diff options
| -rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index e1314212d8d4..fecfcdda6ddd 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
| @@ -459,6 +459,17 @@ static struct attribute_group dbs_attr_group_old = { | |||
| 459 | 459 | ||
| 460 | /************************** sysfs end ************************/ | 460 | /************************** sysfs end ************************/ |
| 461 | 461 | ||
| 462 | static void dbs_freq_increase(struct cpufreq_policy *p, unsigned int freq) | ||
| 463 | { | ||
| 464 | if (dbs_tuners_ins.powersave_bias) | ||
| 465 | freq = powersave_bias_target(p, freq, CPUFREQ_RELATION_H); | ||
| 466 | else if (p->cur == p->max) | ||
| 467 | return; | ||
| 468 | |||
| 469 | __cpufreq_driver_target(p, freq, dbs_tuners_ins.powersave_bias ? | ||
| 470 | CPUFREQ_RELATION_L : CPUFREQ_RELATION_H); | ||
| 471 | } | ||
| 472 | |||
| 462 | static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) | 473 | static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) |
| 463 | { | 474 | { |
| 464 | unsigned int max_load_freq; | 475 | unsigned int max_load_freq; |
| @@ -551,19 +562,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) | |||
| 551 | 562 | ||
| 552 | /* Check for frequency increase */ | 563 | /* Check for frequency increase */ |
| 553 | if (max_load_freq > dbs_tuners_ins.up_threshold * policy->cur) { | 564 | if (max_load_freq > dbs_tuners_ins.up_threshold * policy->cur) { |
| 554 | /* if we are already at full speed then break out early */ | 565 | dbs_freq_increase(policy, policy->max); |
| 555 | if (!dbs_tuners_ins.powersave_bias) { | ||
| 556 | if (policy->cur == policy->max) | ||
| 557 | return; | ||
| 558 | |||
| 559 | __cpufreq_driver_target(policy, policy->max, | ||
| 560 | CPUFREQ_RELATION_H); | ||
| 561 | } else { | ||
| 562 | int freq = powersave_bias_target(policy, policy->max, | ||
| 563 | CPUFREQ_RELATION_H); | ||
| 564 | __cpufreq_driver_target(policy, freq, | ||
| 565 | CPUFREQ_RELATION_L); | ||
| 566 | } | ||
| 567 | return; | 566 | return; |
| 568 | } | 567 | } |
| 569 | 568 | ||
