]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: tegra20: dc: clean framebuffer memory block
authorJonas Schwöbel <jonasschwoebel@yahoo.de>
Tue, 23 Jan 2024 17:16:26 +0000 (19:16 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sun, 21 Apr 2024 07:07:01 +0000 (09:07 +0200)
Fill the framebuffer memory with zeros to avoid visual glitches.

Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
drivers/video/tegra20/tegra-dc.c

index 07d6ac9d718cc0b1f878150473434ecb8d585e3e..10ad21efb0f00aff546bfd28cf385b95d054c19f 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <backlight.h>
+#include <cpu_func.h>
 #include <dm.h>
 #include <fdtdec.h>
 #include <log.h>
@@ -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;