diff options
| -rw-r--r-- | drivers/cpufreq/intel_pstate.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 75a5408e6981..3a4d15a48c1f 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
| @@ -1471,11 +1471,9 @@ static void intel_pstate_set_min_pstate(struct cpudata *cpu) | |||
| 1471 | 1471 | ||
| 1472 | static void intel_pstate_max_within_limits(struct cpudata *cpu) | 1472 | static void intel_pstate_max_within_limits(struct cpudata *cpu) |
| 1473 | { | 1473 | { |
| 1474 | int pstate; | 1474 | int pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio); |
| 1475 | 1475 | ||
| 1476 | update_turbo_state(); | 1476 | update_turbo_state(); |
| 1477 | pstate = intel_pstate_get_base_pstate(cpu); | ||
| 1478 | pstate = max(cpu->pstate.min_pstate, cpu->max_perf_ratio); | ||
| 1479 | intel_pstate_set_pstate(cpu, pstate); | 1477 | intel_pstate_set_pstate(cpu, pstate); |
| 1480 | } | 1478 | } |
| 1481 | 1479 | ||
| @@ -1716,11 +1714,9 @@ static inline int32_t get_target_pstate(struct cpudata *cpu) | |||
| 1716 | 1714 | ||
| 1717 | static int intel_pstate_prepare_request(struct cpudata *cpu, int pstate) | 1715 | static int intel_pstate_prepare_request(struct cpudata *cpu, int pstate) |
| 1718 | { | 1716 | { |
| 1719 | int max_pstate = intel_pstate_get_base_pstate(cpu); | 1717 | int min_pstate = max(cpu->pstate.min_pstate, cpu->min_perf_ratio); |
| 1720 | int min_pstate; | 1718 | int max_pstate = max(min_pstate, cpu->max_perf_ratio); |
| 1721 | 1719 | ||
| 1722 | min_pstate = max(cpu->pstate.min_pstate, cpu->min_perf_ratio); | ||
| 1723 | max_pstate = max(min_pstate, cpu->max_perf_ratio); | ||
| 1724 | return clamp_t(int, pstate, min_pstate, max_pstate); | 1720 | return clamp_t(int, pstate, min_pstate, max_pstate); |
| 1725 | } | 1721 | } |
| 1726 | 1722 | ||
