drm/exynos: fimd: add triggering unset routine in fimd_trigger()
authorYoungJun Cho <yj44.cho@samsung.com>
Mon, 17 Nov 2014 13:00:13 +0000 (22:00 +0900)
committerInki Dae <inki.dae@samsung.com>
Mon, 24 Nov 2014 09:02:54 +0000 (18:02 +0900)
There is a case like set config which requires triggering
but vblank is not enabled yet.
So triggering unset routine is required to exit from
triggering mode.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fimd.c

index 3c632370e9831f7aebee9e336296106d26d83a33..e488b80bef5e23f017f85c77c2786f1ac931c8dc 100644 (file)
@@ -984,6 +984,13 @@ static void fimd_trigger(struct device *dev)
        reg = readl(timing_base + TRIGCON);
        reg |= (TRGMODE_I80_RGB_ENABLE_I80 | SWTRGCMD_I80_RGB_ENABLE);
        writel(reg, timing_base + TRIGCON);
+
+       /*
+        * Exits triggering mode if vblank is not enabled yet, because when the
+        * VIDINTCON0 register is not set, it can not exit from triggering mode.
+        */
+       if (!test_bit(0, &ctx->irq_flags))
+               atomic_set(&ctx->triggering, 0);
 }
 
 static void fimd_te_handler(struct exynos_drm_manager *mgr)