dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame qemu-fix-display-breakage.patch

Mark McLoughlin 3dcd9a
From 9d1b494a2d5dd2c129994edcf4eb7630bb554964 Mon Sep 17 00:00:00 2001
Mark McLoughlin 3dcd9a
From: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Mark McLoughlin 3dcd9a
Date: Tue, 7 Apr 2009 20:55:58 +0000
Mark McLoughlin 3dcd9a
Subject: [PATCH 1/1] Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity)
Mark McLoughlin 910c5e
Mark McLoughlin 3dcd9a
The vga screen dump function updates last_width and last_height,
Mark McLoughlin 3dcd9a
but does not change the DisplaySurface that these variables describe.
Mark McLoughlin 3dcd9a
A consequent vga_draw_graphic() will therefore fail to resize the
Mark McLoughlin 3dcd9a
surface and crash.
Mark McLoughlin 910c5e
Mark McLoughlin 3dcd9a
Fix by invalidating the display state after a screen dump, forcing
Mark McLoughlin 3dcd9a
vga_draw_graphic() to reallocate the DisplaySurface.
Mark McLoughlin 910c5e
Mark McLoughlin 910c5e
Signed-off-by: Avi Kivity <avi@redhat.com>
Mark McLoughlin 3dcd9a
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Mark McLoughlin 3dcd9a
Mark McLoughlin 3dcd9a
Mark McLoughlin 3dcd9a
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7026 c046a42c-6fe2-441c-8c8c-71466251a162
Mark McLoughlin 910c5e
---
Mark McLoughlin 3dcd9a
 qemu/hw/vga.c |    1 +
Mark McLoughlin 3dcd9a
 1 files changed, 1 insertions(+), 0 deletions(-)
Mark McLoughlin 910c5e
Mark McLoughlin 910c5e
diff --git a/qemu/hw/vga.c b/qemu/hw/vga.c
Mark McLoughlin 3dcd9a
index b1e4373..4d1049b 100644
Mark McLoughlin 910c5e
--- a/qemu/hw/vga.c
Mark McLoughlin 910c5e
+++ b/qemu/hw/vga.c
Mark McLoughlin 3dcd9a
@@ -2678,4 +2678,5 @@ static void vga_screen_dump(void *opaque, const char *filename)
Mark McLoughlin 3dcd9a
         vga_screen_dump_graphic(s, filename);
Mark McLoughlin 3dcd9a
     else
Mark McLoughlin 3dcd9a
         vga_screen_dump_text(s, filename);
Mark McLoughlin 3dcd9a
+    vga_invalidate_display(s);
Mark McLoughlin 910c5e
 }
Mark McLoughlin 910c5e
-- 
Mark McLoughlin 910c5e
1.6.0.6
Mark McLoughlin 910c5e