From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: [PATCH 1 of 3] xen/vga: Add 'vga_delay' parameter to delay screen output by X miliseconds per line Date: Mon, 02 Apr 2012 16:27:25 -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, Ian.Jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, Ian.Campbell@citrix.com, jbeulich@suse.com Cc: konrad.wilk@oracle.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Konrad Rzeszutek Wilk # 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 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 #include #include - +#include /* 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. + */ +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 +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) + mdelay(vga_delay); + } xpos = 0; }