From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: vesa: flush lfb when releasing VGA to dom0 Date: Thu, 26 Jan 2012 17:08:52 +0000 Message-ID: <4F2188A4.50506@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060203090201060809080405" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org --------------060203090201060809080405 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit --------------060203090201060809080405 Content-Type: text/x-patch; name="vesa-endboot-flush.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vesa-endboot-flush.patch" # 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 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 @@ -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, --------------060203090201060809080405 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060203090201060809080405--