aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers/video
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2012-01-28 13:42:25 +0000
committerAndrew Cooper <andrew.cooper3@citrix.com>2012-01-28 13:42:25 +0000
commit68e1fbf3db5ed49b05214064a5516154ca0bf842 (patch)
tree934adad4fb125fe822103a0c95917e7324c69728 /xen/drivers/video
parent2ccae182ee2513d7e132fde0523206c40c159d56 (diff)
downloadxen-68e1fbf3db5ed49b05214064a5516154ca0bf842.tar.gz
xen-68e1fbf3db5ed49b05214064a5516154ca0bf842.tar.bz2
xen-68e1fbf3db5ed49b05214064a5516154ca0bf842.zip
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@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/drivers/video')
-rw-r--r--xen/drivers/video/vesa.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/xen/drivers/video/vesa.c b/xen/drivers/video/vesa.c
index fadf78b588..91b6001dec 100644
--- a/xen/drivers/video/vesa.c
+++ b/xen/drivers/video/vesa.c
@@ -151,24 +151,6 @@ void __init vesa_init(void)
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 @@ static void lfb_flush(void)
#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,