Commit f8b237af00a74595dd372f1b23129906948ad9e2

Authored by aliguori
1 parent ba7349cd

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 <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6384 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 0 deletions
hw/cirrus_vga.c
... ... @@ -850,11 +850,17 @@ static void cirrus_bitblt_cputovideo_next(CirrusVGAState * s)
850 850  
851 851 static void cirrus_bitblt_reset(CirrusVGAState * s)
852 852 {
  853 + int need_update;
  854 +
853 855 s->gr[0x31] &=
854 856 ~(CIRRUS_BLT_START | CIRRUS_BLT_BUSY | CIRRUS_BLT_FIFOUSED);
  857 + need_update = s->cirrus_srcptr != &s->cirrus_bltbuf[0]
  858 + || s->cirrus_srcptr_end != &s->cirrus_bltbuf[0];
855 859 s->cirrus_srcptr = &s->cirrus_bltbuf[0];
856 860 s->cirrus_srcptr_end = &s->cirrus_bltbuf[0];
857 861 s->cirrus_srccounter = 0;
  862 + if (!need_update)
  863 + return;
858 864 cirrus_update_memory_access(s);
859 865 }
860 866  
... ...