diff options
author | Alon Levy <alevy@redhat.com> | 2012-02-24 23:19:31 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-27 09:46:52 +0100 |
commit | 81fb6f1504fb9ef71f2382f44af34756668296e8 (patch) | |
tree | 7f34b563bd1687605bc12f5c75717614f6f9c2d6 /hw/qxl.h | |
parent | 2e1a98c9c1b90ca093278c6b43244dc46604d7b7 (diff) | |
download | qemu-81fb6f1504fb9ef71f2382f44af34756668296e8.zip qemu-81fb6f1504fb9ef71f2382f44af34756668296e8.tar.gz qemu-81fb6f1504fb9ef71f2382f44af34756668296e8.tar.bz2 |
qxl: make qxl_render_update async
RHBZ# 747011
Removes the last user of QXL_SYNC when using update drivers that use the
_ASYNC io ports.
The last user is qxl_render_update, it is called both by qxl_hw_update
which is the vga_hw_update_ptr passed to graphic_console_init, and by
qxl_hw_screen_dump.
At the same time the QXLRect area being passed to the red_worker thread
is passed as a copy, as part of the QXLCookie.
The implementation uses interface_update_area_complete with a bh to make
sure dpy_update and qxl_flip are called from the io thread, otherwise
the vga->ds->surface.data can change under our feet.
With this patch sdl+spice works fine. But spice by itself doesn't
produce the expected screendumps unless repeated a few times, due to
ppm_save being called before update_area (rendering done in spice server
thread) having a chance to complete. Fixed by next patch, but see commit
message for problem introduced by it.
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qxl.h')
-rw-r--r-- | hw/qxl.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -18,6 +18,8 @@ enum qxl_mode { #define QXL_UNDEFINED_IO UINT32_MAX +#define QXL_NUM_DIRTY_RECTS 64 + typedef struct PCIQXLDevice { PCIDevice pci; SimpleSpiceDisplay ssd; @@ -93,6 +95,12 @@ typedef struct PCIQXLDevice { /* user-friendly properties (in megabytes) */ uint32_t ram_size_mb; uint32_t vram_size_mb; + + /* qxl_render_update state */ + int render_update_cookie_num; + int num_dirty_rects; + QXLRect dirty[QXL_NUM_DIRTY_RECTS]; + QEMUBH *update_area_bh; } PCIQXLDevice; #define PANIC_ON(x) if ((x)) { \ @@ -134,3 +142,5 @@ void qxl_log_command(PCIQXLDevice *qxl, const char *ring, QXLCommandExt *ext); void qxl_render_resize(PCIQXLDevice *qxl); void qxl_render_update(PCIQXLDevice *qxl); void 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); |