From 279cd17355aaba5b6dba4b2d7ee8eb001f895261 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Wed, 4 Dec 2024 15:46:33 +0000 Subject: [PATCH 1/3] powerhint: Enable auto migration margins/dvfs headroom by default And reduce DownRateLimitUs to 500us as the system should be more reactive now when something needs to rampup quickly. Enable pertask iowait boost too as with auto dvfs headroom enabled all tasks will start form 0 util_avg and this could impact iowait tasks without this being enabled to help them migrate up to bigger cores. Camera use cases should still use their own default DownRateLimitUs and disable this feature to keep their dvfs_headroom tuning intact. Bug: 315748906 Flag: EXEMPT powerhints are not compatible with flagging Signed-off-by: Qais Yousef Change-Id: Ifaee3631458e144270f41b66595c5e853546171c --- powerhint-comet.json | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/powerhint-comet.json b/powerhint-comet.json index 67fd91e..05ff303 100644 --- a/powerhint-comet.json +++ b/powerhint-comet.json @@ -59,7 +59,7 @@ "1000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -100,7 +100,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -142,7 +142,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -213,7 +213,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -223,7 +223,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -257,7 +257,7 @@ "7", "8" ], - "DefaultIndex": 2, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -267,7 +267,7 @@ "0", "512" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1298,6 +1298,12 @@ "Duration": 5000, "Value": "1" }, + { + "PowerHint": "LAUNCH", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1388,6 +1394,12 @@ "Duration": 2000, "Value": "0" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -3174,13 +3186,13 @@ "PowerHint": "DISPLAY_IDLE", "Node": "TARampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_IDLE", "Node": "AdpfRampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", From 8e61044a403e29aca2b31975503ffd23602610ff Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Wed, 4 Dec 2024 15:52:14 +0000 Subject: [PATCH 2/3] powerhint: Set response_time_ms for clusters By default slow it down as auto margins can lead to faster ramping up in low activity use cases. Set it back to default in GAME mode to retain previous behavior. Set it explicitly for DISPLAY_IDLE as a potential area for more tuning in the future. Bug: 315748906 Flag: EXEMPT powerhints are not compatible with flagging Signed-off-by: Qais Yousef Change-Id: I275545cc98714afd3efefb9f57e6bac55fcb6ea3 --- powerhint-comet.json | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/powerhint-comet.json b/powerhint-comet.json index 05ff303..fdbce21 100644 --- a/powerhint-comet.json +++ b/powerhint-comet.json @@ -62,6 +62,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPULittleClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "9", + "13" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUMidClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq", @@ -103,6 +113,16 @@ "DefaultIndex": 4, "ResetOnInit": true }, + { + "Name": "CPUMidClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "52", + "56" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUBigClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq", @@ -145,6 +165,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPUBigClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "165", + "170" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "GPUDvfsPeriod", "Path": "/sys/devices/platform/1f000000.mali/dvfs_period", @@ -3194,6 +3224,24 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "13" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "56" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "170" + }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", "Node": "CPULittleClusterDownRateLimitUs", @@ -3434,6 +3482,24 @@ "Duration": 0, "Value": "2" }, + { + "PowerHint": "GAME", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "9" + }, + { + "PowerHint": "GAME", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "52" + }, + { + "PowerHint": "GAME", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "165" + }, { "PowerHint": "GAME", "Node": "PerTaskMaxIowaitBoost", From 4d46cb3a2dc30835e6a63d878812549a1d19b941 Mon Sep 17 00:00:00 2001 From: jonerlin Date: Thu, 5 Dec 2024 07:23:09 +0000 Subject: [PATCH 3/3] BT: add skip uart suspend overlay config Add config to enable Bluetooth APM UART to skip suspend to avoid hold system too long. Bug: 376774204 Test: check uart skip suspend Flag: EXEMPT project configuration patch Change-Id: If9347b283cd8980ea05353c3d86ded3f0f6f1568 --- bluetooth/bt_vendor_overlay.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bluetooth/bt_vendor_overlay.conf b/bluetooth/bt_vendor_overlay.conf index 6f823bc..4f85111 100644 --- a/bluetooth/bt_vendor_overlay.conf +++ b/bluetooth/bt_vendor_overlay.conf @@ -46,3 +46,6 @@ ThreadDispatcherEnabled = true # A2DP_LDAC_QUALITY_LOW 2 // Equal to 330/303(kbps) # A2DP_LDAC_QUALITY_ABR 3 // ABR mode, range: 990,660,492,396,330(kbps) LdacDefaultQualityMode = 3 + +# APM Uart skip suspend to aovid hold system too long when BT using AOC UART +ApmUartSkipSuspend = true