[PATCH 13/17] drm/amd/display: Fixed the audio noise during mode switching with HDCP mode on

Eryk Brol eryk.brol at amd.com
Fri Dec 4 21:28:46 UTC 2020


From: Roy Chan <roy.chan at amd.com>

[Why]
When HDCP is on, some display would introduce audio noise during
HDCP handling.

[How]
Mute before HDCP handling when disabling core link. Unmute after
HDCP when enabling core link.

Signed-off-by: Roy Chan <roy.chan at amd.com>
Reviewed-by: Martin Leung <Martin.Leung at amd.com>
Acked-by: Eryk Brol <eryk.brol at amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 0052247b4b20..a901baf2aaef 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -3270,8 +3270,6 @@ void core_link_enable_stream(
 #if defined(CONFIG_DRM_AMD_DC_DCN3_0)
 #endif
 
-		dc->hwss.enable_audio_stream(pipe_ctx);
-
 		/* turn off otg test pattern if enable */
 		if (pipe_ctx->stream_res.tg->funcs->set_test_pattern)
 			pipe_ctx->stream_res.tg->funcs->set_test_pattern(pipe_ctx->stream_res.tg,
@@ -3310,6 +3308,9 @@ void core_link_enable_stream(
 #if defined(CONFIG_DRM_AMD_DC_HDCP)
 		update_psp_stream_config(pipe_ctx, false);
 #endif
+
+		dc->hwss.enable_audio_stream(pipe_ctx);
+
 	} else { // if (IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment))
 		if (dc_is_dp_signal(pipe_ctx->stream->signal) ||
 				dc_is_virtual_signal(pipe_ctx->stream->signal))
@@ -3337,6 +3338,8 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx)
 			core_link_set_avmute(pipe_ctx, true);
 	}
 
+	dc->hwss.disable_audio_stream(pipe_ctx);
+
 #if defined(CONFIG_DRM_AMD_DC_HDCP)
 	update_psp_stream_config(pipe_ctx, true);
 #endif
-- 
2.25.1



More information about the amd-gfx mailing list