From 25ce5a9c08e5e088f3a6dc1e703b9824f1bd472c Mon Sep 17 00:00:00 2001 From: Cathy Hsu Date: Thu, 2 May 2024 01:29:24 +0000 Subject: [PATCH 01/10] display: update ssc_en permission Bug: 316357878 Test: Dump ddic commands of "echo 1 > /sys/class/backlight/panel0-backlight/ssc_en" Change-Id: Iedbcc92562e06bc7a833a9a2884a13800f7a0d37 Signed-off-by: Cathy Hsu --- conf/init.tegu.rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/init.tegu.rc b/conf/init.tegu.rc index df2cf28..c5ffcc6 100644 --- a/conf/init.tegu.rc +++ b/conf/init.tegu.rc @@ -8,6 +8,12 @@ on init # eSE streset tool name setprop persist.vendor.se.streset libstreset24 +# Permissions for display +on fs + # Permission for SSC mode enable + chown system system /sys/class/backlight/panel0-backlight/ssc_en + chmod 664 /sys/class/backlight/panel0-backlight/ssc_en + on early-boot # Wait for insmod_sh to finish all common modules wait_for_prop vendor.common.modules.ready 1 From 7b1c1b2326699cdd59b458a7135b22a47af3b687 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 03:22:23 +0000 Subject: [PATCH 02/10] Powerhint: Enable big core reduction feature and CDPreferIdle, limit CPUset to 0-6, optimize MIF clock frequency CAMERA_STREAMING_HIGH: CPUSkipMask to 0x80 MemFreq to 1539000 Enable CDPreferIdle CDCpuset to 0-6 CAMERA_STREAMING_STANDARD: CPUSkipMask to 0x80 TAPreferIdle to 0 Enable CDPreferIdle CDCpuset to 0-6 Refer to ag/26718992, ag/26787527 and ag/26710529 Bug: 342502377 Test: Build pass Change-Id: Id1ba596588bf51c3847c0c5a9f9d72adc8888f19 --- perf/powerhint-tegu.json | 43 ++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index 503c0f8..a120460 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -29,6 +29,7 @@ "Path": "/sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/min_freq", "Values": [ "9999999", + "1539000", "1352000", "1014000", "0" @@ -256,6 +257,16 @@ "DefaultIndex": 0, "ResetOnInit": true }, + { + "Name": "CPUSkipMask", + "Path": "/proc/vendor_sched/cpu_skip_mask", + "Values": [ + "0x0", + "0x80" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "BGUClampMaxBoost", "Path": "/proc/vendor_sched/groups/bg/uclamp_max", @@ -1828,12 +1839,6 @@ "Duration": 0, "Value": "0" }, - { - "PowerHint": "CAMERA_STREAMING_HIGH", - "Node": "CDPreferIdle", - "Duration": 0, - "Value": "0" - }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPULittleClusterMaxFreq", @@ -1844,7 +1849,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "MemFreq", "Duration": 0, - "Value": "1352000" + "Value": "1539000" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -1876,6 +1881,12 @@ "Duration": 0, "Value": "4-6" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CDCpuset", + "Duration": 0, + "Value": "0-6" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "VIRTUAL-SKIN-CPU-MID", @@ -1894,6 +1905,12 @@ "Duration": 0, "Value": "700000" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUSkipMask", + "Duration": 0, + "Value": "0x80" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1974,13 +1991,13 @@ }, { "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "CDPreferIdle", + "Node": "TAPreferHighCap", "Duration": 0, "Value": "0" }, { "PowerHint": "CAMERA_STREAMING_STANDARD", - "Node": "TAPreferHighCap", + "Node": "TAPreferIdle", "Duration": 0, "Value": "0" }, @@ -2012,7 +2029,7 @@ "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CDCpuset", "Duration": 0, - "Value": "0-7" + "Value": "0-6" }, { "PowerHint": "CAMERA_STREAMING_STANDARD", @@ -2026,6 +2043,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "CPUSkipMask", + "Duration": 0, + "Value": "0x80" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CPUDVFSHeadroom", From cc8c9de464205cf2ce13f95b196e92672b540a16 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 03:31:05 +0000 Subject: [PATCH 03/10] Thermal Boost for severe thermal state Refer to ag/26566748 and ag/26898080 Bug: 342502377 Test: Build pass Change-Id: Icc5c6eb7963e7e9a26140738e068d556ca008bb9 --- perf/powerhint-tegu.json | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index a120460..0589632 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -292,6 +292,7 @@ "Path": "/proc/vendor_sched/groups/cam/uclamp_min", "Values": [ "765", + "250", "0" ], "ResetOnInit": true @@ -359,9 +360,10 @@ "0-3", "4-7", "4-6", - "0-6", - "0-7" + "0-7", + "0-6" ], + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -1383,6 +1385,30 @@ "Duration": 3000, "Value": "0" }, + { + "PowerHint": "CAMERA_THERMAL_SEVERE_BOOST", + "Node": "CDPreferHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_THERMAL_SEVERE_BOOST", + "Node": "CAMUClampBoost", + "Duration": 0, + "Value": "250" + }, + { + "PowerHint": "CAMERA_THERMAL_SEVERE_BOOST", + "Node": "CPUSkipMask", + "Duration": 0, + "Value": "0x0" + }, + { + "PowerHint": "CAMERA_THERMAL_SEVERE_BOOST", + "Node": "CDCpuset", + "Duration": 0, + "Value": "0-7" + }, { "PowerHint": "CAMERA_SHOT", "Node": "PMU_POLL", From 0b6862293623d630c37a06ff90ca1bc90484c463 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 03:35:24 +0000 Subject: [PATCH 04/10] Increase TAUClampBoost during capture to reduce latency Refer to ag/26943660 and ag/27007128 Bug: 342502377 Test: Build pass Change-Id: I16bfd29cad1829ed74b6946e02b2bbb573037b51 --- perf/powerhint-tegu.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index 0589632..d8c2494 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -302,6 +302,7 @@ "Path": "/proc/vendor_sched/groups/ta/uclamp_min", "Values": [ "765", + "600", "1" ], "ResetOnInit": true @@ -1385,6 +1386,12 @@ "Duration": 3000, "Value": "0" }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUClampBoost", + "Duration": 3000, + "Value": "600" + }, { "PowerHint": "CAMERA_THERMAL_SEVERE_BOOST", "Node": "CDPreferHighCap", From f5e293b0e4dce846221ffc539d2346a8ae8c38d7 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 03:42:13 +0000 Subject: [PATCH 05/10] Increase SPC threshold for little and mid cores for CAMERA_STREAMING_STANDARD SPC threshold is too low for both Little and Mid cores. This CL increases this threshold to 55 for Little Core and to 30 for Mid core. Test results show lower framedrop rate in presence of background load, without having a negative impact on the power. Refer to ag/26943567 and ag/27018139 Bug: 342502377 Test: Build pass Change-Id: I593b9ca4f85e844ebacdb8606147d51c9d8926da --- perf/powerhint-tegu.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index d8c2494..2c83032 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -687,6 +687,7 @@ "Path": "/sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold", "Values": [ "70", + "55", "42", "35", "30", @@ -1960,7 +1961,7 @@ "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PMU_LIT_SPC_THRESHOLD", "Duration": 0, - "Value": "42" + "Value": "55" }, { "PowerHint": "CAMERA_STREAMING_STANDARD", @@ -1972,7 +1973,7 @@ "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PMU_MID_SPC_THRESHOLD", "Duration": 0, - "Value": "18" + "Value": "30" }, { "PowerHint": "CAMERA_STREAMING_STANDARD", From efae9635e181ba71006d06cd0d33427ccfff4187 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 03:46:57 +0000 Subject: [PATCH 06/10] Increase SPC thresholds for 60fps This CL increase SPC threshold for little core to 55, and for mid core to 32. Tests show that in a loaded scenario, framedrop rate can reduce to almost zero, while not impacting the power in the unloaded (baseline) scenario. Refer to ag/27032799 and ag/27078536 Bug: 342502377 Test: Build pass Change-Id: I9c50b58483cb5262c3550cb45907cbe522eb4e5a --- perf/powerhint-tegu.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index 2c83032..ef2adc6 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -711,6 +711,7 @@ "Path": "/sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold", "Values": [ "50", + "32", "30", "20", "18" @@ -1811,7 +1812,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PMU_LIT_SPC_THRESHOLD", "Duration": 0, - "Value": "35" + "Value": "55" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -1823,7 +1824,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PMU_MID_SPC_THRESHOLD", "Duration": 0, - "Value": "20" + "Value": "32" }, { "PowerHint": "CAMERA_STREAMING_HIGH", From 0efca5ac372a9d3937bddb1063007f3978bde50e Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 03:52:17 +0000 Subject: [PATCH 07/10] Disable CDPreferIdle, set DSUMin to 610MHz for 60fps With MulticamRoutingNode on RT, the performance is no longer impacted by having CDPreferIdle disabled. Additionally, this CL reduces DSUMin to 610MHz, saving overall up to 50mW in CPU power. Refer to ag/27091363 and ag/27105186 Bug: 342502377 Test: Build pass Change-Id: I49c8a5aad237c76582388545ff83d44d440d84a0 --- perf/powerhint-tegu.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index ef2adc6..34b2966 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -53,6 +53,7 @@ "1800000", "1548000", "820000", + "610000", "0" ], "ResetOnInit": true @@ -1800,7 +1801,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "DsuMinFreq", "Duration": 0, - "Value": "820000" + "Value": "610000" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -1898,6 +1899,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CDPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CDHighCpusetCpus", From 1f3c427641880340dab53e6fe4e8b48dc23e7f52 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 04:00:08 +0000 Subject: [PATCH 08/10] Enable PMU during photo capture This CL enables PMU feature during photo capture. With the new settings, we can achieve up to 120ms saving in capture latency, while paying a penalty of 60mW. However, even with the added power, we are still below the F10 numbers (go/f10-camera-power-gtw). Refer to ag/27238472 and ag/27255676 Bug: 342502377 Test: GCA photo capture Change-Id: Iefe755e64e2e5bd6858f13adb4be7533c6b3e611 --- perf/powerhint-tegu.json | 52 ++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index 34b2966..581ca0a 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -677,10 +677,11 @@ "Name": "PMU_LIT_LIMIT_FREQ", "Path": "/sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency", "Values": [ + "1425000", "1328000", "1098000" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -688,6 +689,7 @@ "Path": "/sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold", "Values": [ "70", + "40", "55", "42", "35", @@ -702,6 +704,7 @@ "Path": "/sys/devices/system/cpu/cpufreq/policy4/sched_pixel/limit_frequency", "Values": [ "1795000", + "1549000", "1328000" ], "DefaultIndex": 0, @@ -713,6 +716,7 @@ "Values": [ "50", "32", + "15", "30", "20", "18" @@ -734,8 +738,8 @@ "Path": "/sys/devices/system/cpu/cpufreq/policy7/sched_pixel/spc_threshold", "Values": [ "50", - "22", - "20" + "20", + "22" ], "DefaultIndex": 0 }, @@ -1367,27 +1371,39 @@ }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "CPUBigClusterMaxFreq", - "Duration": 3000, - "Value": "1885000" - }, - { - "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "CPUMidClusterMaxFreq", - "Duration": 3000, - "Value": "1549000" - }, - { - "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "CPULittleClusterMaxFreq", + "Node": "PMU_LIT_LIMIT_FREQ", "Duration": 3000, "Value": "1425000" }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "PMU_POLL", + "Node": "PMU_MID_LIMIT_FREQ", "Duration": 3000, - "Value": "0" + "Value": "1549000" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "PMU_BIG_LIMIT_FREQ", + "Duration": 3000, + "Value": "1885000" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "PMU_LIT_SPC_THRESHOLD", + "Duration": 3000, + "Value": "40" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "PMU_MID_SPC_THRESHOLD", + "Duration": 3000, + "Value": "15" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "PMU_BIG_SPC_THRESHOLD", + "Duration": 3000, + "Value": "20" }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", From 79263305ab4a33cd7b084d0b7cb470de578da498 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Fri, 24 May 2024 04:11:03 +0000 Subject: [PATCH 09/10] [Camera] Change PMU max frequency for CL2 to 1164MHz sync from ag/27327800 and ag/27350615 Bug: 342502377 Test: GCA Change-Id: I21162cd593db199a25fa527d4a1879b3f4ea694b --- perf/powerhint-tegu.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index 581ca0a..ec210a4 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -729,7 +729,7 @@ "Values": [ "2363000", "1885000", - "1298000" + "1164000" ], "DefaultIndex": 0 }, @@ -1715,7 +1715,7 @@ "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "PMU_BIG_LIMIT_FREQ", "Duration": 0, - "Value": "1298000" + "Value": "1164000" }, { "PowerHint": "CAMERA_STREAMING_EXTREME", @@ -1847,7 +1847,7 @@ "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PMU_BIG_LIMIT_FREQ", "Duration": 0, - "Value": "1298000" + "Value": "1164000" }, { "PowerHint": "CAMERA_STREAMING_HIGH", @@ -2003,7 +2003,7 @@ "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PMU_BIG_LIMIT_FREQ", "Duration": 0, - "Value": "1298000" + "Value": "1164000" }, { "PowerHint": "CAMERA_STREAMING_STANDARD", @@ -2904,7 +2904,7 @@ "PowerHint": "CAMERA_PROJECT11", "Node": "PMU_BIG_LIMIT_FREQ", "Duration": 0, - "Value": "1885000" + "Value": "1164000" }, { "PowerHint": "CAMERA_PROJECT11", From bd9bbb5288a0c3dcb98971c3aec20bc1eaad5ebc Mon Sep 17 00:00:00 2001 From: samou Date: Fri, 24 May 2024 08:03:35 +0000 Subject: [PATCH 10/10] thermal: tegu: Remove BCL related thermal zone Bug: 342504477 Change-Id: I8da3a8b1ae6fee59b8e03fddc5f2bdca2c080a8b Signed-off-by: samou --- thermal/thermal_info_config_tegu.json | 69 --------------------------- 1 file changed, 69 deletions(-) diff --git a/thermal/thermal_info_config_tegu.json b/thermal/thermal_info_config_tegu.json index d89db0d..56c6fd3 100644 --- a/thermal/thermal_info_config_tegu.json +++ b/thermal/thermal_info_config_tegu.json @@ -89,51 +89,12 @@ "Name":"battery_cycle", "Type":"BCL_VOLTAGE" }, - { - "Name":"critical-battery-cell", - "Type":"BCL_VOLTAGE", - "VirtualSensor":true, - "Formula":"COUNT_THRESHOLD", - "TriggerSensor": "vdroop1", - "Combination":["battery", "battery_cycle", "vdroop1"], - "Coefficient":[-10000, 400, 1000], - "HotThreshold":["NAN", "NAN", "NAN", "NAN", "NAN", 3.00, "NAN"], - "Multiplier":1, - "PollingDelay":0, - "PassiveDelay":1000, - "SendCallback":true - }, - { - "Name":"FLASH_LED_REDUCE", - "Type":"UNKNOWN", - "VirtualSensor":true, - "Formula":"COUNT_THRESHOLD", - "TriggerSensor": "vdroop1", - "Combination":["battery", "battery_cycle", "vdroop1"], - "Coefficient":[-10000, 400, 1000], - "HotThreshold":["NAN", "NAN", "NAN", "NAN", 3.00, "NAN", "NAN"], - "Multiplier":1, - "PollingDelay":0, - "PassiveDelay":1000, - "SendCallback":true, - "SendPowerHint":true - }, { "Name":"soc", "Type":"BCL_PERCENTAGE", "HotThreshold":["NAN", "NAN", 80, "NAN", "NAN", "NAN", "NAN"], "Multiplier":1 }, - { - "Name":"batoilo", - "Type":"BCL_CURRENT", - "HotThreshold":["NAN", "NAN", "NAN", "NAN", 5000, "NAN", "NAN"], - "HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0], - "Multiplier":1, - "SendCallback":true, - "PollingDelay":0, - "PassiveDelay":1000 - }, { "Name":"BCL_AUDIO_BAACL", "Type":"BCL_VOLTAGE", @@ -148,36 +109,6 @@ "Multiplier":1, "SendCallback":true }, - { - "Name":"vdroop1", - "Type":"BCL_VOLTAGE", - "HotThreshold":["NAN", "NAN", "NAN", "NAN", 1000, "NAN", "NAN"], - "HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0], - "Multiplier":1, - "SendCallback":true, - "PollingDelay":0, - "PassiveDelay":1000 - }, - { - "Name":"vdroop2", - "Type":"BCL_VOLTAGE", - "HotThreshold":["NAN", "NAN", "NAN", "NAN", 1200, "NAN", "NAN"], - "HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0], - "Multiplier":1, - "SendCallback":true, - "PollingDelay":0, - "PassiveDelay":1000 - }, - { - "Name":"smpl_gm", - "Type":"BCL_VOLTAGE", - "HotThreshold":["NAN", "NAN", "NAN", "NAN", 1100, "NAN", "NAN"], - "HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0], - "Multiplier":1, - "SendCallback":true, - "PollingDelay":0, - "PassiveDelay":1000 - }, { "Name":"VIRTUAL-BTS-WINDOW-PARTIAL", "Type":"UNKNOWN",