fix screendump
PATCH 1/1 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
@@ -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
@@ -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
@@ -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
Quoted 8 lines · Gerd Hoffmann
Commit
45efb16124efef51de5157afc31984b5a47700f9optimized a bit too much. We can skip thevga_invalidate_display()in case no console switch happened because we don't need a full redraw then. We can *not* skipvga_hw_update()though, because the screen content will be stale then in case nobody else callsvga_hw_update().Trigger: vga textmode with vnc display and no client connected.
Quoted 56 lines
Reported-by Avi Kivity <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- 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@@ -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@@ -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@@ -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
Quoted 9 lines · Gerd Hoffmann
Commit
45efb16124efef51de5157afc31984b5a47700f9optimized a bit too much. We can skip thevga_invalidate_display()in case no console switch happened because we don't need a full redraw then. We can *not* skipvga_hw_update()though, because the screen content will be stale then in case nobody else callsvga_hw_update().Trigger: vga textmode with vnc display and no client connected.
Reported-by Avi Kivity <[email protected]>
-and-Tested. Thanks.
Quoted 2 lines
Signed-off-by Gerd Hoffmann <[email protected]>
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 10 lines · Gerd Hoffmann
Commit
45efb16124efef51de5157afc31984b5a47700f9optimized a bit too much. We can skip thevga_invalidate_display()in case no console switch happened because we don't need a full redraw then. We can *not* skipvga_hw_update()though, because the screen content will be stale then in case nobody else callsvga_hw_update().Trigger: vga textmode with vnc display and no client connected.
Reported-by Avi Kivity <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>
I find this in qemu-kvm but not in upstream. Forgotten or just sleeping in some queue?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Blue Swirl
AppliedThanks, applied.
Quoted 64 lines · Gerd Hoffmann
Commit
45efb16124efef51de5157afc31984b5a47700f9optimized a bit too much. We can skip thevga_invalidate_display()in case no console switch happened because we don't need a full redraw then. We can *not* skipvga_hw_update()though, because the screen content will be stale then in case nobody else callsvga_hw_update().Trigger: vga textmode with vnc display and no client connected.
Reported-by Avi Kivity <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>---
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@@ -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@@ -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
-2@@ -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); } --1.7.1