|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] vga: Clear the screen when relinquishing
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228477040 0
# Node ID 5e066dc410ac872c8976ae4db17891ed1dc5e00e
# Parent b44e244d7bb93e2e7044bdb6ea5ca7cf341fd312
vga: Clear the screen when relinquishing VGA to dom0.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/drivers/video/vesa.c | 18 ++++++++++++++----
xen/drivers/video/vga.c | 21 ++++++++++++++++-----
2 files changed, 30 insertions(+), 9 deletions(-)
diff -r b44e244d7bb9 -r 5e066dc410ac xen/drivers/video/vesa.c
--- a/xen/drivers/video/vesa.c Fri Dec 05 11:05:45 2008 +0000
+++ b/xen/drivers/video/vesa.c Fri Dec 05 11:37:20 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 b44e244d7bb9 -r 5e066dc410ac xen/drivers/video/vga.c
--- a/xen/drivers/video/vga.c Fri Dec 05 11:05:45 2008 +0000
+++ b/xen/drivers/video/vga.c Fri Dec 05 11:37:20 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:
+ vesa_endboot(vgacon_keep);
+ break;
+ case XEN_VGATYPE_VESA_LFB:
+ if ( !vgacon_keep )
+ memset(video, 0, columns * lines * 2);
+ break;
+ default:
+ BUG();
+ }
}
static void vga_text_puts(const char *s)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] vga: Clear the screen when relinquishing VGA to dom0.,
Xen patchbot-unstable <=
|
|
|
|
|