From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Charlene Liu <Charlene.Liu@amd.com>,
Swapnil Patel <swapnil.patel@amd.com>,
Chenyu Chen <chen-yu.chen@amd.com>,
Daniel Wheeler <daniel.wheeler@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Sasha Levin <sashal@kernel.org>,
alex.hung@amd.com, alvin.lee2@amd.com, aurabindo.pillai@amd.com,
Ausef.Yousof@amd.com, timur.kristof@gmail.com,
michael.strauss@amd.com, Martin.Leung@amd.com,
srinivasan.shanmugam@amd.com
Subject: [PATCH AUTOSEL 6.18-6.6] drm/amd/display: Fix DP no audio issue
Date: Tue, 23 Dec 2025 05:05:11 -0500 [thread overview]
Message-ID: <20251223100518.2383364-7-sashal@kernel.org> (raw)
In-Reply-To: <20251223100518.2383364-1-sashal@kernel.org>
From: Charlene Liu <Charlene.Liu@amd.com>
[ Upstream commit 3886b198bd6e49c801fe9552fcfbfc387a49fbbc ]
[why]
need to enable APG_CLOCK_ENABLE enable first
also need to wake up az from D3 before access az block
Reviewed-by: Swapnil Patel <swapnil.patel@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit bf5e396957acafd46003318965500914d5f4edfa)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
### 3. TECHNICAL ANALYSIS
**The Bug:**
The original code had an incorrect operation sequence:
1. Called `az_enable()` - attempts to access audio controller registers
2. Called `enable_pme_wa()` - wakes audio controller from D3 power state
This is backwards - you cannot access hardware registers while the
device is still in D3 (sleeping). The hardware must be woken up FIRST.
**The Fix:**
The fix simply reorders these operations:
1. Call `enable_pme_wa()` - wake audio controller from D3 first
2. Call `az_enable()` - now safe to access registers
### 4. SCOPE AND RISK ASSESSMENT
- **Lines changed:** ~8 lines (just reordering)
- **Files touched:** 1 file (dce110_hwseq.c)
- **Complexity:** Very low - no new logic, just reordering existing
function calls
- **Subsystem:** AMD display driver, well-tested and mature
- **Risk:** Minimal - same operations, correct sequence
### 5. USER IMPACT
- **Affected users:** AMD GPU users with DisplayPort audio output
- **Severity:** High - complete loss of audio functionality
- **Usage scenario:** Very common (monitors with speakers, AV receivers,
docking stations)
- **Symptoms:** "DP no audio issue" - a clearly user-visible bug
### 6. STABILITY INDICATORS
- Reviewed-by: Swapnil Patel (AMD engineer)
- Tested-by: Daniel Wheeler (AMD engineer)
- Multiple sign-offs from AMD display team
- Cherry-picked from mainline - indicates AMD considers it important
### 7. DEPENDENCY CHECK
The dce110_hwseq.c file has been in the kernel for years and the
`dce110_enable_audio_stream` function is stable code. The fix only
reorders existing calls to `enable_pme_wa()` and `az_enable()` - both of
which already exist in stable trees.
## Summary
**Meets stable criteria:**
- ✅ **Obviously correct:** Simple reordering to match hardware
requirements
- ✅ **Fixes real bug:** Complete audio failure on DisplayPort is a
significant user-visible bug
- ✅ **Small and contained:** ~8 lines changed, same functions, just
different order
- ✅ **No new features:** No new functionality added
- ✅ **Tested:** Has Tested-by and Reviewed-by tags from AMD engineers
- ✅ **No dependencies:** Uses existing functions already in stable trees
**Risk vs Benefit:**
- **Benefit:** Restores DisplayPort audio functionality for affected AMD
GPU users
- **Risk:** Very low - the same operations are performed, just in the
correct hardware-required sequence
This is an ideal stable backport candidate: a small, surgical fix for a
clear user-visible bug (no audio on DP), with proper code review and
testing from the hardware vendor.
**YES**
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
index ebc220b29d14..0bf98d834e61 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
@@ -1098,13 +1098,13 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
if (dc->current_state->res_ctx.pipe_ctx[i].stream_res.audio != NULL)
num_audio++;
}
+ if (num_audio >= 1 && clk_mgr->funcs->enable_pme_wa) {
+ /*wake AZ from D3 first before access az endpoint*/
+ clk_mgr->funcs->enable_pme_wa(clk_mgr);
+ }
pipe_ctx->stream_res.audio->funcs->az_enable(pipe_ctx->stream_res.audio);
- if (num_audio >= 1 && clk_mgr->funcs->enable_pme_wa)
- /*this is the first audio. apply the PME w/a in order to wake AZ from D3*/
- clk_mgr->funcs->enable_pme_wa(clk_mgr);
-
link_hwss->enable_audio_packet(pipe_ctx);
if (pipe_ctx->stream_res.audio)
--
2.51.0
next prev parent reply other threads:[~2025-12-23 10:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 10:05 [PATCH AUTOSEL 6.18-5.10] powercap: fix sscanf() error return value handling Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18-6.6] netfilter: nf_tables: avoid chain re-validation if possible Sasha Levin
2025-12-23 10:12 ` Florian Westphal
2026-01-14 20:00 ` Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18-6.12] spi: mt65xx: Use IRQF_ONESHOT with threaded IRQ Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18-5.10] can: j1939: make j1939_session_activate() fail if device is no longer registered Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18-5.10] powercap: fix race condition in register_control_type() Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18] block: validate pi_offset integrity limit Sasha Levin
2025-12-23 10:05 ` Sasha Levin [this message]
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18-6.12] ata: libata-core: Disable LPM on ST2000DM008-2FR102 Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18] accel/amdxdna: Block running under a hypervisor Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18-6.12] drm/amdkfd: Fix improper NULL termination of queue restore SMI event string Sasha Levin
2025-12-23 10:05 ` [PATCH AUTOSEL 6.18-6.12] net: sfp: extend Potron XGSPON quirk to cover additional EEPROM variant Sasha Levin
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=20251223100518.2383364-7-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Ausef.Yousof@amd.com \
--cc=Charlene.Liu@amd.com \
--cc=Martin.Leung@amd.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=alvin.lee2@amd.com \
--cc=aurabindo.pillai@amd.com \
--cc=chen-yu.chen@amd.com \
--cc=daniel.wheeler@amd.com \
--cc=michael.strauss@amd.com \
--cc=patches@lists.linux.dev \
--cc=srinivasan.shanmugam@amd.com \
--cc=stable@vger.kernel.org \
--cc=swapnil.patel@amd.com \
--cc=timur.kristof@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox