Commit Graph

4 Commits

Author SHA1 Message Date
Johnny Liu
e3ce443fc9 devfreq: Migrate to K519 devfreq for tegra_wmark
Since K519, devfreq takes the priority of devfreq_dev_profile to save
the frequency table information and the number of frequency steps.

Therefore, change the implementation of tegra_wmark devfreq governor to
use devfreq to access the frequency table information and the nubmer of
frequency steps instead of devfreq_dev_profile.

Bug 4288411

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ib0affdcc8913642167cd82d45d014c46b51a8c38
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2980425
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-19 03:30:17 -07:00
Johnny Liu
3db3e1ee88 devfreq: Disable watermark when switching governor
Before switching to another governor, tegra_wmark governor should
disable watermarks so that watermark interrupts won't get triggered and
occupy the CPU resource.

Bug 4180241

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I7aa5611445153b63e4849f4c077ef5fa9fbf4c88
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2930457
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-05 14:55:56 -07:00
Johnny Liu
0da771f275 devfreq: Support suspend and resume in tegra_wmark
When devfreq_suspend_device get called, tegra_wmark will disable the
upper and lower watermark thresholds so that no DFS logic get triggered
after the suspension.

When devfreq_resume_device get called, tegra_wmark will enable back the
upper and lower watermark thresholds so that interrupt-driven DFS logic
can work properly.

Bug 4168788

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I98fa1487db26fdfe95f5c958dbe15bf0f49035d5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927019
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-28 02:06:25 -07:00
Johnny Liu
d06443deae devfreq: Add tegra_wmark governor
The tegra_wmark governor can be used e.g. with DRM clients, such as VIC,
NVDEC, NVENC, and NVJPG. This governor tightly collaborates with the
actmon hardware used for monitoring the active time of the underlying
DRM clients.

Bug 3788919

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ie4d4c2b173615aa239436fbb1545118435629d38
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894529
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-09 22:27:14 -07:00