Skip to content

Commit

Permalink
cpufreq: interactive: Use default min_sample_time if SDF is zero
Browse files Browse the repository at this point in the history
Use min_sample_time to step down from max frequencies if
sampling_down_factor is set to zero.

Change-Id: I2e89bef6220557cb95efd20d658e0c05753b4c3c
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
  • Loading branch information
Rohit Gupta authored and myfluxi committed Nov 9, 2014
1 parent 7e2b836 commit ad192f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/cpufreq/cpufreq_interactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,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) {
Expand Down

0 comments on commit ad192f8

Please sign in to comment.