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

[Xen-changelog] [xen-3.2-testing] vga: Clear the screen when relinquishing VGA to dom0.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228919665 0
# Node ID 68bbfdfbda3ae7da6b0415adfbef1499bd9636a5
# Parent  836852a3602e18345f51dae36f9a5f626806cd35
vga: Clear the screen when relinquishing VGA to dom0.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   18872:5e066dc410ac872c8976ae4db17891ed1dc5e00e
xen-unstable date:        Fri Dec 05 11:37:20 2008 +0000

vga: Fix screen clear at end of Xen bootstrap.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   18890:5535efd8e01141f840f9a8cbc31a9b3a4c9d49e9
xen-unstable date:        Tue Dec 09 13:23:15 2008 +0000
---
 xen/drivers/video/vesa.c |   18 ++++++++++++++----
 xen/drivers/video/vga.c  |   21 ++++++++++++++++-----
 2 files changed, 30 insertions(+), 9 deletions(-)

diff -r 836852a3602e -r 68bbfdfbda3a xen/drivers/video/vesa.c
--- a/xen/drivers/video/vesa.c  Wed Dec 10 14:33:28 2008 +0000
+++ b/xen/drivers/video/vesa.c  Wed Dec 10 14:34:25 2008 +0000
@@ -146,10 +146,20 @@ void __init vesa_init(void)
     xfree(text_buf);
 }
 
-void __init vesa_endboot(void)
-{
-    xpos = 0;
-    vga_puts = vesa_scroll_puts;
+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);
+    }
 }
 
 #if defined(CONFIG_X86)
diff -r 836852a3602e -r 68bbfdfbda3a xen/drivers/video/vga.c
--- a/xen/drivers/video/vga.c   Wed Dec 10 14:33:28 2008 +0000
+++ b/xen/drivers/video/vga.c   Wed Dec 10 14:34:25 2008 +0000
@@ -57,10 +57,10 @@ static unsigned int columns, lines;
 
 #ifdef CONFIG_X86_64
 void vesa_early_init(void);
-void vesa_endboot(void);
+void vesa_endboot(bool_t keep);
 #else
 #define vesa_early_init() ((void)0)
-#define vesa_endboot()    ((void)0)
+#define vesa_endboot(x)   ((void)0)
 #endif
 
 void __init vga_init(void)
@@ -99,16 +99,27 @@ void __init vga_init(void)
 
 void __init vga_endboot(void)
 {
-    if ( vga_puts == vga_noop_puts )
+    if ( !vga_console_info.video_type )
         return;
 
     printk("Xen is %s VGA console.\n",
            vgacon_keep ? "keeping" : "relinquishing");
 
-    vesa_endboot();
-
     if ( !vgacon_keep )
         vga_puts = vga_noop_puts;
+
+    switch ( vga_console_info.video_type )
+    {
+    case XEN_VGATYPE_TEXT_MODE_3:
+        if ( !vgacon_keep )
+            memset(video, 0, columns * lines * 2);
+        break;
+    case XEN_VGATYPE_VESA_LFB:
+        vesa_endboot(vgacon_keep);
+        break;
+    default:
+        BUG();
+    }
 }
 
 static void vga_text_puts(const char *s)

_______________________________________________
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®.