Explicitly error if spice GL setup fails
Fix monitor resizing with virgl (bz #1337564) Fix libvirt noise when introspecting qemu-kvm without hw virt
This commit is contained in:
parent
c3911a29b3
commit
f8dc431e37
30
0004-ui-spice-Exit-if-gl-on-EGL-init-fails.patch
Normal file
30
0004-ui-spice-Exit-if-gl-on-EGL-init-fails.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed, 18 May 2016 11:44:33 -0400
|
||||
Subject: [PATCH] ui: spice: Exit if gl=on EGL init fails
|
||||
|
||||
The user explicitly requested spice GL, so if we know it isn't
|
||||
going to work we should exit
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
---
|
||||
ui/spice-core.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ui/spice-core.c b/ui/spice-core.c
|
||||
index 61db3c1..da05054 100644
|
||||
--- a/ui/spice-core.c
|
||||
+++ b/ui/spice-core.c
|
||||
@@ -833,9 +833,11 @@ void qemu_spice_init(void)
|
||||
"incompatible with -spice port/tls-port");
|
||||
exit(1);
|
||||
}
|
||||
- if (egl_rendernode_init() == 0) {
|
||||
- display_opengl = 1;
|
||||
+ if (egl_rendernode_init() != 0) {
|
||||
+ error_report("Failed to initialize EGL render node for SPICE GL");
|
||||
+ exit(1);
|
||||
}
|
||||
+ display_opengl = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
83
0005-spice-gl-add-use-qemu_spice_gl_monitor_config.patch
Normal file
83
0005-spice-gl-add-use-qemu_spice_gl_monitor_config.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Wed, 3 Feb 2016 13:55:00 +0100
|
||||
Subject: [PATCH] spice/gl: add & use qemu_spice_gl_monitor_config
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
(cherry picked from commit 39414ef4e93db9041e463a097084a407d0d374f0)
|
||||
---
|
||||
include/ui/spice-display.h | 1 +
|
||||
ui/spice-display.c | 30 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+)
|
||||
|
||||
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
|
||||
index 00e4a0b..3c679e8 100644
|
||||
--- a/include/ui/spice-display.h
|
||||
+++ b/include/ui/spice-display.h
|
||||
@@ -71,6 +71,7 @@ typedef struct QXLCookie {
|
||||
QXLRect area;
|
||||
int redraw;
|
||||
} render;
|
||||
+ void *data;
|
||||
} u;
|
||||
} QXLCookie;
|
||||
|
||||
diff --git a/ui/spice-display.c b/ui/spice-display.c
|
||||
index 242ab5f..2a77a54 100644
|
||||
--- a/ui/spice-display.c
|
||||
+++ b/ui/spice-display.c
|
||||
@@ -660,6 +660,11 @@ static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token)
|
||||
qemu_bh_schedule(ssd->gl_unblock_bh);
|
||||
break;
|
||||
}
|
||||
+ case QXL_COOKIE_TYPE_IO:
|
||||
+ if (cookie->io == QXL_IO_MONITORS_CONFIG_ASYNC) {
|
||||
+ g_free(cookie->u.data);
|
||||
+ }
|
||||
+ break;
|
||||
#endif
|
||||
default:
|
||||
/* should never be called, used in qxl native mode only */
|
||||
@@ -795,6 +800,29 @@ static const DisplayChangeListenerOps display_listener_ops = {
|
||||
|
||||
#ifdef HAVE_SPICE_GL
|
||||
|
||||
+static void qemu_spice_gl_monitor_config(SimpleSpiceDisplay *ssd,
|
||||
+ int x, int y, int w, int h)
|
||||
+{
|
||||
+ QXLMonitorsConfig *config;
|
||||
+ QXLCookie *cookie;
|
||||
+
|
||||
+ config = g_malloc0(sizeof(QXLMonitorsConfig) + sizeof(QXLHead));
|
||||
+ config->count = 1;
|
||||
+ config->max_allowed = 1;
|
||||
+ config->heads[0].x = x;
|
||||
+ config->heads[0].y = y;
|
||||
+ config->heads[0].width = w;
|
||||
+ config->heads[0].height = h;
|
||||
+ cookie = qxl_cookie_new(QXL_COOKIE_TYPE_IO,
|
||||
+ QXL_IO_MONITORS_CONFIG_ASYNC);
|
||||
+ cookie->u.data = config;
|
||||
+
|
||||
+ spice_qxl_monitors_config_async(&ssd->qxl,
|
||||
+ (uintptr_t)config,
|
||||
+ MEMSLOT_GROUP_HOST,
|
||||
+ (uintptr_t)cookie);
|
||||
+}
|
||||
+
|
||||
static void qemu_spice_gl_block(SimpleSpiceDisplay *ssd, bool block)
|
||||
{
|
||||
uint64_t timeout;
|
||||
@@ -858,6 +886,8 @@ static void qemu_spice_gl_scanout(DisplayChangeListener *dcl,
|
||||
surface_width(ssd->ds),
|
||||
surface_height(ssd->ds),
|
||||
stride, fourcc, y_0_top);
|
||||
+
|
||||
+ qemu_spice_gl_monitor_config(ssd, x, y, w, h);
|
||||
}
|
||||
|
||||
static void qemu_spice_gl_update(DisplayChangeListener *dcl,
|
13
qemu.spec
13
qemu.spec
@ -49,7 +49,7 @@
|
||||
Summary: QEMU is a FAST! processor emulator
|
||||
Name: qemu
|
||||
Version: 2.6.0
|
||||
Release: 1%{?rcrel}%{?dist}
|
||||
Release: 2%{?rcrel}%{?dist}
|
||||
Epoch: 2
|
||||
License: GPLv2+ and LGPLv2+ and BSD
|
||||
Group: Development/Tools
|
||||
@ -85,11 +85,13 @@ Source21: 50-kvm-s390x.conf
|
||||
# Not for upstream, f24 only
|
||||
Patch0001: 0001-spice-F24-spice-has-backported-gl-support.patch
|
||||
# Fix gtk UI crash when switching to monitor (bz #1333424)
|
||||
# Not upstream yet
|
||||
Patch0002: 0002-ui-gtk-fix-crash-when-terminal-inner-border-is-NULL.patch
|
||||
# Fix sdl2 UI lockup lockup when switching to monitor
|
||||
# Not upstream yet
|
||||
Patch0003: 0003-ui-sdl2-Release-grab-before-opening-console-window.patch
|
||||
# Explicitly error if spice GL setup fails
|
||||
Patch0004: 0004-ui-spice-Exit-if-gl-on-EGL-init-fails.patch
|
||||
# Fix monitor resizing with virgl (bz #1337564)
|
||||
Patch0005: 0005-spice-gl-add-use-qemu_spice_gl_monitor_config.patch
|
||||
|
||||
|
||||
# documentation deps
|
||||
@ -1213,6 +1215,11 @@ getent passwd qemu >/dev/null || \
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri May 20 2016 Cole Robinson <crobinso@redhat.com> - 2:2.6.0-2
|
||||
- Explicitly error if spice GL setup fails
|
||||
- Fix monitor resizing with virgl (bz #1337564)
|
||||
- Fix libvirt noise when introspecting qemu-kvm without hw virt
|
||||
|
||||
* Fri May 13 2016 Cole Robinson <crobinso@redhat.com> - 2:2.6.0-1
|
||||
- Rebase to v2.6.0 GA
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user