From 31550baa88529d18711d9495f04600e4c360c300 Mon Sep 17 00:00:00 2001 From: Joel16 Date: Tue, 18 Jan 2022 22:56:41 -0500 Subject: [PATCH] satsuki: Switch to OSS thermanager --- configs/thermal-engine.conf | 94 ---------- configs/thermanager.xml | 361 ++++++++++++++++++++++++++++++++++++ device.mk | 2 +- proprietary-files.txt | 2 - 4 files changed, 362 insertions(+), 97 deletions(-) delete mode 100644 configs/thermal-engine.conf create mode 100644 configs/thermanager.xml diff --git a/configs/thermal-engine.conf b/configs/thermal-engine.conf deleted file mode 100644 index 39878a7..0000000 --- a/configs/thermal-engine.conf +++ /dev/null @@ -1,94 +0,0 @@ -[msm_therm.DEFAULT] -algo_type monitor -sensor msm_therm -sampling 1000 -thresholds 43000 45000 45500 47000 49000 50500 51500 52500 53000 53300 54000 54500 55500 56000 60200 -thresholds_clr 41000 43000 43500 45000 47000 49500 50500 51500 52000 52300 53000 53500 54500 55000 56000 -actions cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam -action_info 1555200+1958400+0+0+1+1+630000000+209+2+0+100000+0 1555200+1958400+0+0+1+1+630000000+171+3+0+100000+0 1555200+1958400+0+0+1+1+630000000+171+5+0+100000+0 1555200+1248000+0+0+1+1+630000000+141+5+0+100000+0 1478400+864000+0+1+1+1+630000000+141+8+0+001800+0 1344000+384000+1+1+1+1+630000000+115+8+0+001800+0 1248000+384000+1+1+1+1+630000000+95+8+0+001800+0 1248000+384000+1+1+1+1+450000000+78+8+0+001800+0 960000+384000+1+1+1+1+450000000+78+9+1+001800+0 864000+384000+1+1+1+1+390000000+64+11+1+001800+5 768000+384000+1+1+1+1+390000000+64+12+1+001800+5 600000+384000+1+1+1+1+180000000+51+12+1+001800+5 460800+384000+1+1+1+1+180000000+44+12+1+001800+5 384000+384000+1+1+1+1+180000000+44+12+1+001800+6 384000+384000+1+1+1+1+180000000+44+13+1+001800+6 - -[msm_therm.CAMERA-Step] -algo_type monitor -sensor msm_therm -sampling 1000 -thresholds -100000 45500 47000 49000 52000 53500 56000 60200 -thresholds_clr -110000 40000 45500 47000 49000 52000 53500 56000 -actions cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam -action_info 1555200+1958400+0+0+0+0+630000000+141+8+0+100000+0 1555200+1728000+0+0+1+1+630000000+95+9+0+100000+0 1555200+1248000+0+1+1+1+305000000+78+12+0+100000+0 960000+384000+1+1+1+1+305000000+51+12+1+001800+0 960000+384000+1+1+1+1+305000000+51+12+1+001800+1 960000+384000+1+1+1+1+305000000+44+12+1+001800+5 960000+384000+1+1+1+1+305000000+44+12+1+001800+6 384000+384000+1+1+1+1+180000000+44+13+1+001800+6 -disable - -[msm_therm.CAMERA-Low] -algo_type monitor -sensor msm_therm -sampling 1000 -thresholds -100000 45500 47000 49000 53500 57000 60200 -thresholds_clr -110000 40000 45500 47000 49000 53500 57000 -actions cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam -action_info 672000+384000+1+1+1+1+180000000+141+8+0+100000+0 672000+384000+1+1+1+1+180000000+95+9+0+100000+0 672000+384000+1+1+1+1+180000000+78+12+0+100000+0 672000+384000+1+1+1+1+180000000+51+12+1+001800+0 672000+384000+1+1+1+1+180000000+44+12+1+001800+5 672000+384000+1+1+1+1+180000000+44+12+1+001800+6 384000+384000+1+1+1+1+180000000+44+13+1+001800+6 -disable - -[msm_therm.CAMERA-Mid] -algo_type monitor -sensor msm_therm -sampling 1000 -thresholds -100000 45500 47000 49000 53500 57000 60200 -thresholds_clr -110000 40000 45500 47000 49000 53500 57000 -actions cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam -action_info 960000+384000+1+1+1+1+180000000+141+8+0+100000+0 960000+384000+1+1+1+1+180000000+95+9+0+100000+0 960000+384000+1+1+1+1+180000000+78+12+0+100000+0 960000+384000+1+1+1+1+180000000+51+12+1+001800+0 960000+384000+1+1+1+1+180000000+44+12+1+001800+5 960000+384000+1+1+1+1+180000000+44+12+1+001800+6 384000+384000+1+1+1+1+180000000+44+13+1+001800+6 -disable - -[msm_therm.CAMERA-Hi] -algo_type monitor -sensor msm_therm -sampling 1000 -thresholds -100000 45500 47000 49000 53500 57000 60200 -thresholds_clr -110000 40000 45500 47000 49000 53500 57000 -actions cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem+s_cam_ltb_tim+s_cam -action_info 1344000+384000+1+1+1+1+305000000+141+8+0+100000+0 1344000+384000+1+1+1+1+305000000+95+9+0+100000+0 1344000+384000+1+1+1+1+305000000+78+12+0+100000+0 1344000+384000+1+1+1+1+305000000+51+12+1+001800+0 1344000+384000+1+1+1+1+305000000+44+12+1+001800+5 1344000+384000+1+1+1+1+305000000+44+12+1+001800+6 384000+384000+1+1+1+1+180000000+44+13+1+001800+6 -disable - -[msm_therm.CAMERA-All] -algo_type monitor -sensor msm_therm -sampling 1000 -thresholds -100000 45500 47000 49000 -thresholds_clr -110000 40000 45500 47000 -actions cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem cluster0+cluster1+hotplug_4+hotplug_5+hotplug_6+hotplug_7+gpu+s_backlight+battery+modem -action_info 1555200+1958400+0+0+0+0+630000000+141+8+0 1555200+1728000+0+0+1+1+630000000+95+9+0 1555200+1248000+0+1+1+1+305000000+78+12+0 1344000+384000+1+1+1+1+305000000+51+12+1 -disable - -[batt_therm] -algo_type monitor -sensor bms -sampling 1000 -thresholds -100000 43000 44000 67000 -thresholds_clr -110000 41000 42000 0 -actions battery battery battery battery+s_shutdown -action_info 1 2 3 13+5 - -[msm_therm] -algo_type monitor -sensor msm_therm -sampling 1000 -thresholds 54000 60200 62000 74000 -thresholds_clr 50000 59000 60200 0 -actions s_tether+s_tel+s_bg s_tether+s_tel+s_bg s_tether+s_tel+s_bg s_tether+s_tel+s_bg+s_shutdown -action_info 0+0+1 1+1+1 1+1+1 1+1+1+5 - -[bl_therm] -algo_type monitor -sensor quiet_therm -sampling 1000 -thresholds 39000 39500 40000 41000 41500 42000 -thresholds_clr 38000 38500 39000 40000 40500 41000 -actions s_backlight s_backlight s_backlight s_backlight s_backlight s_backlight -action_info 209 171 141 115 78 44 - -[sony_camera] -algo_type monitor -sensor sony_camera_0 -sampling 1000 -thresholds 55000 59000 60000 62000 67000 -thresholds_clr 49000 53000 57000 60000 61000 -actions s_cam_ltb_tim+s_cam s_cam_ltb_tim+s_cam s_cam_ltb_tim+s_cam s_cam_ltb_tim+s_cam s_cam_ltb_tim+s_cam+s_shutdown -action_info 001800+0 001800+1 001800+5 001800+6 001800+6+5 diff --git a/configs/thermanager.xml b/configs/thermanager.xml new file mode 100644 index 0000000..168de44 --- /dev/null +++ b/configs/thermanager.xml @@ -0,0 +1,361 @@ + + + + /sys/class/thermal/thermal_zone0 + /sys/class/thermal/thermal_zone1 + + /sys/class/thermal/thermal_zone2 + /sys/class/thermal/thermal_zone3 + /sys/class/thermal/thermal_zone4 + /sys/class/thermal/thermal_zone5 + /sys/class/thermal/thermal_zone6 + /sys/class/thermal/thermal_zone7 + + /sys/class/thermal/thermal_zone8 + /sys/class/thermal/thermal_zone9 + /sys/class/thermal/thermal_zone10 + /sys/class/thermal/thermal_zone11 + /sys/class/thermal/thermal_zone12 + /sys/class/thermal/thermal_zone13 + /sys/class/thermal/thermal_zone14 + /sys/class/thermal/thermal_zone15 + /sys/class/thermal/thermal_zone16 + /sys/class/thermal/thermal_zone17 + + /sys/class/thermal/thermal_zone18 + /sys/class/thermal/thermal_zone19 + /sys/class/thermal/thermal_zone20 + /sys/class/thermal/thermal_zone21 + /sys/class/thermal/thermal_zone22 + /sys/class/thermal/thermal_zone23 + /sys/class/thermal/thermal_zone24 + /sys/class/thermal/thermal_zone25 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /sys/module/msm_performance/parameters/cpu_max_freq + /sys/module/msm_performance/parameters/cpu_max_freq + + + /sys/devices/system/cpu/cpuquiet/nr_thermal_max_cpus + + + /sys/class/kgsl/kgsl-3d0/max_gpuclk + /sys/class/power_supply/usb/current_max + /sys/class/power_supply/battery/system_temp_level + /sys/class/power_supply/battery/charging_enabled + + + + + + + + + + 1500000 + 1100000 + 900000 + 700000 + 500000 + 300000 + 150000 + + + + 1 + 0 + + + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + + + + 0 + 1 + + + + NORMAL + WARNING + CRITICAL + + + + + + + + + 600000000 + 510000000 + 450000000 + 390000000 + 305000000 + 180000000 + + + + + 0:4294967295 + 0:1478400 + 0:1344000 + 0:1248000 + 0:960000 + 0:864000 + 0:768000 + 0:672000 + 0:600000 + 0:460800 + 0:384000 + + + + + 4:4294967295 + 4:1824000 + 4:1728000 + 4:1632000 + 4:1536000 + 4:1440000 + 4:1344000 + 4:1248000 + 4:960000 + 4:864000 + 4:768000 + 4:633600 + 4:480000 + 4:384000 + + + + + 8 + 7 + 6 + 5 + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device.mk b/device.mk index 465868d..0555aca 100644 --- a/device.mk +++ b/device.mk @@ -62,7 +62,7 @@ PRODUCT_COPY_FILES += \ # Thermal PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/thermal-engine.conf:system/etc/thermal-engine.conf + $(LOCAL_PATH)/configs/thermanager.xml:$(TARGET_COPY_OUT_VENDOR)/etc/thermanager.xml # WLAN PRODUCT_COPY_FILES += \ diff --git a/proprietary-files.txt b/proprietary-files.txt index 33613c8..1658aab 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -551,10 +551,8 @@ vendor/lib64/libsensor_reg.so vendor/lib64/sensors.ssc.so # Thermal -vendor/bin/thermal-engine vendor/lib/libthermalclient.so vendor/lib64/libthermalclient.so -vendor/lib64/libthermalioctl.so lib64/liblights-core.so lib/liblights-core.so lib64/libidd.so