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

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



# HG changeset patch
# User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
# Date 1345579709 14400
# Node ID 635917c6dac4ab8748572fcbeb3e745428684e15
# Parent  e6ca45ca03c2e08af3a74b404166527b68fd1218
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 e6ca45ca03c2 -r 635917c6dac4 docs/misc/xen-command-line.markdown
--- a/docs/misc/xen-command-line.markdown       Mon Aug 20 08:46:47 2012 +0200
+++ b/docs/misc/xen-command-line.markdown       Tue Aug 21 16:08:29 2012 -0400
@@ -606,6 +606,15 @@ The optional `keep` parameter causes Xen
 console even after dom0 has been started.  The default behaviour is to
 relinquish control to dom0.
 
+### vga_delay
+> `= <miliseconds>`
+
+> Default: `vga_delay=0`
+
+Defines the delay to print a line to the screen. '2' is a a good value
+to get a good screen output. Note: If you need to use this, do so with care
+as it will screw up time handling.
+
 ### vpid (Intel)
 > `= <boolean>`
 
diff -r e6ca45ca03c2 -r 635917c6dac4 xen/drivers/video/vga.c
--- a/xen/drivers/video/vga.c   Mon Aug 20 08:46:47 2012 +0200
+++ b/xen/drivers/video/vga.c   Tue Aug 21 16:08:29 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,15 @@ 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.
+ * NOTE: If you need to use this, do so with care as it wil screw up
+ * time handling
+ */
+static unsigned int __read_mostly vga_delay;
+integer_param("vga_delay", vga_delay);
+
 /* VGA text-mode definitions. */
 static unsigned int columns, lines;
 #define ATTRIBUTE   7
@@ -135,6 +144,7 @@ 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);
+                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®.