diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 22:40:15 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-11-07 22:40:15 +0100 |
commit | faddf2f5d278f1656e9444961bdd8d9db4deb5bf (patch) | |
tree | 28a46ab7b92b9cbc8e56068b2f36f7ed13c207c5 /drivers | |
parent | 63ff4d0765a4e30afa659edbf09006987fc62499 (diff) | |
parent | 3baa976ae644f76f5cdb5be0fb26754c3bfb32cb (diff) | |
download | op-kernel-dev-faddf2f5d278f1656e9444961bdd8d9db4deb5bf.zip op-kernel-dev-faddf2f5d278f1656e9444961bdd8d9db4deb5bf.tar.gz |
Merge branch 'pm-cpufreq'
* pm-cpufreq:
cpufreq: conservative: fix requested_freq reduction issue
Diffstat (limited to 'drivers')
-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 f62d822..218460f 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) /* Check for frequency decrease */ if (load < cs_tuners->down_threshold) { + unsigned int freq_target; /* * if we cannot reduce the frequency anymore, break out early */ if (policy->cur == policy->min) return; - dbs_info->requested_freq -= get_freq_target(cs_tuners, policy); + freq_target = get_freq_target(cs_tuners, policy); + if (dbs_info->requested_freq > freq_target) + dbs_info->requested_freq -= freq_target; + else + dbs_info->requested_freq = policy->min; __cpufreq_driver_target(policy, dbs_info->requested_freq, CPUFREQ_RELATION_L); |