mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
drm: bridge: dw-hdmi: fix GCP default phase in deep color mode
According to HDMI 1.4b specification: If the transmitted video format has timing such that the phase of the first pixel of every Video Data Period corresponds to pixel packing phase 0 (e.g. 10P0, 12P0, 16P0), the Source may set the Default_Phase bit in the GCP. The Sink may use this bit to optimize its filtering or handling of the PP field. This means that for 10-bit mode the Htotal must be dividable by 4; for 12-bit mode, the Htotal must be divisible by 2. Change-Id: I02e632d095141cbabcba06dc1321ae0dc69dc736 Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
@@ -1444,8 +1444,13 @@ static void hdmi_video_packetize(struct dw_hdmi *hdmi)
|
||||
HDMI_VP_CONF_PR_EN_MASK |
|
||||
HDMI_VP_CONF_BYPASS_SELECT_MASK, HDMI_VP_CONF);
|
||||
|
||||
hdmi_modb(hdmi, 1 << HDMI_VP_STUFF_IDEFAULT_PHASE_OFFSET,
|
||||
HDMI_VP_STUFF_IDEFAULT_PHASE_MASK, HDMI_VP_STUFF);
|
||||
if ((color_depth == 5 && hdmi->previous_mode.htotal % 4) ||
|
||||
(color_depth == 6 && hdmi->previous_mode.htotal % 2))
|
||||
hdmi_modb(hdmi, 0, HDMI_VP_STUFF_IDEFAULT_PHASE_MASK,
|
||||
HDMI_VP_STUFF);
|
||||
else
|
||||
hdmi_modb(hdmi, 1 << HDMI_VP_STUFF_IDEFAULT_PHASE_OFFSET,
|
||||
HDMI_VP_STUFF_IDEFAULT_PHASE_MASK, HDMI_VP_STUFF);
|
||||
|
||||
hdmi_writeb(hdmi, remap_size, HDMI_VP_REMAP);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user