From 40d33ae6b9b1730ff18c6cfb1aeb6e631763c90b Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Wed, 8 Oct 2014 17:23:28 -0500 Subject: [PATCH] Add CPU performance profiles --- recovery/etc/init.recovery.qcom.rc | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/recovery/etc/init.recovery.qcom.rc b/recovery/etc/init.recovery.qcom.rc index 0fdb3d7..8f1fb55 100644 --- a/recovery/etc/init.recovery.qcom.rc +++ b/recovery/etc/init.recovery.qcom.rc @@ -15,14 +15,28 @@ on boot write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 384000 write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 384000 write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu1/online 1 - write /sys/devices/system/cpu/cpu2/online 0 - write /sys/devices/system/cpu/cpu3/online 0 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand" - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "ondemand" + setprop recovery.perf.mode 0 start choice_fn start chargeled +on property:recovery.perf.mode=0 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu1/online 0 + write /sys/devices/system/cpu/cpu2/online 0 + write /sys/devices/system/cpu/cpu3/online 0 + +on property:recovery.perf.mode=1 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance" + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance" + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "performance" + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "performance" + service choice_fn /sbin/choice_fn disabled