aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChirayu Desai <chirayudesai1@gmail.com>2015-07-02 19:24:08 +0530
committerChirayu Desai <chirayudesai1@gmail.com>2015-07-16 20:34:25 +0530
commitf6a8d8917ab8e287af52c60763ed300c2ccf9d13 (patch)
treee0537d14ee57522982fce377ed722944d8f0cfc5
parent094461216a5ad9bdb1771e3de6d0def7635e42e8 (diff)
msm8916: Update power script
* Move to it's own file * Speed up IO performance * Enable perfd after boot complete * Bring in line with QC 1.2.5_rb2.5 Change-Id: I3a4734533b45b2f5e4653601960545ef2462dbcb
-rw-r--r--msm8916.mk1
-rw-r--r--rootdir/Android.mk11
-rw-r--r--rootdir/etc/init.qcom.power.rc54
-rw-r--r--rootdir/etc/init.qcom.rc84
-rw-r--r--rootdir/etc/init.recovery.qcom.rc23
5 files changed, 66 insertions, 107 deletions
diff --git a/msm8916.mk b/msm8916.mk
index f8cc047..ff22cd3 100644
--- a/msm8916.mk
+++ b/msm8916.mk
@@ -148,6 +148,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
fstab.qcom \
init.qcom.rc \
+ init.qcom.power.rc \
init.qcom.usb.rc \
init.recovery.qcom.rc \
ueventd.qcom.rc
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index 3188882..ef18378 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -42,6 +42,14 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.power.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.power.rc
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
@@ -49,11 +57,12 @@ LOCAL_SRC_FILES := etc/init.qcom.usb.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
+# Copy the power config for recovery too
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.qcom.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := etc/init.recovery.qcom.rc
+LOCAL_SRC_FILES := etc/init.qcom.power.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc
new file mode 100644
index 0000000..0f7f49c
--- /dev/null
+++ b/rootdir/etc/init.qcom.power.rc
@@ -0,0 +1,54 @@
+on early-init
+
+ write /sys/block/mmcblk0/bdi/read_ahead_kb 512
+
+on boot
+
+ write /proc/sys/vm/dirty_ratio 5
+ write /proc/sys/vm/dirty_background_ratio 1
+ write /proc/sys/kernel/sched_boost 1
+
+ write /sys/module/lpm_levels/parameters/sleep_disabled 0
+
+ # HMP scheduler load tracking settings
+ write /proc/sys/kernel/sched_ravg_hist_size 3
+
+ # HMP Task packing settings for 8916
+ write /proc/sys/kernel/sched_small_task 20
+ write /proc/sys/kernel/sched_mostly_idle_load 30
+ write /proc/sys/kernel/sched_mostly_idle_nr_run 3
+
+ # disable thermal core_control to update interactive governor settings
+ write /sys/module/msm_thermal/core_control/enabled 0
+
+ # enable governor
+ write /sys/devices/system/cpu/cpu0/online 1
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 800000
+ write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "25000 1094400:50000"
+ write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90
+ write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000
+ write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 998400
+ write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
+ write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 50000
+ write /sys/devices/system/cpu/cpufreq/interactive/target_loads "1 800000:85 998400:90 1094400:80"
+ write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 50000
+
+ # enable thermal core_control now
+ write /sys/module/msm_thermal/core_control/enabled 1
+
+ write /proc/sys/kernel/sched_window_stats_policy 2
+ write /proc/sys/kernel/sched_ravg_hist_size 5
+
+on charger
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
+
+on property:sys.boot_completed=1
+ write /sys/block/mmcblk0/queue/scheduler row
+
+ # bring all CPUs online
+ write /sys/devices/system/cpu/cpu1/online 1
+ write /sys/devices/system/cpu/cpu2/online 1
+ write /sys/devices/system/cpu/cpu3/online 1
+
+ start perfd
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 084672e..4f5f31b 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -25,6 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+import init.qcom.power.rc
import init.qcom.usb.rc
import init.target.rc
@@ -33,8 +34,6 @@ on early-init
mkdir /firmware 0771 system system
mkdir /system 0777 root root
symlink /data/tombstones /tombstones
- write /sys/block/mmcblk0/queue/scheduler noop
- write /sys/block/mmcblk0/bdi/read_ahead_kb 512
on init
# Set permissions for persist partition
@@ -310,65 +309,6 @@ on boot
chown system system /sys/devices/virtual/graphics/fb0/rgb
chmod 0660 /sys/devices/virtual/graphics/fb0/rgb
-on property:service.bootanim.exit=1
- write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/l2-pc/idle_enabled Y
- write /sys/module/lpm_levels/system/l2-cache-active/idle_enabled Y
- write /sys/module/lpm_levels/system/l2-pc/suspend_enabled Y
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
-
- write /sys/module/lpm_levels/parameters/sleep_disabled 0
-
-on property:init.svc.bootanim=stopped
- # Apply HMP task packing
- write /proc/sys/kernel/sched_small_task 20
- write /proc/sys/kernel/sched_mostly_idle_load 30
- write /proc/sys/kernel/sched_mostly_idle_nr_run 3
-
- # enable governor
- write /sys/module/msm_thermal/core_control/enabled 0
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 800000
- write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1094400:50000"
- write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 85
- write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1094400
- write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
- write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 50000
- write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 50000
- write /sys/devices/system/cpu/cpufreq/interactive/target_loads "1 1094400:85 1152000:90 1209600:80"
- write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
- write /sys/module/msm_thermal/core_control/enabled 1
-
- # bring all CPUs online
- 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 /proc/sys/kernel/sched_window_stats_policy 2
- write /proc/sys/kernel/sched_ravg_hist_size 5
-
- write /sys/module/cpu_boost/parameters/boost_ms 20
- write /sys/module/cpu_boost/parameters/input_boost_freq "0:1094400 1:1094400 2:1094400 3:1094400"
- write /sys/module/cpu_boost/parameters/sched_boost_on_input 1
-
- write /sys/block/mmcblk0/queue/scheduler row
- start perfd
-
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
@@ -616,28 +556,6 @@ service audiod /system/bin/audiod
user system
group system
-on charger
- write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled N
- write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/l2-pc/idle_enabled Y
- write /sys/module/lpm_levels/system/l2-cache-active/idle_enabled Y
- write /sys/module/lpm_levels/system/l2-pc/suspend_enabled Y
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
-
service ppd /system/bin/mm-pp-daemon
class late_start
disabled
diff --git a/rootdir/etc/init.recovery.qcom.rc b/rootdir/etc/init.recovery.qcom.rc
deleted file mode 100644
index 70725f2..0000000
--- a/rootdir/etc/init.recovery.qcom.rc
+++ /dev/null
@@ -1,23 +0,0 @@
-on boot
- write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled Y
- write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled Y
- write /sys/module/lpm_levels/system/l2-pc/idle_enabled Y
- write /sys/module/lpm_levels/system/l2-cache-active/idle_enabled Y
- write /sys/module/lpm_levels/system/l2-pc/suspend_enabled Y
-
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand"
-