From 1c76650adcf83f16c9fec03e3ce0b7c9289af8ae Mon Sep 17 00:00:00 2001 From: Sugakesshaa Date: Thu, 18 Jul 2024 20:16:00 +0530 Subject: [PATCH] sm6375-common: powerhint: Setup uclamp boosting - Make use of uclamp boost for top-app and foreground hints based on newer pixels Co-authored-by: Vivekachooz Change-Id: I70c4262230841b3c7bf84b4165916a22312f829f --- configs/powerhint.json | 69 ++++++++++++++++++++++++++-------- rootdir/etc/init.qcom.power.rc | 27 ------------- 2 files changed, 54 insertions(+), 42 deletions(-) diff --git a/configs/powerhint.json b/configs/powerhint.json index f8e06a7..d9b5c46 100644 --- a/configs/powerhint.json +++ b/configs/powerhint.json @@ -46,6 +46,36 @@ ], "ResetOnInit": true }, + { + "Name": "UclampTAMin", + "Path": "/dev/cpuctl/top-app/cpu.uclamp.min", + "Values": [ + "0", + "50", + "100" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "UclampTALatency", + "Path": "/dev/cpuctl/top-app/cpu.uclamp.latency_sensitive", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "UclampFgMin", + "Path": "/dev/cpuctl/foreground/cpu.uclamp.min", + "Values": [ + "0", + "100" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "GPUMaxFreq", "Path": "/sys/class/kgsl/kgsl-3d0/devfreq/max_freq", @@ -159,15 +189,6 @@ ], "ResetOnInit": true }, - { - "Name": "SchedBoost", - "Path": "/proc/sys/kernel/sched_boost", - "Values": [ - "1", - "0" - ], - "ResetOnInit": true - }, { "Name": "PowerHALMainState", "Path": "vendor.powerhal.state", @@ -233,6 +254,18 @@ "Duration": 0, "Value": "1113600" }, + { + "PowerHint": "INTERACTION", + "Node": "UclampTAMin", + "Duration": 0, + "Value": "50" + }, + { + "PowerHint": "INTERACTION", + "Node": "UclampTALatency", + "Duration": 0, + "Value": "1" + }, { "PowerHint": "INTERACTION", "Node": "CPUBWHystTriggerCount", @@ -257,12 +290,6 @@ "Duration": 0, "Value": "5931" }, - { - "PowerHint": "LAUNCH", - "Node": "SchedBoost", - "Duration": 5000, - "Value": "1" - }, { "PowerHint": "LAUNCH", "Node": "CPUBigClusterMaxFreq", @@ -281,6 +308,18 @@ "Duration": 5000, "Value": "9999999" }, + { + "PowerHint": "LAUNCH", + "Node": "UclampTAMin", + "Duration": 3000, + "Value": "50" + }, + { + "PowerHint": "LAUNCH", + "Node": "UclampFgMin", + "Duration": 3000, + "Value": "100" + }, { "PowerHint": "LAUNCH", "Node": "CPUBWHystTriggerCount", diff --git a/rootdir/etc/init.qcom.power.rc b/rootdir/etc/init.qcom.power.rc index ee6aa3a..a12f8b0 100644 --- a/rootdir/etc/init.qcom.power.rc +++ b/rootdir/etc/init.qcom.power.rc @@ -25,23 +25,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -on early-init - # Enable sched_boost - write /proc/sys/kernel/sched_boost 1 - on init -# Set Permissions for Power HAL - chown system system /dev/stune/top-app/schedtune.boost - chmod 0664 /dev/stune/top-app/schedtune.boost - - write /dev/stune/foreground/schedtune.sched_boost_no_override 1 - write /dev/stune/top-app/schedtune.sched_boost_no_override 1 - write /dev/stune/schedtune.colocate 0 - write /dev/stune/background/schedtune.colocate 0 - write /dev/stune/system-background/schedtune.colocate 0 - write /dev/stune/foreground/schedtune.colocate 0 - write /dev/stune/top-app/schedtune.colocate 1 - # Disable UFS powersaving write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 0 write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 0 @@ -69,11 +53,6 @@ on init write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us 500 write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us 20000 - # Set default schedTune value for foreground/top-app - write /dev/stune/foreground/schedtune.prefer_idle 1 - write /dev/stune/top-app/schedtune.boost 1 - write /dev/stune/top-app/schedtune.prefer_idle 1 - on boot # For cpusets initialize for Silver only first and then Silver + Gold # Silver only configuration cannot work with 0-7 @@ -111,9 +90,6 @@ on property:init.svc.vendor.charger=running # Turn on sleep modes write /sys/module/lpm_levels/parameters/sleep_disabled 0 - # Disable sched_boost - write /proc/sys/kernel/sched_boost 0 - start vendor.power_off_alarm mount tmpfs tmpfs /data setprop sys.usb.controller 4e00000.dwc3 @@ -171,9 +147,6 @@ on enable-low-power write /dev/cpuset/top-app/cpus 0-7 write /dev/cpuset/restricted/cpus 0-3 - # Turn off scheduler boost at the end - write /proc/sys/kernel/sched_boost 0 - # Turn on sleep modes write /sys/module/lpm_levels/parameters/sleep_disabled 0