diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 16:40:15 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 16:40:15 -0500 |
commit | faddf2f5d278f1656e9444961bdd8d9db4deb5bf (patch) | |
tree | 28a46ab7b92b9cbc8e56068b2f36f7ed13c207c5 /drivers/cpufreq | |
parent | 63ff4d0765a4e30afa659edbf09006987fc62499 (diff) | |
parent | 3baa976ae644f76f5cdb5be0fb26754c3bfb32cb (diff) |
Merge branch 'pm-cpufreq'
* pm-cpufreq:
cpufreq: conservative: fix requested_freq reduction issue
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index f62d822048e6..218460fcd2e4 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -80,13 +80,18 @@ static void cs_check_cpu(int cpu, unsigned int load) | |||
80 | 80 | ||
81 | /* Check for frequency decrease */ | 81 | /* Check for frequency decrease */ |
82 | if (load < cs_tuners->down_threshold) { | 82 | if (load < cs_tuners->down_threshold) { |
83 | unsigned int freq_target; | ||
83 | /* | 84 | /* |
84 | * if we cannot reduce the frequency anymore, break out early | 85 | * if we cannot reduce the frequency anymore, break out early |
85 | */ | 86 | */ |
86 | if (policy->cur == policy->min) | 87 | if (policy->cur == policy->min) |
87 | return; | 88 | return; |
88 | 89 | ||
89 | dbs_info->requested_freq -= get_freq_target(cs_tuners, policy); | 90 | freq_target = get_freq_target(cs_tuners, policy); |
91 | if (dbs_info->requested_freq > freq_target) | ||
92 | dbs_info->requested_freq -= freq_target; | ||
93 | else | ||
94 | dbs_info->requested_freq = policy->min; | ||
90 | 95 | ||
91 | __cpufreq_driver_target(policy, dbs_info->requested_freq, | 96 | __cpufreq_driver_target(policy, dbs_info->requested_freq, |
92 | CPUFREQ_RELATION_L); | 97 | CPUFREQ_RELATION_L); |