qxl: make qxl_render_update async
authorAlon Levy <alevy@redhat.com>
Fri, 24 Feb 2012 21:19:31 +0000 (23:19 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 27 Feb 2012 08:46:52 +0000 (09:46 +0100)
commit81fb6f1504fb9ef71f2382f44af34756668296e8
tree7f34b563bd1687605bc12f5c75717614f6f9c2d6
parent2e1a98c9c1b90ca093278c6b43244dc46604d7b7
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>
hw/qxl-render.c
hw/qxl.c
hw/qxl.h
ui/spice-display.h