AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, Ray.Wu@amd.com,
	Harry.Wentland@amd.com, Alex.Hung@amd.com, Wenjing.Liu@amd.com,
	Chris.Park@amd.com, Yu.Wang4@amd.com
Cc: "Timur Kristóf" <timur.kristof@gmail.com>,
	"Harry Wentland" <harry.wentland@amd.com>
Subject: [PATCH 4/4] drm/amd/display: Move analog check to dce110_hwseq
Date: Thu, 13 Nov 2025 17:33:48 +0100	[thread overview]
Message-ID: <20251113163348.137315-5-timur.kristof@gmail.com> (raw)
In-Reply-To: <20251113163348.137315-1-timur.kristof@gmail.com>

Instead of checking that the signal is analog before calling the
HWSS disable_audio_stream() function to disable audio, move
the check inside the HWSS function.

Suggested-by: Ray Wu <Ray.Wu@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 6 ++++--
 drivers/gpu/drm/amd/display/dc/link/link_dpms.c           | 3 +--
 2 files changed, 5 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 3005115c8505..94e66d96c403 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
@@ -1139,6 +1139,9 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx)
 	if (!pipe_ctx || !pipe_ctx->stream)
 		return;
 
+	if (dc_is_rgb_signal(pipe_ctx->stream->signal))
+		return;
+
 	dc = pipe_ctx->stream->ctx->dc;
 	clk_mgr = dc->clk_mgr;
 	link_hwss = get_link_hwss(pipe_ctx->stream->link, &pipe_ctx->link_res);
@@ -1193,8 +1196,7 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
 		pipe_ctx->stream_res.stream_enc->funcs->stop_dp_info_packets(
 			pipe_ctx->stream_res.stream_enc);
 
-	if (!dc_is_rgb_signal(pipe_ctx->stream->signal))
-		dc->hwss.disable_audio_stream(pipe_ctx);
+	dc->hwss.disable_audio_stream(pipe_ctx);
 
 	link_hwss->reset_stream_encoder(pipe_ctx);
 
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
index 4ddcdc222913..f7ac26598c39 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
@@ -2374,8 +2374,7 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)
 			set_avmute(pipe_ctx, true);
 	}
 
-	if (!dc_is_rgb_signal(pipe_ctx->stream->signal))
-		dc->hwss.disable_audio_stream(pipe_ctx);
+	dc->hwss.disable_audio_stream(pipe_ctx);
 
 	update_psp_stream_config(pipe_ctx, true);
 	dc->hwss.blank_stream(pipe_ctx);
-- 
2.51.1


  parent reply	other threads:[~2025-11-13 16:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 16:33 [PATCH 0/4] drm/amd/display: Follow-up patches to analog support Timur Kristóf
2025-11-13 16:33 ` [PATCH 1/4] drm/amd/display: Fix warning for analog stream encoders Timur Kristóf
2025-11-17 20:16   ` Kees Cook
2025-11-19  1:48     ` Alex Hung
2025-11-13 16:33 ` [PATCH 2/4] drm/amd/display: Cleanup uses of the analog flag Timur Kristóf
2025-11-13 16:33 ` [PATCH 3/4] drm/amd/display: Cleanup early return in construct_phy Timur Kristóf
2025-11-13 16:33 ` Timur Kristóf [this message]
2025-11-17 22:18 ` [PATCH 0/4] drm/amd/display: Follow-up patches to analog support Mario Limonciello
2025-11-18 10:10   ` timur.kristof

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=20251113163348.137315-5-timur.kristof@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=Alex.Hung@amd.com \
    --cc=Chris.Park@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Ray.Wu@amd.com \
    --cc=Wenjing.Liu@amd.com \
    --cc=Yu.Wang4@amd.com \
    --cc=amd-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox