From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Jan Beulich <JBeulich@suse.com>
Subject: vesa: flush lfb when releasing VGA to dom0
Date: Thu, 26 Jan 2012 17:08:52 +0000 [thread overview]
Message-ID: <4F2188A4.50506@citrix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: vesa-endboot-flush.patch --]
[-- Type: text/x-patch, Size: 1969 bytes --]
# HG changeset patch
# Parent a2a8089b1ffbf5757ca3191cb8f74a5f1ed7fed1
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>
diff -r a2a8089b1ffb xen/drivers/video/vesa.c
--- 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,
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2012-01-26 17:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F2188A4.50506@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.