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

Commit 24d3ed23 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

cpufreq: interactive: Use default min_sample_time if SDF is zero



Use min_sample_time to step down from max frequencies if
sampling_down_factor is set to zero.

Change-Id: I2e89bef6220557cb95efd20d658e0c05753b4c3c
Signed-off-by: default avatarRohit Gupta <rohgup@codeaurora.org>
parent 446a396c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -471,11 +471,10 @@ static void cpufreq_interactive_timer(unsigned long data)
	 * Do not scale below floor_freq unless we have been at or above the
	 * floor frequency for the minimum sample time since last validated.
	 */
	if (pcpu->policy->cur == pcpu->policy->max) {
	if (sampling_down_factor && pcpu->policy->cur == pcpu->policy->max)
		mod_min_sample_time = sampling_down_factor;
	} else {
	else
		mod_min_sample_time = min_sample_time;
	}

	if (new_freq < pcpu->floor_freq) {
		if (now - pcpu->floor_validate_time < mod_min_sample_time) {