From 1f98950323e565e999a23f4264d5fed33d6c6a2e Mon Sep 17 00:00:00 2001 From: Sayanna Chandula Date: Fri, 22 Apr 2022 01:36:32 +0000 Subject: [PATCH] thermal: enable thermal engine for evt1.0 devices New version of thermal engine (Powerlink v2) uses ODPM data for thermal mitigation. But proto devices does not support ODPM. Currently we have disabled thermal mitigation for all A0 based devices through a separate config, thermal_info_config_A0.json. This change restricts using separate thermal config only for the proto devices and uses thermal_info_config.json for the rest. Fix a format issue with qi-quiet sensor definition. Bug: 196478280 Test: Build and boot on device. Check thermal config Signed-off-by: Sayanna Chandula Change-Id: I0922e935cafe118f3437335e2a72b87aae6f6009 --- conf/init.pantah.rc | 6 ++++++ device-cheetah.mk | 2 +- device-cloudripper.mk | 2 +- device-panther.mk | 2 +- device-ravenclaw.mk | 2 +- thermal_info_config_panther.json | 2 +- ...al_info_config_A0.json => thermal_info_config_proto.json | 0 7 files changed, 11 insertions(+), 5 deletions(-) rename thermal_info_config_A0.json => thermal_info_config_proto.json (100%) diff --git a/conf/init.pantah.rc b/conf/init.pantah.rc index 697aca9..2b1408d 100644 --- a/conf/init.pantah.rc +++ b/conf/init.pantah.rc @@ -82,6 +82,12 @@ on property:persist.vendor.se.ese2.mode=ctsmode on init && property:ro.boot.hw.soc.rev=0 setprop vendor.powerhal.config powerhint-a0.json +on property:ro.boot.hardware.revision=PROTO1.0 + setprop vendor.thermal.config "thermal_info_config_proto.json" + +on property:ro.boot.hardware.revision=PROTO1.1 + setprop vendor.thermal.config "thermal_info_config_proto.json" + # Touch on property:vendor.device.modules.ready=1 chown system system /proc/focaltech_touch/Channel_Num diff --git a/device-cheetah.mk b/device-cheetah.mk index cbf2a9f..0a84055 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -110,7 +110,7 @@ DEVICE_MANIFEST_FILE += \ # Thermal Config PRODUCT_COPY_FILES += \ device/google/pantah/thermal_info_config_cheetah.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json + device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json # Power HAL config PRODUCT_COPY_FILES += \ diff --git a/device-cloudripper.mk b/device-cloudripper.mk index 72d6a7b..0356a70 100644 --- a/device-cloudripper.mk +++ b/device-cloudripper.mk @@ -80,7 +80,7 @@ DEVICE_MANIFEST_FILE += \ # Thermal Config PRODUCT_COPY_FILES += \ device/google/pantah/thermal_info_config_cloudripper.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json + device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json # Power HAL config PRODUCT_COPY_FILES += \ diff --git a/device-panther.mk b/device-panther.mk index fa17108..f390c44 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -98,7 +98,7 @@ DEVICE_MANIFEST_FILE += \ # Thermal Config PRODUCT_COPY_FILES += \ device/google/pantah/thermal_info_config_panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json + device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json # Power HAL config PRODUCT_COPY_FILES += \ diff --git a/device-ravenclaw.mk b/device-ravenclaw.mk index c922dc5..e4d9223 100644 --- a/device-ravenclaw.mk +++ b/device-ravenclaw.mk @@ -85,7 +85,7 @@ DEVICE_MANIFEST_FILE += \ # Thermal Config PRODUCT_COPY_FILES += \ device/google/pantah/thermal_info_config_ravenclaw.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json + device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json # Power HAL config PRODUCT_COPY_FILES += \ diff --git a/thermal_info_config_panther.json b/thermal_info_config_panther.json index f51b057..1c0ff89 100644 --- a/thermal_info_config_panther.json +++ b/thermal_info_config_panther.json @@ -107,7 +107,7 @@ "Formula":"WEIGHTED_AVG", "Combination":["qi_therm", "quiet_therm"], "Coefficient":[0.3, 0.7], - "Offset":-1400, + "Offset":-1400 }, { "Name":"VIRTUAL-QI-DISP", diff --git a/thermal_info_config_A0.json b/thermal_info_config_proto.json similarity index 100% rename from thermal_info_config_A0.json rename to thermal_info_config_proto.json