]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm: renesas: shmobile: Fix overlay plane disable
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 15 Sep 2023 08:53:19 +0000 (10:53 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 16 Oct 2023 09:47:43 +0000 (11:47 +0200)
Merely writing zero to the CHn Source Image Format Register is not
sufficient to disable a plane, as the programmed register value is not
propagated immediately to the current side.  This can be seen when using
the -P option of modetest: the extra plane is displayed correctly, but
does not disappear after exit.

Fix this by doing the full update dance using the Blend Control
Register, like is done when enabling the plane.

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/54e2556e18b5524ce153a7ac79faf2c7b0a55260.1694767209.git.geert+renesas@glider.be
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c

index 850986cee848226a1b36f06de195a81e22f8e9a3..0e34573c3cb3d032c0f7e5696e79494fc7e95cb2 100644 (file)
@@ -215,7 +215,10 @@ static int shmob_drm_plane_disable(struct drm_plane *plane,
 
        splane->format = NULL;
 
+       lcdc_write(sdev, LDBCR, LDBCR_UPC(splane->index));
        lcdc_write(sdev, LDBnBSIFR(splane->index), 0);
+       lcdc_write(sdev, LDBCR,
+                  LDBCR_UPF(splane->index) | LDBCR_UPD(splane->index));
        return 0;
 }