From: Minsung Kim Date: Sat, 29 Nov 2014 12:43:53 +0000 (+0900) Subject: cpufreq: interactive: don't skip waking up speedchange_task if target_freq > policy... X-Git-Tag: firefly_0821_release~2958^2~248 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b4d5f59680e7c7101dec8c84514cd4eb0f7fb0a;p=firefly-linux-kernel-4.4.55.git cpufreq: interactive: don't skip waking up speedchange_task if target_freq > policy->cur When __cpufreq_driver_target() in speedchange_task failed for some reason, the policy->cur could be lower than the target_freq. The governor misses to change the target_freq if the target_freq is equal to the next_freq at the next sample time. Added a check to prevent the CPU to stay at the speed that is lower than the target_freq for long duration. Change-Id: Ibfdcd193b8280390b8f8374a63218aa31267f310 Signed-off-by: Minsung Kim --- diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index a0a7c3aef859..5121976ade55 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -432,7 +432,8 @@ static void cpufreq_interactive_timer(unsigned long data) pcpu->floor_validate_time = now; } - if (pcpu->target_freq == new_freq) { + if (pcpu->target_freq == new_freq && + pcpu->target_freq <= pcpu->policy->cur) { trace_cpufreq_interactive_already( data, cpu_load, pcpu->target_freq, pcpu->policy->cur, new_freq);