Skip to content

Commit

Permalink
drm/exynos: release pending pageflip events when closed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joonyoung Shim authored and Dave Airlie committed Mar 20, 2012
1 parent f0b1bda commit 3ab0943
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/gpu/drm/exynos/exynos_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,22 @@ static int exynos_drm_unload(struct drm_device *dev)
static void exynos_drm_preclose(struct drm_device *dev,
struct drm_file *file)
{
struct exynos_drm_private *private = dev->dev_private;
struct drm_pending_vblank_event *e, *t;
unsigned long flags;

DRM_DEBUG_DRIVER("%s\n", __FILE__);

/* release events of current file */
spin_lock_irqsave(&dev->event_lock, flags);
list_for_each_entry_safe(e, t, &private->pageflip_event_list,
base.link) {
if (e->base.file_priv == file) {
list_del(&e->base.link);
e->base.destroy(&e->base);
}
}
spin_unlock_irqrestore(&dev->event_lock, flags);
}

static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
Expand Down

0 comments on commit 3ab0943

Please sign in to comment.