S666LN: init: Reconfigure utilization clamping for all groups

* Based on power tunings of [1].

[1]: https://github.com/mt6878-devs/android_device_xiaomi_malachite

Change-Id: I53e5cc5841714cb2c2375d3522e1eb788467987e
Signed-off-by: ChrisCatto <chriscatto@proton.me>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
Signed-off-by: KimelaZX <mmikailrei@gmail.com>
This commit is contained in:
ChrisCatto
2025-12-11 07:15:01 +07:00
committed by KimelaZX
parent b1488407c6
commit a4f1c2d346
2 changed files with 63 additions and 23 deletions

View File

@@ -230,19 +230,34 @@
{ {
"Name": "FGUclampMin", "Name": "FGUclampMin",
"Path": "/dev/cpuctl/foreground/cpu.uclamp.min", "Path": "/dev/cpuctl/foreground/cpu.uclamp.min",
"Values": ["100", "75", "50", "25", "0"], "Values": [
"0",
"10",
"30"
],
"DefaultIndex": 0,
"ResetOnInit": true "ResetOnInit": true
}, },
{ {
"Name": "TAUclampMin", "Name": "TAUclampMin",
"Path": "/dev/cpuctl/top-app/cpu.uclamp.min", "Path": "/dev/cpuctl/top-app/cpu.uclamp.min",
"Values": ["100", "75", "50", "25", "0"], "Values": [
"0",
"30",
"100"
],
"DefaultIndex": 0,
"ResetOnInit": true "ResetOnInit": true
}, },
{ {
"Name": "CAMUClampBoost", "Name": "CAMUClampBoost",
"Path": "/dev/cpuctl/camera-daemon/cpu.uclamp.min", "Path": "/dev/cpuctl/camera-daemon/cpu.uclamp.min",
"Values": ["100", "75", "50", "25", "0"], "Values": [
"60",
"80",
"100"
],
"DefaultIndex": 0,
"ResetOnInit": true "ResetOnInit": true
}, },
{ {
@@ -381,13 +396,13 @@
"PowerHint": "INTERACTION", "PowerHint": "INTERACTION",
"Node": "FGUclampMin", "Node": "FGUclampMin",
"Duration": 1000, "Duration": 1000,
"Value": "50" "Value": "10"
}, },
{ {
"PowerHint": "INTERACTION", "PowerHint": "INTERACTION",
"Node": "TAUclampMin", "Node": "TAUclampMin",
"Duration": 1000, "Duration": 1000,
"Value": "50" "Value": "30"
}, },
{ {
"PowerHint": "INTERACTION", "PowerHint": "INTERACTION",
@@ -473,6 +488,18 @@
"Duration": 0, "Duration": 0,
"Value": "50" "Value": "50"
}, },
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "FGUclampMin",
"Duration": 0,
"Value": "30"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "TAUclampMin",
"Duration": 0,
"Value": "30"
},
{ {
"PowerHint": "DOUBLE_TAP_TO_WAKE", "PowerHint": "DOUBLE_TAP_TO_WAKE",
"Node": "DoubleTapToWake", "Node": "DoubleTapToWake",

View File

@@ -110,45 +110,58 @@ on property:sys.boot_completed=1
write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0 write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0
# Configure clamps for standard task groups. # Configure clamps for standard task groups.
# rt
write /dev/cpuctl/rt/cpu.uclamp.latency_sensitive 1
write /dev/cpuctl/rt/cpu.uclamp.max max
write /dev/cpuctl/rt/cpu.uclamp.min 0
write /dev/cpuctl/rt/cpu.shares 20480
# system-background # system-background
# cap the max utilisation for system-background tasks to save power. # cap the max utilisation for system-background tasks to save power.
write /dev/cpuctl/system/cpu.uclamp.max 40
write /dev/cpuctl/system/cpu.uclamp.min 0
write /dev/cpuctl/system/cpu.uclamp.latency_sensitive 0 write /dev/cpuctl/system/cpu.uclamp.latency_sensitive 0
write /dev/cpuctl/system-background/cpu.uclamp.max 40 write /dev/cpuctl/system-background/cpu.uclamp.max 60
write /dev/cpuctl/system-background/cpu.uclamp.min 0 write /dev/cpuctl/system-background/cpu.uclamp.min 0
write /dev/cpuctl/system-background/cpu.uclamp.latency_sensitive 0 write /dev/cpuctl/system-background/cpu.shares 2048
# background
write /dev/cpuctl/background/cpu.uclamp.latency_sensitive 0
write /dev/cpuctl/background/cpu.uclamp.max 40
write /dev/cpuctl/background/cpu.uclamp.min 0
write /dev/cpuctl/background/cpu.shares 1024
# foreground # foreground
write /dev/cpuctl/foreground/cpu.uclamp.max max write /dev/cpuctl/foreground/cpu.uclamp.max max
write /dev/cpuctl/foreground/cpu.uclamp.min 10 write /dev/cpuctl/foreground/cpu.uclamp.min 0
write /dev/cpuctl/foreground/cpu.uclamp.latency_sensitive 0 write /dev/cpuctl/foreground/cpu.uclamp.latency_sensitive 1
write /dev/cpuctl/foreground/cpu.shares 10240
# foreground_window # foreground_window
write /dev/cpuctl/foreground_window/cpu.uclamp.max max write /dev/cpuctl/foreground_window/cpu.uclamp.max max
write /dev/cpuctl/foreground_window/cpu.uclamp.min 10 write /dev/cpuctl/foreground_window/cpu.uclamp.min 0
write /dev/cpuctl/foreground_window/cpu.uclamp.latency_sensitive 0 write /dev/cpuctl/foreground_window/cpu.uclamp.latency_sensitive 1
write /dev/cpuctl/foreground_window/cpu.shares 10240
# top-app # top-app
write /dev/cpuctl/top-app/cpu.uclamp.max max write /dev/cpuctl/top-app/cpu.uclamp.max max
write /dev/cpuctl/top-app/cpu.uclamp.min 10 write /dev/cpuctl/top-app/cpu.uclamp.min 0
write /dev/cpuctl/top-app/cpu.uclamp.latency_sensitive 1 write /dev/cpuctl/top-app/cpu.uclamp.latency_sensitive 1
write /dev/cpuctl/top-app/cpu.shares 20480
# background
# cap the max utilisation for background tasks to save power.
write /dev/cpuctl/background/cpu.uclamp.max 50
write /dev/cpuctl/background/cpu.uclamp.min 0
write /dev/cpuctl/background/cpu.uclamp.latency_sensitive 0
# nnapi-hal # nnapi-hal
write /dev/cpuctl/nnapi-hal/cpu.uclamp.max max write /dev/cpuctl/nnapi-hal/cpu.uclamp.max max
write /dev/cpuctl/nnapi-hal/cpu.uclamp.min 75 write /dev/cpuctl/nnapi-hal/cpu.uclamp.min 75
write /dev/cpuctl/nnapi-hal/cpu.uclamp.latency_sensitive 1 write /dev/cpuctl/nnapi-hal/cpu.uclamp.latency_sensitive 1
write /dev/cpuctl/nnapi-hal/cpu.shares 20480
# camera-daemon # camera-daemon
write /dev/cpuctl/camera-daemon/cpu.uclamp.max max write /dev/cpuctl/camera-daemon/cpu.uclamp.max max
write /dev/cpuctl/camera-daemon/cpu.uclamp.min 50 write /dev/cpuctl/camera-daemon/cpu.uclamp.min 60
write /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive 1 write /dev/cpuctl/camera-daemon/cpu.shares 20480
# dex2oat
write /dev/cpuctl/dex2oat/cpu.uclamp.latency_sensitive 0
write /dev/cpuctl/dex2oat/cpu.uclamp.max 60
write /dev/cpuctl/dex2oat/cpu.uclamp.min 0
write /dev/cpuctl/dex2oat/cpu.shares 2048
# Uclamp tuning # Uclamp tuning
write /proc/sys/kernel/sched_util_clamp_min_rt_default 96 write /proc/sys/kernel/sched_util_clamp_min_rt_default 96