Commit fd2290d4 authored by voron00's avatar voron00 Committed by Alexey Ilin

mako: rewrite init.mako.power.rc

 - Boot with noop and large readahed, set to bfq and default after boot complete.
 - Add interactive tunables and tune-up to slightly reduce power usage.

Change-Id: I9f247ef5cfcf3b59bd2d5a6e8fe811ef5ed9d502
parent 42433bfc
on enable-low-power
# Enable Power modes and set the CPU Freq Sampling rates
on early-init
write /sys/block/mmcblk0/queue/scheduler noop
write /sys/block/mmcblk0/queue/read_ahead_kb 2048
on boot
write /sys/module/rpm_resources/enable_low_power/L2_cache 1
write /sys/module/rpm_resources/enable_low_power/pxo 1
write /sys/module/rpm_resources/enable_low_power/vdd_dig 1
......@@ -36,55 +39,27 @@ on enable-low-power
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 384000
write /dev/cpuctl/cpu.notify_on_migrate 1
on charger
# Enable Power modes and set the CPU Freq Sampling rates
write /sys/module/rpm_resources/enable_low_power/L2_cache 1
write /sys/module/rpm_resources/enable_low_power/pxo 1
write /sys/module/rpm_resources/enable_low_power/vdd_dig 1
write /sys/module/rpm_resources/enable_low_power/vdd_mem 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1512000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1512000
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 1512000
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 1512000
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/cpufreq/interactive/above_hispeed_delay 0
write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 100
write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1512000
write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1
write /sys/devices/system/cpu/cpufreq/interactive/target_loads "35 486000:40 702000:45 1026000:60 1134000:70 1242000:75 1458000:85 1512000:95"
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 60000
write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 40000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpufreq/interactive/boost 1
write /sys/devices/system/cpu/cpufreq/interactive/input_boost_freq 1242000
write /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration 1000000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 384000
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 0
write /sys/devices/system/cpu/cpu2/online 0
write /sys/devices/system/cpu/cpu3/online 0
on boot
trigger enable-low-power
on property:init.svc.recovery=running
trigger enable-low-power
on property:recovery.perf.mode=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
on property:recovery.perf.mode=0
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
write /dev/cpuctl/cpu.notify_on_migrate 1
on property:dev.bootcomplete=1
setprop sys.io.scheduler bfq
on property:sys.boot_completed=1
write /sys/block/mmcblk0/queue/scheduler bfq
write /sys/block/mmcblk0/queue/read_ahead_kb 128
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment