summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Chan <roy.chan@amd.com>2020-11-24 18:20:13 -0500
committerAlex Deucher <alexander.deucher@amd.com>2020-12-08 23:04:46 -0500
commitc0794a3b5999d612c396a66875ccaf93cf396631 (patch)
treebfcf51b2c7a60f0f3b390d3dc4b7c37ac8a2343b
parent4bbfae00ac22810de9e539258f27ab5993619493 (diff)
downloadlinux-c0794a3b5999d612c396a66875ccaf93cf396631.tar.bz2
drm/amd/display: Fixed the audio noise during mode switching with HDCP mode on
[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@amd.com> Reviewed-by: Martin Leung <Martin.Leung@amd.com> Acked-by: Eryk Brol <eryk.brol@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_link.c7
1 files 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