From 4080c0deea977c63494fb1197e322c2900ab6800 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Tue, 9 Jul 2024 03:47:35 +0000 Subject: [PATCH] Powerhint tuning for photo capture UClamp.min of all threads in top app is set to mid core max capacity during photo capture, which will dispatch them to big core. Critical threads of photo capture will be interrupted due to their lower priority, while other cores idle. To deal with this situation, prefer_idle mask to big/mid cores can reduce the idle in mid cores. UClamp.min on nice can set UClamp.min of photo capture critical threads to mid core max capacity, while others as zero, this can make critical threads run on big core without frequently interrupted. By applying this, photo capture latency can be reduced with slight change of power consumption. Refer to ag/28118299 Bug: 345601796 Test: Build pass, Boot to home Flag: NONE powerhint change does not support flags Change-Id: I7d6d0c5c23aaf7888a64ecbafde2275129fd22a1 --- powerhint-comet.json | 89 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/powerhint-comet.json b/powerhint-comet.json index bbbbf3d..bf28c03 100644 --- a/powerhint-comet.json +++ b/powerhint-comet.json @@ -274,6 +274,42 @@ ], "ResetOnInit": true }, + { + "Name": "TAUclampMinOnNiceEnable", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_enable", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "TAUclampMinOnNiceMidValue", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_mid_value", + "Values": [ + "600", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "TAUclampMinOnNiceHighPrio", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_high_prio", + "Values": [ + "119", + "120" + ], + "ResetOnInit": true + }, + { + "Name": "TAUclampMinOnNiceMidPrio", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_mid_prio", + "Values": [ + "128", + "130" + ], + "ResetOnInit": true + }, { "Name": "FGUClampBoost", "Path": "/proc/vendor_sched/groups/fg/uclamp_min", @@ -390,6 +426,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_high", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -399,6 +436,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_mid", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -408,6 +446,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_low", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -1513,12 +1552,60 @@ "Duration": 3000, "Value": "0" }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "ReducePreferIdle", + "Duration": 3000, + "Value": "0" + }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "TAUClampBoost", + "Node": "TAPreferredIdleMaskHigh", + "Duration": 3000, + "Value": "0xf0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAPreferredIdleMaskMid", + "Duration": 3000, + "Value": "0xf0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAPreferredIdleMaskLow", + "Duration": 3000, + "Value": "0xf0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceEnable", + "Duration": 3000, + "Value": "1" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceMidValue", "Duration": 3000, "Value": "600" }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceHighPrio", + "Duration": 3000, + "Value": "119" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceMidPrio", + "Duration": 3000, + "Value": "128" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAPreferIdle", + "Duration": 3000, + "Value": "1" + }, { "PowerHint": "CAMERA_THERMAL_SEVERE_BOOST", "Node": "CDPreferHighCap",