From: Konrad Rzeszutek Wilk Subject: [PATCH 2 of 6] xen/vga: Add 'vga_delay' parameter to delay screen output by 2 second per screen output Date: Sat, 24 Mar 2012 13:41:43 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com, keir.fraser@eu.citrix.com, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com Cc: konrad.wilk@oracle.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Konrad Rzeszutek Wilk # 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 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 #include #include - +#include /* 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); + if ( (c == '\n') || (xpos >= columns) ) { if ( ++ypos >= lines )