minor spice patches.

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTHbpqAAoJEEy22O7T6HE4erMP/Axq1jLKpZxbZRJjYYmncyxP
 Eps2m6yR5NEXCtULyD0PiAC1Aomf4ztx0GfOpTari6mhUGdnzZsQyUhFZvJtnOUv
 lfDrc3Sb5IRapjN5Y3Ev0VEfqKl5jsNA0Q1RqbYnfiejU3VuI8BeIvPBStsTyoNy
 zqB/pJgW1c85IOx34tQQqgG0r/6lHTE/8A3aZqrNHIa1MfxTeBewPUHAOskbsh5x
 oLZ1vWvPW7Klk4G6XjMjBYsBo71WExFyQEtQsxUP5iOho+W0U4x0WMb7WyKw5S/4
 MG8440oQxRlR7zOua7KCQRz/4cm43/ZG3Cu9ERHEJb4XZClRldgUW+36KSNfXX9k
 2QbVueqxi5k8hEGxgfklNrAw+N0HvDuQEE4ROEPKItMAIc0IARa1yeY5v+eMhWfB
 N98c7w5byWLDW7x7adD6i/wlDNoPl//NEihjeFPFlZPNGr/+my1CaicnQHqAPqSe
 +ezwTIxe/BmQyRken7z2B38H6u2kxQNBfg29LlMeAu1yjls+UM6pz6USyQvJPZiX
 vfftlexSf55modR+8JVBv4yA4vwI8dzCP5U8Xt8wBzT6JLNrRo7H9t8sbiGIlj9s
 KfFEdspR1jRNNZy5mYuDgCtB3+dUHuFtv8HURP3A2XtUTcFKE2nBNXbSm0OAOpay
 p5WwDJO8tMhl8aGf4HWq
 =rl0F
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/spice/tags/pull-spice-4' into staging

minor spice patches.

# gpg: Signature made Mon 10 Mar 2014 13:13:14 GMT using RSA key ID D3E87138
# 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>"

* remotes/spice/tags/pull-spice-4:
  configure: Prettify message for hosts without spice support
  spice: QemuUIInfo windup
  spice: fix simple display surface handling

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2014-03-11 13:03:21 +00:00
commit ed9b103d3e
2 changed files with 34 additions and 7 deletions

4
configure vendored
View File

@ -4107,7 +4107,11 @@ echo "vhost-net support $vhost_net"
echo "vhost-scsi support $vhost_scsi"
echo "Trace backend $trace_backend"
echo "Trace output file $trace_file-<pid>"
if test "$spice" = "yes"; then
echo "spice support $spice ($spice_protocol_version/$spice_server_version)"
else
echo "spice support $spice"
fi
echo "rbd support $rbd"
echo "xfsctl support $xfs"
echo "nss used $smartcard_nss"

View File

@ -354,6 +354,7 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
DisplaySurface *surface)
{
SimpleSpiceUpdate *update;
bool need_destroy;
dprint(1, "%s/%d:\n", __func__, ssd->qxl.id);
@ -366,14 +367,19 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
}
qemu_mutex_lock(&ssd->lock);
need_destroy = (ssd->ds != NULL);
ssd->ds = surface;
while ((update = QTAILQ_FIRST(&ssd->updates)) != NULL) {
QTAILQ_REMOVE(&ssd->updates, update, next);
qemu_spice_destroy_update(ssd, update);
}
qemu_mutex_unlock(&ssd->lock);
qemu_spice_destroy_host_primary(ssd);
qemu_spice_create_host_primary(ssd);
if (need_destroy) {
qemu_spice_destroy_host_primary(ssd);
}
if (ssd->ds) {
qemu_spice_create_host_primary(ssd);
}
memset(&ssd->dirty, 0, sizeof(ssd->dirty));
ssd->notify++;
@ -537,10 +543,29 @@ static void interface_set_client_capabilities(QXLInstance *sin,
}
static int interface_client_monitors_config(QXLInstance *sin,
VDAgentMonitorsConfig *monitors_config)
VDAgentMonitorsConfig *mc)
{
dprint(3, "%s:\n", __func__);
return 0; /* == not supported by guest */
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
QemuUIInfo info;
int rc;
/*
* 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;
}
rc = dpy_set_ui_info(ssd->dcl.con, &info);
dprint(1, "%s/%d: size %dx%d, rc %d <--- ==========================\n",
__func__, ssd->qxl.id, info.width, info.height, rc);
if (rc != 0) {
return 0; /* == not supported by guest */
} else {
return 1;
}
}
static const QXLInterface dpy_interface = {
@ -610,8 +635,6 @@ static void qemu_spice_display_init_one(QemuConsole *con)
ssd->dcl.ops = &display_listener_ops;
ssd->dcl.con = con;
register_displaychangelistener(&ssd->dcl);
qemu_spice_create_host_primary(ssd);
}
void qemu_spice_display_init(void)