diff mbox series

drm/stm: ltdc: reset plane transparency after plane disable

Message ID 20240712131344.98113-1-yannick.fertre@foss.st.com (mailing list archive)
State New, archived
Headers show
Series drm/stm: ltdc: reset plane transparency after plane disable | expand

Commit Message

Yannick Fertre July 12, 2024, 1:13 p.m. UTC
The plane's opacity should be reseted while the plane
is disabled. It prevents from seeing a possible global
or layer background color set earlier.

Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Raphael Gallais-Pou July 19, 2024, 10:47 a.m. UTC | #1
On 7/12/24 15:13, Yannick Fertre wrote:
> The plane's opacity should be reseted while the plane
> is disabled. It prevents from seeing a possible global
> or layer background color set earlier.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>

Hi Yannick,

Applied on drm-misc-next.

Thanks,
Raphaƫl
diff mbox series

Patch

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 5576fdae4962..cb4f08673a64 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1514,6 +1514,9 @@  static void ltdc_plane_atomic_disable(struct drm_plane *plane,
 	/* Disable layer */
 	regmap_write_bits(ldev->regmap, LTDC_L1CR + lofs, LXCR_LEN | LXCR_CLUTEN |  LXCR_HMEN, 0);
 
+	/* Reset the layer transparency to hide any related background color */
+	regmap_write_bits(ldev->regmap, LTDC_L1CACR + lofs, LXCACR_CONSTA, 0x00);
+
 	/* Commit shadow registers = update plane at next vblank */
 	if (ldev->caps.plane_reg_shadow)
 		regmap_write_bits(ldev->regmap, LTDC_L1RCR + lofs,