drm/exynos/decon5433: signal frame done interrupt at front porch
authorAndrzej Hajda <a.hajda@samsung.com>
Tue, 14 Mar 2017 08:27:58 +0000 (09:27 +0100)
committerInki Dae <inki.dae@samsung.com>
Tue, 21 Mar 2017 04:17:22 +0000 (13:17 +0900)
DECON in case of video mode generates interrupt by default at start
of vertical back porch. As this interrupt is used to generate VBLANK
events more optimal point is start of vertical front porch.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
include/video/exynos5433_decon.h

index cfe6f8af849f3e66f0b9f727cfc319da7aab6921..a43d0fa0b051c83d5b092cf4cc605e92e850e8f6 100644 (file)
@@ -105,7 +105,7 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
                if (ctx->out_type & IFTYPE_I80)
                        val |= VIDINTCON0_FRAMEDONE;
                else
-                       val |= VIDINTCON0_INTFRMEN;
+                       val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP;
 
                writel(val, ctx->addr + DECON_VIDINTCON0);
        }
index 352fc0d9528fe5947c4897ef34063e3e986d226e..6b083d327e982c0c5deb7895ce6e7c6b1094c8a6 100644 (file)
 
 /* VIDINTCON0 */
 #define VIDINTCON0_FRAMEDONE           (1 << 17)
+#define VIDINTCON0_FRAMESEL_BP         (0 << 15)
+#define VIDINTCON0_FRAMESEL_VS         (1 << 15)
+#define VIDINTCON0_FRAMESEL_AC         (2 << 15)
+#define VIDINTCON0_FRAMESEL_FP         (3 << 15)
 #define VIDINTCON0_INTFRMEN            (1 << 12)
 #define VIDINTCON0_INTEN               (1 << 0)