forked from rubenslte/android_kernel_samsung_msm8226
thermal: Don't limit CPU frequency after msm_thermal is disabled
There may be an outstanding task to check for threshold crossing when msm_thermal is disabled and CPU is restored to maximum frequency. This task can get scheduled after the maximum frequency is restored, and result in another mitigation that pins CPU frequencies to 918mHz. This happens in the case that the final temperature was still above the max temperature threshold. This patch ensures any outstanding tasks are cancelled and flushed before finally restoring the CPU frequencies. CRs-fixed: 351614 Change-Id: Ifce00b379989b78856803ac09c7403207f5c998b Signed-off-by: Eugene Seah <eseah@codeaurora.org>
This commit is contained in:
@@ -117,6 +117,10 @@ static void disable_msm_thermal(void)
|
||||
int cpu = 0;
|
||||
struct cpufreq_policy *cpu_policy = NULL;
|
||||
|
||||
/* make sure check_temp is no longer running */
|
||||
cancel_delayed_work(&check_temp_work);
|
||||
flush_scheduled_work();
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
cpu_policy = cpufreq_cpu_get(cpu);
|
||||
if (cpu_policy) {
|
||||
|
||||
Reference in New Issue
Block a user