From eb817000180261167ef96bfecc939208f9726247 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20Schw=C3=B6bel?= Date: Tue, 23 Jan 2024 19:16:26 +0200 Subject: [PATCH] video: tegra20: dc: clean framebuffer memory block MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fill the framebuffer memory with zeros to avoid visual glitches. Signed-off-by: Jonas Schwöbel Signed-off-by: Svyatoslav Ryhel Reviewed-by: Thierry Reding --- drivers/video/tegra20/tegra-dc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/video/tegra20/tegra-dc.c b/drivers/video/tegra20/tegra-dc.c index 07d6ac9d71..10ad21efb0 100644 --- a/drivers/video/tegra20/tegra-dc.c +++ b/drivers/video/tegra20/tegra-dc.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -381,6 +382,10 @@ static int tegra_lcd_probe(struct udevice *dev) priv->scdiv = dc_plat->scdiv; } + /* Clean the framebuffer area */ + memset((u8 *)plat->base, 0, plat->size); + flush_dcache_all(); + if (tegra_display_probe(priv, (void *)plat->base)) { debug("%s: Failed to probe display driver\n", __func__); return -1; -- 2.39.5