Skip to contentSkip to conversation

Vga 20180927 patches

GIT PULL Peter Maydell 1 participant 2 messages Oct 1, 2018 – Oct 5, 2018 2 messages not in the archive

lore
Share & tools
lore

Peter Maydell

author Applied
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines · Gerd Hoffmann

The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48:

Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2018-09-25' into staging (2018-09-25 16:47:35 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/vga-20180927-pull-request

Quoted 8 lines

for you to fetch changes up to 36ffc122dcd69ab66db4afab3a13cfca46bfc323:

qxl: support mono cursors with inverted colors (2018-09-27 08:10:07 +0200)

----------------------------------------------------------------
vga: add edid support, qxl bugfixes.

----------------------------------------------------------------

Applied, thanks.

-- PMM

#3 lore raw

Re: [Qemu-devel] [PULL 6/7] qxl: use guest_monitor_config for local renderer.

In reply to a message not in the archive
Quoted 33 lines · Gerd Hoffmann

When processing monitor config from guest store head0 width and height for single-head configurations. Use these when creating the DisplaySurface in the local renderer.

This fixes a rendering issue with wayland. Wayland rounds up the framebuffer width and height to a multiple of 64, so with odd resolutions (800x600 for example) the framebuffer is larger than the actual screen. The monitor config has the actual screen size though.

This fixes guest display for anything using the local renderer (non-spice UI, screendump monitor command).

Message-id: [email protected]

hw/display/qxl.c +2 -0
index 8e9135d9c6..747986478f 100644
@@ -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));
     }

hw/display/qxl.c static void qxl_spice_monitors_config_async(PCIQXLDevice *qxl, int replay) · line 300

Quoted 10 lines
hw/display/qxl.c +10 -0
+
+    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;
+    }

Hi. Coverity points out (CID 1395986) that we fail to check the return value from qxl_phys2virt() here. It can return NULL, in which case we'll segfault trying to dereference it.

thanks
-- PMM