diff options
author | Ram Chandrasekar <rkumbako@codeaurora.org> | 2016-05-05 13:17:15 -0600 |
---|---|---|
committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-05-12 15:06:47 -0700 |
commit | c8a89f3b1995436311990871aff6f7d8d85807a1 (patch) | |
tree | b6f21ff79cd3482eca16b7ad8025adedea28953e | |
parent | 0f2154f71ddd0838ca66d730711ad18332f91f94 (diff) |
msm: thermal: Avoid updating the scaling max frequency to cpufreq
With LMH DCVSh hardware, thermal driver can directly vote in the
hardware to limit the scaling max frequency. Voting to the cpufreq
driver along side the hardware, will introduce software delay when
removing the mitigation.
So avoid voting the scaling max frequency to the cpufreq when LMH DCVSh
is available.
Change-Id: I8a5f913ae41263b06af99b0ee802b4fa68312f33
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
-rw-r--r-- | drivers/thermal/msm_thermal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c index 0a37c97b79d5..28e9cad2d84f 100644 --- a/drivers/thermal/msm_thermal.c +++ b/drivers/thermal/msm_thermal.c @@ -973,7 +973,8 @@ static int msm_thermal_cpufreq_callback(struct notifier_block *nfb, switch (event) { case CPUFREQ_ADJUST: - max_freq_req = cpus[policy->cpu].parent_ptr->limited_max_freq; + max_freq_req = (lmh_dcvs_available) ? UINT_MAX : + cpus[policy->cpu].parent_ptr->limited_max_freq; min_freq_req = cpus[policy->cpu].parent_ptr->limited_min_freq; pr_debug("mitigating CPU%d to freq max: %u min: %u\n", policy->cpu, max_freq_req, min_freq_req); |