From 12e823b0e3253f6784fcf16cd1e8b066d5a9b054 Mon Sep 17 00:00:00 2001 From: Algea Cao Date: Fri, 27 Dec 2024 10:43:48 +0800 Subject: [PATCH] drm/bridge: synopsys: dw_hdmi: Send GCP when set/clear avmute HDMI avmute is sent via GCP. If HDMI want to use the avmute function, GCP must be sent. Change-Id: Id844ea93c5296e1a5cf200f9ccf7bd2effd13e82 Signed-off-by: Algea Cao --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 619f08947a44..b3c6ed89e0c2 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -1673,6 +1673,18 @@ static void hdmi_video_packetize(struct dw_hdmi *hdmi) return; } + /* + * GCP is sent by default after power on. + * In kernel 4.19/5.10, we did not intentionally + * disable sending of GCP. The kernel 6.1 upstream + * code disable GCP transmission in 8bit color depth. + * Therefore, when you need to use avmute function, + * it is need to enable GCP transmission. + */ + val = hdmi_readb(hdmi, HDMI_FC_GCP); + if (val & (HDMI_FC_GCP_SET_AVMUTE | HDMI_FC_GCP_CLEAR_AVMUTE)) + clear_gcp_auto = 0; + /* set the packetizer registers */ val = (color_depth << HDMI_VP_PR_CD_COLOR_DEPTH_OFFSET) & HDMI_VP_PR_CD_COLOR_DEPTH_MASK;