summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRam Chandrasekar <rkumbako@codeaurora.org>2016-06-03 15:01:19 -0600
committerKyle Yan <kyan@codeaurora.org>2016-07-11 18:56:33 -0700
commitc02e00ef9d4d995762c37bbaa1c300091b09dda2 (patch)
tree72409aa7825ecb2a446fc93e989a97c6425d5e6d
parent610d5d59af64b37dbbae443cef65c8f6219eab8f (diff)
driver: thermal: Configure ARM threshold instead of low
LMH DCVSh will retain the mitigation till it clears the Low threshold. With mitigation happening at 95C, configuring the low threshold as 65C will hold the mitigation till it clears 65C, which will impact the performance. Instead of configuring the low threshold, configure the ARM threshold from HLOS and low threshold will be configured 2C less than the high threshold in the trust zone. CRs-Fixed: 1024370 Change-Id: Ifb303d7266c98eb94c5eb6f806b7c5e1d95236d3 Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
-rw-r--r--drivers/thermal/msm_lmh_dcvs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/thermal/msm_lmh_dcvs.c b/drivers/thermal/msm_lmh_dcvs.c
index 3c37f0728481..cd45eeccbfe7 100644
--- a/drivers/thermal/msm_lmh_dcvs.c
+++ b/drivers/thermal/msm_lmh_dcvs.c
@@ -44,11 +44,13 @@
#define MSM_LIMITS_ALGO_MODE_ENABLE 0x454E424C
#define MSM_LIMITS_HI_THRESHOLD 0x48494748
-#define MSM_LIMITS_LO_THRESHOLD 0x4C4F5700
+#define MSM_LIMITS_ARM_THRESHOLD 0x41524D00
#define MSM_LIMITS_CLUSTER_0 0x6370302D
#define MSM_LIMITS_CLUSTER_1 0x6370312D
+#define MSM_LIMITS_HIGH_THRESHOLD_VAL 95000
+#define MSM_LIMITS_ARM_THRESHOLD_VAL 65000
#define MSM_LIMITS_POLLING_DELAY_MS 10
#define MSM_LIMITS_CLUSTER_0_REQ 0x179C1B04
#define MSM_LIMITS_CLUSTER_1_REQ 0x179C3B04
@@ -203,7 +205,7 @@ static int lmh_activate_trip(struct thermal_zone_device *dev,
hw->temp_limits[LIMITS_TRIP_HI])
return -EINVAL;
- thresh = (trip == LIMITS_TRIP_LO) ? MSM_LIMITS_LO_THRESHOLD :
+ thresh = (trip == LIMITS_TRIP_LO) ? MSM_LIMITS_ARM_THRESHOLD :
MSM_LIMITS_HI_THRESHOLD;
temp = hw->temp_limits[trip];
@@ -306,11 +308,11 @@ static int msm_lmh_dcvs_probe(struct platform_device *pdev)
if (ret)
return ret;
- hw->default_lo.temp = 65000;
+ hw->default_lo.temp = MSM_LIMITS_ARM_THRESHOLD_VAL;
hw->default_lo.trip = THERMAL_TRIP_CONFIGURABLE_LOW;
hw->default_lo.notify = trip_notify;
- hw->default_hi.temp = 95000;
+ hw->default_hi.temp = MSM_LIMITS_HIGH_THRESHOLD_VAL;
hw->default_hi.trip = THERMAL_TRIP_CONFIGURABLE_HI;
hw->default_hi.notify = trip_notify;