From adc580edaf71a199ea66ea047c7c63023d320371 Mon Sep 17 00:00:00 2001 From: "Peter (YM)" Date: Mon, 18 Sep 2023 03:55:10 +0000 Subject: [PATCH] Optimize the thermal policy for camera mode Align with P23 device thermal feature Bug: 301196807 Test: Build on device and boot to home Change-Id: I703b36956717694f46922849f9707a2c9b5e3f95 Signed-off-by: Peter (YM) --- powerhint-akita.json | 21 ++++++++++++++++++- thermal_info_config_akita.json | 37 +++++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/powerhint-akita.json b/powerhint-akita.json index 58be8d8..b0f0732 100644 --- a/powerhint-akita.json +++ b/powerhint-akita.json @@ -752,7 +752,8 @@ "Path": "vendor.thermal.VIRTUAL-SKIN-CPU-MID.profile", "Values": [ "", - "game" + "game", + "camera" ], "DefaultIndex": 0, "ResetOnInit": true, @@ -1560,6 +1561,12 @@ "Duration": 0, "Value": "0-8" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "VIRTUAL-SKIN-CPU-HIGH", @@ -1704,6 +1711,12 @@ "Duration": 0, "Value": "4-8" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "VIRTUAL-SKIN-CPU-HIGH", @@ -1830,6 +1843,12 @@ "Duration": 0, "Value": "0-8" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "VIRTUAL-SKIN-CPU-HIGH", diff --git a/thermal_info_config_akita.json b/thermal_info_config_akita.json index e324818..94f3e72 100644 --- a/thermal_info_config_akita.json +++ b/thermal_info_config_akita.json @@ -355,6 +355,26 @@ "Disabled":true } ] + }, + { + "Mode": "camera", + "BindedCdevInfo": [ + { + "CdevRequest": "thermal-cpufreq-0", + "MaxReleaseStep": 1, + "Disabled":true + }, + { + "CdevRequest": "thermal-cpufreq-1", + "MaxReleaseStep": 1, + "Disabled":true + }, + { + "CdevRequest": "thermal-cpufreq-2", + "MaxReleaseStep": 1, + "Disabled":true + } + ] } ] }, @@ -400,7 +420,7 @@ }, { "CdevRequest": "thermal-cpufreq-2", - "CdevWeightForPID": [0.252, 0.225, 0.225, 0.225, 0.225, 0.225, 0.225], + "CdevWeightForPID": [0.225, 0.225, 0.225, 0.225, 0.225, 0.225, 0.225], "MaxReleaseStep": 1, "MaxThrottleStep": 2, "CdevCeiling": [0, 13, 13, 13, 13, 13, 13] @@ -435,21 +455,24 @@ "BindedCdevInfo": [ { "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [0.156, 0.156, 0.156, 0.156, 0.156, 0.156, 0.156], "MaxReleaseStep": 1, - "CdevCeiling": [0, 8, 8, 8, 8, 8, 8], - "Disabled":true + "MaxThrottleStep": 1, + "CdevCeiling": [0, 6, 6, 6, 6, 6, 6] }, { "CdevRequest": "thermal-cpufreq-1", + "CdevWeightForPID": [0.428, 0.428, 0.428, 0.428, 0.428, 0.428, 0.428], "MaxReleaseStep": 1, - "CdevCeiling": [0, 11, 11, 11, 11, 11, 11], - "Disabled":true + "MaxThrottleStep": 2, + "CdevCeiling": [0, 9, 9, 9, 9, 9, 9] }, { "CdevRequest": "thermal-cpufreq-2", + "CdevWeightForPID": [0.225, 0.225, 0.225, 0.225, 0.225, 0.225, 0.225], "MaxReleaseStep": 1, - "CdevCeiling": [0, 13, 13, 13, 13, 13, 13], - "Disabled":true + "MaxThrottleStep": 2, + "CdevCeiling": [0, 12, 12, 12, 12, 12, 12] } ] }