qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/5] cirrus: avoid resetting vga dirty logging unnec


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH 3/5] cirrus: avoid resetting vga dirty logging unnecessarily
Date: Mon, 19 Jan 2009 09:15:37 +0100
User-agent: StGIT/0.14.2

From: Avi Kivity <address@hidden>

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 <address@hidden>
---

 hw/cirrus_vga.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 706c4c3..fc7c9ca 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -850,11 +850,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);
 }
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]