summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_crtc.c
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2011-10-14 13:29:51 +0900
committerDave Airlie <airlied@redhat.com>2011-10-18 10:01:19 +0100
commitccf4d883f82e10053fa5806f2cd35401012bec84 (patch)
tree8d9058f2cd1161d4351db83d961b84e9fe1ebe47 /drivers/gpu/drm/exynos/exynos_drm_crtc.c
parentf6b98252946496de86bd4e89a8b7ef12ec48d97c (diff)
drm/exynos: fixed page flip bug.
in case of using two drivers such as fimd and hdmi controller that they have their own hardware interrupt, drm framework doesn't provide pipe number corresponding to it. so the pipe should be set to event's from specific crtc. Signed-off-by: Seung-Woo Kim <sw0312.kim@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/exynos_drm_crtc.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 8cd9d8eec46..9337e5e2dbb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -259,13 +259,21 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
mutex_lock(&dev->struct_mutex);
- if (event && !dev_priv->pageflip_event) {
+ if (event) {
+ /*
+ * the pipe from user always is 0 so we can set pipe number
+ * of current owner to event.
+ */
+ event->pipe = exynos_crtc->pipe;
+
list_add_tail(&event->base.link,
&dev_priv->pageflip_event_list);
ret = drm_vblank_get(dev, exynos_crtc->pipe);
if (ret) {
DRM_DEBUG("failed to acquire vblank counter\n");
+ list_del(&event->base.link);
+
goto out;
}
@@ -274,7 +282,7 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
if (ret) {
crtc->fb = old_fb;
drm_vblank_put(dev, exynos_crtc->pipe);
- dev_priv->pageflip_event = false;
+ list_del(&event->base.link);
goto out;
}
@@ -282,12 +290,10 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
/*
* the values related to a buffer of the drm framebuffer
* to be applied should be set at here. because these values
- * first, is set to shadow registers and then to
+ * first, are set to shadow registers and then to
* real registers at vsync front porch period.
*/
exynos_drm_crtc_apply(crtc);
-
- dev_priv->pageflip_event = true;
}
out:
mutex_unlock(&dev->struct_mutex);