From 16ae08548a42588d89962ab4846a812181b8c7a7 Mon Sep 17 00:00:00 2001 From: Ramya Subramanian Date: Sat, 18 Nov 2023 23:29:00 +0000 Subject: [PATCH] thermal: optimize thermal policy for camera mode Bug: 310748549 Test: sideloaded the cofig files and device rebooted to home Change-Id: Ib2af1fd19099b58fd6ba23bde10ea59767b67e05 Signed-off-by: Ramya Subramanian --- perf/powerhint-caiman.json | 36 +++++++++++ perf/powerhint-komodo.json | 36 +++++++++++ perf/powerhint-tokay.json | 42 +++++++++++++ thermal/thermal_info_config_caiman.json | 56 ++++++++++++----- thermal/thermal_info_config_caiman_proto.json | 56 ++++++++++++----- thermal/thermal_info_config_komodo.json | 61 +++++++++++++------ thermal/thermal_info_config_komodo_proto.json | 56 ++++++++++++----- thermal/thermal_info_config_tokay.json | 56 ++++++++++++----- thermal/thermal_info_config_tokay_proto.json | 56 ++++++++++++----- 9 files changed, 360 insertions(+), 95 deletions(-) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 0e394826..fa4a375b 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -1625,6 +1625,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PowerHALCameraRunning", @@ -1781,6 +1793,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1913,6 +1937,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index 0e394826..fa4a375b 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -1625,6 +1625,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PowerHALCameraRunning", @@ -1781,6 +1793,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1913,6 +1937,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 0e394826..9d327551 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -1625,6 +1625,24 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "PowerHALCameraRunning", + "Duration": 0, + "Value": "1" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "PowerHALCameraRunning", @@ -1781,6 +1799,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1913,6 +1943,18 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "VIRTUAL-SKIN-CPU-MID", + "Duration": 0, + "Value": "camera" + }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "VIRTUAL-SKIN-CPU-HIGH", + "Duration": 0, + "Value": "camera" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", diff --git a/thermal/thermal_info_config_caiman.json b/thermal/thermal_info_config_caiman.json index 72c098ab..9b797ca7 100644 --- a/thermal/thermal_info_config_caiman.json +++ b/thermal/thermal_info_config_caiman.json @@ -391,6 +391,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 + } + ] } ] }, @@ -436,7 +456,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] @@ -467,20 +487,26 @@ "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 - } + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [0.156, 0.156, 0.156, 0.156, 0.156, 0.156, 0.156], + "MaxReleaseStep": 1, + "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, + "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, + "MaxThrottleStep": 2, + "CdevCeiling": [0, 12, 12, 12, 12, 12, 12] + } ] } ] diff --git a/thermal/thermal_info_config_caiman_proto.json b/thermal/thermal_info_config_caiman_proto.json index 8abd9e2a..f9355bda 100644 --- a/thermal/thermal_info_config_caiman_proto.json +++ b/thermal/thermal_info_config_caiman_proto.json @@ -381,6 +381,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 + } + ] } ] }, @@ -426,7 +446,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] @@ -457,20 +477,26 @@ "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 - } + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [0.156, 0.156, 0.156, 0.156, 0.156, 0.156, 0.156], + "MaxReleaseStep": 1, + "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, + "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, + "MaxThrottleStep": 2, + "CdevCeiling": [0, 12, 12, 12, 12, 12, 12] + } ] } ] diff --git a/thermal/thermal_info_config_komodo.json b/thermal/thermal_info_config_komodo.json index efa59d8d..10520e61 100644 --- a/thermal/thermal_info_config_komodo.json +++ b/thermal/thermal_info_config_komodo.json @@ -413,6 +413,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 + } + ] } ] }, @@ -458,7 +478,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] @@ -486,25 +506,26 @@ ] }, { - "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 - } - ] - } + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [0.156, 0.156, 0.156, 0.156, 0.156, 0.156, 0.156], + "MaxReleaseStep": 1, + "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, + "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, + "MaxThrottleStep": 2, + "CdevCeiling": [0, 12, 12, 12, 12, 12, 12] + } ] }, { diff --git a/thermal/thermal_info_config_komodo_proto.json b/thermal/thermal_info_config_komodo_proto.json index e70ed452..2b65d936 100644 --- a/thermal/thermal_info_config_komodo_proto.json +++ b/thermal/thermal_info_config_komodo_proto.json @@ -414,6 +414,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 + } + ] } ] }, @@ -459,7 +479,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] @@ -490,20 +510,26 @@ "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 - } + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [0.156, 0.156, 0.156, 0.156, 0.156, 0.156, 0.156], + "MaxReleaseStep": 1, + "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, + "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, + "MaxThrottleStep": 2, + "CdevCeiling": [0, 12, 12, 12, 12, 12, 12] + } ] } ] diff --git a/thermal/thermal_info_config_tokay.json b/thermal/thermal_info_config_tokay.json index 76f6c9c9..656f4766 100644 --- a/thermal/thermal_info_config_tokay.json +++ b/thermal/thermal_info_config_tokay.json @@ -358,6 +358,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 + } + ] } ] }, @@ -403,7 +423,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] @@ -434,20 +454,26 @@ "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 - } + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [0.156, 0.156, 0.156, 0.156, 0.156, 0.156, 0.156], + "MaxReleaseStep": 1, + "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, + "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, + "MaxThrottleStep": 2, + "CdevCeiling": [0, 12, 12, 12, 12, 12, 12] + } ] } ] diff --git a/thermal/thermal_info_config_tokay_proto.json b/thermal/thermal_info_config_tokay_proto.json index 0cd18ff8..5895dbae 100644 --- a/thermal/thermal_info_config_tokay_proto.json +++ b/thermal/thermal_info_config_tokay_proto.json @@ -360,6 +360,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 + } + ] } ] }, @@ -405,7 +425,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] @@ -436,20 +456,26 @@ "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 - } + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [0.156, 0.156, 0.156, 0.156, 0.156, 0.156, 0.156], + "MaxReleaseStep": 1, + "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, + "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, + "MaxThrottleStep": 2, + "CdevCeiling": [0, 12, 12, 12, 12, 12, 12] + } ] } ]