From 137a4098bd74797143baadaf599b98634fa64fdc Mon Sep 17 00:00:00 2001 From: "Ali K. Zadeh" Date: Fri, 21 Jul 2023 17:28:54 +0000 Subject: [PATCH] Relax PMU capping during CAMERA_ZOOMING_BOOST ag/24163297 defines a new power boost profile which gets applied during camera transitioning its zoom ratio. This CL defines the parameters for this boost profile to enhance the camera performance by relaxing the PMU capping, which is achieved by setting the SPC thresholds to 100. Bug: 291979193 Test: perfetto trace (https://ui.perfetto.dev/#!/?s=ee36305fa386b5e1825fe9982b984190b1c804cd3c2d0b0fe9c85b9df94659d7) Change-Id: Id17721719151d216fa1bd3abd7bad613a0ee1c7b --- perf/powerhint-husky.json | 32 ++++++++++++++++++++++++++++++-- perf/powerhint-ripcurrent.json | 32 ++++++++++++++++++++++++++++++-- perf/powerhint-shiba.json | 32 ++++++++++++++++++++++++++++++-- 3 files changed, 90 insertions(+), 6 deletions(-) diff --git a/perf/powerhint-husky.json b/perf/powerhint-husky.json index 45053cd..0af507d 100644 --- a/perf/powerhint-husky.json +++ b/perf/powerhint-husky.json @@ -298,9 +298,10 @@ "Name": "CDPreferIdle", "Path": "/proc/vendor_sched/cam_prefer_idle", "Values": [ - "0", - "1" + "1", + "0" ], + "DefaultIndex": 0, "ResetOnInit": true }, { @@ -652,6 +653,7 @@ "Name": "PMU_LIT_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold", "Values": [ + "100", "70", "42", "35", @@ -683,6 +685,7 @@ "Name": "PMU_MID_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold", "Values": [ + "100", "50", "30", "20", @@ -712,6 +715,7 @@ "Name": "PMU_BIG_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy8/sched_pixel/spc_threshold", "Values": [ + "100", "50", "22", "20" @@ -1194,6 +1198,30 @@ "Duration": 1000, "Value": "664000" }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "CDPreferIdle", + "Duration": 100, + "Value": "1" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_LIT_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_MID_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_BIG_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, { "PowerHint": "GCA_CAMERA_SHOT_BIGCPU_RANK1", "Node": "TAPreferHighCap", diff --git a/perf/powerhint-ripcurrent.json b/perf/powerhint-ripcurrent.json index c6ed23b..9631195 100644 --- a/perf/powerhint-ripcurrent.json +++ b/perf/powerhint-ripcurrent.json @@ -281,9 +281,10 @@ "Name": "CDPreferIdle", "Path": "/proc/vendor_sched/cam_prefer_idle", "Values": [ - "0", - "1" + "1", + "0" ], + "DefaultIndex": 0, "ResetOnInit": true }, { @@ -635,6 +636,7 @@ "Name": "PMU_LIT_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold", "Values": [ + "100", "70", "42", "35", @@ -666,6 +668,7 @@ "Name": "PMU_MID_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold", "Values": [ + "100", "50", "30", "20", @@ -695,6 +698,7 @@ "Name": "PMU_BIG_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy8/sched_pixel/spc_threshold", "Values": [ + "100", "50", "22", "20" @@ -1131,6 +1135,30 @@ "Duration": 1000, "Value": "664000" }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "CDPreferIdle", + "Duration": 100, + "Value": "1" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_LIT_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_MID_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_BIG_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, { "PowerHint": "GCA_CAMERA_SHOT_BIGCPU", "Node": "TAPreferHighCap", diff --git a/perf/powerhint-shiba.json b/perf/powerhint-shiba.json index 51beaab..a0de305 100644 --- a/perf/powerhint-shiba.json +++ b/perf/powerhint-shiba.json @@ -288,9 +288,10 @@ "Name": "CDPreferIdle", "Path": "/proc/vendor_sched/cam_prefer_idle", "Values": [ - "0", - "1" + "1", + "0" ], + "DefaultIndex": 0, "ResetOnInit": true }, { @@ -652,6 +653,7 @@ "Name": "PMU_LIT_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold", "Values": [ + "100", "70", "42", "35", @@ -683,6 +685,7 @@ "Name": "PMU_MID_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold", "Values": [ + "100", "50", "30", "20", @@ -712,6 +715,7 @@ "Name": "PMU_BIG_SPC_THRESHOLD", "Path": "/sys/devices/system/cpu/cpufreq/policy8/sched_pixel/spc_threshold", "Values": [ + "100", "50", "22", "20" @@ -1194,6 +1198,30 @@ "Duration": 1000, "Value": "664000" }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "CDPreferIdle", + "Duration": 100, + "Value": "1" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_LIT_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_MID_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "PMU_BIG_SPC_THRESHOLD", + "Duration": 100, + "Value": "100" + }, { "PowerHint": "GCA_CAMERA_SHOT_BIGCPU", "Node": "TAPreferHighCap",