mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
df0489a1e0
commit
0da771f275
@@ -497,6 +497,8 @@ static int devfreq_tegra_wmark_event_handler(struct devfreq *df,
|
||||
unsigned int event,
|
||||
void *data)
|
||||
{
|
||||
struct devfreq_tegra_wmark_data *drvdata = df->data;
|
||||
struct devfreq_tegra_wmark_config wmark_config;
|
||||
int err;
|
||||
|
||||
switch (event) {
|
||||
@@ -510,6 +512,14 @@ static int devfreq_tegra_wmark_event_handler(struct devfreq *df,
|
||||
case DEVFREQ_GOV_STOP:
|
||||
tegra_wmark_exit(df);
|
||||
break;
|
||||
case DEVFREQ_GOV_SUSPEND:
|
||||
wmark_config.upper_wmark_enabled = 0;
|
||||
wmark_config.lower_wmark_enabled = 0;
|
||||
drvdata->update_wmark_threshold(df, &wmark_config);
|
||||
break;
|
||||
case DEVFREQ_GOV_RESUME:
|
||||
devfreq_update_wmark_threshold(df);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user