[PATCH] video: bochs: Support a copy buffer

Simon Glass sjg at chromium.org
Sat May 24 16:17:39 CEST 2025


Provide support for using CONFIG_VIDEO_COPY with bochs, since this can
help to reduce flicker with QEMU

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/video/bochs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/video/bochs.c b/drivers/video/bochs.c
index c34bc23f274..57d7b8eb8c6 100644
--- a/drivers/video/bochs.c
+++ b/drivers/video/bochs.c
@@ -81,7 +81,11 @@ static int bochs_init_fb(struct udevice *dev)
 	/* disable blanking */
 	bochs_vga_write(mmio, VGA_ATT_W - VGA_INDEX, VGA_AR_ENABLE_DISPLAY);
 
-	plat->base = fb;
+	/* Use double buffering if enabled */
+	if (IS_ENABLED(CONFIG_VIDEO_COPY) && plat->base)
+		plat->copy_base = fb;
+	else
+		plat->base = fb;
 
 	return 0;
 }
-- 
2.43.0

base-commit: e3ced530e543c9f24cbc66430abc6109ce8df015
branch: vid


More information about the U-Boot mailing list