summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2014-10-24 03:09:35 (GMT)
committerChanho Park <chanho61.park@samsung.com>2014-11-18 03:01:05 (GMT)
commit485935a422e6be299e56896c40d7f818242dbd62 (patch)
treecc13abc952102e77470d83e46bece161fc7deb9b
parent42b3d02a59023ed43aa1038f1bea936986f800ed (diff)
downloadlinux-3.10-485935a422e6be299e56896c40d7f818242dbd62.zip
linux-3.10-485935a422e6be299e56896c40d7f818242dbd62.tar.gz
linux-3.10-485935a422e6be299e56896c40d7f818242dbd62.tar.bz2
drm/exynos: fimd: make a wait_for_vblank event to be handled in same period
This patch makes sure for a wait_for_vblank event to be handled in same period. For this, it adds a new member, triggerred which means whether trigger request is completed or not since trigger request. So if there is a trigger request, update-request, then this patch makes a wait_for_vblank event to be handled after the trigger request is completed. Change-Id: If1a2491a323b637d20806373e0502b2b0a9ff810 Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 37583ae..1500128 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -165,6 +165,7 @@ struct fimd_context {
atomic_t wait_vsync_event;
atomic_t win_updated;
atomic_t triggering;
+ atomic_t triggerred;
spinlock_t win_updated_lock;
struct exynos_drm_panel_info panel;
@@ -985,6 +986,13 @@ static int fimd_te_handler(struct exynos_drm_manager *mgr)
if (atomic_read(&ctx->triggering))
return 0;
+
+ /* Handle wait for vblank request in case of in-trigger. */
+ if (atomic_read(&ctx->triggerred)) {
+ atomic_set(&ctx->triggerred, 0);
+ drm_handle_vblank(ctx->drm_dev, ctx->pipe);
+ }
+
spin_lock_irqsave(&ctx->win_updated_lock, flags);
/*
@@ -995,6 +1003,7 @@ static int fimd_te_handler(struct exynos_drm_manager *mgr)
atomic_set(&ctx->win_updated, 0);
spin_unlock_irqrestore(&ctx->win_updated_lock, flags);
+ atomic_set(&ctx->triggerred, 1);
fimd_trigger(ctx->dev);
spin_lock_irqsave(&ctx->win_updated_lock, flags);