[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1 of 3] xen/vga: Add 'vga_delay' parameter to delay screen output by X miliseconds per line



>>> On 02.04.12 at 22:27, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
> # HG changeset patch
> # User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> # Date 1333398408 14400
> # Node ID f1da2ce71ed41d1b74ebe6916ff7710d6579438e
> # Parent  1088c8557a46ab28e509bb9482e2a73a21590df8
> xen/vga: Add 'vga_delay' parameter to delay screen output by X miliseconds 
> per line.
> 
> This is useful if you find yourself on machine that has no serial console,
> nor any PCI, PCIe to put in a serial card. Nothing really fancy except it 
> allows
> to capture the screenshot of the screen using a camera.
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> 
> diff -r 1088c8557a46 -r f1da2ce71ed4 xen/drivers/video/vga.c
> --- a/xen/drivers/video/vga.c Fri Mar 30 21:05:54 2012 +0100
> +++ b/xen/drivers/video/vga.c Mon Apr 02 16:26:48 2012 -0400
> @@ -10,7 +10,7 @@
>  #include <xen/mm.h>
>  #include <xen/vga.h>
>  #include <asm/io.h>
> -
> +#include <xen/delay.h>
>  /* Filled in by arch boot code. */
>  struct xen_vga_console_info vga_console_info;
>  
> @@ -49,6 +49,12 @@ void (*vga_puts)(const char *) = vga_noo
>  static char __initdata opt_vga[30] = "";
>  string_param("vga", opt_vga);
>  
> +/*
> + * 'vga_delay=miliseconds' which defines to delay to print a line
> + * to the screen. 2 is a a good value to get a good screen output.

Maybe add something like "If you need to use this, do so with care
as it might screw up time handling", since this will suppress the timer
softirq for arbitrary periods of time.

> + */
> +unsigned int __read_mostly vga_delay;

static.

> +integer_param("vga_delay", vga_delay);

Missing blank line.

>  /* VGA text-mode definitions. */
>  static unsigned int columns, lines;
>  #define ATTRIBUTE   7
> @@ -135,6 +141,9 @@ static void vga_text_puts(const char *s)
>                  ypos = lines - 1;
>                  memmove(video, video + 2 * columns, ypos * 2 * columns);
>                  memset(video + ypos * 2 * columns, 0, 2 * xpos);
> +                if (vga_delay)

I don't think a conditional is needed here.

Jan

> +                    mdelay(vga_delay);
> +
>              }
>              xpos = 0;
>          }




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.