Skip to content

Commit

Permalink
cirrus: wrap memory update in a transaction
Browse files Browse the repository at this point in the history
This prevents spurious unmapping and remapping of the vga windows,
which reduces performance.

Reviewed-by: Richard Henderson  <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
avikivity committed Aug 25, 2011
1 parent 20e5758 commit cf9182e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/cirrus_vga.c
Original file line number Diff line number Diff line change
Expand Up @@ -2424,6 +2424,7 @@ static void cirrus_update_memory_access(CirrusVGAState *s)
{
unsigned mode;

memory_region_transaction_begin();
if ((s->vga.sr[0x17] & 0x44) == 0x44) {
goto generic_io;
} else if (s->cirrus_srcptr != s->cirrus_srcptr_end) {
Expand All @@ -2443,6 +2444,7 @@ static void cirrus_update_memory_access(CirrusVGAState *s)
unmap_linear_vram(s);
}
}
memory_region_transaction_commit();
}


Expand Down

0 comments on commit cf9182e

Please sign in to comment.