From 015e02f88071cfedd6bc6f910af5a388462aec6b Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 29 Jun 2016 18:41:35 -0400 Subject: spice: avoid .set_mm_time on >= 0.12.6 Spice deprecated this callback in 0.12.6. It's not a problem yet, but it will cause Clang to fail in a -Werror build due to the deprecated tag. Signed-off-by: John Snow Message-id: 1467240095-12507-2-git-send-email-jsnow@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/qemu-spice.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 57ac91b921..edad5e7bbf 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -42,6 +42,9 @@ int qemu_spice_set_pw_expire(time_t expires); int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, const char *subject); +#define SPICE_NEEDS_SET_MM_TIME \ + (!defined(SPICE_SERVER_VERSION) || (SPICE_SERVER_VERSION < 0xc06)) + #if SPICE_SERVER_VERSION >= 0x000c02 void qemu_spice_register_ports(void); #else -- cgit v1.2.3 From c540128f93e17141c63d41a8eb77bde80a2fc752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 14 Jun 2016 15:44:07 +0200 Subject: virgl: count the calls to gl_block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In virgl_cmd_resource_flush(), when several consoles are updated, it needs to keep blocking until all spice gl draws are done. This fixes an assert() in spice when using multiple monitors with virgl. Signed-off-by: Marc-André Lureau Message-id: 1465911849-30423-2-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index 89f4879f55..3dff0c9a76 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -107,7 +107,7 @@ typedef struct VirtIOGPU { bool use_virgl_renderer; bool renderer_inited; - bool renderer_blocked; + int renderer_blocked; QEMUTimer *fence_poll; QEMUTimer *print_stats; -- cgit v1.2.3 From 9d8256ebc0ef88fb1f35d0405893962d20cc10ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 14 Jun 2016 15:44:09 +0200 Subject: virgl: pass whole GL scanout dimensions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spice client needs the whole GL texture dimension to be able to show a scanout with a monitor offset (different than +0+0). Furthermore, this fixes a crash when calling surface_{width,height}() after dpy_gfx_replace_surface(con, NULL) was called in virgl_cmd_set_scanout() Signed-off-by: Marc-André Lureau Message-id: 1465911849-30423-4-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 2 ++ include/ui/gtk.h | 1 + include/ui/sdl2.h | 1 + 3 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/ui/console.h b/include/ui/console.h index 7c1fdbad6f..2703a3aa5a 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -217,6 +217,7 @@ typedef struct DisplayChangeListenerOps { void (*dpy_gl_scanout)(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h); void (*dpy_gl_update)(DisplayChangeListener *dcl, uint32_t x, uint32_t y, uint32_t w, uint32_t h); @@ -285,6 +286,7 @@ bool dpy_gfx_check_format(QemuConsole *con, void dpy_gl_scanout(QemuConsole *con, uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h); void dpy_gl_update(QemuConsole *con, uint32_t x, uint32_t y, uint32_t w, uint32_t h); diff --git a/include/ui/gtk.h b/include/ui/gtk.h index 2bf60f3ec5..a7644046e4 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -101,6 +101,7 @@ QEMUGLContext gd_egl_create_context(DisplayChangeListener *dcl, QEMUGLParams *params); void gd_egl_scanout(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h); void gd_egl_scanout_flush(DisplayChangeListener *dcl, diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index 3f0b57bb16..683bb6af2e 100644 --- a/include/ui/sdl2.h +++ b/include/ui/sdl2.h @@ -64,6 +64,7 @@ QEMUGLContext sdl2_gl_get_current_context(DisplayChangeListener *dcl); void sdl2_gl_scanout(DisplayChangeListener *dcl, uint32_t backing_id, bool backing_y_0_top, + uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h); void sdl2_gl_scanout_flush(DisplayChangeListener *dcl, -- cgit v1.2.3