aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2012-03-16 05:47:07 -0400
committerDave Airlie <airlied@redhat.com>2012-03-20 05:40:23 -0400
commit3ab09435d5fbad63842cd2749f95deec336eb566 (patch)
tree6c1d4597b45e47aea3b7cd5f9cc2278f02d49979 /drivers/gpu/drm/exynos
parentf0b1bda725c1c49620d2e7ae7405a247098cdb8e (diff)
drm/exynos: release pending pageflip events when closed
We should release pending pageflip events when closed. If not, they will be dangling events. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 58820ebd3558..d359cb4b7b88 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -147,8 +147,22 @@ static int exynos_drm_unload(struct drm_device *dev)
147static void exynos_drm_preclose(struct drm_device *dev, 147static void exynos_drm_preclose(struct drm_device *dev,
148 struct drm_file *file) 148 struct drm_file *file)
149{ 149{
150 struct exynos_drm_private *private = dev->dev_private;
151 struct drm_pending_vblank_event *e, *t;
152 unsigned long flags;
153
150 DRM_DEBUG_DRIVER("%s\n", __FILE__); 154 DRM_DEBUG_DRIVER("%s\n", __FILE__);
151 155
156 /* release events of current file */
157 spin_lock_irqsave(&dev->event_lock, flags);
158 list_for_each_entry_safe(e, t, &private->pageflip_event_list,
159 base.link) {
160 if (e->base.file_priv == file) {
161 list_del(&e->base.link);
162 e->base.destroy(&e->base);
163 }
164 }
165 spin_unlock_irqrestore(&dev->event_lock, flags);
152} 166}
153 167
154static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) 168static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)