]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: cpufreq: cpu_thermal only allows lower max frequency, fix it
authorSonny Rao <sonnyrao@chromium.org>
Fri, 14 Dec 2012 22:48:30 +0000 (14:48 -0800)
committerGerrit <chrome-bot@google.com>
Tue, 18 Dec 2012 03:01:02 +0000 (19:01 -0800)
The cpu_thermal generic thermal management code has a bug where once
max cpu frequency has been lowered in sysfs (scaling_max_freq) it is
not possible to raise the max back up later.  The bug is that the
notifer gets called by __cpufreq_set_policy() before the user policy
max is raised, and is incorrectly trying to enforce the max frequency
policy even when we are trying to change the policy.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chromium-os:36435
TEST=kernel_CpufreqMinMax

Change-Id: I12ad4ef5aad544333cad4a9ff1e81f04d1cfa5e8
Reviewed-on: https://gerrit.chromium.org/gerrit/39793
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
drivers/thermal/cpu_cooling.c

index c40d9a09929aeaf61e196ac4bd85d98dd808e93f..551d3f2e3f639f10c98b1b77b2f4593e532f3f11 100644 (file)
@@ -270,10 +270,6 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
                }
        }
 
-       /* Never exceed user_policy.max*/
-       if (max_freq > policy->user_policy.max)
-               max_freq = policy->user_policy.max;
-
        if (policy->max != max_freq)
                cpufreq_verify_within_limits(policy, 0, max_freq);