mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
drm/tegra: Resume device frequency with Fmax
Avoid using suspend_freq to set the Fmax for the device, since it will re-enable the actmon watermark interrupts again if the suspend_freq is not zero in the devfreq_suspend_device call. Since we want to make sure device is running at Fmax but avoid using suspend_freq, we can forcelly override the resume_freq with the scaling_max_freq to reach the same effect. Bug 4271562 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Change-Id: Ia19a7ef9de14643abf1b174b6180e40a847de132 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2974074 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ebf51c43ae
commit
837b275df5
@@ -289,7 +289,6 @@ static int nvdec_devfreq_init(struct nvdec *nvdec)
|
|||||||
if (IS_ERR(devfreq))
|
if (IS_ERR(devfreq))
|
||||||
return PTR_ERR(devfreq);
|
return PTR_ERR(devfreq);
|
||||||
|
|
||||||
devfreq->suspend_freq = max_rate;
|
|
||||||
nvdec->devfreq = devfreq;
|
nvdec->devfreq = devfreq;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -581,6 +580,8 @@ static __maybe_unused int nvdec_runtime_resume(struct device *dev)
|
|||||||
goto disable;
|
goto disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Forcely set frequency as Fmax when device is resumed back */
|
||||||
|
nvdec->devfreq->resume_freq = nvdec->devfreq->scaling_max_freq;
|
||||||
err = devfreq_resume_device(nvdec->devfreq);
|
err = devfreq_resume_device(nvdec->devfreq);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto disable;
|
goto disable;
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ static int nvenc_devfreq_init(struct nvenc *nvenc)
|
|||||||
if (IS_ERR(devfreq))
|
if (IS_ERR(devfreq))
|
||||||
return PTR_ERR(devfreq);
|
return PTR_ERR(devfreq);
|
||||||
|
|
||||||
devfreq->suspend_freq = max_rate;
|
|
||||||
nvenc->devfreq = devfreq;
|
nvenc->devfreq = devfreq;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -471,6 +470,8 @@ static __maybe_unused int nvenc_runtime_resume(struct device *dev)
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto disable;
|
goto disable;
|
||||||
|
|
||||||
|
/* Forcely set frequency as Fmax when device is resumed back */
|
||||||
|
nvenc->devfreq->resume_freq = nvenc->devfreq->scaling_max_freq;
|
||||||
err = devfreq_resume_device(nvenc->devfreq);
|
err = devfreq_resume_device(nvenc->devfreq);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto disable;
|
goto disable;
|
||||||
|
|||||||
@@ -212,7 +212,6 @@ static int nvjpg_devfreq_init(struct nvjpg *nvjpg)
|
|||||||
if (IS_ERR(devfreq))
|
if (IS_ERR(devfreq))
|
||||||
return PTR_ERR(devfreq);
|
return PTR_ERR(devfreq);
|
||||||
|
|
||||||
devfreq->suspend_freq = max_rate;
|
|
||||||
nvjpg->devfreq = devfreq;
|
nvjpg->devfreq = devfreq;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -470,6 +469,8 @@ static __maybe_unused int nvjpg_runtime_resume(struct device *dev)
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto disable;
|
goto disable;
|
||||||
|
|
||||||
|
/* Forcely set frequency as Fmax when device is resumed back */
|
||||||
|
nvjpg->devfreq->resume_freq = nvjpg->devfreq->scaling_max_freq;
|
||||||
err = devfreq_resume_device(nvjpg->devfreq);
|
err = devfreq_resume_device(nvjpg->devfreq);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto disable;
|
goto disable;
|
||||||
|
|||||||
@@ -231,7 +231,6 @@ static int vic_devfreq_init(struct vic *vic)
|
|||||||
if (IS_ERR(devfreq))
|
if (IS_ERR(devfreq))
|
||||||
return PTR_ERR(devfreq);
|
return PTR_ERR(devfreq);
|
||||||
|
|
||||||
devfreq->suspend_freq = max_rate;
|
|
||||||
vic->devfreq = devfreq;
|
vic->devfreq = devfreq;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -528,6 +527,8 @@ static int __maybe_unused vic_runtime_resume(struct device *dev)
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto assert;
|
goto assert;
|
||||||
|
|
||||||
|
/* Forcely set frequency as Fmax when device is resumed back */
|
||||||
|
vic->devfreq->resume_freq = vic->devfreq->scaling_max_freq;
|
||||||
err = devfreq_resume_device(vic->devfreq);
|
err = devfreq_resume_device(vic->devfreq);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto assert;
|
goto assert;
|
||||||
|
|||||||
Reference in New Issue
Block a user