From 80c115e7f557088f0b136f963111bd346869d798 Mon Sep 17 00:00:00 2001 From: Cho KyongHo Date: Mon, 18 May 2015 16:37:49 +0900 Subject: [PATCH] [COMMON] media: smfc: fix inconsistency in hardware state Setting SMFC_DEV_RUNNING is after configuring H/W to start working. If IRQ is occurred before configuring the flag, the IRQ handler is called before the flag set. Change-Id: I3f408f569b7265eb368b9efc38cffdb13d79fff2 Signed-off-by: Cho KyongHo --- drivers/media/platform/exynos/smfc/smfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos/smfc/smfc.c b/drivers/media/platform/exynos/smfc/smfc.c index c601f5b94ebe..7a2cc4343fbf 100644 --- a/drivers/media/platform/exynos/smfc/smfc.c +++ b/drivers/media/platform/exynos/smfc/smfc.c @@ -1215,12 +1215,13 @@ static void smfc_m2m_device_run(void *priv) smfc_hwconfigure_2nd_tables(ctx, thumb_quality_factor); smfc_hwconfigure_2nd_image(ctx); } - smfc_hwconfigure_start(ctx, restart_interval, !!enable_hwfc); spin_lock_irqsave(&ctx->smfc->flag_lock, flags); ctx->smfc->flags |= SMFC_DEV_RUNNING; spin_unlock_irqrestore(&ctx->smfc->flag_lock, flags); + smfc_hwconfigure_start(ctx, restart_interval, !!enable_hwfc); + return; err_hwfc: if (!IS_ERR(ctx->smfc->clk_gate)) { -- 2.20.1