]> git.proxmox.com Git - qemu.git/commitdiff
fix screendump
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 1 Mar 2012 07:34:40 +0000 (08:34 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 24 Mar 2012 13:06:41 +0000 (13:06 +0000)
Commit 45efb16124efef51de5157afc31984b5a47700f9 optimized a bit too
much.  We can skip the vga_invalidate_display() in case no console
switch happened because we don't need a full redraw then.  We can *not*
skip vga_hw_update() though, because the screen content will be stale
then in case nobody else calls vga_hw_update().

Trigger: vga textmode with vnc display and no client connected.

Reported-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Tested-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/blizzard.c
hw/omap_lcdc.c
hw/vga.c

index c7d844d105983b81e904190b9350c27d049039bc..29074c4fa7eb352a309ed87bfe0ef66cfa321988 100644 (file)
@@ -937,9 +937,7 @@ static void blizzard_screen_dump(void *opaque, const char *filename,
 {
     BlizzardState *s = (BlizzardState *) opaque;
 
-    if (cswitch) {
-        blizzard_update_display(opaque);
-    }
+    blizzard_update_display(opaque);
     if (s && ds_get_data(s->state))
         ppm_save(filename, s->state->surface);
 }
index f172093876022daf83760b863b827cc7dcf81d6a..4a08e9d002f4ca9ec0dd4297aec9f636617b2995 100644 (file)
@@ -267,9 +267,8 @@ static int ppm_save(const char *filename, uint8_t *data,
 static void omap_screen_dump(void *opaque, const char *filename, bool cswitch)
 {
     struct omap_lcd_panel_s *omap_lcd = opaque;
-    if (cswitch) {
-        omap_update_display(opaque);
-    }
+
+    omap_update_display(opaque);
     if (omap_lcd && ds_get_data(omap_lcd->state))
         ppm_save(filename, ds_get_data(omap_lcd->state),
                 omap_lcd->width, omap_lcd->height,
index 6dc98f6c2a6f934804c7ffe260fc1d405c6e2728..f80860caed39cefdefd23bca2d61e1cced2b05cc 100644 (file)
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2415,7 +2415,7 @@ static void vga_screen_dump(void *opaque, const char *filename, bool cswitch)
 
     if (cswitch) {
         vga_invalidate_display(s);
-        vga_hw_update();
     }
+    vga_hw_update();
     ppm_save(filename, s->ds->surface);
 }