[PATCH v6 11/18] video: tegra20: dc: clean framebuffer memory block

Svyatoslav Ryhel clamor95 at gmail.com
Tue Jan 23 18:16:26 CET 2024


From: Jonas Schwöbel <jonasschwoebel at yahoo.de>

Fill the framebuffer memory with zeros to avoid visual glitches.

Signed-off-by: Jonas Schwöbel <jonasschwoebel at yahoo.de>
Signed-off-by: Svyatoslav Ryhel <clamor95 at gmail.com>
---
 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 ac6833229a..caeec94468 100644
--- a/drivers/video/tegra20/tegra-dc.c
+++ b/drivers/video/tegra20/tegra-dc.c
@@ -4,6 +4,7 @@
  */
 
 #include <backlight.h>
+#include <cpu_func.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
@@ -398,6 +399,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.40.1



More information about the U-Boot mailing list