From 14edfc76be552f657a873ae299df38dbc9a957fa Mon Sep 17 00:00:00 2001 From: Sayanna Chandula Date: Tue, 24 May 2022 05:44:56 +0000 Subject: [PATCH] thermal: add tpu/aur power hints for emergency severity Add power hints handling for EMERGENCY severity. Control temperature and switchon temperature are lowered when the pwoerhint is received. Remove power hint handling for isp thermal zones as PID control loop is not enabled for isp as of now. Bug: 229014824 Test: Build and boot on device. Check control/switchon temp when thermal severity reaches EMERGENCY level Signed-off-by: Sayanna Chandula Change-Id: I2e4bab9495d76e231df8277f3bf4ef68d5a141af --- powerhint-cheetah.json | 56 ++++++++++++++++++------------------------ powerhint-panther.json | 56 ++++++++++++++++++------------------------ 2 files changed, 48 insertions(+), 64 deletions(-) diff --git a/powerhint-cheetah.json b/powerhint-cheetah.json index 4138867..8e963dd 100644 --- a/powerhint-cheetah.json +++ b/powerhint-cheetah.json @@ -385,16 +385,6 @@ "DefaultIndex": 0, "ResetOnInit": false }, - { - "Name": "IspControlTempSet", - "Path": "/dev/thermal/tz-by-name/ISP/trip_point_2_temp", - "Values": [ - "100000", - "80000" - ], - "DefaultIndex": 0, - "ResetOnInit": false - }, { "Name": "AurControlTempSet", "Path": "/dev/thermal/tz-by-name/AUR/trip_point_2_temp", @@ -455,16 +445,6 @@ "DefaultIndex": 0, "ResetOnInit": false }, - { - "Name": "IspSwitchOnTempSet", - "Path": "/dev/thermal/tz-by-name/ISP/trip_point_1_temp", - "Values": [ - "80000", - "60000" - ], - "DefaultIndex": 0, - "ResetOnInit": false - }, { "Name": "AurSwitchOnTempSet", "Path": "/dev/thermal/tz-by-name/AUR/trip_point_1_temp", @@ -1481,12 +1461,6 @@ "Duration": 0, "Value": "80000" }, - { - "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", - "Node": "IspControlTempSet", - "Duration": 0, - "Value": "80000" - }, { "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", "Node": "AurControlTempSet", @@ -1523,12 +1497,6 @@ "Duration": 0, "Value": "60000" }, - { - "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", - "Node": "IspSwitchOnTempSet", - "Duration": 0, - "Value": "60000" - }, { "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", "Node": "AurSwitchOnTempSet", @@ -1655,6 +1623,18 @@ "Duration": 0, "Value": "80000" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "TpuControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "AurControlTempSet", + "Duration": 0, + "Value": "80000" + }, { "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", "Node": "BigSwitchOnTempSet", @@ -1679,6 +1659,18 @@ "Duration": 0, "Value": "60000" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "TpuSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "AurSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, { "PowerHint": "ML_ACC", "Node": "MLUclampBoost", diff --git a/powerhint-panther.json b/powerhint-panther.json index 4fe9966..964eb40 100644 --- a/powerhint-panther.json +++ b/powerhint-panther.json @@ -385,16 +385,6 @@ "DefaultIndex": 0, "ResetOnInit": false }, - { - "Name": "IspControlTempSet", - "Path": "/dev/thermal/tz-by-name/ISP/trip_point_2_temp", - "Values": [ - "100000", - "80000" - ], - "DefaultIndex": 0, - "ResetOnInit": false - }, { "Name": "AurControlTempSet", "Path": "/dev/thermal/tz-by-name/AUR/trip_point_2_temp", @@ -455,16 +445,6 @@ "DefaultIndex": 0, "ResetOnInit": false }, - { - "Name": "IspSwitchOnTempSet", - "Path": "/dev/thermal/tz-by-name/ISP/trip_point_1_temp", - "Values": [ - "80000", - "60000" - ], - "DefaultIndex": 0, - "ResetOnInit": false - }, { "Name": "AurSwitchOnTempSet", "Path": "/dev/thermal/tz-by-name/AUR/trip_point_1_temp", @@ -1465,12 +1445,6 @@ "Duration": 0, "Value": "80000" }, - { - "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", - "Node": "IspControlTempSet", - "Duration": 0, - "Value": "80000" - }, { "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", "Node": "AurControlTempSet", @@ -1507,12 +1481,6 @@ "Duration": 0, "Value": "60000" }, - { - "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", - "Node": "IspSwitchOnTempSet", - "Duration": 0, - "Value": "60000" - }, { "PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT", "Node": "AurSwitchOnTempSet", @@ -1639,6 +1607,18 @@ "Duration": 0, "Value": "80000" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "TpuControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "AurControlTempSet", + "Duration": 0, + "Value": "80000" + }, { "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", "Node": "BigSwitchOnTempSet", @@ -1663,6 +1643,18 @@ "Duration": 0, "Value": "60000" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "TpuSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "AurSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, { "PowerHint": "ML_ACC", "Node": "MLUclampBoost",