diff options
author | Sai Gurrappadi <sgurrappadi@nvidia.com> | 2014-03-26 17:58:10 -0700 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-04-29 11:28:44 -0700 |
commit | a2980c85b35b48eb65152e00aaefef4d2881a3d3 (patch) | |
tree | eb97d98cc9eb208b392e18033dd25fcb5688a663 /drivers/cpufreq | |
parent | 9e1a73fb047af8fa4b4673cb1795bfd9bf57466d (diff) |
cpufreq: interactive: Fix hispeed_freq boost
Select the maximum of the result from choose_freq and hispeed_freq
instead of always assuming choose_freq would return a target less than
hispeed_freq.
Bug 1470007
Change-Id: Ida51812f2d78a07f53f718ba8bfc64786753dca0
Reviewed-on: http://git-master/r/392000
(cherry picked from commit fbb619558c5dcd0aee2e5cda490b9824fb4fdaab)
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/401045
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq_interactive.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index b4c21feea256..e6bef7c8a18f 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -2,7 +2,7 @@ * drivers/cpufreq/cpufreq_interactive.c * * Copyright (C) 2010 Google, Inc. - * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -383,21 +383,13 @@ static void cpufreq_interactive_timer(unsigned long data) cpu_load = loadadjfreq / pcpu->target_freq; boosted = tunables->boost_val || now < tunables->boostpulse_endtime; + new_freq = choose_freq(pcpu, loadadjfreq); if (cpu_load >= tunables->go_hispeed_load || boosted) { - if (pcpu->target_freq < tunables->hispeed_freq) { - if (tunables->boost_factor) - new_freq = min((pcpu->target_freq + new_freq = max(new_freq, tunables->hispeed_freq); + if (pcpu->target_freq < tunables->hispeed_freq && + tunables->boost_factor) + new_freq = min((pcpu->target_freq * tunables->boost_factor), tunables->hispeed_freq); - else - new_freq = tunables->hispeed_freq; - } else { - new_freq = choose_freq(pcpu, loadadjfreq); - - if (new_freq < tunables->hispeed_freq) - new_freq = tunables->hispeed_freq; - } - } else { - new_freq = choose_freq(pcpu, loadadjfreq); } if (pcpu->target_freq >= tunables->hispeed_freq && |