video: bochs: Support a copy buffer

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

Signed-off-by: Simon Glass <sjg@chromium.org>
Series-to: u-boot
Series-links: 1:458274
This commit is contained in:
Simon Glass
2025-03-26 15:24:36 -06:00
parent 34f6d8909e
commit 49c22f66e5

View File

@@ -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;
}