Commit 6c8b66ed authored by Lucas Stach's avatar Lucas Stach Committed by Philipp Zabel

drm/imx: notify DRM core about CRTC vblank state

Make sure the DRM core is aware that there will be no vblank interrupts
incoming if the CRTC is disabled. That way the core will reject any
attempts from userspace to wait on a vblank event on a disabled CRTC.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 596a65d1
...@@ -64,6 +64,7 @@ static void ipu_fb_enable(struct ipu_crtc *ipu_crtc) ...@@ -64,6 +64,7 @@ static void ipu_fb_enable(struct ipu_crtc *ipu_crtc)
/* Start DC channel and DI after IDMAC */ /* Start DC channel and DI after IDMAC */
ipu_dc_enable_channel(ipu_crtc->dc); ipu_dc_enable_channel(ipu_crtc->dc);
ipu_di_enable(ipu_crtc->di); ipu_di_enable(ipu_crtc->di);
drm_crtc_vblank_on(&ipu_crtc->base);
ipu_crtc->enabled = 1; ipu_crtc->enabled = 1;
} }
...@@ -80,6 +81,7 @@ static void ipu_fb_disable(struct ipu_crtc *ipu_crtc) ...@@ -80,6 +81,7 @@ static void ipu_fb_disable(struct ipu_crtc *ipu_crtc)
ipu_di_disable(ipu_crtc->di); ipu_di_disable(ipu_crtc->di);
ipu_plane_disable(ipu_crtc->plane[0]); ipu_plane_disable(ipu_crtc->plane[0]);
ipu_dc_disable(ipu); ipu_dc_disable(ipu);
drm_crtc_vblank_off(&ipu_crtc->base);
ipu_crtc->enabled = 0; ipu_crtc->enabled = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment