* [PATCH] cpufreq/amd-pstate: Fix setting EPP in performance mode
@ 2026-05-30 15:41 Mario Limonciello (AMD)
2026-05-31 19:56 ` [PATCH] cpufreq/amd-pstate: Allow EPP to be set to 0 under performance policy Marco Scardovi
0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello (AMD) @ 2026-05-30 15:41 UTC (permalink / raw)
To: K Prateek Nayak
Cc: Perry Yuan, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
open list:CPU FREQUENCY SCALING FRAMEWORK,
Mario Limonciello (AMD),
Stuart Meckle
EPP 0 is the only supported value in the performance policy.
commit 798c47593cca ("cpufreq/amd-pstate: Add support for platform profile
class") changed this while adding platform profile support to the
dynamic EPP feature, but this actually wasn't necessary since platform
profile writes disable manual EPP writes.
Restore allowing writing EPP of 0 when in performance mode.
Reported-by: Stuart Meckle <stuartmeckle@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221473
Closes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/work_items/190
Fixes: 798c47593cca ("cpufreq/amd-pstate: Add support for platform profile class")
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
drivers/cpufreq/amd-pstate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 62b5d995281d..72df461e7b39 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1428,7 +1428,7 @@ ssize_t store_energy_performance_preference(struct cpufreq_policy *policy,
epp = cpudata->epp_default_dc;
}
- if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) {
+ if (epp > 0 && cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) {
pr_debug("EPP cannot be set under performance policy\n");
return -EBUSY;
}
--
2.54.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq/amd-pstate: Allow EPP to be set to 0 under performance policy
2026-05-30 15:41 [PATCH] cpufreq/amd-pstate: Fix setting EPP in performance mode Mario Limonciello (AMD)
@ 2026-05-31 19:56 ` Marco Scardovi
0 siblings, 0 replies; 2+ messages in thread
From: Marco Scardovi @ 2026-05-31 19:56 UTC (permalink / raw)
To: superm1; +Cc: kprateek.nayak, linux-kernel, linux-pm, perry.yuan, stuartmeckle
Hi Mario,
as you saw in bugzilla I reached a similar result to yours and in the end
I can confirm both work normally so you have my vote for it.
Let me know what do you think about the other patch I posted in
https://bugzilla.kernel.org/show_bug.cgi?id=221473
If you think it's good enough feel free to take it over, I don't mind it
as long as it helps.
Reviewed-by: Marco Scardovi <scardracs@disroot.org>
Tested-by: Marco Scardovi <scardracs@disroot.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-31 19:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-30 15:41 [PATCH] cpufreq/amd-pstate: Fix setting EPP in performance mode Mario Limonciello (AMD)
2026-05-31 19:56 ` [PATCH] cpufreq/amd-pstate: Allow EPP to be set to 0 under performance policy Marco Scardovi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome