On Tue, 17 Mar 2026, Marc-André Lureau wrote:
Replace the two-field design (gfx_update void callback + gfx_update_async
flag) with a single bool return value from gfx_update. Returning true
means the update completed synchronously and graphic_hw_update_done()
should be called by the console layer. Returning false means the update
is deferred and the device will call graphic_hw_update_done() itself
later (as done by QXL/SPICE and Apple GFX).
This simplifies the interface and makes the async contract explicit at
each call site rather than relying on a separate struct field.
Signed-off-by: Marc-André Lureau <[email protected]>
---
hw/display/qxl.h | 2 +-
include/ui/console.h | 3 +--
hw/arm/musicpal.c | 3 ++-
hw/display/artist.c | 4 +++-
hw/display/bcm2835_fb.c | 7 ++++---
hw/display/bochs-display.c | 6 ++++--
hw/display/cg3.c | 5 +++--
hw/display/dm163.c | 4 +++-
hw/display/exynos4210_fimd.c | 6 ++++--
hw/display/g364fb.c | 9 ++++++---
hw/display/jazz_led.c | 6 ++++--
hw/display/macfb.c | 6 ++++--
hw/display/next-fb.c | 4 +++-
hw/display/omap_lcdc.c | 14 ++++++++------
hw/display/pl110.c | 5 +++--
hw/display/qxl-render.c | 6 +++---
hw/display/qxl.c | 7 +++----
hw/display/ramfb-standalone.c | 4 +++-
hw/display/sm501.c | 8 +++++---
hw/display/ssd0303.c | 10 ++++++----
hw/display/ssd0323.c | 11 ++++++-----
hw/display/tcx.c | 6 ++++--
hw/display/vga.c | 4 +++-
hw/display/virtio-gpu-base.c | 3 ++-
hw/display/virtio-vga.c | 6 +++---
hw/display/vmware_vga.c | 7 ++++---
hw/display/xenfb.c | 6 ++++--
hw/display/xlnx_dp.c | 10 ++++++----
hw/vfio/display.c | 17 ++++++++++-------
ui/console.c | 7 +------
hw/display/apple-gfx.m | 10 +++++-----
31 files changed, 121 insertions(+), 85 deletions(-)
diff --git a/hw/display/qxl.h b/hw/display/qxl.h
index e0a85a5ca49..ad8a9128785 100644
--- a/hw/display/qxl.h
+++ b/hw/display/qxl.h
@@ -187,7 +187,7 @@ int qxl_log_command(PCIQXLDevice *qxl, const char *ring,
QXLCommandExt *ext);
/* qxl-render.c */
void qxl_render_resize(PCIQXLDevice *qxl);
-void qxl_render_update(PCIQXLDevice *qxl);
+bool qxl_render_update(PCIQXLDevice *qxl);
int qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext);
void qxl_render_update_area_done(PCIQXLDevice *qxl, QXLCookie *cookie);
void qxl_render_update_area_bh(void *opaque);
diff --git a/include/ui/console.h b/include/ui/console.h
index c695b433fe3..2ac9c59e151 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -363,8 +363,7 @@ enum {
typedef struct GraphicHwOps {
int (*get_flags)(void *opaque); /* optional, default 0 */
void (*invalidate)(void *opaque);
- void (*gfx_update)(void *opaque);
- bool gfx_update_async; /* if true, calls graphic_hw_update_done() */
+ bool (*gfx_update)(void *opaque); /* false if deferred update_done */
This short comment (and the commit message) seems to be the only
documentation. Is it worth documenting better somewhere or at least make
the comment more descriptive such as "true: graphic_hw_update_done() is
needed, false: deferred update_done" or something more easily understood
by somebody not familiar with console internal working.
Also when returning from update functions from an error at the beginning
without any update is graphic_hw_update_done needed when nothing changed?
Regards,
BALATON Zoltan