summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/msm_thermal.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c
index bca85bf2f7ec..990a4161038e 100644
--- a/drivers/thermal/msm_thermal.c
+++ b/drivers/thermal/msm_thermal.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1057,6 +1057,16 @@ static int msm_lmh_dcvs_update(int cpu)
uint32_t affinity;
int ret;
+ /*
+ * It is better to use max/min limits of cluster for given
+ * cpu if cluster mitigation is supported. It ensures that it
+ * requests aggregated max/min limits of all cpus in that cluster.
+ */
+ if (core_ptr) {
+ max_freq = cpus[cpu].parent_ptr->limited_max_freq;
+ min_freq = cpus[cpu].parent_ptr->limited_min_freq;
+ }
+
switch (id) {
case 0:
affinity = MSM_LIMITS_CLUSTER_0;