diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2016-12-09 10:45:20 +0100 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:54:32 +0900 |
commit | ef1faaaa5bb809f158ba66e1e15a5661922808a5 (patch) | |
tree | 4e411a4d3ac8c3321badd61c713e55f88f17ab68 | |
parent | a4b78abe0bb3e646bd9550d88fbaa9d8ecf14089 (diff) |
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 <a.hajda@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 | ||||
-rw-r--r-- | include/video/exynos5433_decon.h | 1 |
2 files changed, 8 insertions, 0 deletions
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) |