mxsfb has vblank support, is atomic, but doesn't call
drm_crtc_vblank_on/off as it should. Not good.

With my next patch to add the drm_crtc_vblank_reset to helpers this
means not even the very first crtc enabling will vblanks work anymore,
since they'll just stay off forever.

Since mxsfb doesn't have any vblank waits of its own in the
enable/disable flow, nor an enable/disable_vblank callback we can do
the on/off as the first respectively last operation, and it should all
work.

Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
Cc: Marek Vasut <ma...@denx.de>
Cc: Stefan Agner <ste...@agner.ch>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <s.ha...@pengutronix.de>
Cc: Pengutronix Kernel Team <ker...@pengutronix.de>
Cc: Fabio Estevam <feste...@gmail.com>
Cc: NXP Linux Team <linux-...@nxp.com>
Cc: linux-arm-ker...@lists.infradead.org
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c 
b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 497cf443a9af..1891cd6deb2f 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -124,6 +124,7 @@ static void mxsfb_pipe_enable(struct 
drm_simple_display_pipe *pipe,
        drm_panel_prepare(mxsfb->panel);
        mxsfb_crtc_enable(mxsfb);
        drm_panel_enable(mxsfb->panel);
+       drm_crtc_vblank_on(&pipe->crtc);
 }
 
 static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe)
@@ -133,6 +134,7 @@ static void mxsfb_pipe_disable(struct 
drm_simple_display_pipe *pipe)
        struct drm_crtc *crtc = &pipe->crtc;
        struct drm_pending_vblank_event *event;
 
+       drm_crtc_vblank_off(&pipe->crtc);
        drm_panel_disable(mxsfb->panel);
        mxsfb_crtc_disable(mxsfb);
        drm_panel_unprepare(mxsfb->panel);
-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to