From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 633A13EBF2C; Sat, 14 Feb 2026 01:03:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771030994; cv=none; b=CbX9UKbbJCFpID/Xh5FtbpFoqgG4UBXLTncpscmU3EIMnmj/hPAJ0kJ4epkUAD+pd0FeJImEd4kHSbiKphzxlfYNdF/Zp1O2J5csi/5as5Bq6Plmq2oQLqP28WmOjO5uiMAFzZIWdJMFC1Zo/HxT4Bl3Nb6W5aasVJdTQy8YpDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771030994; c=relaxed/simple; bh=6SSAtVZchfmD+XiqwGPW7/YBg/40cnF1wyteP+omcdc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PcdC3jhjQpT4UCnyd1/ZbBi22ZoHMqcQAlQjL7q05C9oP9QiKi07P08seL4XwznKNoZbB/UR1k65nveChDBbp1K1dUHb69FC/7Dj2O/+EzJMEwDZ3cmfpqwrLLCtacpu0pCgD8TZ9MdX5cNlRByE6RBN1KnDvL+yroP0+KrBNjc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Kr9JIuox; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Kr9JIuox" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AF26C116C6; Sat, 14 Feb 2026 01:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771030994; bh=6SSAtVZchfmD+XiqwGPW7/YBg/40cnF1wyteP+omcdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kr9JIuoxrA7nQW3xZ81DWMJv/yR4D3+P8brRzbPB3nolJuZPsnN9mr2AMt2awOeNG x/w/FXXc24k1PIaY2XRa3FS6HkNF0wRiPEBwdNm9O6L4B2eNFVZr3Fe6JSmgISraT8 4PxOe9wYVM9AOQYYr2IaM+mMW5iv84s9WzuLvYucg8ep2fXxiqW3V2Ta419J95x1xp v5sZSDFCB8r1hccqh0uXr10iOhfbB2BXAA//UNrs0Luod8lS0mX8KEOWqDaLKzf0R6 NgCwG8TFpFpxLoIgXbPp7fo9caN4BgBbOnaGJ+DHxLCi7fpaT0MOk7VNM1ab0yRLb/ 87ya91F43AguA== From: Sasha Levin To: patches@lists.linux.dev, stable@vger.kernel.org Cc: Charlene Liu , Swapnil Patel , Chenyu Chen , Daniel Wheeler , Alex Deucher , Sasha Levin , Dillon.Varone@amd.com, Alvin.Lee2@amd.com, alex.hung@amd.com, nicholas.kazlauskas@amd.com, mwen@igalia.com, Yihan.Zhu@amd.com, yelangyan@huaqin.corp-partner.google.com, Ilya.Bakoulin@amd.com Subject: [PATCH AUTOSEL 6.19] drm/amd/display: Fix DP no audio issue Date: Fri, 13 Feb 2026 19:58:16 -0500 Message-ID: <20260214010245.3671907-16-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260214010245.3671907-1-sashal@kernel.org> References: <20260214010245.3671907-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.19 Content-Transfer-Encoding: 8bit From: Charlene Liu [ Upstream commit bf5e396957acafd46003318965500914d5f4edfa ] [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 Signed-off-by: Charlene Liu Signed-off-by: Chenyu Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- LLM Generated explanations, may be completely bogus: Good, the fix has already been picked up in both 6.12.y and 6.6.y stable trees. Now let me compile my complete analysis. ## Complete Analysis ### 1. COMMIT MESSAGE ANALYSIS The commit subject is explicit: "Fix DP no audio issue". The body explains the root cause: - Need to enable `APG_CLOCK_ENABLE` first - Need to wake AZ (Azalia audio controller) from D3 power state before accessing AZ block The commit has strong trust indicators: - **Reviewed-by**: Swapnil Patel (AMD) - **Tested-by**: Daniel Wheeler (AMD) - **Signed-off-by**: Charlene Liu (AMD display engineer), Alex Deucher (AMD GPU maintainer) - Cherry-picked from mainline (`bf5e396957ac`) into drm-fixes for 6.19-rc2 ### 2. CODE CHANGE ANALYSIS The meaningful fix is entirely in `dce110_hwseq.c` (4 lines changed, 1 file). The `dcn401_hwseq.c` change is just a cosmetic blank line removal. **Before the fix** (the bug): ```1102:1106:drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c // ORDER WAS: (1) az_enable, (2) enable_pme_wa pipe_ctx->stream_res.audio->funcs->az_enable(pipe_ctx- >stream_res.audio); // accesses AZ registers while in D3! if (num_audio >= 1 && clk_mgr->funcs->enable_pme_wa) clk_mgr->funcs->enable_pme_wa(clk_mgr); // wakes AZ from D3 - TOO LATE ``` **After the fix**: ```1121:1126:drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c 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); ``` The `dce_aud_az_enable()` function reads and writes `AZALIA_F0_CODEC_PIN_CONTROL_HOT_PLUG_CONTROL` registers. These are hardware registers of the Azalia audio controller block. When the AZ block is in D3 (deep power state), register accesses return garbage/undefined values. The `enable_pme_wa()` function sends a PME (Power Management Event) to wake the AZ from D3. The fix simply reorders these two operations so the AZ block is woken from D3 **before** its registers are accessed. ### 3. BUG HISTORY Tracing via `git blame`: - **v4.19-rc1** (commit `1a05873f21d6`): `dce110_enable_audio_stream()` created with `az_enable()` called before `set_pme_wa_enable_by_version()` - **bug introduced here** - **v5.3-rc1** (commit `170a2398d2d80f`): Refactored to `clk_mgr->funcs->enable_pme_wa()` but preserved the wrong ordering - **v6.2-rc1** (commit `14e2739c36957`): Further refactoring but ordering still wrong - **Now**: Fix corrects the ordering that has been wrong since v4.19 ### 4. CLASSIFICATION This is a **clear bug fix** - hardware initialization ordering error that causes complete audio failure on DisplayPort connections. Not a feature, not refactoring. ### 5. SCOPE AND RISK - **Size**: 4 lines changed in 1 meaningful file - **Risk**: Extremely low - both `enable_pme_wa()` and `az_enable()` were already called; only the order changed - **Subsystem**: AMD display driver (dce110 path is shared by many ASIC generations including DCN1.0, DCN2.0, DCN2.1, DCN3.0, DCN3.1, DCN3.5, etc.) ### 6. USER IMPACT **HIGH**: DP audio is completely broken without this fix. Users with DisplayPort-connected monitors/TVs would have no audio output. This affects a very large number of AMD GPU users. ### 7. STABILITY AND TESTING - Already tested by AMD's QA team (Daniel Wheeler) - Already picked into drm-fixes (drm maintainer deemed it worthy) - Already backported to 6.12.y (v6.12.69) and 6.6.y (v6.6.123) stable trees - The fix has been in mainline since v6.19-rc2 ### 8. DEPENDENCIES The core fix (reorder `enable_pme_wa` before `az_enable`) is self- contained. For older stable kernels (pre-6.7), the file path differs (`dc/dce110/dce110_hw_sequencer.c` vs `dc/hwss/dce110/dce110_hwseq.c`), and for pre-6.2 kernels there's no `link_hwss` variable, but the core ordering change applies identically. ### Summary This is a textbook stable backport candidate: - Fixes a **complete audio failure** on DP connections for AMD GPUs - Only **4 lines changed** (reordering two existing function calls) - **Zero risk** of regression (both calls were already present) - **Long-standing bug** since v4.19 (2018) - Properly reviewed, tested, and already backported to 6.12.y and 6.6.y - Affects a huge number of AMD GPU users with DP audio **YES** drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c index 12ce3789f5130..e1f5b1a34cde8 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c @@ -297,7 +297,6 @@ void dcn401_init_hw(struct dc *dc) } } } - for (i = 0; i < res_pool->audio_count; i++) { struct audio *audio = res_pool->audios[i]; -- 2.51.0