diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 7d7244314ac9..6dc83808e590 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -333,6 +333,10 @@ static void dbs_check_cpu(int cpu) | |||
333 | usecs_to_jiffies(dbs_tuners_ins.sampling_rate); | 333 | usecs_to_jiffies(dbs_tuners_ins.sampling_rate); |
334 | 334 | ||
335 | if (idle_ticks < up_idle_ticks) { | 335 | if (idle_ticks < up_idle_ticks) { |
336 | /* if we are already at full speed then break out early */ | ||
337 | if (policy->cur == policy->max) | ||
338 | return; | ||
339 | |||
336 | __cpufreq_driver_target(policy, policy->max, | 340 | __cpufreq_driver_target(policy, policy->max, |
337 | CPUFREQ_RELATION_H); | 341 | CPUFREQ_RELATION_H); |
338 | down_skip[cpu] = 0; | 342 | down_skip[cpu] = 0; |
@@ -386,6 +390,10 @@ static void dbs_check_cpu(int cpu) | |||
386 | usecs_to_jiffies(freq_down_sampling_rate); | 390 | usecs_to_jiffies(freq_down_sampling_rate); |
387 | 391 | ||
388 | if (idle_ticks > down_idle_ticks ) { | 392 | if (idle_ticks > down_idle_ticks ) { |
393 | /* if we are already at the lowest speed then break out early */ | ||
394 | if (policy->cur == policy->min) | ||
395 | return; | ||
396 | |||
389 | freq_down_step = (5 * policy->max) / 100; | 397 | freq_down_step = (5 * policy->max) / 100; |
390 | 398 | ||
391 | /* max freq cannot be less than 100. But who knows.... */ | 399 | /* max freq cannot be less than 100. But who knows.... */ |