aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 18d409189092..ad3f38fd3eb9 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -170,21 +170,24 @@ static void od_check_cpu(int cpu, unsigned int load)
170 dbs_freq_increase(policy, policy->max); 170 dbs_freq_increase(policy, policy->max);
171 } else { 171 } else {
172 /* Calculate the next frequency proportional to load */ 172 /* Calculate the next frequency proportional to load */
173 unsigned int freq_next; 173 unsigned int freq_next, min_f, max_f;
174 freq_next = load * policy->cpuinfo.max_freq / 100; 174
175 min_f = policy->cpuinfo.min_freq;
176 max_f = policy->cpuinfo.max_freq;
177 freq_next = min_f + load * (max_f - min_f) / 100;
175 178
176 /* No longer fully busy, reset rate_mult */ 179 /* No longer fully busy, reset rate_mult */
177 dbs_info->rate_mult = 1; 180 dbs_info->rate_mult = 1;
178 181
179 if (!od_tuners->powersave_bias) { 182 if (!od_tuners->powersave_bias) {
180 __cpufreq_driver_target(policy, freq_next, 183 __cpufreq_driver_target(policy, freq_next,
181 CPUFREQ_RELATION_L); 184 CPUFREQ_RELATION_C);
182 return; 185 return;
183 } 186 }
184 187
185 freq_next = od_ops.powersave_bias_target(policy, freq_next, 188 freq_next = od_ops.powersave_bias_target(policy, freq_next,
186 CPUFREQ_RELATION_L); 189 CPUFREQ_RELATION_L);
187 __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L); 190 __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_C);
188 } 191 }
189} 192}
190 193