drm/vc4: crtc: Support odd horizontal timings on BCM2712
authorDom Cobley <popcornmix@gmail.com>
Tue, 24 Oct 2023 15:20:42 +0000 (16:20 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:12 +0000 (11:35 +0000)
commitc2d096ec2bd55acd222ee169463a38dea0f3a0e4
treeb96e52929757f88ed2a8671f437f4b6ec3bc2d7f
parentac7795b5d2308316cf0b2b97b3d50e022d3f6b42
drm/vc4: crtc: Support odd horizontal timings on BCM2712

BCM2711 runs pixelvalve at two pixels per clock cycle which results
in an unfortunate limitation that odd horizontal timings are not
possible. This is apparent on the standard DMT mode of 1366x768@60
which cannot be driven with correct timing.

BCM2712 defaults to the same behaviour, but has a mode to support
odd timings. While internally it still runs at two pixels per clock,
setting the PV_VCONTROL_ODD_TIMING bit makes it appear externally
to behave as it is one pixel per clock.

Switching to this mode fixes 1366x768@60 mode, and other custom
resultions with odd horizontal timings.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_regs.h