cpufreq: interactive: base above_hispeed_delay on target freq, not current
authorTodd Poynor <toddpoynor@google.com>
Fri, 22 Mar 2013 03:46:00 +0000 (20:46 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:54 +0000 (13:52 -0800)
Time to wait should be based on the intended target speed, not the
actual speed (which may be held high by another CPU).

Change-Id: Ifc5bb55d06adddb9a02af90af05398a78f282272
Reported-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
drivers/cpufreq/cpufreq_interactive.c

index 3dc067e6eb45b758e8f9d5bcbb3ef469afdf61ee..9dd4d38f2c9e2379d8d4565223e6afd4b148dfe0 100644 (file)
@@ -377,7 +377,7 @@ static void cpufreq_interactive_timer(unsigned long data)
        if (pcpu->target_freq >= hispeed_freq &&
            new_freq > pcpu->target_freq &&
            now - pcpu->hispeed_validate_time <
-           freq_to_above_hispeed_delay(pcpu->policy->cur)) {
+           freq_to_above_hispeed_delay(pcpu->target_freq)) {
                trace_cpufreq_interactive_notyet(
                        data, cpu_load, pcpu->target_freq,
                        pcpu->policy->cur, new_freq);