summaryrefslogtreecommitdiffstats
path: root/ui/spice-display.c
diff options
context:
space:
mode:
authorPeter Maydell2016-07-06 13:49:51 +0200
committerPeter Maydell2016-07-06 13:49:51 +0200
commit0c56c6ab68902281094c7aac6305e2321c34c187 (patch)
treecf570f12b1c76ee62413ebca618f850774322142 /ui/spice-display.c
parentMerge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-07-06' into ... (diff)
parentvirgl: pass whole GL scanout dimensions (diff)
downloadqemu-0c56c6ab68902281094c7aac6305e2321c34c187.tar.gz
qemu-0c56c6ab68902281094c7aac6305e2321c34c187.tar.xz
qemu-0c56c6ab68902281094c7aac6305e2321c34c187.zip
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20160706-1' into staging
spice and qxl bugfixes. # gpg: Signature made Wed 06 Jul 2016 10:44:10 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/spice/tags/pull-spice-20160706-1: virgl: pass whole GL scanout dimensions spice: use the right head for multi-monitor virgl: count the calls to gl_block spice: avoid .set_mm_time on >= 0.12.6 qxl: fix surface migration qxl: store memory region and offset instead of pointer for guest slots qxl: factor out qxl_get_check_slot_offset qxl: handle no updates in interface_update_area_complete qxl: use uint64_t for vram size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r--ui/spice-display.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 34095fbc8c..99132b69b6 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -527,11 +527,13 @@ static void interface_set_compression_level(QXLInstance *sin, int level)
/* nothing to do */
}
+#if SPICE_NEEDS_SET_MM_TIME
static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time)
{
dprint(3, "%s/%d:\n", __func__, sin->id);
/* nothing to do */
}
+#endif
static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info)
{
@@ -686,6 +688,7 @@ static int interface_client_monitors_config(QXLInstance *sin,
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
QemuUIInfo info;
+ int head;
if (!dpy_ui_info_supported(ssd->dcl.con)) {
return 0; /* == not supported by guest */
@@ -695,14 +698,12 @@ static int interface_client_monitors_config(QXLInstance *sin,
return 1;
}
- /*
- * FIXME: multihead is tricky due to the way
- * spice has multihead implemented.
- */
memset(&info, 0, sizeof(info));
- if (mc->num_of_monitors > 0) {
- info.width = mc->monitors[0].width;
- info.height = mc->monitors[0].height;
+
+ head = qemu_console_get_head(ssd->dcl.con);
+ if (mc->num_of_monitors > head) {
+ info.width = mc->monitors[head].width;
+ info.height = mc->monitors[head].height;
}
dpy_set_ui_info(ssd->dcl.con, &info);
dprint(1, "%s/%d: size %dx%d\n", __func__, ssd->qxl.id,
@@ -718,7 +719,9 @@ static const QXLInterface dpy_interface = {
.attache_worker = interface_attach_worker,
.set_compression_level = interface_set_compression_level,
+#if SPICE_NEEDS_SET_MM_TIME
.set_mm_time = interface_set_mm_time,
+#endif
.get_init_info = interface_get_init_info,
/* the callbacks below are called from spice server thread context */
@@ -858,6 +861,8 @@ static QEMUGLContext qemu_spice_gl_create_context(DisplayChangeListener *dcl,
static void qemu_spice_gl_scanout(DisplayChangeListener *dcl,
uint32_t tex_id,
bool y_0_top,
+ uint32_t backing_width,
+ uint32_t backing_height,
uint32_t x, uint32_t y,
uint32_t w, uint32_t h)
{
@@ -880,9 +885,7 @@ static void qemu_spice_gl_scanout(DisplayChangeListener *dcl,
assert(!tex_id || fd >= 0);
/* note: spice server will close the fd */
- spice_qxl_gl_scanout(&ssd->qxl, fd,
- surface_width(ssd->ds),
- surface_height(ssd->ds),
+ spice_qxl_gl_scanout(&ssd->qxl, fd, backing_width, backing_height,
stride, fourcc, y_0_top);
qemu_spice_gl_monitor_config(ssd, x, y, w, h);