]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpufreq: intel_pstate: Always use HWP_DESIRED_PERF in passive mode
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 16 Jun 2025 18:19:19 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:43 +0000 (12:08 +0200)
commit1bc35f9a50e10a78a8a3e8c35f5b59cacd1be60b
tree4f35839c348da725217a1b5af7574345d6c2234b
parent81f50619370045120c133bfdda5b320c8c97d41e
cpufreq: intel_pstate: Always use HWP_DESIRED_PERF in passive mode

[ Upstream commit 1cefe495cacba5fb0417da3a75a1a76e3546d176 ]

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: a365ab6b9dfb ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/intel_pstate.c