From ef1faaaa5bb809f158ba66e1e15a5661922808a5 Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Fri, 9 Dec 2016 10:45:20 +0100 Subject: drm/exynos/decon5433: signal vblank only on odd fields In case of interlace mode irq is generated for odd and even fields, but vblank should be signaled only for the last emitted field. Change-Id: Icfae5a6729a0168b4f565e79825083b39cce5ca3 Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++++++ include/video/exynos5433_decon.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index e3a27949d5d8..b0f696f12f8b 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -756,6 +756,13 @@ static irqreturn_t decon_irq_handler(int irq, void *dev_id) val &= ctx->i80_if ? VIDINTCON1_INTFRMDONEPEND : VIDINTCON1_INTFRMPEND; if (val) { writel(val, ctx->addr + DECON_VIDINTCON1); + if (!ctx->i80_if) { + val = readl(ctx->addr + DECON_VIDOUTCON0); + val &= VIDOUT_INTERLACE_EN_F | VIDOUT_INTERLACE_FIELD_F; + if (val == + (VIDOUT_INTERLACE_EN_F | VIDOUT_INTERLACE_FIELD_F)) + return IRQ_HANDLED; + } drm_handle_vblank(ctx->drm_dev, ctx->pipe); exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe); } diff --git a/include/video/exynos5433_decon.h b/include/video/exynos5433_decon.h index a67759a946a8..a3360c406f50 100644 --- a/include/video/exynos5433_decon.h +++ b/include/video/exynos5433_decon.h @@ -90,6 +90,7 @@ #define VIDCON0_SWRESET (1 << 28) /* VIDOUTCON0 */ +#define VIDOUT_INTERLACE_FIELD_F (1 << 29) #define VIDOUT_INTERLACE_EN_F (1 << 28) #define VIDOUT_LCD_ON (1 << 24) #define VIDOUT_IF_F_MASK (0x3 << 20) -- cgit v1.2.3