You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.8 KiB

#
# Copyright (C) 2017 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
on property:sys.boot_completed=1
# Enable bus-dcvs
write /sys/class/devfreq/soc:qcom,cpubw/governor "bw_hwmon"
write /sys/class/devfreq/soc:qcom,cpubw/polling_interval 50
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/mbps_zones "2288 4577 6500 8132 9155 10681"
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/sample_ms 4
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent 40
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory 20
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length 10
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps 0
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/up_scale 250
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/idle_mbps 1600
write /sys/class/devfreq/soc:qcom,llccbw/governor "bw_hwmon"
write /sys/class/devfreq/soc:qcom,llccbw/polling_interval 50
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/mbps_zones "1720 2929 3879 5931 6881"
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/sample_ms 4
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/io_percent 80
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/hist_memory 20
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/hyst_length 10
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/guard_band_mbps 0
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/up_scale 250
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/idle_mbps 1600
write /sys/class/devfreq/soc:qcom,mincpubw/governor "cpufreq"
# Enable memlat governor
write /sys/class/devfreq/soc:qcom,memlat-cpu0/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,memlat-cpu0/polling_interval 10
write /sys/class/devfreq/soc:qcom,memlat-cpu0/mem_latency/ratio_ceil 400
write /sys/class/devfreq/soc:qcom,memlat-cpu4/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,memlat-cpu4/polling_interval 10
write /sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil 400
write /sys/class/devfreq/soc:qcom,l3-cpu0/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,l3-cpu0/polling_interval 10
write /sys/class/devfreq/soc:qcom,l3-cpu0/mem_latency/ratio_ceil 400
write /sys/class/devfreq/soc:qcom,l3-cpu4/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,l3-cpu4/polling_interval 10
write /sys/class/devfreq/soc:qcom,l3-cpu4/mem_latency/ratio_ceil 4000
# Turn on sleep modes.
write /sys/module/lpm_levels/parameters/sleep_disabled 0
# Enable idle state listener
write /sys/class/drm/card0/device/idle_encoder_mask 1
write /sys/class/drm/card0/device/idle_timeout_ms 100
# Change l3-cdsp to userspace governor
write /sys/class/devfreq/soc:qcom,l3-cdsp/governor userspace
chown system system /sys/class/devfreq/soc:qcom,l3-cdsp/userspace/set_freq
# Disable console_suspend to get better logging for kernel crashes
on boot
write /sys/module/printk/parameters/console_suspend N
#Enable suspend to idle mode to reduce latency during suspend/resume
write /sys/power/mem_sleep "s2idle"
# If UART is on, enable console_suspend on boot_complete to save power
on property:sys.boot_completed=1 && property:init.svc.console=running
write /sys/module/printk/parameters/console_suspend Y