aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2018-08-01 20:26:06 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-08-06 04:22:27 -0400
commitd3264f752a1aedac98aa90e50853df149d1346f2 (patch)
tree82a493ca086d0cc35a382e6f5b710bac9f27276c
parent6ccbe1dcdd17c9b76cc9f63e2dc600b381cb2378 (diff)
cpufreq: intel_pstate: Ignore turbo active ratio in HWP
When HWP is active turbo active ratio is not used, so we should allow policy max frequency above turbo activation ratio to be set. When HWP is not active, then any policy max frequency above turbo activation ratio can result upto max one-core turbo frequency. This fix helps better thermal control in turbo region when other methods like "Running Average Power Limit" is not available to use. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 7bfb98380db9..b6a1aadaff9f 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2008,7 +2008,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
2008static void intel_pstate_adjust_policy_max(struct cpufreq_policy *policy, 2008static void intel_pstate_adjust_policy_max(struct cpufreq_policy *policy,
2009 struct cpudata *cpu) 2009 struct cpudata *cpu)
2010{ 2010{
2011 if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate && 2011 if (!hwp_active &&
2012 cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
2012 policy->max < policy->cpuinfo.max_freq && 2013 policy->max < policy->cpuinfo.max_freq &&
2013 policy->max > cpu->pstate.max_freq) { 2014 policy->max > cpu->pstate.max_freq) {
2014 pr_debug("policy->max > max non turbo frequency\n"); 2015 pr_debug("policy->max > max non turbo frequency\n");