Skip to content

Commit b5dbc4d

Browse files
committed
drm/vc4: kms: Document the muxing corner cases
We've had a number of muxing corner-cases with specific ways to reproduce them, so let's document them to make sure they aren't lost and introduce regressions later on. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com> Reviewed-by: Hoegeun Kwon <hoegeun.kwon@samsung.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20201105135656.383350-6-maxime@cerno.tech
1 parent a72b045 commit b5dbc4d

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

drivers/gpu/drm/vc4/vc4_kms.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,28 @@ static int vc4_load_tracker_obj_init(struct vc4_dev *vc4)
662662
return drmm_add_action_or_reset(&vc4->base, vc4_load_tracker_obj_fini, NULL);
663663
}
664664

665+
/*
666+
* The BCM2711 HVS has up to 7 outputs connected to the pixelvalves and
667+
* the TXP (and therefore all the CRTCs found on that platform).
668+
*
669+
* The naive (and our initial) implementation would just iterate over
670+
* all the active CRTCs, try to find a suitable FIFO, and then remove it
671+
* from the pool of available FIFOs. However, there are a few corner
672+
* cases that need to be considered:
673+
*
674+
* - When running in a dual-display setup (so with two CRTCs involved),
675+
* we can update the state of a single CRTC (for example by changing
676+
* its mode using xrandr under X11) without affecting the other. In
677+
* this case, the other CRTC wouldn't be in the state at all, so we
678+
* need to consider all the running CRTCs in the DRM device to assign
679+
* a FIFO, not just the one in the state.
680+
*
681+
* - Since we need the pixelvalve to be disabled and enabled back when
682+
* the FIFO is changed, we should keep the FIFO assigned for as long
683+
* as the CRTC is enabled, only considering it free again once that
684+
* CRTC has been disabled. This can be tested by booting X11 on a
685+
* single display, and changing the resolution down and then back up.
686+
*/
665687
static int vc4_pv_muxing_atomic_check(struct drm_device *dev,
666688
struct drm_atomic_state *state)
667689
{

0 commit comments

Comments
 (0)