summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-01-28 19:07:10 +0800
committerZhao Wei Liew <zhaoweiliew@gmail.com>2016-02-15 17:46:56 +0800
commitaa4bce34e2b1abe11739dfae3e93b5c6c2134fc0 (patch)
treeb14c0a440104d2f147884e9b4556f6f944a237af
parentb3d392d5f5bef5f5b4358f61ea71b4fdb3004aed (diff)
flo: Boost smarter
Reduce the unnecessary boosting by boosting CPU frequencies only when really necessary. Accomplish this by: * Boost only to 1.1 GHz for the duration of an ondemand sample whenever a touch input is registered. * Boost to 1 GHz for 3 seconds for CPU_BOOST and LAUNCH_BOOST hints, both of which are important UX moments. Change-Id: I06c2e7d662418a6cc1530e2887dd11d87a6e6309
-rw-r--r--init.flo.power.rc1
-rw-r--r--power/power_flo.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/init.flo.power.rc b/init.flo.power.rc
index 7d9ac2f..83bd08f 100644
--- a/init.flo.power.rc
+++ b/init.flo.power.rc
@@ -28,6 +28,7 @@ on post-fs-data
write /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core 3
write /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq 918000
write /sys/devices/system/cpu/cpufreq/ondemand/sync_freq 1026000
+ write /sys/devices/system/cpu/cpufreq/ondemand/input_boost 1134000
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load 80
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 384000
diff --git a/power/power_flo.c b/power/power_flo.c
index 957f2f4..c4112af 100644
--- a/power/power_flo.c
+++ b/power/power_flo.c
@@ -332,7 +332,8 @@ static void power_hint( __attribute__((unused)) struct power_module *module,
int cpu, ret;
switch (hint) {
- case POWER_HINT_INTERACTION:
+ case POWER_HINT_LAUNCH_BOOST:
+ case POWER_HINT_CPU_BOOST:
ALOGD("POWER_HINT_INTERACTION");
touch_boost();
break;