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 <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2024-12-27 10:43:48 +08:00
committed by Tao Huang
parent 54ecd2a75a
commit 12e823b0e3

View File

@@ -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;