]> git.baikalelectronics.ru Git - kernel.git/commit
drm/imx: move arming of the vblank event to atomic_flush
authorLucas Stach <l.stach@pengutronix.de>
Thu, 15 Mar 2018 09:11:59 +0000 (10:11 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 15 Mar 2018 16:52:41 +0000 (17:52 +0100)
commita1be6e26ee9104fd3e8f793beede79f62e60a280
treecc31f87b70c42d341c811fd689f02fb8c5c83a58
parent6d9e3865c357cc5bf1550b7285f44ecfd2875e91
drm/imx: move arming of the vblank event to atomic_flush

Right now the vblank event completion is racing with the atomic update,
which is especially bad when the PRE is in use, as one of the hardware
issue workaround might extend the atomic commit for quite some time.

If the vblank IRQ happens to trigger during that time, we will prematurely
signal the atomic commit completion to userspace, which causes tearing
when userspace re-uses a framebuffer we haven't managed to flip away from
yet.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/ipuv3-crtc.c