From e7c6bf2d350491068d8a0abf545127dc9c536e1a Mon Sep 17 00:00:00 2001 From: Yvonne Yip Date: Tue, 23 Jan 2024 11:19:39 -0800 Subject: [PATCH 1/2] powerhint: port dvfs_headroom settings from p23 Bug: 322000346 Test: boot Change-Id: I04cbd92a905135664059b338710993250566c9a7 Signed-off-by: Yvonne Yip (cherry picked from commit 5f65d099f05995a87aeda72ee94bc1a1629f5352) Merged-In: I04cbd92a905135664059b338710993250566c9a7 --- perf/powerhint-caiman.json | 46 +++++++++++++--------------- perf/powerhint-komodo.json | 50 ++++++++++++++----------------- perf/powerhint-ripcurrentpro.json | 50 ++++++++++++++----------------- perf/powerhint-tokay.json | 50 ++++++++++++++----------------- 4 files changed, 86 insertions(+), 110 deletions(-) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 8c8ce94a..494e4c79 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -230,9 +230,9 @@ "Values": [ "1280", "1100", - "1280 1100 1055" + "1100 1078 1024" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1851,13 +1851,13 @@ }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -1933,6 +1933,12 @@ "Duration": 0, "Value": "700000" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -2005,18 +2011,6 @@ "Duration": 0, "Value": "cam2" }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUUtilThreshold", - "Duration": 0, - "Value": "1100 1024 1100" - }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1280 1100 1055" - }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CDPreferHighCap", @@ -2077,6 +2071,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", @@ -2253,13 +2253,13 @@ }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, "Value": "1100" }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -2600,12 +2600,6 @@ "Duration": 0, "Value": "game" }, - { - "PowerHint": "GAME", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1100" - }, { "PowerHint": "GAME", "Node": "CPUTaperedDVFSHeadroomEnable", @@ -2978,7 +2972,7 @@ "Name": "REFRESH_120FPS", "PID_On": true, "PID_Po": 2.0, - "PID_Pu": 1.0, + "PID_Pu": 0.6, "PID_I": 0.0, "PID_I_Init": 200, "PID_I_High": 512, diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index 9cd2eeca..494e4c79 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -213,7 +213,7 @@ ], "ResetOnInit": true }, - { + { "Name": "CPUUtilThreshold", "Path": "/proc/vendor_sched/util_threshold", "Values": [ @@ -230,9 +230,9 @@ "Values": [ "1280", "1100", - "1280 1100 1055" + "1100 1078 1024" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1213,7 +1213,7 @@ "Type": "EndHint", "Value": "DISPLAY_UPDATE_IMMINENT" }, - { + { "PowerHint": "DISPLAY_INACTIVE", "Node": "TAPreferIdle", "Duration": 0, @@ -1851,13 +1851,13 @@ }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -1933,6 +1933,12 @@ "Duration": 0, "Value": "700000" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -2005,18 +2011,6 @@ "Duration": 0, "Value": "cam2" }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUUtilThreshold", - "Duration": 0, - "Value": "1100 1024 1100" - }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1280 1100 1055" - }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CDPreferHighCap", @@ -2077,6 +2071,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", @@ -2253,13 +2253,13 @@ }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, "Value": "1100" }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -2600,12 +2600,6 @@ "Duration": 0, "Value": "game" }, - { - "PowerHint": "GAME", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1100" - }, { "PowerHint": "GAME", "Node": "CPUTaperedDVFSHeadroomEnable", @@ -2978,7 +2972,7 @@ "Name": "REFRESH_120FPS", "PID_On": true, "PID_Po": 2.0, - "PID_Pu": 1.0, + "PID_Pu": 0.6, "PID_I": 0.0, "PID_I_Init": 200, "PID_I_High": 512, diff --git a/perf/powerhint-ripcurrentpro.json b/perf/powerhint-ripcurrentpro.json index 9cd2eeca..494e4c79 100644 --- a/perf/powerhint-ripcurrentpro.json +++ b/perf/powerhint-ripcurrentpro.json @@ -213,7 +213,7 @@ ], "ResetOnInit": true }, - { + { "Name": "CPUUtilThreshold", "Path": "/proc/vendor_sched/util_threshold", "Values": [ @@ -230,9 +230,9 @@ "Values": [ "1280", "1100", - "1280 1100 1055" + "1100 1078 1024" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1213,7 +1213,7 @@ "Type": "EndHint", "Value": "DISPLAY_UPDATE_IMMINENT" }, - { + { "PowerHint": "DISPLAY_INACTIVE", "Node": "TAPreferIdle", "Duration": 0, @@ -1851,13 +1851,13 @@ }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -1933,6 +1933,12 @@ "Duration": 0, "Value": "700000" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -2005,18 +2011,6 @@ "Duration": 0, "Value": "cam2" }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUUtilThreshold", - "Duration": 0, - "Value": "1100 1024 1100" - }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1280 1100 1055" - }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CDPreferHighCap", @@ -2077,6 +2071,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", @@ -2253,13 +2253,13 @@ }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, "Value": "1100" }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -2600,12 +2600,6 @@ "Duration": 0, "Value": "game" }, - { - "PowerHint": "GAME", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1100" - }, { "PowerHint": "GAME", "Node": "CPUTaperedDVFSHeadroomEnable", @@ -2978,7 +2972,7 @@ "Name": "REFRESH_120FPS", "PID_On": true, "PID_Po": 2.0, - "PID_Pu": 1.0, + "PID_Pu": 0.6, "PID_I": 0.0, "PID_I_Init": 200, "PID_I_High": 512, diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 9cd2eeca..494e4c79 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -213,7 +213,7 @@ ], "ResetOnInit": true }, - { + { "Name": "CPUUtilThreshold", "Path": "/proc/vendor_sched/util_threshold", "Values": [ @@ -230,9 +230,9 @@ "Values": [ "1280", "1100", - "1280 1100 1055" + "1100 1078 1024" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1213,7 +1213,7 @@ "Type": "EndHint", "Value": "DISPLAY_UPDATE_IMMINENT" }, - { + { "PowerHint": "DISPLAY_INACTIVE", "Node": "TAPreferIdle", "Duration": 0, @@ -1851,13 +1851,13 @@ }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -1933,6 +1933,12 @@ "Duration": 0, "Value": "700000" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -2005,18 +2011,6 @@ "Duration": 0, "Value": "cam2" }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUUtilThreshold", - "Duration": 0, - "Value": "1100 1024 1100" - }, - { - "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1280 1100 1055" - }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CDPreferHighCap", @@ -2077,6 +2071,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", @@ -2253,13 +2253,13 @@ }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUUtilThreshold", + "Node": "CPUDVFSHeadroom", "Duration": 0, "Value": "1100" }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", - "Node": "CPUDVFSHeadroom", + "Node": "CPUUtilThreshold", "Duration": 0, "Value": "1100" }, @@ -2600,12 +2600,6 @@ "Duration": 0, "Value": "game" }, - { - "PowerHint": "GAME", - "Node": "CPUDVFSHeadroom", - "Duration": 0, - "Value": "1100" - }, { "PowerHint": "GAME", "Node": "CPUTaperedDVFSHeadroomEnable", @@ -2978,7 +2972,7 @@ "Name": "REFRESH_120FPS", "PID_On": true, "PID_Po": 2.0, - "PID_Pu": 1.0, + "PID_Pu": 0.6, "PID_I": 0.0, "PID_I_Init": 200, "PID_I_High": 512, From 8626e6e6dde5c36afc6058cdf86dc18545c325c7 Mon Sep 17 00:00:00 2001 From: Yvonne Yip Date: Tue, 12 Mar 2024 07:47:57 -0700 Subject: [PATCH 2/2] powerhint: port migration margin settings from p23 Bug: 316035859 Test: boot (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:62221287956f6123e6bfe761de37ff1f3cb058c6) Merged-In: I75a13076c9e388cb1628c80035d3f4f7a0905718 Change-Id: I75a13076c9e388cb1628c80035d3f4f7a0905718 --- perf/powerhint-caiman.json | 11 +++++++++-- perf/powerhint-komodo.json | 11 +++++++++-- perf/powerhint-ripcurrentpro.json | 11 +++++++++-- perf/powerhint-tokay.json | 11 +++++++++-- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 494e4c79..dd76c983 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -217,9 +217,10 @@ "Name": "CPUUtilThreshold", "Path": "/proc/vendor_sched/util_threshold", "Values": [ + "2048 1280 1280", "1280", "1100", - "1100 1024 1100" + "1100 1078 1024" ], "DefaultIndex": 0, "ResetOnInit": true @@ -1859,7 +1860,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPUUtilThreshold", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -2083,6 +2084,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUUtilThreshold", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CDPreferHighCap", diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index 494e4c79..dd76c983 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -217,9 +217,10 @@ "Name": "CPUUtilThreshold", "Path": "/proc/vendor_sched/util_threshold", "Values": [ + "2048 1280 1280", "1280", "1100", - "1100 1024 1100" + "1100 1078 1024" ], "DefaultIndex": 0, "ResetOnInit": true @@ -1859,7 +1860,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPUUtilThreshold", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -2083,6 +2084,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUUtilThreshold", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CDPreferHighCap", diff --git a/perf/powerhint-ripcurrentpro.json b/perf/powerhint-ripcurrentpro.json index 494e4c79..dd76c983 100644 --- a/perf/powerhint-ripcurrentpro.json +++ b/perf/powerhint-ripcurrentpro.json @@ -217,9 +217,10 @@ "Name": "CPUUtilThreshold", "Path": "/proc/vendor_sched/util_threshold", "Values": [ + "2048 1280 1280", "1280", "1100", - "1100 1024 1100" + "1100 1078 1024" ], "DefaultIndex": 0, "ResetOnInit": true @@ -1859,7 +1860,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPUUtilThreshold", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -2083,6 +2084,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUUtilThreshold", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CDPreferHighCap", diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 494e4c79..dd76c983 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -217,9 +217,10 @@ "Name": "CPUUtilThreshold", "Path": "/proc/vendor_sched/util_threshold", "Values": [ + "2048 1280 1280", "1280", "1100", - "1100 1024 1100" + "1100 1078 1024" ], "DefaultIndex": 0, "ResetOnInit": true @@ -1859,7 +1860,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPUUtilThreshold", "Duration": 0, - "Value": "1100" + "Value": "1100 1078 1024" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -2083,6 +2084,12 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUUtilThreshold", + "Duration": 0, + "Value": "1280" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CDPreferHighCap",