From db08208ae55b49b6b4ce9265ff510fcedf3ee4ce Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Wed, 27 Mar 2024 09:06:39 +0000 Subject: [PATCH] Disable auto prefer idle explictly for some conditions In auto prefer idle mode, a task in top-app will be granted prefer idle if it satisfied the conditions. So turn auto prefer idle off if top-app prefer_idle is explictly disabled. Also turn auto prefer off when other group enables prefer_idle explictly. Bug: 236868627 Test: build pass Change-Id: Iaeaa6772695f79be5365db6fbec604ce3840ccbd --- powerhint-comet.json | 76 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/powerhint-comet.json b/powerhint-comet.json index 100bc21..df2822b 100644 --- a/powerhint-comet.json +++ b/powerhint-comet.json @@ -213,6 +213,16 @@ ], "ResetOnInit": true }, + { + "Name": "AutoPreferIdle", + "Path": "/proc/vendor_sched/auto_prefer_idle", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "BigClusterPowerDownTargetResidency", "Path": "/sys/devices/platform/cpupm/cpupm/cpd_cl2_target_residency", @@ -829,6 +839,12 @@ "Duration": 5000, "Value": "0" }, + { + "PowerHint": "LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 5000, + "Value": "0" + }, { "PowerHint": "LAUNCH_GPU", "Node": "GPUDvfsPeriod", @@ -1012,6 +1028,12 @@ "Duration": 2000, "Value": "1" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "AutoPreferIdle", + "Duration": 2000, + "Value": "0" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -1089,6 +1111,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "DISPLAY_INACTIVE", "Node": "FGPreferIdle", @@ -1179,6 +1207,12 @@ "Duration": 1000, "Value": "1" }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 1000, + "Value": "0" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "FGCpuset", @@ -1299,6 +1333,12 @@ "Duration": 100, "Value": "1" }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "AutoPreferIdle", + "Duration": 100, + "Value": "0" + }, { "PowerHint": "CAMERA_ZOOMING_BOOST", "Node": "PMU_POLL", @@ -1605,6 +1645,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "CDHighCpusetCpus", @@ -1767,6 +1813,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CDHighCpusetCpus", @@ -1803,6 +1855,12 @@ "Duration": 0, "Value": "700000" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1947,6 +2005,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CPUDVFSHeadroom", @@ -2061,6 +2125,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", "Node": "CDPreferIdle", @@ -2632,6 +2702,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "GAME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "GAME", "Node": "FGPreferIdle",