summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2017-04-05 10:28:29 +0300
committerInki Dae <inki.dae@samsung.com>2017-06-01 10:21:36 +0300
commit366dcad34c2fe1684bd93892d06e774e44600f34 (patch)
tree912bb9a630e532a6a7271e079f0d68af424b467d /drivers/gpu/drm/exynos/exynos5433_drm_decon.c
parent2a6e4cd53c498c6762d9fa69745b84ff99815905 (diff)
downloadlinux-366dcad34c2fe1684bd93892d06e774e44600f34.tar.xz
drm/exynos/decon5433: always do sw-trigger when vblanks enabled
When vblanks are enabled userspace and/or kernel can expect vblank interrupt at declared period of time. To generate vblank interrupt image transfer must be triggered. This patch fixes vblank timeouts in case of sw-trigger mode. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos5433_drm_decon.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos5433_drm_decon.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 42e8f8c74bb0..028a6575f7d5 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -49,6 +49,7 @@ static const char * const decon_clks_name[] = {
enum decon_flag_bits {
BIT_CLKS_ENABLED,
+ BIT_IRQS_ENABLED,
BIT_WIN_UPDATED,
BIT_SUSPENDED
};
@@ -104,6 +105,7 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
val |= VIDINTCON0_INTFRMEN | VIDINTCON0_FRAMESEL_FP;
writel(val, ctx->addr + DECON_VIDINTCON0);
+ set_bit(BIT_IRQS_ENABLED, &ctx->flags);
return 0;
}
@@ -112,6 +114,7 @@ static void decon_disable_vblank(struct exynos_drm_crtc *crtc)
{
struct decon_context *ctx = crtc->ctx;
+ clear_bit(BIT_IRQS_ENABLED, &ctx->flags);
if (test_bit(BIT_SUSPENDED, &ctx->flags))
return;
@@ -518,7 +521,8 @@ static void decon_te_irq_handler(struct exynos_drm_crtc *crtc)
(ctx->out_type & I80_HW_TRG))
return;
- if (test_and_clear_bit(BIT_WIN_UPDATED, &ctx->flags))
+ if (test_and_clear_bit(BIT_WIN_UPDATED, &ctx->flags) ||
+ test_bit(BIT_IRQS_ENABLED, &ctx->flags))
decon_set_bits(ctx, DECON_TRIGCON, TRIGCON_SWTRIGCMD, ~0);
}