Commit 7bc494a9 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'exynos-drm-fixes' of...

Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes

two outstanding exynos fixes
* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos: release unhandled page flip events at postclose.
  drm/exynos: Fix trivial typo in exynos_drm_fimd.c
parents 60460f65 0cbc330e
...@@ -172,29 +172,38 @@ static int exynos_drm_open(struct drm_device *dev, struct drm_file *file) ...@@ -172,29 +172,38 @@ static int exynos_drm_open(struct drm_device *dev, struct drm_file *file)
static void exynos_drm_preclose(struct drm_device *dev, static void exynos_drm_preclose(struct drm_device *dev,
struct drm_file *file) struct drm_file *file)
{
exynos_drm_subdrv_close(dev, file);
}
static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
{ {
struct exynos_drm_private *private = dev->dev_private; struct exynos_drm_private *private = dev->dev_private;
struct drm_pending_vblank_event *e, *t; struct drm_pending_vblank_event *v, *vt;
struct drm_pending_event *e, *et;
unsigned long flags; unsigned long flags;
/* release events of current file */ if (!file->driver_priv)
return;
/* Release all events not unhandled by page flip handler. */
spin_lock_irqsave(&dev->event_lock, flags); spin_lock_irqsave(&dev->event_lock, flags);
list_for_each_entry_safe(e, t, &private->pageflip_event_list, list_for_each_entry_safe(v, vt, &private->pageflip_event_list,
base.link) { base.link) {
if (e->base.file_priv == file) { if (v->base.file_priv == file) {
list_del(&e->base.link); list_del(&v->base.link);
e->base.destroy(&e->base); drm_vblank_put(dev, v->pipe);
v->base.destroy(&v->base);
} }
} }
spin_unlock_irqrestore(&dev->event_lock, flags);
exynos_drm_subdrv_close(dev, file); /* Release all events handled by page flip handler but not freed. */
} list_for_each_entry_safe(e, et, &file->event_list, link) {
list_del(&e->link);
e->destroy(e);
}
spin_unlock_irqrestore(&dev->event_lock, flags);
static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
{
if (!file->driver_priv)
return;
kfree(file->driver_priv); kfree(file->driver_priv);
file->driver_priv = NULL; file->driver_priv = NULL;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "exynos_drm_iommu.h" #include "exynos_drm_iommu.h"
/* /*
* FIMD is stand for Fully Interactive Mobile Display and * FIMD stands for Fully Interactive Mobile Display and
* as a display controller, it transfers contents drawn on memory * as a display controller, it transfers contents drawn on memory
* to a LCD Panel through Display Interfaces such as RGB or * to a LCD Panel through Display Interfaces such as RGB or
* CPU Interface. * CPU Interface.
......
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