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
This commit is contained in:
Zhao Wei Liew 2016-01-28 19:07:10 +08:00 committed by followmsi
parent 146e92e204
commit e4d0502b37
2 changed files with 3 additions and 1 deletions

View File

@ -230,6 +230,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
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 384000

View File

@ -282,7 +282,8 @@ static void power_hint( __attribute__((unused)) struct power_module *module,
return;
switch (hint) {
case POWER_HINT_INTERACTION:
case POWER_HINT_LAUNCH_BOOST:
case POWER_HINT_CPU_BOOST:
ALOGV("POWER_HINT_INTERACTION");
touch_boost();
break;