From 918e2cd8ec49b32e256c43ad7bab6a2a4dfe4f01 Mon Sep 17 00:00:00 2001 From: guibing Date: Thu, 16 May 2024 18:30:54 +0000 Subject: [PATCH] Adpf:raviole: enable heuristic boost. Heuristic boost will adjust the ADPF boost profile when the powerhal detects the power session is very janky, providing more boost for deadline sensitive threads managed in the session. Bug: 341111433 Test: adb shell dumpsys android.hardware.power.IPower/default; check the device adpf sessions' traces. Change-Id: I850a5e9e2132c0f62097f41cc77e81d1ff6986f0 --- powerhint-oriole-mainline.json | 33 ++++++++++++++++++++++++++++++--- powerhint-oriole.json | 33 ++++++++++++++++++++++++++++++--- powerhint-raven-mainline.json | 33 ++++++++++++++++++++++++++++++--- powerhint-raven.json | 33 ++++++++++++++++++++++++++++++--- powerhint-slider.json | 33 ++++++++++++++++++++++++++++++--- powerhint-whitefin.json | 33 ++++++++++++++++++++++++++++++--- 6 files changed, 180 insertions(+), 18 deletions(-) diff --git a/powerhint-oriole-mainline.json b/powerhint-oriole-mainline.json index e10d6a9..29dd8ab 100644 --- a/powerhint-oriole-mainline.json +++ b/powerhint-oriole-mainline.json @@ -1239,7 +1239,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 83333330, "TargetTimeFactor": 1, - "StaleTimeFactor": 15 + "StaleTimeFactor": 15, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_90FPS", @@ -1263,7 +1272,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 111111110, "TargetTimeFactor": 1, - "StaleTimeFactor": 15 + "StaleTimeFactor": 15, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_60FPS", @@ -1287,7 +1305,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 166666660, "TargetTimeFactor": 1, - "StaleTimeFactor": 15 + "StaleTimeFactor": 15, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "UiHighBoostWithoutPid", diff --git a/powerhint-oriole.json b/powerhint-oriole.json index e97fa3a..9264d09 100644 --- a/powerhint-oriole.json +++ b/powerhint-oriole.json @@ -1756,7 +1756,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 83333330, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_90FPS", @@ -1781,7 +1790,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 111111110, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_60FPS", @@ -1806,7 +1824,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 166666660, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "UiHighBoostWithoutPid", diff --git a/powerhint-raven-mainline.json b/powerhint-raven-mainline.json index f6d6ce1..a748e0e 100644 --- a/powerhint-raven-mainline.json +++ b/powerhint-raven-mainline.json @@ -1220,7 +1220,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 83333330, "TargetTimeFactor": 1, - "StaleTimeFactor": 15 + "StaleTimeFactor": 15, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_90FPS", @@ -1244,7 +1253,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 111111110, "TargetTimeFactor": 1, - "StaleTimeFactor": 15 + "StaleTimeFactor": 15, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_60FPS", @@ -1268,7 +1286,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 166666660, "TargetTimeFactor": 1, - "StaleTimeFactor": 15 + "StaleTimeFactor": 15, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "UiHighBoostWithoutPid", diff --git a/powerhint-raven.json b/powerhint-raven.json index 3872e3e..af6d3c7 100644 --- a/powerhint-raven.json +++ b/powerhint-raven.json @@ -1737,7 +1737,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 83333330, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_90FPS", @@ -1762,7 +1771,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 111111110, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_60FPS", @@ -1787,7 +1805,16 @@ "SamplingWindow_D": 1, "ReportingRateLimitNs": 166666660, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "UiHighBoostWithoutPid", diff --git a/powerhint-slider.json b/powerhint-slider.json index a18eda1..98f770e 100644 --- a/powerhint-slider.json +++ b/powerhint-slider.json @@ -1511,7 +1511,16 @@ "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 20.0 + "StaleTimeFactor": 20.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_90FPS", @@ -1536,7 +1545,16 @@ "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 20.0 + "StaleTimeFactor": 20.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_60FPS", @@ -1561,7 +1579,16 @@ "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 20.0 + "StaleTimeFactor": 20.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "UiHighBoostWithoutPid", diff --git a/powerhint-whitefin.json b/powerhint-whitefin.json index 20e65c9..a53293f 100644 --- a/powerhint-whitefin.json +++ b/powerhint-whitefin.json @@ -1478,7 +1478,16 @@ "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 20.0 + "StaleTimeFactor": 20.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_90FPS", @@ -1503,7 +1512,16 @@ "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 20.0 + "StaleTimeFactor": 20.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "REFRESH_60FPS", @@ -1528,7 +1546,16 @@ "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 20.0 + "StaleTimeFactor": 20.0, + "HeuristicBoost_On": true, + "HBoostOnMissedCycles": 8, + "HBoostOffMaxAvgRatio": 4.0, + "HBoostOffMissedCycles": 5, + "HBoostPidPuFactor": 0.5, + "HBoostUclampMin": 722, + "JankCheckTimeFactor": 1.2, + "LowFrameRateThreshold": 25, + "MaxRecordsNum": 300 }, { "Name": "UiHighBoostWithoutPid",