From 69639cfa67d473c4d6d9dd4193059eac1688d61c Mon Sep 17 00:00:00 2001 From: Dybios Date: Mon, 3 Jun 2019 01:30:41 +0530 Subject: [PATCH] sanders: add XT1804 thermal configs from stock OPSS28.65-36-6 Indian variant has additional thermal configs for a few stuff. Also added check so that those configs don't appear in other models. Signed-off-by: ronaxdevil --- configs/check_features.sh | 19 +++ configs/thermal-engine-sanders-INDIA.conf | 165 ++++++++++++++++++++++ device.mk | 3 +- 3 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 configs/thermal-engine-sanders-INDIA.conf diff --git a/configs/check_features.sh b/configs/check_features.sh index 650a69b..a6f6bdb 100644 --- a/configs/check_features.sh +++ b/configs/check_features.sh @@ -13,3 +13,22 @@ else # Only XT1806 variant got a compass rm /vendor/etc/permissions/android.hardware.sensor.compass.xml fi + +if ! [ "$sku" = "XT1802" ]; then + # Others variants doesn't have DTV support + rm /vendor/etc/permissions/com.motorola.hardware.dtv.xml + rm /vendor/etc/permissions/mot_dtv_permissions.xml + rm /vendor/lib/libdtvtuner.so + rm /vendor/lib64/libdtvtuner.so + rm /vendor/lib/libdtvhal.so + rm /vendor/lib64/libdtvhal.so + rm -r /vendor/app/DTVPlayer + rm -r /vendor/app/DTVService +fi + +if [ "$sku" = "XT1804" ]; then + # XT1804 has additional thermal configs + mv /vendor/etc/thermal-engine-INDIA.conf /vendor/etc/thermal-engine.conf +else + rm /vendor/etc/thermal-engine-INDIA.conf +fi diff --git a/configs/thermal-engine-sanders-INDIA.conf b/configs/thermal-engine-sanders-INDIA.conf new file mode 100644 index 0000000..21d26d0 --- /dev/null +++ b/configs/thermal-engine-sanders-INDIA.conf @@ -0,0 +1,165 @@ +[FRONT_TEMP] +algo_type virtual +trip_sensor msm_therm +set_point -18000 +set_point_clr -20000 +sensors msm_therm pa_therm0 chg_therm batt_temp +weights 110 100 85 110 +offsets -2000 -2000 -2000 -2000 +sampling 10000 +math 0 +sys_temp + +[REPORT-FRONT-TEMP] +algo_type monitor +sampling 300000 +sensor FRONT_TEMP +thresholds 45000 +thresholds_clr 43000 +actions report +action_info 1 + +[BACK_TEMP] +algo_type virtual +trip_sensor msm_therm +set_point -18000 +set_point_clr -20000 +sensors msm_therm pa_therm0 chg_therm batt_temp +weights 110 100 85 110 +offsets -1000 -1000 -1000 -1000 +sampling 10000 +math 0 +sys_temp + +[REPORT-BACK-TEMP] +algo_type monitor +sampling 300000 +sensor BACK_TEMP +thresholds 45000 +thresholds_clr 43000 +actions report +action_info 1 + +[SS-BATT-BATT] +algo_type ss +sampling 5000 +sensor batt_therm +device battery +set_point 44000 +set_point_clr 42000 + +[SS-CHG-BATT] +algo_type ss +sampling 5000 +sensor chg_therm +device battery +set_point 50000 +set_point_clr 44000 +time_constant 0 + +[VIRTUAL-MSM-CPU] +algo_type virtual +trip_sensor msm_therm +set_point 41000 +set_point_clr 39000 +sensors tsens_tz_sensor4 tsens_tz_sensor5 tsens_tz_sensor6 tsens_tz_sensor7 +weights 1 1 1 1 +sampling 1000 +math 0 + +[SS-MSM-CPU] +algo_type ss +sampling 1000 +sensor VIRTUAL-MSM-CPU +device battery +set_point 43000 +set_point_clr 40000 + +[VIRTUAL-MSM-GPU] +algo_type virtual +trip_sensor msm_therm +set_point 41000 +set_point_clr 39000 +sensors tsens_tz_sensor15 +sampling 1000 +math 2 + +[SS-MSM-GPU] +algo_type ss +sampling 1000 +sensor VIRTUAL-MSM-GPU +device battery +set_point 43000 +set_point_clr 40000 + +[SS-MSM-CLUSTER0] +algo_type ss +sampling 1000 +sensor msm_therm +device cluster0 +set_point 43000 +set_point_clr 41000 +device_max_limit 1401600 + +[VIRTUAL-CPUS] +algo_type virtual +trip_sensor tsens_tz_sensor9 +set_point 75000 +set_point_clr 65000 +sensors tsens_tz_sensor9 tsens_tz_sensor10 tsens_tz_sensor11 tsens_tz_sensor12 tsens_tz_sensor13 tsens_tz_sensor4 tsens_tz_sensor5 tsens_tz_sensor6 tsens_tz_sensor7 tsens_tz_sensor8 +sampling 50 +math 2 + +[SS-GPU] +algo_type ss +sampling 250 +sensor gpu +device gpu +set_point 95000 +set_point_clr 65000 + +[SS-POPMEM] +algo_type ss +disable +sampling 250 +sensor pop_mem +device cluster0 +set_point 70000 +set_point_clr 55000 +time_constant 2 + +[SS-CPUS-ALL] +algo_type ss +sampling 50 +sensor VIRTUAL-CPUS +device cluster0 +set_point 95000 +set_point_clr 55000 + +[MONITOR-CAMERA-MSM] +algo_type monitor +sampling 1000 +sensor msm_therm +thresholds 52000 56000 +thresholds_clr 47000 53000 +actions camera camera +action_info 1 2 + + +[VIRT-MSM-CHG-LCD] +algo_type virtual +trip_sensor chg_therm +set_point 50000 +set_point_clr 47000 +sensors msm_therm +sampling 1000 +math 2 + +[MONITOR-LCD] +algo_type monitor +sampling 1000 +sensor VIRT-MSM-CHG-LCD +thresholds 43000 45000 +thresholds_clr 40000 43000 +actions lcd lcd +action_info 225 200 diff --git a/device.mk b/device.mk index ec2f3c3..917f394 100644 --- a/device.mk +++ b/device.mk @@ -400,7 +400,8 @@ PRODUCT_PACKAGES += \ thermal.msm8953 PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/thermal-engine-sanders.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf + $(LOCAL_PATH)/configs/thermal-engine-sanders.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf \ + $(LOCAL_PATH)/configs/thermal-engine-sanders-INDIA.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-INDIA.conf # USB HAL PRODUCT_PACKAGES += \