projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a610c81
)
cpufreq: interactive governor: scale to max only if at min speed
author
Todd Poynor
<toddpoynor@google.com>
Fri, 4 Nov 2011 04:22:54 +0000
(21:22 -0700)
committer
Todd Poynor
<toddpoynor@google.com>
Thu, 10 Nov 2011 03:01:44 +0000
(19:01 -0800)
Change-Id: Ieffb2aa56b5290036285c948718be7be0d3af9e8
Signed-off-by: Todd Poynor <toddpoynor@google.com>
drivers/cpufreq/cpufreq_interactive.c
patch
|
blob
|
history
diff --git
a/drivers/cpufreq/cpufreq_interactive.c
b/drivers/cpufreq/cpufreq_interactive.c
index a085fc86733b076fa947000cb625b1acb4226b08..72ae6533a2d47a99c6de946e430f0776aa20521d 100644
(file)
--- a/
drivers/cpufreq/cpufreq_interactive.c
+++ b/
drivers/cpufreq/cpufreq_interactive.c
@@
-159,10
+159,14
@@
static void cpufreq_interactive_timer(unsigned long data)
if (load_since_change > cpu_load)
cpu_load = load_since_change;
- if (cpu_load >= go_maxspeed_load)
- new_freq = pcpu->policy->max;
- else
+ if (cpu_load >= go_maxspeed_load) {
+ if (pcpu->policy->cur == pcpu->policy->min)
+ new_freq = pcpu->policy->max;
+ else
+ new_freq = pcpu->policy->max * cpu_load / 100;
+ } else {
new_freq = pcpu->policy->cur * cpu_load / 100;
+ }
if (cpufreq_frequency_table_target(pcpu->policy, pcpu->freq_table,
new_freq, CPUFREQ_RELATION_H,