Skip to contentSkip to conversation

Broken screendump with unconnected vnc

Qemu-devel Avi Kivity 2 participants 2 messages Feb 29, 2012 – Mar 1, 2012

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

qemu-system-x86_64 -monitor stdio -vnc :0 QEMU 1.0.50 monitor - type 'help' for more information (qemu) screendump /tmp/x.ppm

display /tmp/x.ppm shows an empty screenshot. Breaks autotest for me. Connecting a vnc viewer works around the problem.

Signature · 1 line
error compiling committee.c: too many arguments to function
#1 lore raw
Quoted 6 lines · Avi Kivity

qemu-system-x86_64 -monitor stdio -vnc :0 QEMU 1.0.50 monitor - type 'help' for more information (qemu) screendump /tmp/x.ppm

display /tmp/x.ppm shows an empty screenshot. Breaks autotest for me. Connecting a vnc viewer works around the problem.

Patch sent. Attached here for convenience as git send-email hasn't picked up Reported-by: for Cc'ing.

cheers,
Gerd

From d30d22f5a71ba60d0bc71b6879791f2377c70a1f Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <[email protected]>
Date: Thu, 1 Mar 2012 08:28:32 +0100
Subject: [PATCH] fix screendump

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.

---
 hw/blizzard.c  |    4 +---
 hw/omap_lcdc.c |    5 ++---
 hw/vga.c       |    2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)
hw/blizzard.c +1 -3
index c7d844d..29074c4 100644
@@ -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);
 }
hw/omap_lcdc.c +2 -3
index f172093..4a08e9d 100644
@@ -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,
hw/vga.c +1 -1
index 5994f43..16546ef 100644
@@ -2413,7 +2413,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);
 }
Signature · 1 line
1.7.1