Re: [PATCH] drm/stm: ltdc: update planes at next vblank to avoid partial refresh
From: Philippe CORNU
Date: Mon Apr 01 2019 - 05:23:06 EST
Dear Yannick,
Thank you for your patch, works fine,
Acked-by: Philippe Cornu <philippe.cornu@xxxxxx>
Philippe :-)
On 4/1/19 9:24 AM, Yannick Fertrà wrote:
> Plane updates must be synchronized on vblank with the shadow register mechanism
> to avoid partial refresh on screen.
>
> Signed-off-by: Yannick Fertrà <yannick.fertre@xxxxxx>
> ---
> drivers/gpu/drm/stm/ltdc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index b1741a9..c2d0800 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -426,8 +426,8 @@ static void ltdc_crtc_atomic_enable(struct drm_crtc *crtc,
> /* Enable IRQ */
> reg_set(ldev->regs, LTDC_IER, IER_RRIE | IER_FUIE | IER_TERRIE);
>
> - /* Immediately commit the planes */
> - reg_set(ldev->regs, LTDC_SRCR, SRCR_IMR);
> + /* Commit shadow registers = update planes at next vblank */
> + reg_set(ldev->regs, LTDC_SRCR, SRCR_VBR);
>
> /* Enable LTDC */
> reg_set(ldev->regs, LTDC_GCR, GCR_LTDCEN);
>