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>
This commit is contained in:
Johnny Liu
2023-07-04 04:09:42 +00:00
committed by mobile promotions
parent 4241a7c976
commit 3db3e1ee88

View File

@@ -510,6 +510,9 @@ static int devfreq_tegra_wmark_event_handler(struct devfreq *df,
devfreq_update_wmark_threshold(df);
break;
case DEVFREQ_GOV_STOP:
wmark_config.upper_wmark_enabled = 0;
wmark_config.lower_wmark_enabled = 0;
drvdata->update_wmark_threshold(df, &wmark_config);
tegra_wmark_exit(df);
break;
case DEVFREQ_GOV_SUSPEND: