From 22d1715635268f7cbeb9702594c2ea4280041a57 Mon Sep 17 00:00:00 2001 From: Steven Lay Date: Mon, 3 Jul 2017 04:33:58 +0000 Subject: shinano-common: revert CPUQuiet infrastructure As we are returning to MPDecision. * Restore MPDecision service * Remove CPUQuiet related ueventd rules * Remove RQBalance configuration file * Interactive CPUFreq settings based on Bacon Change-Id: If6cf04841083be2f3ded50c4f20d600f0c74d339 --- rootdir/init.qcom.power.rc | 132 ++++++++------------------------ rootdir/init.qcom.rc | 6 ++ rootdir/system/etc/rqbalance_config.xml | 54 ------------- rootdir/ueventd.qcom.rc | 7 +- 4 files changed, 41 insertions(+), 158 deletions(-) delete mode 100644 rootdir/system/etc/rqbalance_config.xml (limited to 'rootdir') diff --git a/rootdir/init.qcom.power.rc b/rootdir/init.qcom.power.rc index baa5de9..fed2e28 100644 --- a/rootdir/init.qcom.power.rc +++ b/rootdir/init.qcom.power.rc @@ -1,32 +1,14 @@ on early-init write /sys/block/mmcblk0/bdi/read_ahead_kb 512 - -on init - # cpuquiet rqbalance permissions - chown system system /sys/devices/system/cpu/cpuquiet/nr_min_cpus - chown system system /sys/devices/system/cpu/cpuquiet/nr_power_max_cpus - chown system system /sys/devices/system/cpu/cpuquiet/nr_thermal_max_cpus - chown system system /sys/devices/system/cpu/cpuquiet/rqbalance/balance_level - chown system system /sys/devices/system/cpu/cpuquiet/rqbalance/nr_run_thresholds - chown system system /sys/devices/system/cpu/cpuquiet/rqbalance/nr_down_run_thresholds - chmod 0660 /sys/devices/system/cpu/cpuquiet/nr_min_cpus - chmod 0660 /sys/devices/system/cpu/cpuquiet/nr_power_max_cpus - chmod 0660 /sys/devices/system/cpu/cpuquiet/nr_thermal_max_cpus - chmod 0660 /sys/devices/system/cpu/cpuquiet/rqbalance/balance_level - chmod 0660 /sys/devices/system/cpu/cpuquiet/rqbalance/nr_run_thresholds - chmod 0660 /sys/devices/system/cpu/cpuquiet/rqbalance/nr_down_run_thresholds on charger - write /sys/module/lpm_levels/enable_low_power/l2 2 + write /sys/module/lpm_levels/enable_low_power/l2 2 write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1 write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1 write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1 write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1 write /sys/module/msm_thermal/core_control/enabled 0 - - # Enable Power modes and set the CPU Freq Sampling rates - write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 @@ -43,31 +25,7 @@ on charger write /sys/devices/system/cpu/cpu2/online 0 write /sys/devices/system/cpu/cpu3/online 0 -on boot - # Disable thermal - write /sys/module/msm_thermal/core_control/enabled 0 - - # Device boots with performance governor. - # Switch one core to interactive to set permissions, for power hal and system server. - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" - chown system system /dev/cpuctl/cpu.notify_on_migrate - chmod 0660 /dev/cpuctl/cpu.notify_on_migrate - chown root system /sys/devices/system/cpu/cpu1/online - chown root system /sys/devices/system/cpu/cpu2/online - chown root system /sys/devices/system/cpu/cpu3/online - chmod 664 /sys/devices/system/cpu/cpu1/online - chmod 664 /sys/devices/system/cpu/cpu2/online - chmod 664 /sys/devices/system/cpu/cpu3/online - - # Bring CPUs online - write /sys/devices/system/cpu/cpu0/online 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 - - trigger enable-low-power - -on enable-low-power +on property:sys.boot_completed=1 write /sys/module/lpm_levels/enable_low_power/l2 4 write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1 write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1 @@ -89,71 +47,49 @@ on enable-low-power write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1 write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1 write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1 + write /sys/module/msm_pm/modes/cpu1/retention/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu2/retention/suspend_enabled 1 + write /sys/module/msm_pm/modes/cpu3/retention/suspend_enabled 1 + write /sys/module/msm_thermal/core_control/enabled 0 -on property:init.svc.bootanim=stopped - 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 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000 - write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1400000:40000 1700000:20000" - write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90 - write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400 + # Configure the CPU governor + 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 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "19000 1400000:39000 1700000:19000" + write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 99 + write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1497600 write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1 write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1500000:90 1800000:70" write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000 write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000 - write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 20000 - write /dev/cpuctl/cpu.notify_on_migrate 1 + write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000 + + chown root system /sys/devices/system/cpu/cpu1/online + chown root system /sys/devices/system/cpu/cpu2/online + chown root system /sys/devices/system/cpu/cpu3/online + chmod 664 /sys/devices/system/cpu/cpu1/online + chmod 664 /sys/devices/system/cpu/cpu2/online + chmod 664 /sys/devices/system/cpu/cpu3/online - # Enable thermal write /sys/module/msm_thermal/core_control/enabled 1 - # Switch to interactive and let PowerHAL configure it - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive - chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay - chown system system /sys/devices/system/cpu/cpufreq/interactive/align_windows - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/align_windows - chown system system /sys/devices/system/cpu/cpufreq/interactive/boost - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boost - chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boostpulse - chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration - chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load - chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq - chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - chown system system /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis - chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time - chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/target_loads - chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_rate - chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_slack - chown system system /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif - chown system system /sys/devices/system/cpu/cpufreq/interactive/use_sched_load - chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/use_sched_load - chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq + write /sys/module/cpu_boost/parameters/boost_ms 20 + write /sys/module/cpu_boost/parameters/sync_threshold 1728000 + write /sys/module/cpu_boost/parameters/input_boost_freq 1497600 + write /sys/module/cpu_boost/parameters/input_boost_ms 40 + + write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon" # Set max mA current for usb/dc charger write /sys/class/power_supply/qpnp-dc/current_max 1800000 write /sys/class/power_supply/usb/current_max 1500000 -on property:init.svc.recovery=running - trigger enable-low-power - -on property:dev.bootcomplete=1 + setprop sys.io.scheduler bfq rm /data/system/perfd/default_values - setprop sys.io.scheduler "bfq" + start mpdecision \ No newline at end of file diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc index ce2c8e5..7316d4c 100644 --- a/rootdir/init.qcom.rc +++ b/rootdir/init.qcom.rc @@ -539,6 +539,12 @@ service mediadrm /system/bin/mediadrmserver group mediadrm drmrpc trimarea ioprio rt 4 +service mpdecision /system/bin/mpdecision --avg_comp + class main + user root + group root readproc + disabled + # brcm-uim-sysfs (BT/FM/ANT+) service uim /system/bin/brcm-uim-sysfs class late_start diff --git a/rootdir/system/etc/rqbalance_config.xml b/rootdir/system/etc/rqbalance_config.xml deleted file mode 100644 index ce43a99..0000000 --- a/rootdir/system/etc/rqbalance_config.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootdir/ueventd.qcom.rc b/rootdir/ueventd.qcom.rc index ebb7b8a..bcac699 100644 --- a/rootdir/ueventd.qcom.rc +++ b/rootdir/ueventd.qcom.rc @@ -233,9 +233,4 @@ /dev/pmem 0660 system graphics /dev/pmem_adsp* 0660 system audio /dev/pmem_camera* 0660 system camera -/dev/msm_hw3dm 0660 system graphics - -# cpuquiet rqbalance permissions -/sys/devices/system/cpu/cpuquiet/rqbalance/balance_level 0660 system system -/sys/devices/system/cpu/cpuquiet/rqbalance/nr_run_thresholds 0660 system system -/sys/devices/system/cpu/cpuquiet/rqbalance/nr_down_run_thresholds 0660 system system +/dev/msm_hw3dm 0660 system graphics \ No newline at end of file -- cgit v1.2.3