Skip to content

Commit 1cefe49

Browse files
committed
cpufreq: intel_pstate: Always use HWP_DESIRED_PERF in passive mode
In the passive mode, intel_cpufreq_update_pstate() sets HWP_MIN_PERF in accordance with the target frequency to ensure delivering adequate performance, but it sets HWP_DESIRED_PERF to 0, so the processor has no indication that the desired performance level is actually equal to the floor one. This may cause it to choose a performance point way above the desired level. Moreover, this is inconsistent with intel_cpufreq_adjust_perf() which actually sets HWP_DESIRED_PERF in accordance with the target performance value. Address this by adjusting intel_cpufreq_update_pstate() to pass target_pstate as both the minimum and the desired performance levels to intel_cpufreq_hwp_update(). Fixes: a365ab6 ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Shashank Balaji <shashank.mahadasyam@sony.com> Link: https://patch.msgid.link/6173276.lOV4Wx5bFT@rjwysocki.net
1 parent 221504a commit 1cefe49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,8 +3249,8 @@ static int intel_cpufreq_update_pstate(struct cpufreq_policy *policy,
32493249
int max_pstate = policy->strict_target ?
32503250
target_pstate : cpu->max_perf_ratio;
32513251

3252-
intel_cpufreq_hwp_update(cpu, target_pstate, max_pstate, 0,
3253-
fast_switch);
3252+
intel_cpufreq_hwp_update(cpu, target_pstate, max_pstate,
3253+
target_pstate, fast_switch);
32543254
} else if (target_pstate != old_pstate) {
32553255
intel_cpufreq_perf_ctl_update(cpu, target_pstate, fast_switch);
32563256
}

0 commit comments

Comments
 (0)