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

Commit ec0ab3fc authored by Todd Poynor's avatar Todd Poynor Committed by Ruchi Kandoi
Browse files

cpufreq: interactive: always limit initial speed bump to hispeed



First bump speed up to hispeed_freq whenever the current speed is below
hispeed_freq, instead of only when the current speed is the minimum speed.
The previous code made it too difficult to use hispeed_freq as a common
intermediate speed on systems that frequently run at speeds between
minimum and hispeed_freq.

Change-Id: I04ec30bafabf5741e267ff289209b8c2d846824b
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
parent 07eafd99
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -178,7 +178,8 @@ static void cpufreq_interactive_timer(unsigned long data)
		cpu_load = load_since_change;

	if (cpu_load >= go_hispeed_load || boost_val) {
		if (pcpu->target_freq <= pcpu->policy->min) {
		if (pcpu->target_freq < hispeed_freq &&
		    hispeed_freq < pcpu->policy->max) {
			new_freq = hispeed_freq;
		} else {
			new_freq = pcpu->policy->max * cpu_load / 100;