Skip to content

Commit fb51ec5

Browse files
johnnysltFlyhalf205
authored andcommitted
msm: cpufreq: boost freq of online cpu(s) to max on resume
Resume events cause several tasks to initiate such as WiFi connect, data sync, etc. that require cpu cycles. Instead of waiting for the cpu governor to increase the cpu frequency which occur after an unpleasant delay, start at the max frequency and the cpu governor will scale the frequency back as soon as possible. This shouldn't have any noticeable impact on battery life. credit: mrg666
1 parent 90783b6 commit fb51ec5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/arm/mach-msm/cpufreq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,13 @@ static int msm_cpufreq_suspend(void)
479479
static int msm_cpufreq_resume(void)
480480
{
481481
int cpu;
482+
struct cpufreq_policy policy;
482483

483484
for_each_possible_cpu(cpu) {
484485
per_cpu(cpufreq_suspend, cpu).device_suspended = 0;
486+
cpufreq_get_policy(&policy, cpu);
487+
if (cpu_online(cpu))
488+
acpuclk_set_rate(cpu, policy.max, SETRATE_CPUFREQ);
485489
}
486490

487491
return NOTIFY_DONE;

0 commit comments

Comments
 (0)