All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-pm@vger.kernel.org
Subject: [Bug 221505] REGRESSION][amd_pstate] "EPP cannot be set under performance policy" (EBUSY) when switching to performance profile via PPD on 7.1
Date: Sat, 30 May 2026 15:43:39 +0000	[thread overview]
Message-ID: <bug-221505-137361-E8Sez8ivzD@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-221505-137361@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=221505

Marco Scardovi (scardracs@disroot.org) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |scardracs@disroot.org

--- Comment #28 from Marco Scardovi (scardracs@disroot.org) ---
@Mario I took a look into it and made a quick patch. I hope that it can help
mitigate the problem.

From 379f0641e4bd7b287f398e1798530b1b09c5ad0f Mon Sep 17 00:00:00 2001
From: Marco Scardovi <scardracs@disroot.org>
Date: Sat, 30 May 2026 16:30:50 +0200
Subject: [PATCH 1/2] cpufreq/amd-pstate: Allow EPP=0 under performance policy

Under the cpufreq "performance" policy, the amd-pstate driver currently
rejects all EPP writes with -EBUSY. However, writing the EPP value of
AMD_CPPC_EPP_PERFORMANCE (0) is semantically consistent with the
performance policy as EPP=0 corresponds to the most performance-oriented
setting. Allowing EPP=0 writes under the performance policy prevents
userspace power management utilities like power-profiles-daemon from
receiving -EBUSY and failing when switching profiles.

Only reject non-zero EPP values when the policy is set to performance.

Fixes: 2064543f5ba0 ("cpufreq/amd-pstate: Rework CPPC enabling")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221505
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Marco Scardovi <scardracs@disroot.org>
---
 drivers/cpufreq/amd-pstate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 8d55e2be825b..30b4953a93b3 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1423,7 +1423,8 @@ ssize_t store_energy_performance_preference(struct
cpufreq_policy *policy,
                        epp = cpudata->epp_default_dc;
        }

-       if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) {
+       if (epp != AMD_CPPC_EPP_PERFORMANCE &&
+           cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) {
                pr_debug("EPP cannot be set under performance policy\n");
                return -EBUSY;
        }
-- 
2.54.0

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2026-05-30 15:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 17:45 [Bug 221505] New: REGRESSION][amd_pstate] "EPP cannot be set under performance policy" (EBUSY) when switching to performance profile via PPD on 7.1 bugzilla-daemon
2026-05-11 20:15 ` [Bug 221505] " bugzilla-daemon
2026-05-13  6:17 ` bugzilla-daemon
2026-05-13 11:03 ` bugzilla-daemon
2026-05-13 15:39 ` bugzilla-daemon
2026-05-13 15:43 ` bugzilla-daemon
2026-05-13 16:57 ` bugzilla-daemon
2026-05-13 17:12 ` bugzilla-daemon
2026-05-13 18:41 ` bugzilla-daemon
2026-05-13 18:44 ` bugzilla-daemon
2026-05-13 19:14 ` bugzilla-daemon
2026-05-14  7:30 ` bugzilla-daemon
2026-05-26  6:40 ` bugzilla-daemon
2026-05-26  9:20 ` bugzilla-daemon
2026-05-26  9:22 ` bugzilla-daemon
2026-05-26 11:23 ` bugzilla-daemon
2026-05-27 17:41 ` bugzilla-daemon
2026-05-29  9:41 ` bugzilla-daemon
2026-05-29  9:43 ` bugzilla-daemon
2026-05-29  9:51 ` bugzilla-daemon
2026-05-29  9:56 ` bugzilla-daemon
2026-05-29 10:00 ` bugzilla-daemon
2026-05-29 10:02 ` bugzilla-daemon
2026-05-29 10:10 ` bugzilla-daemon
2026-05-29 11:18 ` bugzilla-daemon
2026-05-29 11:31 ` bugzilla-daemon
2026-05-29 11:50 ` bugzilla-daemon
2026-05-30 13:35 ` bugzilla-daemon
2026-05-30 15:43 ` bugzilla-daemon [this message]
2026-05-30 17:58 ` bugzilla-daemon
2026-05-30 18:19 ` bugzilla-daemon
2026-05-30 18:44 ` bugzilla-daemon
2026-05-31 14:14 ` bugzilla-daemon
2026-05-31 14:14 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-221505-137361-E8Sez8ivzD@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.