drm/vc4: crtc: Keep the previously assigned HVS FIFO 37/245637/1
authorMaxime Ripard <maxime@cerno.tech>
Mon, 12 Oct 2020 07:44:43 +0000 (16:44 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Tue, 13 Oct 2020 08:58:42 +0000 (17:58 +0900)
commit704036c2a3e84a1d1a42d9511e3527e029c37e59
treee65dbad7b60fa2a037d4583f42c146df168f0be3
parent1d6059916173b882b6755dfc6c05bf8027e4b4db
drm/vc4: crtc: Keep the previously assigned HVS FIFO

The HVS FIFOs are currently assigned each time we have an atomic_check
for all the enabled CRTCs.

However, if we are running multiple outputs in parallel and we happen to
disable the first (by index) CRTC, we end up changing the assigned FIFO
of the second CRTC without disabling and reenabling the pixelvalve which
ends up in a stall and eventually a VBLANK timeout.

In order to fix this, we can create a special value for our assigned
channel to mark it as disabled, and if our CRTC already had an assigned
channel in its previous state, we keep on using it.

Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
[hoegeun.kwon: Needed to fix page flip issue of dual hdmi.]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I70e0d6b563d5c7f22a1a7e1527a401ac42395b78
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_kms.c