summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2014-10-30 04:34:10 (GMT)
committerChanho Park <chanho61.park@samsung.com>2014-11-18 03:01:07 (GMT)
commitb10cde6e67c36b2bf54c8049abc1f1c4d60d61a1 (patch)
tree2adf1e37b45b04e766deaea39396e2e3ba3fb3db
parentf8faa55d2ea536aa429f106cd8be095c407ed59c (diff)
downloadlinux-3.10-b10cde6e67c36b2bf54c8049abc1f1c4d60d61a1.zip
linux-3.10-b10cde6e67c36b2bf54c8049abc1f1c4d60d61a1.tar.gz
linux-3.10-b10cde6e67c36b2bf54c8049abc1f1c4d60d61a1.tar.bz2
drm/exynos: move triggering checking
It's better to be checking whether triggerring in fimd_trigger function. Also it will return if in triggerring on fimd_te_handler, then it can't execute remain codes. Change-Id: If8dbcbd139908af330ad59b5d4a66435fe0d77c6 Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 37583ae..16169b0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -957,6 +957,13 @@ static void fimd_trigger(struct device *dev)
void *timing_base = ctx->regs + driver_data->timing_base;
u32 reg;
+ /*
+ * Skips to trigger if in triggering state, because multiple triggering
+ * requests can cause panel reset.
+ */
+ if (atomic_read(&ctx->triggering))
+ return;
+
atomic_set(&ctx->triggering, 1);
reg = readl(ctx->regs + VIDINTCON0);
@@ -978,13 +985,6 @@ static int fimd_te_handler(struct exynos_drm_manager *mgr)
if (ctx->pipe < 0 || !ctx->drm_dev)
return -EINVAL;
- /*
- * Skips to trigger if in triggering state, because multiple triggering
- * requests can cause panel reset.
- */
- if (atomic_read(&ctx->triggering))
- return 0;
-
spin_lock_irqsave(&ctx->win_updated_lock, flags);
/*