All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vga: Fix text mode screendumps
@ 2011-09-15 22:47 Jan Kiszka
  2011-09-16 15:12 ` Andriy Gapon
  2011-09-23 14:43 ` Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2011-09-15 22:47 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel; +Cc: Andriy Gapon

From: Jan Kiszka <jan.kiszka@siemens.com>

In text mode, even a full refresh of the screen takes multiple updates.
As we reset the dump file pointer after the first call, we only wrote
the first line.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vga.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/vga.c b/hw/vga.c
index 0a0c5a6..f9a6014 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -149,7 +149,7 @@ static uint16_t expand2[256];
 static uint8_t expand4to8[16];
 
 static void vga_screen_dump(void *opaque, const char *filename);
-static char *screen_dump_filename;
+static const char *screen_dump_filename;
 static DisplayChangeListener *screen_dump_dcl;
 
 static void vga_update_memory_access(VGACommonState *s)
@@ -2319,7 +2319,6 @@ static void vga_save_dpy_update(DisplayState *ds,
 {
     if (screen_dump_filename) {
         ppm_save(screen_dump_filename, ds->surface);
-        screen_dump_filename = NULL;
     }
 }
 
@@ -2397,8 +2396,8 @@ static void vga_screen_dump(void *opaque, const char *filename)
     if (!screen_dump_dcl)
         screen_dump_dcl = vga_screen_dump_init(s->ds);
 
-    screen_dump_filename = (char *)filename;
+    screen_dump_filename = filename;
     vga_invalidate_display(s);
     vga_hw_update();
+    screen_dump_filename = NULL;
 }
-

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vga: Fix text mode screendumps
  2011-09-15 22:47 [Qemu-devel] [PATCH] vga: Fix text mode screendumps Jan Kiszka
@ 2011-09-16 15:12 ` Andriy Gapon
  2011-09-23 14:43 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Andriy Gapon @ 2011-09-16 15:12 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Anthony Liguori, qemu-devel

on 16/09/2011 01:47 Jan Kiszka said the following:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> In text mode, even a full refresh of the screen takes multiple updates.
> As we reset the dump file pointer after the first call, we only wrote
> the first line.

Thank you very much!
I can confirm that with the patch I get a complete screen dump.

> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  hw/vga.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/vga.c b/hw/vga.c
> index 0a0c5a6..f9a6014 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -149,7 +149,7 @@ static uint16_t expand2[256];
>  static uint8_t expand4to8[16];
>  
>  static void vga_screen_dump(void *opaque, const char *filename);
> -static char *screen_dump_filename;
> +static const char *screen_dump_filename;
>  static DisplayChangeListener *screen_dump_dcl;
>  
>  static void vga_update_memory_access(VGACommonState *s)
> @@ -2319,7 +2319,6 @@ static void vga_save_dpy_update(DisplayState *ds,
>  {
>      if (screen_dump_filename) {
>          ppm_save(screen_dump_filename, ds->surface);
> -        screen_dump_filename = NULL;
>      }
>  }
>  
> @@ -2397,8 +2396,8 @@ static void vga_screen_dump(void *opaque, const char *filename)
>      if (!screen_dump_dcl)
>          screen_dump_dcl = vga_screen_dump_init(s->ds);
>  
> -    screen_dump_filename = (char *)filename;
> +    screen_dump_filename = filename;
>      vga_invalidate_display(s);
>      vga_hw_update();
> +    screen_dump_filename = NULL;
>  }
> -


-- 
Andriy Gapon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vga: Fix text mode screendumps
  2011-09-15 22:47 [Qemu-devel] [PATCH] vga: Fix text mode screendumps Jan Kiszka
  2011-09-16 15:12 ` Andriy Gapon
@ 2011-09-23 14:43 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2011-09-23 14:43 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Andriy Gapon

On 09/15/2011 05:47 PM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> In text mode, even a full refresh of the screen takes multiple updates.
> As we reset the dump file pointer after the first call, we only wrote
> the first line.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>

Applied.  Thanks.

Regards,

Anthony Liguori

> ---
>   hw/vga.c |    7 +++----
>   1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/hw/vga.c b/hw/vga.c
> index 0a0c5a6..f9a6014 100644
> --- a/hw/vga.c
> +++ b/hw/vga.c
> @@ -149,7 +149,7 @@ static uint16_t expand2[256];
>   static uint8_t expand4to8[16];
>
>   static void vga_screen_dump(void *opaque, const char *filename);
> -static char *screen_dump_filename;
> +static const char *screen_dump_filename;
>   static DisplayChangeListener *screen_dump_dcl;
>
>   static void vga_update_memory_access(VGACommonState *s)
> @@ -2319,7 +2319,6 @@ static void vga_save_dpy_update(DisplayState *ds,
>   {
>       if (screen_dump_filename) {
>           ppm_save(screen_dump_filename, ds->surface);
> -        screen_dump_filename = NULL;
>       }
>   }
>
> @@ -2397,8 +2396,8 @@ static void vga_screen_dump(void *opaque, const char *filename)
>       if (!screen_dump_dcl)
>           screen_dump_dcl = vga_screen_dump_init(s->ds);
>
> -    screen_dump_filename = (char *)filename;
> +    screen_dump_filename = filename;
>       vga_invalidate_display(s);
>       vga_hw_update();
> +    screen_dump_filename = NULL;
>   }
> -
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-23 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-15 22:47 [Qemu-devel] [PATCH] vga: Fix text mode screendumps Jan Kiszka
2011-09-16 15:12 ` Andriy Gapon
2011-09-23 14:43 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.