From 1f26a4e82230b66dfdc54add7f598d64b566d62d Mon Sep 17 00:00:00 2001 From: Giammarco Senatore Date: Tue, 20 Jul 2021 01:25:51 +0200 Subject: [PATCH] kunlun2: Partially revert "Drop android.hardware.thermal HAL" We still need thermal engine This partially reverts commit 11d6885d9387ba11af7da7effbac5a345721a612. --- configs/thermal-engine.conf | 107 ++++++++++++++++++++++++++++++++++++ device.mk | 4 ++ proprietary-files.txt | 2 + 3 files changed, 113 insertions(+) create mode 100644 configs/thermal-engine.conf diff --git a/configs/thermal-engine.conf b/configs/thermal-engine.conf new file mode 100644 index 0000000..919ff3d --- /dev/null +++ b/configs/thermal-engine.conf @@ -0,0 +1,107 @@ +[MSM-THERM0-0] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu0 +set_point 50000 +set_point_clr 48000 +device_max_limit 1612800 + +[MSM-THERM0-1] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu0 +set_point 52000 +set_point_clr 50000 +device_max_limit 1516800 + +[MSM-THERM0-2] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu0 +set_point 54000 +set_point_clr 52000 +device_max_limit 1324800 + +[MSM-THERM0-PERF] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu0 +set_point 54000 +set_point_clr 52000 +device_max_limit 1708800 + +[MSM-THERM1-0] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu6 +set_point 50000 +set_point_clr 48000 +device_max_limit 2054400 + +[MSM-THERM1-1] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu6 +set_point 52000 +set_point_clr 50000 +device_max_limit 1843200 + +[MSM-THERM1-2] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu6 +set_point 54000 +set_point_clr 52000 +device_max_limit 1747200 + +[MSM-THERM1-3] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu6 +set_point 56000 +set_point_clr 54000 +device_max_limit 1536000 + +[MSM-THERM1-PERF] +algo_type ss +sampling 100 +sensor msm-therm-adc +device cpu6 +set_point 56000 +set_point_clr 54000 +device_max_limit 2054400 + +[SS-GPU] +algo_type ss +sampling 250 +sensor gpu0-usr +device gpu +set_point 85000 +set_point_clr 60000 + + +[MODEM_PROC_TEMP_MITIGATION] +disable 1 + +[MODEM_PA_MITIGATION] +disable 1 + +[CAMERA_SKIN_EXIT_MITIGATION] +disable 1 + +[BATTERY_CHARGING_CTL] +algo_type monitor +sampling 1000 +sensor xo-therm-adc +thresholds 40000 42000 44000 46000 48000 +thresholds_clr 40000 42000 44000 46000 48000 +actions battery battery battery battery battery +action_info 1 2 3 4 5 diff --git a/device.mk b/device.mk index 94e775c..e0ed851 100644 --- a/device.mk +++ b/device.mk @@ -342,6 +342,10 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ TetheringConfigOverlay +# Thermal engine +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf + # Tracing PRODUCT_PACKAGES += \ android.hardware.atrace@1.0-service.pixel diff --git a/proprietary-files.txt b/proprietary-files.txt index f515355..7d52c55 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -1258,7 +1258,9 @@ vendor/lib/libtime_genoff.so|9f1e0fd1180207b3df81aa65c319b0d5a467d74c # Thermal vendor/bin/thermal-engine vendor/lib/libthermalclient.so +vendor/lib/hw/thermal.sdm710.so vendor/lib64/libthermalclient.so +vendor/lib64/hw/thermal.sdm710.so # Trusted Execution Environment connector - from LA.UM.9.8.r1-02700-SDM710.0 vendor/bin/hw/vendor.qti.hardware.qteeconnector@1.0-service|f8dc88c7166ffc2c1d997e7d5f16a8eb69c37cfc