aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2008-12-04 21:51:22 +0200
committerAvi Kivity <avi@redhat.com>2008-12-05 17:35:44 +0200
commit8ae52b000f14d2646238b3544178bdb7d5dd84f3 (patch)
tree7714c66974e0dc8155d268f779d56e7336111459
parent33c35bcf41fb86672d309527e96c184fd7d4b5bd (diff)
Avoid resetting vga dirty logging unnecessarilykvm-80rc3
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: Avi Kivity <avi@redhat.com>
-rw-r--r--hw/cirrus_vga.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 6164f2bd5..752904222 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -860,11 +860,17 @@ static void cirrus_bitblt_cputovideo_next(CirrusVGAState * s)
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);
}