]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/exynos/decon5433: update shadow registers iff there are active windows
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 9 Jan 2017 14:33:02 +0000 (15:33 +0100)
committerInki Dae <inki.dae@samsung.com>
Fri, 13 Jan 2017 09:01:20 +0000 (18:01 +0900)
Improper usage of DECON_UPDATE register leads to subtle errors.
If it set in decon_commit when there are no active windows it results
in slow registry updates - all subsequent shadow registry updates takes more
than full vblank. On the other side if it is not set when there are
active windows it results in garbage on the screen after suspend/resume of
FB console.

The patch hopefully fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos5433_drm_decon.c

index 6ca1f3117fe8d524fbb4dfed89692c527c5bd41c..ef7fcb5f044b830229fcc40c0054012719a3b802 100644 (file)
@@ -188,8 +188,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 
        /* enable output and display signal */
        decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID | VIDCON0_ENVID_F, ~0);
-
-       decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
 }
 
 static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
@@ -340,8 +338,9 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc)
        for (i = ctx->first_win; i < WINDOWS_NR; i++)
                decon_shadow_protect_win(ctx, i, false);
 
-       /* standalone update */
-       decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
+       /* update iff there are active windows */
+       if (crtc->base.state->plane_mask)
+               decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
 
        if (ctx->out_type & IFTYPE_I80)
                set_bit(BIT_WIN_UPDATED, &ctx->flags);