]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: video: Correct the address of the copy base
authorSimon Glass <sjg@chromium.org>
Fri, 19 Nov 2021 20:23:49 +0000 (13:23 -0700)
committerAnatolij Gustschin <agust@denx.de>
Sun, 26 Dec 2021 22:02:19 +0000 (23:02 +0100)
The intention is for the copy base to start halfway through the
frame-buffer area. At present is it actually below the frame buffer,
which could have anything in it (probably it is malloc space). Fix
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/video/sandbox_sdl.c

index de8c6609c46a364f8d803fe82f09f47374ee8fc2..eb321ad17f5dbff451dfb35a6924a86e17c766cf 100644 (file)
@@ -43,7 +43,7 @@ static int sandbox_sdl_probe(struct udevice *dev)
        uc_priv->vidconsole_drv_name = plat->vidconsole_drv_name;
        uc_priv->font_size = plat->font_size;
        if (IS_ENABLED(CONFIG_VIDEO_COPY))
-               uc_plat->copy_base = uc_plat->base - uc_plat->size / 2;
+               uc_plat->copy_base = uc_plat->base + uc_plat->size / 2;
 
        return 0;
 }