aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2015-01-29 15:17:13 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-29 19:52:17 -0500
commit630ec286dd85c5838493ab7ef975881c42069ef0 (patch)
tree67ba7b127e3e4a45f8c58878df236a5ddcf40ddb /drivers/cpufreq
parent0522424ecb333c0874c4e74bc053dd662bed40df (diff)
intel_pstate: respect cpufreq policy request
When thermal or other subsystem requests to change the policy, use that irrepective of whether cpufreq policy is PERFORMANCE or not. Without this change, when thermal subsystem passive policy wants to reduce performance, it still runs at 100%. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-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 80ecc351d613..dfee5725903b 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -919,7 +919,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
919 if (!policy->cpuinfo.max_freq) 919 if (!policy->cpuinfo.max_freq)
920 return -ENODEV; 920 return -ENODEV;
921 921
922 if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) { 922 if (policy->policy == CPUFREQ_POLICY_PERFORMANCE &&
923 policy->max >= policy->cpuinfo.max_freq) {
923 limits.min_perf_pct = 100; 924 limits.min_perf_pct = 100;
924 limits.min_perf = int_tofp(1); 925 limits.min_perf = int_tofp(1);
925 limits.max_policy_pct = 100; 926 limits.max_policy_pct = 100;