From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794585790; b=uY1NdjC00InoZngq2NgrBCYS0LEM33+u6BbKPj7k+2mATJJPLsYzjhgbg7yBN8SUWTHx jvZTDFymwIOnYQbsKwrpvWh9rTF3kMpb8MpBC/G5+HDRKJ4xok3eh++hGzPzCpAQn4yQl YgU5pdRcdAZ5MoSrmEXCnCZUvEWNYH3v/gj8G9FCAl/ZsyifDVVf13DNdPc9wEHSOdHnk 3LMNrxs2B6c0afqs5+RXSm4Wr3/Bu/8UC9oHrZrqd1MuAKd2RFn6bYivvwdkUoV8RRlJk i6F0Zzhyod3uG5bpg3HB8yHUfkT5Tb01dJcGjDbhT9Bi6nWpu0EVqLcXnXQaWFLCmOw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794585790; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=TbidLm3POldfwDcdmNAqdidlp8A9zZ9XZz5GRShYHL4=; b=mjkqLX1jJP1CfVS9L41xhoUjpymxRm9cSTzqYPZ8n9BvLEs5fY0YDrdc+1p5Cgpyw5Yt 4fnR4+iJ+cXtyXIhcwwnw9oDFWUx8g6piml+G93nYWVqMhi/77OzClV7lo7Sqdl/uEp/f OSih/Nhuiv3V869DBDUtHkoGItB8Ro9mqpc4JEDI1OYyyDKXPcv9yaTpfqAekV+rgkkU+ S5glvL+8MJ+45a3iU621YxoyuG+a2C78eCk6NYu1M7SRys8lFYeIkToew7xqqUvPs5+cr E/ySWE6kk9Po7W5OprYImdMGDTZ+vJc1HH9P5jwllCa8QVN4si30RYAZNHmyd4/pqcw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=jZHw5fsO; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B450F606EBB6; Fri, 13 Nov 2026 16:03:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=jZHw5fsO Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E5D11F000C6; Fri, 13 Nov 2026 16:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1794585790; bh=TbidLm3POldfwDcdmNAqdidlp8A9zZ9XZz5GRShYHL4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jZHw5fsOrpafyLytvvl7MSN+HL95+XK8jNPD8nVXE2KFzDFUTsVP6UOhYCLuZ/oqZ Zxl31RE+nRGyh46V+GBXR3TbERUcs4hYg/run+2lafUPB/EdCsQwTGnu6wl9L1h8rz DTXrqpZ+B2nzdSX8tFRf2DW2Ia/b2b8rW8MDhErc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Deucher , renpanpan , Sasha Levin Subject: [PATCH 7.3 379/507] drm/amdgpu: Only enable HDMI audio if display supports it Date: Fri, 13 Nov 2026 10:51:23 -0500 Message-ID: <20261113153809.163655127@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261113153753.358973689@linuxfoundation.org> References: <20261113153753.358973689@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: renpanpan [ Upstream commit 0de95c96655c8a12df62e47871016f49e5cd8618 ] The amdgpu legacy DCE audio path (dce_v6/v8/v10) unconditionally calls audio_enable(pin, true) at the end of afmt_setmode(), regardless of whether the connected display advertises audio support in its EDID. This causes a phantom HDMI audio output to appear for displays that have no audio capability (no basic audio bit, no Audio Data Block in EDID), because the GPU sets the AUDIO_ENABLED register bit, which drives the HDA codec's ELDV pin sense, making the codec report the jack as audio-available. The radeon, nouveau, and dw-hdmi drivers all gate audio enablement on display_info.has_audio. Apply the same check to amdgpu's DCE afmt_setmode functions. Reviewed-by: Alex Deucher Signed-off-by: renpanpan Signed-off-by: Alex Deucher (cherry picked from commit 842a45c68e0355eea47796551c8761c0c77e8ce0) Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index f2977fe6d8242..04b18056a9060 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -1705,8 +1705,9 @@ static void dce_v10_0_afmt_setmode(struct drm_encoder *encoder, WREG32(mmAFMT_RAMP_CONTROL2 + dig->afmt->offset, 0x00000001); WREG32(mmAFMT_RAMP_CONTROL3 + dig->afmt->offset, 0x00000001); - /* enable audio after to setting up hw */ - dce_v10_0_audio_enable(adev, dig->afmt->pin, true); + /* Only enable audio if the display supports it */ + if (connector->display_info.has_audio) + dce_v10_0_audio_enable(adev, dig->afmt->pin, true); } static void dce_v10_0_afmt_enable(struct drm_encoder *encoder, bool enable) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index c68de0fe1d7d3..585b0a50279f9 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c @@ -1748,8 +1748,9 @@ static void dce_v6_0_afmt_setmode(struct drm_encoder *encoder, dce_v6_0_audio_dp_enable(encoder, 1); } - /* enable audio after setting up hw */ - dce_v6_0_audio_enable(adev, dig->afmt->pin, true); + /* Only enable audio if the display supports it */ + if (connector->display_info.has_audio) + dce_v6_0_audio_enable(adev, dig->afmt->pin, true); } static void dce_v6_0_afmt_enable(struct drm_encoder *encoder, bool enable) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index c3906270f25ef..1390efa4ea515 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -1653,8 +1653,9 @@ static void dce_v8_0_afmt_setmode(struct drm_encoder *encoder, WREG32(mmAFMT_RAMP_CONTROL2 + offset, 0x00000001); WREG32(mmAFMT_RAMP_CONTROL3 + offset, 0x00000001); - /* enable audio after setting up hw */ - dce_v8_0_audio_enable(adev, dig->afmt->pin, true); + /* Only enable audio if the display supports it */ + if (connector->display_info.has_audio) + dce_v8_0_audio_enable(adev, dig->afmt->pin, true); } static void dce_v8_0_afmt_enable(struct drm_encoder *encoder, bool enable) -- 2.53.0