summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2012-11-02 13:30:47 +0200
committerInki Dae <daeinki@gmail.com>2012-11-29 03:30:33 -0800
commit85473328bac6170aabb5e13d2542d11d1fc4cc76 (patch)
tree55e1929abe76b57616019638b31cab4f6d15f622 /drivers
parentfdd66e06ce71cdcdb515ef355d4f2fc90e151503 (diff)
drm/exynos: hold event_lock while accessing pageflip_event_list
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index fce245f64c4f..2efa4b031d73 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -236,16 +236,21 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
goto out;
}
+ spin_lock_irq(&dev->event_lock);
list_add_tail(&event->base.link,
&dev_priv->pageflip_event_list);
+ spin_unlock_irq(&dev->event_lock);
crtc->fb = fb;
ret = exynos_drm_crtc_mode_set_base(crtc, crtc->x, crtc->y,
NULL);
if (ret) {
crtc->fb = old_fb;
+
+ spin_lock_irq(&dev->event_lock);
drm_vblank_put(dev, exynos_crtc->pipe);
list_del(&event->base.link);
+ spin_unlock_irq(&dev->event_lock);
goto out;
}