All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos/decon5433: update shadow registers iff there are active windows
       [not found] <CGME20170109143305eucas1p24cb7e4ef9559afcdcb1b6c6854d9c5e3@eucas1p2.samsung.com>
@ 2017-01-09 14:33 ` Andrzej Hajda
  2017-01-12  9:22   ` Inki Dae
  0 siblings, 1 reply; 2+ messages in thread
From: Andrzej Hajda @ 2017-01-09 14:33 UTC (permalink / raw)
  To: Inki Dae, dri-devel, linux-samsung-soc
  Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski

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>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index ca75fe1..f15d9b1 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -209,8 +209,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,
@@ -361,8 +359,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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/exynos/decon5433: update shadow registers iff there are active windows
  2017-01-09 14:33 ` [PATCH] drm/exynos/decon5433: update shadow registers iff there are active windows Andrzej Hajda
@ 2017-01-12  9:22   ` Inki Dae
  0 siblings, 0 replies; 2+ messages in thread
From: Inki Dae @ 2017-01-12  9:22 UTC (permalink / raw)
  To: Andrzej Hajda, dri-devel, linux-samsung-soc
  Cc: Bartlomiej Zolnierkiewicz, Marek Szyprowski

Applied.

Thanks.

2017년 01월 09일 23:33에 Andrzej Hajda 이(가) 쓴 글:
> 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>
> ---
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> index ca75fe1..f15d9b1 100644
> --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> @@ -209,8 +209,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,
> @@ -361,8 +359,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);
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-12  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20170109143305eucas1p24cb7e4ef9559afcdcb1b6c6854d9c5e3@eucas1p2.samsung.com>
2017-01-09 14:33 ` [PATCH] drm/exynos/decon5433: update shadow registers iff there are active windows Andrzej Hajda
2017-01-12  9:22   ` Inki Dae

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.