diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-10-16 16:04:59 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-01-25 18:32:47 +0000 |
commit | fd4aa979033ca604ad829cf95055d4b5c5ed1063 (patch) | |
tree | defa55c0e1815076d229f941d4fe8ddf239b799f /hw/g364fb.c | |
parent | 59abb06198ee9471e29c970f294eae80c0b39be1 (diff) |
memory: change dirty setting APIs to take a size
Instead of each target knowing or guessing the guest page size,
just pass the desired size of dirtied memory area.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/g364fb.c')
-rw-r--r-- | hw/g364fb.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/hw/g364fb.c b/hw/g364fb.c index 33ec149e0f..02ec7b5fca 100644 --- a/hw/g364fb.c +++ b/hw/g364fb.c @@ -268,12 +268,9 @@ static void g364fb_update_display(void *opaque) static inline void g364fb_invalidate_display(void *opaque) { G364State *s = opaque; - int i; s->blanked = 0; - for (i = 0; i < s->vram_size; i += G364_PAGE_SIZE) { - memory_region_set_dirty(&s->mem_vram, i); - } + memory_region_set_dirty(&s->mem_vram, 0, s->vram_size); } static void g364fb_reset(G364State *s) @@ -385,7 +382,7 @@ static void g364fb_update_depth(G364State *s) static void g364_invalidate_cursor_position(G364State *s) { - int ymin, ymax, start, end, i; + int ymin, ymax, start, end; /* invalidate only near the cursor */ ymin = s->cursor_position & 0xfff; @@ -393,9 +390,7 @@ static void g364_invalidate_cursor_position(G364State *s) start = ymin * ds_get_linesize(s->ds); end = (ymax + 1) * ds_get_linesize(s->ds); - for (i = start; i < end; i += G364_PAGE_SIZE) { - memory_region_set_dirty(&s->mem_vram, i); - } + memory_region_set_dirty(&s->mem_vram, start, end - start); } static void g364fb_ctrl_write(void *opaque, |