Skip to content

Commit fb10dc4

Browse files
6by9mripard
authored andcommitted
drm/vc4: hdmi: Correct HDMI timing registers for interlaced modes
For interlaced modes the timings were not being correctly programmed into the HDMI block, so correct them. Fixes: 8323989 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://lore.kernel.org/r/20220613144800.326124-33-maxime@cerno.tech Signed-off-by: Maxime Ripard <maxime@cerno.tech>
1 parent c94cd06 commit fb10dc4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,13 +1036,13 @@ static void vc5_hdmi_set_timings(struct vc4_hdmi *vc4_hdmi,
10361036
VC4_SET_FIELD(mode->crtc_vsync_start - mode->crtc_vdisplay,
10371037
VC5_HDMI_VERTA_VFP) |
10381038
VC4_SET_FIELD(mode->crtc_vdisplay, VC5_HDMI_VERTA_VAL));
1039-
u32 vertb = (VC4_SET_FIELD(0, VC5_HDMI_VERTB_VSPO) |
1040-
VC4_SET_FIELD(mode->crtc_vtotal - mode->crtc_vsync_end +
1041-
interlaced,
1039+
u32 vertb = (VC4_SET_FIELD(mode->htotal >> (2 - pixel_rep),
1040+
VC5_HDMI_VERTB_VSPO) |
1041+
VC4_SET_FIELD(mode->crtc_vtotal - mode->crtc_vsync_end,
10421042
VC4_HDMI_VERTB_VBP));
10431043
u32 vertb_even = (VC4_SET_FIELD(0, VC5_HDMI_VERTB_VSPO) |
10441044
VC4_SET_FIELD(mode->crtc_vtotal -
1045-
mode->crtc_vsync_end,
1045+
mode->crtc_vsync_end - interlaced,
10461046
VC4_HDMI_VERTB_VBP));
10471047
unsigned long flags;
10481048
unsigned char gcp;

0 commit comments

Comments
 (0)