drm/tegra: Derive count weight from max freq

The original resume_freq will be overridden when the device is put
into suspend mode. Therefore, the resume cycle won't always use the
max frequency of the device to set the actmon count weight.

Change the implementation to use scaling_max_freq to always use the
max frequency of the device to set the actmon count weight.

Bug 4252125

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iaaae8ada989cd1ed7dd728fb526ad4391a2f192c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2967098
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Johnny Liu
2023-08-24 03:52:16 +00:00
committed by mobile promotions
parent 1435b03c66
commit a588ad882d
4 changed files with 4 additions and 4 deletions

View File

@@ -588,7 +588,7 @@ static __maybe_unused int nvdec_runtime_resume(struct device *dev)
nvdec_actmon_reg_init(nvdec);
nvdec_count_weight_init(nvdec, nvdec->devfreq->resume_freq);
nvdec_count_weight_init(nvdec, nvdec->devfreq->scaling_max_freq);
host1x_actmon_enable(&nvdec->client.base);

View File

@@ -478,7 +478,7 @@ static __maybe_unused int nvenc_runtime_resume(struct device *dev)
nvenc_actmon_reg_init(nvenc);
nvenc_count_weight_init(nvenc, nvenc->devfreq->resume_freq);
nvenc_count_weight_init(nvenc, nvenc->devfreq->scaling_max_freq);
host1x_actmon_enable(&nvenc->client.base);

View File

@@ -477,7 +477,7 @@ static __maybe_unused int nvjpg_runtime_resume(struct device *dev)
nvjpg_actmon_reg_init(nvjpg);
nvjpg_count_weight_init(nvjpg, nvjpg->devfreq->resume_freq);
nvjpg_count_weight_init(nvjpg, nvjpg->devfreq->scaling_max_freq);
host1x_actmon_enable(&nvjpg->client.base);

View File

@@ -535,7 +535,7 @@ static int __maybe_unused vic_runtime_resume(struct device *dev)
vic_actmon_reg_init(vic);
vic_count_weight_init(vic, vic->devfreq->resume_freq);
vic_count_weight_init(vic, vic->devfreq->scaling_max_freq);
host1x_actmon_enable(&vic->client.base);