diff mbox series

[RESEND,v3,11/26] video: Clear the copy framebuffer when clearing the screen

Message ID 20200702211204.RESEND.v3.11.Idb93182c5620fa4a55ad25cd4ef796bb8ce2241d@changeid
State Superseded
Headers show
Series x86: video: Speed up the framebuffer | expand

Commit Message

Simon Glass July 3, 2020, 3:12 a.m. UTC
Update video_clear() to also sync to the copy framebuffer.

Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Anatolij Gustschin <agust at denx.de>
---

(no changes since v1)

 drivers/video/video-uclass.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 0c80fd5bfe..4ddd8bc1db 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -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;
 }