]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.10/drm-amd-display-fix-noise-issue-on-hdmi-av-mute.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / queue-5.10 / drm-amd-display-fix-noise-issue-on-hdmi-av-mute.patch
1 From 11f683f72e70b7c1070c6b933a9d26961d2d63a7 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Fri, 28 Jul 2023 08:35:07 -0400
4 Subject: drm/amd/display: Fix noise issue on HDMI AV mute
5
6 From: Leo Ma <hanghong.ma@amd.com>
7
8 [ Upstream commit 69e3be6893a7e668660b05a966bead82bbddb01d ]
9
10 [Why]
11 When mode switching is triggered there is momentary noise visible on
12 some HDMI TV or displays.
13
14 [How]
15 Wait for 2 frames to make sure we have enough time to send out AV mute
16 and sink receives a full frame.
17
18 Cc: Mario Limonciello <mario.limonciello@amd.com>
19 Cc: Alex Deucher <alexander.deucher@amd.com>
20 Cc: stable@vger.kernel.org
21 Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
22 Acked-by: Wayne Lin <wayne.lin@amd.com>
23 Signed-off-by: Leo Ma <hanghong.ma@amd.com>
24 Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
25 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
26 Signed-off-by: Sasha Levin <sashal@kernel.org>
27 ---
28 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 12 +++++++++++-
29 1 file changed, 11 insertions(+), 1 deletion(-)
30
31 diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
32 index 22c77e96f6a54..02d22f62c0031 100644
33 --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
34 +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
35 @@ -641,10 +641,20 @@ void dcn30_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
36 if (pipe_ctx == NULL)
37 return;
38
39 - if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal) && pipe_ctx->stream_res.stream_enc != NULL)
40 + if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal) && pipe_ctx->stream_res.stream_enc != NULL) {
41 pipe_ctx->stream_res.stream_enc->funcs->set_avmute(
42 pipe_ctx->stream_res.stream_enc,
43 enable);
44 +
45 + /* Wait for two frame to make sure AV mute is sent out */
46 + if (enable) {
47 + pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VACTIVE);
48 + pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VBLANK);
49 + pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VACTIVE);
50 + pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VBLANK);
51 + pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VACTIVE);
52 + }
53 + }
54 }
55
56 void dcn30_update_info_frame(struct pipe_ctx *pipe_ctx)
57 --
58 2.43.0
59