summary refs log tree commit diff stats
path: root/hw/display/qxl.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-10-01 11:33:16 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-10-01 11:33:16 +0100
commitcc28dce2eccdcfc2660b8bf680eaa340ef2067d5 (patch)
tree53b756fec754323b97115bca4401d57dfca23bcb /hw/display/qxl.c
parente7f5f0b6e6f2fb592ab66145b8bc35a0e4a4e198 (diff)
parent36ffc122dcd69ab66db4afab3a13cfca46bfc323 (diff)
downloadfocaccia-qemu-cc28dce2eccdcfc2660b8bf680eaa340ef2067d5.tar.gz
focaccia-qemu-cc28dce2eccdcfc2660b8bf680eaa340ef2067d5.zip
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180927-pull-request' into staging
vga: add edid support, qxl bugfixes.

# gpg: Signature made Thu 27 Sep 2018 08:12:32 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# 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/kraxel/tags/vga-20180927-pull-request:
  qxl: support mono cursors with inverted colors
  qxl: use guest_monitor_config for local renderer.
  display/stdvga: add edid support.
  display/edid: add DEFINE_EDID_PROPERTIES
  display/edid: add region helper.
  display/edid: add qemu_edid_size()
  display/edid: add edid generator to qemu.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/display/qxl.c')
-rw-r--r--hw/display/qxl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 8e9135d9c6..747986478f 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -259,6 +259,8 @@ static void qxl_spice_destroy_surfaces(PCIQXLDevice *qxl, qxl_async_io async)
 
 static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl, int replay)
 {
+    QXLMonitorsConfig *cfg;
+
     trace_qxl_spice_monitors_config(qxl->id);
     if (replay) {
         /*
@@ -286,6 +288,16 @@ static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl, int replay)
                 (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
                                           QXL_IO_MONITORS_CONFIG_ASYNC));
     }
+
+    cfg = qxl_phys2virt(qxl, qxl->guest_monitors_config, MEMSLOT_GROUP_GUEST);
+    if (cfg->count == 1) {
+        qxl->guest_primary.resized = 1;
+        qxl->guest_head0_width  = cfg->heads[0].width;
+        qxl->guest_head0_height = cfg->heads[0].height;
+    } else {
+        qxl->guest_head0_width  = 0;
+        qxl->guest_head0_height = 0;
+    }
 }
 
 void qxl_spice_reset_image_cache(PCIQXLDevice *qxl)