diff options
author | Alon Levy <alevy@redhat.com> | 2011-07-20 12:20:58 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2011-08-03 12:03:01 +0200 |
commit | 5ff4e36c804157bd84af43c139f8cd3a59722db9 (patch) | |
tree | 0deeae86edf1a1010325d82e01e676064eb69285 /ui/spice-display.h | |
parent | e21a298a7b7a5c5e8edc4912dec3b497497c347d (diff) |
qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done.
The async command processing relies on an added QXLInterface::async_complete
and added QXLWorker::*_async additions, in spice server qxl >= 3.1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alon Levy <alevy@redhat.com>
Diffstat (limited to 'ui/spice-display.h')
-rw-r--r-- | ui/spice-display.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/ui/spice-display.h b/ui/spice-display.h index abe99c7d33..1388641370 100644 --- a/ui/spice-display.h +++ b/ui/spice-display.h @@ -33,6 +33,20 @@ #define NUM_SURFACES 1024 +/* + * Internal enum to differenciate between options for + * io calls that have a sync (old) version and an _async (new) + * version: + * QXL_SYNC: use the old version + * QXL_ASYNC: use the new version and make sure there are no two + * happening at the same time. This is used for guest initiated + * calls + */ +typedef enum qxl_async_io { + QXL_SYNC, + QXL_ASYNC, +} qxl_async_io; + typedef struct SimpleSpiceDisplay SimpleSpiceDisplay; typedef struct SimpleSpiceUpdate SimpleSpiceUpdate; @@ -82,12 +96,15 @@ void qemu_spice_display_update(SimpleSpiceDisplay *ssd, void qemu_spice_display_resize(SimpleSpiceDisplay *ssd); void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd); -void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot); +void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot, + qxl_async_io async); void qemu_spice_del_memslot(SimpleSpiceDisplay *ssd, uint32_t gid, uint32_t sid); void qemu_spice_create_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id, - QXLDevSurfaceCreate *surface); -void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id); + QXLDevSurfaceCreate *surface, + qxl_async_io async); +void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd, + uint32_t id, qxl_async_io async); void qemu_spice_wakeup(SimpleSpiceDisplay *ssd); void qemu_spice_start(SimpleSpiceDisplay *ssd); void qemu_spice_stop(SimpleSpiceDisplay *ssd); |