]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: Clear the copy framebuffer when clearing the screen
authorSimon Glass <sjg@chromium.org>
Fri, 3 Jul 2020 03:12:22 +0000 (21:12 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 9 Jul 2020 04:33:24 +0000 (12:33 +0800)
Update video_clear() to also sync to the copy framebuffer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
drivers/video/video-uclass.c

index 0c80fd5bfec4821985695a603689e8ad4f10d9ad..4ddd8bc1db8d89fc3f22143e7e3270fb3c8af114 100644 (file)
@@ -95,6 +95,7 @@ int video_reserve(ulong *addrp)
 int video_clear(struct udevice *dev)
 {
        struct video_priv *priv = dev_get_uclass_priv(dev);
+       int ret;
 
        switch (priv->bpix) {
        case VIDEO_BPP16:
@@ -119,6 +120,9 @@ int video_clear(struct udevice *dev)
                memset(priv->fb, priv->colour_bg, priv->fb_size);
                break;
        }
+       ret = video_sync_copy(dev, priv->fb, priv->fb + priv->fb_size);
+       if (ret)
+               return ret;
 
        return 0;
 }