From 175bd53191590f3ef0d337aeb3e11cc3ff610259 Mon Sep 17 00:00:00 2001 From: Grace Chen Date: Wed, 6 Apr 2022 12:23:46 -0700 Subject: [PATCH 1/4] Enable read/write access to st33spi_state for euiccpixel_app Bug: 228508704 Test: Confirm can read/write st33spi_state Change-Id: Ia7a41d2785a84fdf2d99c09fb040e35733e0eda1 --- conf/init.pantah.rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/init.pantah.rc b/conf/init.pantah.rc index 8827b03..069331f 100644 --- a/conf/init.pantah.rc +++ b/conf/init.pantah.rc @@ -50,6 +50,10 @@ on post-fs-data # Speaker amp permission chmod 644 /mnt/vendor/persist/audio/speaker.cal + # Allow secure_element group to read / write ST33 SPI state + chown secure_element secure_element /sys/class/st33spi/st33spi/st33spi_state + chmod 0660 /sys/class/st33spi/st33spi/st33spi_state + service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1p2p_device=1 \ -m/vendor/etc/wifi/p2p_supplicant.conf \ @@ -93,4 +97,4 @@ on property:vendor.device.modules.ready=1 chown system system /proc/focaltech_touch/selftest/Scap_CB chown system system /proc/focaltech_touch/selftest/Scap_Rawdata chown system system /proc/focaltech_touch/selftest/Short - chown system system /proc/focaltech_touch/selftest/Strength \ No newline at end of file + chown system system /proc/focaltech_touch/selftest/Strength From 43ad58996b2590c341db7b4a030fb3d77fd8a6c2 Mon Sep 17 00:00:00 2001 From: George Lee Date: Mon, 11 Apr 2022 13:04:20 -0700 Subject: [PATCH 2/4] thermal: Remove 80% SOC monitoring Bug: 228808192 Test: Local test to verify no polling Signed-off-by: George Lee Change-Id: I6a0a0fa240e199a3ccf47138b3204679fd3f6eed --- thermal_info_config_cheetah.json | 4 +--- thermal_info_config_cloudripper.json | 16 ++++------------ thermal_info_config_panther.json | 4 +--- thermal_info_config_ravenclaw.json | 4 +--- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/thermal_info_config_cheetah.json b/thermal_info_config_cheetah.json index c2df4a9..04530fa 100644 --- a/thermal_info_config_cheetah.json +++ b/thermal_info_config_cheetah.json @@ -598,7 +598,7 @@ "Type":"BCL_PERCENTAGE", "HotThreshold":[ "NAN", - 20, + "NAN", 80, "NAN", "NAN", @@ -607,8 +607,6 @@ ], "VrThreshold":"NAN", "Multiplier":1, - "PollingDelay":60000, - "PassiveDelay":7000, "Monitor":true }, { diff --git a/thermal_info_config_cloudripper.json b/thermal_info_config_cloudripper.json index c75ce64..cf069aa 100644 --- a/thermal_info_config_cloudripper.json +++ b/thermal_info_config_cloudripper.json @@ -142,22 +142,14 @@ "NAN", 80, "NAN", - 90, - 93, - 96, + "NAN", + "NAN", + "NAN", "NAN" ], "VrThreshold":"NAN", "Multiplier":1, - "Monitor":true, - "PollingDelay":300000, - "PassiveDelay":5000, - "BindedCdevInfo": [ - { - "CdevRequest": "thermal-cpufreq-2", - "LimitInfo": [0, 0, 0, 7, 7, 10, 10] - } - ] + "Monitor":true }, { "Name":"batoilo", diff --git a/thermal_info_config_panther.json b/thermal_info_config_panther.json index b64e11f..f698199 100644 --- a/thermal_info_config_panther.json +++ b/thermal_info_config_panther.json @@ -598,7 +598,7 @@ "Type":"BCL_PERCENTAGE", "HotThreshold":[ "NAN", - 20, + "NAN", 80, "NAN", "NAN", @@ -607,8 +607,6 @@ ], "VrThreshold":"NAN", "Multiplier":1, - "PollingDelay":60000, - "PassiveDelay":7000, "Monitor":true }, { diff --git a/thermal_info_config_ravenclaw.json b/thermal_info_config_ravenclaw.json index ba85ef8..85d91b7 100644 --- a/thermal_info_config_ravenclaw.json +++ b/thermal_info_config_ravenclaw.json @@ -140,7 +140,7 @@ "Type":"BCL_PERCENTAGE", "HotThreshold":[ "NAN", - 20, + "NAN", 80, "NAN", "NAN", @@ -149,8 +149,6 @@ ], "VrThreshold":"NAN", "Multiplier":1, - "PollingDelay":60000, - "PassiveDelay":7000, "Monitor":true }, { From f94b4648325087cff2bc9acdf4d89653d9a19561 Mon Sep 17 00:00:00 2001 From: shawnlin Date: Fri, 8 Apr 2022 11:45:00 +0800 Subject: [PATCH 3/4] Fixed status bar glitch for apps that access internal resource dimen Bring back old usage of status_bar_height, status_bar_height_portrait, and status_bar_height_landscape by set the size containing cutout size. Bug: 216782082 Test: make Change-Id: Iff388639497a7955e363c3372d79ead35831bea5 --- .../overlay/frameworks/base/core/res/res/values/dimens.xml | 4 +++- .../overlay/frameworks/base/core/res/res/values/dimens.xml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cheetah/overlay/frameworks/base/core/res/res/values/dimens.xml b/cheetah/overlay/frameworks/base/core/res/res/values/dimens.xml index fb5ea14..ee3f9c7 100644 --- a/cheetah/overlay/frameworks/base/core/res/res/values/dimens.xml +++ b/cheetah/overlay/frameworks/base/core/res/res/values/dimens.xml @@ -29,7 +29,9 @@ - 28dp + 28dp + 130px + 28dp 5px diff --git a/panther/overlay/frameworks/base/core/res/res/values/dimens.xml b/panther/overlay/frameworks/base/core/res/res/values/dimens.xml index 82c194e..9051ca3 100644 --- a/panther/overlay/frameworks/base/core/res/res/values/dimens.xml +++ b/panther/overlay/frameworks/base/core/res/res/values/dimens.xml @@ -29,7 +29,9 @@ - 28dp + 28dp + 118px + 28dp 5px From dade9ed2ac491a3bc1bf309ca8abfce792bed625 Mon Sep 17 00:00:00 2001 From: Sayanna Chandula Date: Thu, 31 Mar 2022 18:17:19 +0000 Subject: [PATCH 4/4] thermal: add usbc virtual sensors for overheat protection Add a virtual sensor for USBC overheat protection and messaging to UI. Bind overheat protection sensor with USBC cooling device. Bug: 222577017 Test: Build and boot on device Signed-off-by: Sayanna Chandula Change-Id: I6f3cdc01fedfd152382a2d5370e22e0acf6cb3ba --- thermal_info_config_cheetah.json | 125 ++++++++++++++++++++++++++++++- thermal_info_config_panther.json | 125 ++++++++++++++++++++++++++++++- 2 files changed, 246 insertions(+), 4 deletions(-) diff --git a/thermal_info_config_cheetah.json b/thermal_info_config_cheetah.json index 04530fa..6d369fe 100644 --- a/thermal_info_config_cheetah.json +++ b/thermal_info_config_cheetah.json @@ -95,7 +95,7 @@ "Type":"UNKNOWN", "HotThreshold":[ "NAN", - "NAN", + "35.0", "NAN", "NAN", "NAN", @@ -111,7 +111,7 @@ "Type":"UNKNOWN", "HotThreshold":[ "NAN", - "35.0", + "NAN", "NAN", "NAN", "NAN", @@ -458,6 +458,123 @@ "PollingDelay":300000, "PassiveDelay":7000 }, + { + "Name":"USB-MINUS-USB2", + "Type":"UNKNOWN", + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":[ + "usb_pwr_therm", + "usb_pwr_therm2" + ], + "Coefficient":[ + "1.0", + "-1.0" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN" + ], + "VrThreshold":"NAN", + "Multiplier":0.001 + }, + { + "Name":"USB-MINUS-NEUTRAL", + "Type":"UNKNOWN", + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":[ + "usb_pwr_therm", + "neutral_therm" + ], + "Coefficient":[ + "1.0", + "-1.0" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN" + ], + "VrThreshold":"NAN", + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-USB-THROTTLING", + "Type":"USB_PORT", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm", + "Combination":[ + "usb_pwr_therm", + "USB-MINUS-USB2", + "USB-MINUS-NEUTRAL" + ], + "Coefficient":[ + "42000", + "4000", + "7000" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "3.0", + "NAN", + "NAN" + ], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "VrThreshold":"NAN", + "Multiplier":1, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-UI", + "Type":"USB_PORT", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm", + "Combination":[ + "usb_pwr_therm", + "USB-MINUS-USB2", + "USB-MINUS-NEUTRAL" + ], + "Coefficient":[ + "47000", + "4500", + "8000" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "3.0", + "NAN" + ], + "VrThreshold":"NAN", + "Multiplier":1, + "Monitor":true, + "PollingDelay":60000, + "PassiveDelay":7000 + }, { "Name":"LITTLE", "Type":"CPU", @@ -1249,6 +1366,10 @@ "Name":"wlc_fcc", "Type":"BATTERY" }, + { + "Name":"usbc-port", + "Type":"BATTERY" + }, { "Name":"tpu_cooling", "Type":"NPU", diff --git a/thermal_info_config_panther.json b/thermal_info_config_panther.json index f698199..65ea98a 100644 --- a/thermal_info_config_panther.json +++ b/thermal_info_config_panther.json @@ -68,7 +68,7 @@ "Type":"UNKNOWN", "HotThreshold":[ "NAN", - "NAN", + "35.0", "NAN", "NAN", "NAN", @@ -84,7 +84,7 @@ "Type":"UNKNOWN", "HotThreshold":[ "NAN", - "35.0", + "NAN", "NAN", "NAN", "NAN", @@ -458,6 +458,123 @@ "PollingDelay":300000, "PassiveDelay":7000 }, + { + "Name":"USB-MINUS-USB2", + "Type":"UNKNOWN", + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":[ + "usb_pwr_therm", + "usb_pwr_therm2" + ], + "Coefficient":[ + "1.0", + "-1.0" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN" + ], + "VrThreshold":"NAN", + "Multiplier":0.001 + }, + { + "Name":"USB-MINUS-NEUTRAL", + "Type":"UNKNOWN", + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":[ + "usb_pwr_therm", + "neutral_therm" + ], + "Coefficient":[ + "1.0", + "-1.0" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "NAN" + ], + "VrThreshold":"NAN", + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-USB-THROTTLING", + "Type":"USB_PORT", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm", + "Combination":[ + "usb_pwr_therm", + "USB-MINUS-USB2", + "USB-MINUS-NEUTRAL" + ], + "Coefficient":[ + "40000", + "1500", + "3000" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "3.0", + "NAN", + "NAN" + ], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "VrThreshold":"NAN", + "Multiplier":1, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-UI", + "Type":"USB_PORT", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm", + "Combination":[ + "usb_pwr_therm", + "USB-MINUS-USB2", + "USB-MINUS-NEUTRAL" + ], + "Coefficient":[ + "42000", + "2000", + "4000" + ], + "HotThreshold":[ + "NAN", + "NAN", + "NAN", + "NAN", + "NAN", + "3.0", + "NAN" + ], + "VrThreshold":"NAN", + "Multiplier":1, + "Monitor":true, + "PollingDelay":60000, + "PassiveDelay":7000 + }, { "Name":"LITTLE", "Type":"CPU", @@ -1249,6 +1366,10 @@ "Name":"wlc_fcc", "Type":"BATTERY" }, + { + "Name":"usbc-port", + "Type":"BATTERY" + }, { "Name":"tpu_cooling", "Type":"NPU",