diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-01-18 16:57:36 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-06-12 22:52:45 +0300 |
commit | 1d5e5ea1f6061ec9ad4f43928697f479aeb884c6 (patch) | |
tree | 316b7d55f847846b55cc6dd6db36cf87da001d7b /drivers/gpu/drm/omapdrm/omap_drv.c | |
parent | f13ab00567273c70ffbecb59e8f11491cc108bbd (diff) | |
download | linux-1d5e5ea1f6061ec9ad4f43928697f479aeb884c6.tar.bz2 |
drm: omapdrm: Cancel pending page flips when closing device
Pending page flips must be cancelled when closing the device, otherwise
their completion at next vblank will result in nasty effects, including
possible oopses due to resources required to complete the page flip
being freed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 47fb99b3a375..cf1b37e5374b 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -630,7 +630,13 @@ static void dev_lastclose(struct drm_device *dev) static void dev_preclose(struct drm_device *dev, struct drm_file *file) { + struct omap_drm_private *priv = dev->dev_private; + unsigned int i; + DBG("preclose: dev=%p", dev); + + for (i = 0; i < priv->num_crtcs; ++i) + omap_crtc_cancel_page_flip(priv->crtcs[i], file); } static void dev_postclose(struct drm_device *dev, struct drm_file *file) |