Skip to content

Commit 26ff77f

Browse files
popcornmixmripard
authored andcommitted
drm/vc4: hdmi: Use gcp=4 for YCC422
HDMI 1.4 6.2.4 YCC4:2:2 is also 36-bit mode but does not require the further use of the Deep Color modes described in section 6.5.2 and 6.5.3 (GCP sections) So we don't want to signal bpc here
1 parent eeacb0e commit 26ff77f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,8 @@ static void vc5_hdmi_set_timings(struct vc4_hdmi *vc4_hdmi,
10021002
struct drm_connector_state *state,
10031003
struct drm_display_mode *mode)
10041004
{
1005+
struct vc4_hdmi_connector_state *vc4_state =
1006+
conn_state_to_vc4_hdmi_conn_state(state);
10051007
bool hsync_pos = mode->flags & DRM_MODE_FLAG_PHSYNC;
10061008
bool vsync_pos = mode->flags & DRM_MODE_FLAG_PVSYNC;
10071009
bool interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE;
@@ -1065,6 +1067,12 @@ static void vc5_hdmi_set_timings(struct vc4_hdmi *vc4_hdmi,
10651067
break;
10661068
}
10671069

1070+
// YCC422 is always 36-bit and not considered deep colour so doesn't signal in GCP
1071+
if (vc4_state->output_format == DRM_COLOR_FORMAT_YCRCB422) {
1072+
gcp = 4;
1073+
gcp_en = false;
1074+
}
1075+
10681076
reg = HDMI_READ(HDMI_DEEP_COLOR_CONFIG_1);
10691077
reg &= ~(VC5_HDMI_DEEP_COLOR_CONFIG_1_INIT_PACK_PHASE_MASK |
10701078
VC5_HDMI_DEEP_COLOR_CONFIG_1_COLOR_DEPTH_MASK);

0 commit comments

Comments
 (0)