From patchwork Tue Aug 17 16:56:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [libpayload] fix garbage on screen with Geode-LX VGA Date: Tue, 17 Aug 2010 16:56:41 -0000 From: Jens Rottmann X-Patchwork-Id: 1763 Message-Id: <4C6ABF49.5040802@LiPPERTEmbedded.de> To: coreboot mailing list libpayload: fix garbage on screen with Geode-LX VGA Clear initial garbage in VGA memory and fix scroll_up, which scrolled 1 scanline instead of 1 text line by mistake. Signed-off-by: Jens Rottmann Acked-by: Patrick Georgi --- --- payloads/libpayload/drivers/video/geodelx.c (revision 5697) +++ payloads/libpayload/drivers/video/geodelx.c (working copy) @@ -206,7 +206,7 @@ static void geodelx_set_palette(int entr static void geodelx_scroll_up(void) { unsigned char *dst = FB; - unsigned char *src = FB + vga_mode.hactive; + unsigned char *src = FB + FONT_HEIGHT * vga_mode.hactive; int y; for(y = 0; y < vga_mode.vactive - FONT_HEIGHT; y++) { @@ -216,8 +216,6 @@ static void geodelx_scroll_up(void) src += vga_mode.hactive; } - dst = FB + (vga_mode.vactive - FONT_HEIGHT) * vga_mode.hactive; - for(; y < vga_mode.vactive; y++) { memset(dst, 0, vga_mode.hactive); dst += vga_mode.hactive; @@ -280,6 +278,8 @@ static int geodelx_init(void) geodelx_set_palette(i, vga_colors[i]); } + geodelx_clear(); + return 0; }