cg3: fix up size parameter for memory_region_get_dirty()
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 5 Apr 2017 08:02:46 +0000 (09:02 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 21 Apr 2017 07:31:30 +0000 (08:31 +0100)
The code was incorrectly calculating the end address rather than the size of
the required region.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/cg3.c

index 7d436945e94e2a6df7e45ba97f5933bc581587d9..b42f60e201159a2841d632e32504915d574038aa 100644 (file)
@@ -114,7 +114,7 @@ static void cg3_update_display(void *opaque)
         int update = s->full_update;
 
         page = y * width;
-        update |= memory_region_get_dirty(&s->vram_mem, page, page + width,
+        update |= memory_region_get_dirty(&s->vram_mem, page, width,
                                           DIRTY_MEMORY_VGA);
         if (update) {
             if (y_start < 0) {