Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jse0T-0006OU-N9 for qemu-devel@nongnu.org; Sun, 04 May 2008 09:11:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jse0S-0006Ng-U0 for qemu-devel@nongnu.org; Sun, 04 May 2008 09:11:57 -0400 Received: from [199.232.76.173] (port=48306 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jse0S-0006Nb-P5 for qemu-devel@nongnu.org; Sun, 04 May 2008 09:11:56 -0400 Received: from savannah.gnu.org ([199.232.41.3] helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jse0S-0003Hk-Gi for qemu-devel@nongnu.org; Sun, 04 May 2008 09:11:56 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Jse0Q-0000AD-IB for qemu-devel@nongnu.org; Sun, 04 May 2008 13:11:54 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Jse0Q-0000A9-7x for qemu-devel@nongnu.org; Sun, 04 May 2008 13:11:54 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 04 May 2008 13:11:54 +0000 Subject: [Qemu-devel] [4328] Fix spurious VGA updates Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4328 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4328 Author: aurel32 Date: 2008-05-04 13:11:53 +0000 (Sun, 04 May 2008) Log Message: ----------- Fix spurious VGA updates (Samuel Thibault) Modified Paths: -------------- trunk/hw/vga.c Modified: trunk/hw/vga.c =================================================================== --- trunk/hw/vga.c 2008-05-04 13:11:44 UTC (rev 4327) +++ trunk/hw/vga.c 2008-05-04 13:11:53 UTC (rev 4328) @@ -1418,7 +1418,7 @@ static void vga_draw_graphic(VGAState *s, int full_update) { int y1, y, update, page_min, page_max, linesize, y_start, double_scan, mask; - int width, height, shift_control, line_offset, page0, page1, bwidth; + int width, height, shift_control, line_offset, page0, page1, bwidth, bits; int disp_width, multi_scan, multi_run; uint8_t *d; uint32_t v, addr1, addr; @@ -1454,6 +1454,7 @@ } else { v = VGA_DRAW_LINE4; } + bits = 4; } else if (shift_control == 1) { full_update |= update_palette16(s); if (s->sr[0x01] & 8) { @@ -1462,28 +1463,35 @@ } else { v = VGA_DRAW_LINE2; } + bits = 4; } else { switch(s->get_bpp(s)) { default: case 0: full_update |= update_palette256(s); v = VGA_DRAW_LINE8D2; + bits = 4; break; case 8: full_update |= update_palette256(s); v = VGA_DRAW_LINE8; + bits = 8; break; case 15: v = VGA_DRAW_LINE15; + bits = 16; break; case 16: v = VGA_DRAW_LINE16; + bits = 16; break; case 24: v = VGA_DRAW_LINE24; + bits = 24; break; case 32: v = VGA_DRAW_LINE32; + bits = 32; break; } } @@ -1507,7 +1515,7 @@ width, height, v, line_offset, s->cr[9], s->cr[0x17], s->line_compare, s->sr[0x01]); #endif addr1 = (s->start_addr * 4); - bwidth = width * 4; + bwidth = (width * bits + 7) / 8; y_start = -1; page_min = 0x7fffffff; page_max = -1;