From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPhrM-0003WB-Tn for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:31:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPhrL-0003VE-I9 for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:31:28 -0500 Received: from [199.232.76.173] (port=47373 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPhrL-0003V9-EG for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:31:27 -0500 Received: from savannah.gnu.org ([199.232.41.3]:44310 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 1LPhrL-0005LT-7Y for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:31:27 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LPhrK-0003Rz-Oc for qemu-devel@nongnu.org; Wed, 21 Jan 2009 18:31:26 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LPhrK-0003Rv-DR for qemu-devel@nongnu.org; Wed, 21 Jan 2009 18:31:26 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Wed, 21 Jan 2009 18:31:26 +0000 Subject: [Qemu-devel] [6384] cirrus: avoid resetting vga dirty logging unnecessarily (Avi Kivity) 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: 6384 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6384 Author: aliguori Date: 2009-01-21 18:31:26 +0000 (Wed, 21 Jan 2009) Log Message: ----------- cirrus: avoid resetting vga dirty logging unnecessarily (Avi Kivity) cirrus bitblt reset will stop and start dirty logging even when there is no need; this causes full redraws. avoid by only updating memory access when exiting cpu-to-video update mode. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/cirrus_vga.c Modified: trunk/hw/cirrus_vga.c =================================================================== --- trunk/hw/cirrus_vga.c 2009-01-21 18:31:16 UTC (rev 6383) +++ trunk/hw/cirrus_vga.c 2009-01-21 18:31:26 UTC (rev 6384) @@ -850,11 +850,17 @@ static void cirrus_bitblt_reset(CirrusVGAState * s) { + int need_update; + s->gr[0x31] &= ~(CIRRUS_BLT_START | CIRRUS_BLT_BUSY | CIRRUS_BLT_FIFOUSED); + need_update = s->cirrus_srcptr != &s->cirrus_bltbuf[0] + || s->cirrus_srcptr_end != &s->cirrus_bltbuf[0]; s->cirrus_srcptr = &s->cirrus_bltbuf[0]; s->cirrus_srcptr_end = &s->cirrus_bltbuf[0]; s->cirrus_srccounter = 0; + if (!need_update) + return; cirrus_update_memory_access(s); }