Skip to contentSkip to conversation

[6384] cirrus: avoid resetting vga dirty logging unnecessarily (Avi Kivity)

Qemu-devel Anthony Liguori 1 participant 1 message Jan 21, 2009

lore
Share & tools
lore
#0 lore raw

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.

Modified Paths:
--------------
trunk/hw/cirrus_vga.c

Modified: trunk/hw/cirrus_vga.c
===================================================================

hw/cirrus_vga.c +6 -0
@@ -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);
 }