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

[Xen-changelog] [xen-unstable] vesa: flush lfb after zeroing



# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1327758145 0
# Node ID ac9f32525376922fdf5b9efac7a1fe0ff866cc76
# Parent  f8c2cf24a26cc6cdaaad9140e4b1dfc54f07bab3
vesa: flush lfb after zeroing

If Xen is going to relinquish the VGA console, flush the linear frame
buffer after zeroing it in vesa_endboot().

Failing to do so in some circumstances leads to the actual linear
framebuffer on the graphics card still containing the output of the
Xen boot console can lead to ugly graphics output when dom0 is setting
up the graphics card for its own use.

While the patch is quite large, it is mostly just code motion to
prevent having to forward declare lfb_flush().  The only functional
change to vesa_endboot() is to insert a call to lbf_flush().

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r f8c2cf24a26c -r ac9f32525376 xen/drivers/video/vesa.c
--- a/xen/drivers/video/vesa.c  Sat Jan 28 13:41:42 2012 +0000
+++ b/xen/drivers/video/vesa.c  Sat Jan 28 13:42:25 2012 +0000
@@ -151,24 +151,6 @@
     xfree(line_len);
 }
 
-void __init vesa_endboot(bool_t keep)
-{
-    if ( keep )
-    {
-        xpos = 0;
-        vga_puts = vesa_scroll_puts;
-    }
-    else
-    {
-        unsigned int i, bpp = (vlfb_info.bits_per_pixel + 7) >> 3;
-        for ( i = 0; i < vlfb_info.height; i++ )
-            memset(lfb + i * vlfb_info.bytes_per_line, 0,
-                   vlfb_info.width * bpp);
-    }
-
-    xfree(line_len);
-}
-
 #if defined(CONFIG_X86)
 
 #include <asm/mtrr.h>
@@ -215,6 +197,25 @@
 
 #endif
 
+void __init vesa_endboot(bool_t keep)
+{
+    if ( keep )
+    {
+        xpos = 0;
+        vga_puts = vesa_scroll_puts;
+    }
+    else
+    {
+        unsigned int i, bpp = (vlfb_info.bits_per_pixel + 7) >> 3;
+        for ( i = 0; i < vlfb_info.height; i++ )
+            memset(lfb + i * vlfb_info.bytes_per_line, 0,
+                   vlfb_info.width * bpp);
+        lfb_flush();
+    }
+
+    xfree(line_len);
+}
+
 /* Render one line of text to given linear framebuffer line. */
 static void vesa_show_line(
     const unsigned char *text_line,

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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