drm/vc4: crtc: Enable and disable the PV in atomic_enable / disable
authorMaxime Ripard <maxime@cerno.tech>
Fri, 21 Feb 2020 13:34:31 +0000 (14:34 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:37 +0000 (16:33 +0100)
commitdcbae8ea224877a8656b6b2ad92b528982c9dfd2
tree563abeeb3238792f13082c0f82905fdfc43f1f2c
parent2d4e262faabd77c04aa5026af8975d85ad344833
drm/vc4: crtc: Enable and disable the PV in atomic_enable / disable

The VIDEN bit in the pixelvalve currently being used to enable or disable
the pixelvalve seems to not be enough in some situations, which whill end
up with the pixelvalve stalling.

In such a case, even re-enabling VIDEN doesn't bring it back and we need to
clear the FIFO. This can only be done if the pixelvalve is disabled though.

In order to overcome this, we can configure the pixelvalve during
mode_set_no_fb, but only enable it in atomic_enable and flush the FIFO
there, and in atomic_disable disable the pixelvalve again.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_crtc.c