Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb84e533 authored by Todd Poynor's avatar Todd Poynor Committed by Amit Pundir
Browse files

cpufreq: interactive: fix boosting logic



35a84de cpufreq: interactive: apply above_hispeed_delay to each step above hispeed

caused the speed choice logic to osciallate between boosting and not boosting.
Add back code to ensure speed does not drop below boost frequency while
boosting.

Change-Id: Id420068480fcc7f5c4989ff523e2a8d22e2f4db2
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
parent 47078403
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -298,11 +298,18 @@ static void cpufreq_interactive_timer(unsigned long data)
	cpu_load = loadadjfreq / pcpu->target_freq;
	boosted = boost_val || now < boostpulse_endtime;

	if ((cpu_load >= go_hispeed_load || boosted) &&
	    pcpu->target_freq < hispeed_freq)
	if (cpu_load >= go_hispeed_load || boosted) {
		if (pcpu->target_freq < hispeed_freq) {
			new_freq = hispeed_freq;
		} else {
			new_freq = choose_freq(pcpu, loadadjfreq);

			if (new_freq < hispeed_freq)
				new_freq = hispeed_freq;
	else
		}
	} else {
		new_freq = choose_freq(pcpu, loadadjfreq);
	}

	if (pcpu->target_freq >= hispeed_freq &&
	    new_freq > pcpu->target_freq &&