render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame 0511-qxl-always-update-displaysurface-on-resize.patch

5544c1
From d0b5c82d532ef14bbbc770b06a6ae68f6ec3c1a8 Mon Sep 17 00:00:00 2001
Hans de Goede 5ba1a7
From: Gerd Hoffmann <kraxel@redhat.com>
Hans de Goede 5ba1a7
Date: Fri, 14 Sep 2012 22:09:23 +0200
5544c1
Subject: [PATCH] qxl: always update displaysurface on resize
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
Don't try to be clever and skip displaysurface reinitialization in case
Hans de Goede 5ba1a7
the size hasn't changed.  Other parameters might have changed
Hans de Goede 5ba1a7
nevertheless, for example depth or stride, resulting in rendering being
Hans de Goede 5ba1a7
broken then.
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
Trigger: boot linux guest with vesafb, start X11, make sure both vesafb
Hans de Goede 5ba1a7
and X11 use the display same resolution.  Then watch X11 screen being
Hans de Goede 5ba1a7
upside down.
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hans de Goede 5ba1a7
---
Hans de Goede 5ba1a7
 hw/qxl-render.c | 4 ----
Hans de Goede 5ba1a7
 1 file changed, 4 deletions(-)
Hans de Goede 5ba1a7
Hans de Goede 5ba1a7
diff --git a/hw/qxl-render.c b/hw/qxl-render.c
Hans de Goede 5ba1a7
index e2e3fe2..b66c168 100644
Hans de Goede 5ba1a7
--- a/hw/qxl-render.c
Hans de Goede 5ba1a7
+++ b/hw/qxl-render.c
Hans de Goede 5ba1a7
@@ -99,7 +99,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
Hans de Goede 5ba1a7
 {
Hans de Goede 5ba1a7
     VGACommonState *vga = &qxl->vga;
Hans de Goede 5ba1a7
     int i;
Hans de Goede 5ba1a7
-    DisplaySurface *surface = vga->ds->surface;
Hans de Goede 5ba1a7
 
Hans de Goede 5ba1a7
     if (qxl->guest_primary.resized) {
Hans de Goede 5ba1a7
         qxl->guest_primary.resized = 0;
Hans de Goede 5ba1a7
@@ -112,9 +111,6 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
Hans de Goede 5ba1a7
                qxl->guest_primary.qxl_stride,
Hans de Goede 5ba1a7
                qxl->guest_primary.bytes_pp,
Hans de Goede 5ba1a7
                qxl->guest_primary.bits_pp);
Hans de Goede 5ba1a7
-    }
Hans de Goede 5ba1a7
-    if (surface->width != qxl->guest_primary.surface.width ||
Hans de Goede 5ba1a7
-        surface->height != qxl->guest_primary.surface.height) {
Hans de Goede 5ba1a7
         if (qxl->guest_primary.qxl_stride > 0) {
Hans de Goede 5ba1a7
             qemu_free_displaysurface(vga->ds);
Hans de Goede 5ba1a7
             qemu_create_displaysurface_from(qxl->guest_primary.surface.width,
Hans de Goede 5ba1a7
-- 
5544c1
1.7.12.1
Hans de Goede 5ba1a7