[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2 of 6] xen/vga: Add 'vga_delay' parameter to delay screen output by 2 second per screen output
>>> On 24.03.12 at 18:41, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote: > # HG changeset patch > # User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > # Date 1332608052 14400 > # Node ID d097c3ba42f601af65b53a0c84973855aab64aa9 > # Parent 708bf485e5d4baaf1c6272bd4fb1895a3c355d3e > xen/vga: Add 'vga_delay' parameter to delay screen output by 2 second per > screen output. > > 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 708bf485e5d4 -r d097c3ba42f6 xen/drivers/video/vga.c > --- a/xen/drivers/video/vga.c Sat Mar 24 12:54:11 2012 -0400 > +++ b/xen/drivers/video/vga.c Sat Mar 24 12:54:12 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,8 @@ void (*vga_puts)(const char *) = vga_noo > static char __initdata opt_vga[30] = ""; > string_param("vga", opt_vga); > > +static bool_t __read_mostly vga_delay; > +boolean_param("vga_delay", vga_delay); > /* VGA text-mode definitions. */ > static unsigned int columns, lines; > #define ATTRIBUTE 7 > @@ -128,6 +130,9 @@ static void vga_text_puts(const char *s) > > while ( (c = *s++) != '\0' ) > { > + if (vga_delay) > + udelay(2000); Subject and implementation aren't in sync - udelay()'s argument is in microseconds, so the delay above is 2ms. I wonder whether that's really useful for taking photos of the screen. Oh, wait, this is per character, not per line. The description should probably warn about this being potentially unsafe. And if any such would really be allowed to go in, I'd favor the command line option to specify a numeric value (e.g. in milliseconds) rather than forcing a fixed value of 2ms. Jan > + > if ( (c == '\n') || (xpos >= columns) ) > { > if ( ++ypos >= lines ) > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |