From 0b2824e5e48a787be3edbfc897244b4621e5bd61 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 4 Nov 2014 13:59:59 +0100 Subject: spice: use bottom half instead of refresh timer for cursor updates Calling directly doesn't work due to the qxl-render code running in spice server thread context. Meanwhile bottom half scheduling is thread-safe though, so we can use that to kick a cursor update in main i/o thread context. Cc: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- hw/display/qxl-render.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/display/qxl-render.c') diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index e812ddd6e7..a542087fcc 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -283,12 +283,14 @@ int qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext) qxl->ssd.mouse_x = cmd->u.set.position.x; qxl->ssd.mouse_y = cmd->u.set.position.y; qemu_mutex_unlock(&qxl->ssd.lock); + qemu_bh_schedule(qxl->ssd.cursor_bh); break; case QXL_CURSOR_MOVE: qemu_mutex_lock(&qxl->ssd.lock); qxl->ssd.mouse_x = cmd->u.position.x; qxl->ssd.mouse_y = cmd->u.position.y; qemu_mutex_unlock(&qxl->ssd.lock); + qemu_bh_schedule(qxl->ssd.cursor_bh); break; } return 0; -- cgit v1.2.3-55-g7522