From 526c9136929c491bda30f89102ec66e3438b7c88 Mon Sep 17 00:00:00 2001 From: Joonyoung Shim Date: Thu, 30 Oct 2014 13:34:10 +0900 Subject: 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 --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 37583ae0ab3..16169b06a2b 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); /* -- cgit v1.2.3