From 99a3d372443c6e71db862b8946242e2f0ba940cf Mon Sep 17 00:00:00 2001 From: Won Jung Date: Fri, 6 Jan 2017 10:26:02 +0900 Subject: [PATCH] [COMMON] media: scaler: fix power-off bug for scaler There is a possibility which g2d block power off while scaler is running. A scaler is in the g2d block. In interrupt handler, rm_runtim functions, pm_runtime_get or pm_runtime_put, are uesed as asynchronous mode. But since a wating job can be called in interrupt handler, g2d block power is turned off due to the asyncchronous pm_runtime_put function while the job is performing. Therefore, the pm_runtime_put should be called after the wating job which performs in irq handler is done. Change-Id: If342b2cc4b57714d6183486b4b54b1b21b1c1472 Signed-off-by: Won Jung --- drivers/media/platform/exynos/scaler/scaler-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos/scaler/scaler-core.c b/drivers/media/platform/exynos/scaler/scaler-core.c index 0a2fb06959ea..a64587095de0 100644 --- a/drivers/media/platform/exynos/scaler/scaler-core.c +++ b/drivers/media/platform/exynos/scaler/scaler-core.c @@ -2679,8 +2679,6 @@ static irqreturn_t sc_irq_handler(int irq, void *priv) clear_bit(DEV_RUN, &sc->state); clear_bit(CTX_RUN, &ctx->flags); - sc_clk_power_disable(sc); - if (ctx->context_type == SC_CTX_V4L2_TYPE) { BUG_ON(ctx != v4l2_m2m_get_curr_priv(sc->m2m.m2m_dev)); @@ -2733,6 +2731,7 @@ static irqreturn_t sc_irq_handler(int irq, void *priv) sc_run_next_job(sc); + sc_clk_power_disable(sc); isr_unlock: spin_unlock(&sc->slock); -- 2.20.1