* [Qemu-devel] [PATCH] qxl: fix spice+sdl no cursor regression [not found] <CAK9pz9Le5Wsq6my4E79TbgNOHwr+dk0BbfJP9qMd0jo3WQshtQ@mail.gmail.com> @ 2012-02-22 9:36 ` Alon Levy 2012-02-22 9:50 ` [Qemu-devel] [PATCH v2] " Alon Levy 0 siblings, 1 reply; 2+ messages in thread From: Alon Levy @ 2012-02-22 9:36 UTC (permalink / raw) To: qemu-devel regression introduced by 075360945860ad9bdd491921954b383bf762b0e5, Reported-by: Fabiano Fidêncio <fabiano@fidencio.org> Signed-off-by: Alon Levy <alevy@redhat.com> --- Thanks for the report, this fixes the problem for me, the problem with reverting the commit you proposed is that it would reintroduce dropping of the global mutex in spice code. hw/qxl.c | 2 ++ ui/spice-display.c | 23 ++++++++++++++--------- ui/spice-display.h | 1 + 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 87ad49a..6f8351c 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1545,6 +1545,8 @@ static void display_refresh(struct DisplayState *ds) { if (qxl0->mode == QXL_MODE_VGA) { qemu_spice_display_refresh(&qxl0->ssd); + } else { + qemu_spice_cursor_refresh_unlocked(&qxl0->ssd); } } diff --git a/ui/spice-display.c b/ui/spice-display.c index 6c302a3..c6e61d8 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -317,16 +317,8 @@ void qemu_spice_display_resize(SimpleSpiceDisplay *ssd) ssd->notify++; } -void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) +void qemu_spice_cursor_refresh_unlocked(SimpleSpiceDisplay *ssd) { - dprint(3, "%s:\n", __FUNCTION__); - vga_hw_update(); - - qemu_mutex_lock(&ssd->lock); - if (ssd->update == NULL) { - ssd->update = qemu_spice_create_update(ssd); - ssd->notify++; - } if (ssd->cursor) { ssd->ds->cursor_define(ssd->cursor); cursor_put(ssd->cursor); @@ -337,6 +329,19 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) ssd->mouse_x = -1; ssd->mouse_y = -1; } +} + +void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) +{ + dprint(3, "%s:\n", __func__); + vga_hw_update(); + + qemu_mutex_lock(&ssd->lock); + if (ssd->update == NULL) { + ssd->update = qemu_spice_create_update(ssd); + ssd->notify++; + } + qemu_spice_cursor_refresh_unlocked(ssd); qemu_mutex_unlock(&ssd->lock); if (ssd->notify) { diff --git a/ui/spice-display.h b/ui/spice-display.h index 5e52df9..a23bfc8 100644 --- a/ui/spice-display.h +++ b/ui/spice-display.h @@ -97,6 +97,7 @@ void qemu_spice_display_update(SimpleSpiceDisplay *ssd, int x, int y, int w, int h); void qemu_spice_display_resize(SimpleSpiceDisplay *ssd); void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd); +void qemu_spice_cursor_refresh_unlocked(SimpleSpiceDisplay *ssd); void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot, qxl_async_io async); -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] [PATCH v2] qxl: fix spice+sdl no cursor regression 2012-02-22 9:36 ` [Qemu-devel] [PATCH] qxl: fix spice+sdl no cursor regression Alon Levy @ 2012-02-22 9:50 ` Alon Levy 0 siblings, 0 replies; 2+ messages in thread From: Alon Levy @ 2012-02-22 9:50 UTC (permalink / raw) To: qemu-devel, kraxel; +Cc: Fabiano Fidêncio regression introduced by 075360945860ad9bdd491921954b383bf762b0e5, v2: lock around qemu_spice_cursor_refresh_unlocked Reported-by: Fabiano Fidêncio <fabiano@fidencio.org> Signed-off-by: Alon Levy <alevy@redhat.com> --- hw/qxl.c | 4 ++++ ui/spice-display.c | 23 ++++++++++++++--------- ui/spice-display.h | 1 + 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 87ad49a..db66d7f 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1545,6 +1545,10 @@ static void display_refresh(struct DisplayState *ds) { if (qxl0->mode == QXL_MODE_VGA) { qemu_spice_display_refresh(&qxl0->ssd); + } else { + qemu_mutex_lock(&qxl0->ssd.lock); + qemu_spice_cursor_refresh_unlocked(&qxl0->ssd); + qemu_mutex_unlock(&qxl0->ssd.lock); } } diff --git a/ui/spice-display.c b/ui/spice-display.c index 6c302a3..c6e61d8 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -317,16 +317,8 @@ void qemu_spice_display_resize(SimpleSpiceDisplay *ssd) ssd->notify++; } -void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) +void qemu_spice_cursor_refresh_unlocked(SimpleSpiceDisplay *ssd) { - dprint(3, "%s:\n", __FUNCTION__); - vga_hw_update(); - - qemu_mutex_lock(&ssd->lock); - if (ssd->update == NULL) { - ssd->update = qemu_spice_create_update(ssd); - ssd->notify++; - } if (ssd->cursor) { ssd->ds->cursor_define(ssd->cursor); cursor_put(ssd->cursor); @@ -337,6 +329,19 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) ssd->mouse_x = -1; ssd->mouse_y = -1; } +} + +void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) +{ + dprint(3, "%s:\n", __func__); + vga_hw_update(); + + qemu_mutex_lock(&ssd->lock); + if (ssd->update == NULL) { + ssd->update = qemu_spice_create_update(ssd); + ssd->notify++; + } + qemu_spice_cursor_refresh_unlocked(ssd); qemu_mutex_unlock(&ssd->lock); if (ssd->notify) { diff --git a/ui/spice-display.h b/ui/spice-display.h index 5e52df9..a23bfc8 100644 --- a/ui/spice-display.h +++ b/ui/spice-display.h @@ -97,6 +97,7 @@ void qemu_spice_display_update(SimpleSpiceDisplay *ssd, int x, int y, int w, int h); void qemu_spice_display_resize(SimpleSpiceDisplay *ssd); void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd); +void qemu_spice_cursor_refresh_unlocked(SimpleSpiceDisplay *ssd); void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot, qxl_async_io async); -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-22 9:51 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CAK9pz9Le5Wsq6my4E79TbgNOHwr+dk0BbfJP9qMd0jo3WQshtQ@mail.gmail.com> 2012-02-22 9:36 ` [Qemu-devel] [PATCH] qxl: fix spice+sdl no cursor regression Alon Levy 2012-02-22 9:50 ` [Qemu-devel] [PATCH v2] " Alon Levy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).