peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

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

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