Skip to contentSkip to conversation

vga: fix display update region calculation

PATCH New Gerd Hoffmann 1 participant 1 message May 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vga: fix display update region calculation

vga display update mis-calculated the region for the dirty bitmap snapshot in case the scanlines are padded. This can triggere an assert in cpu_physical_memory_snapshot_get_dirty().

Fixes fec5e8c92becad223df9d972770522f64aafdb72
---
 hw/display/vga.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/vga.c +1 -1
index b2516c8d21..dcc95f88e2 100644
@@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
     if (!full_update) {
         vga_sync_dirty_bitmap(s);
         snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
-                                                      bwidth * height,
+                                                      line_offset * height,
                                                       DIRTY_MEMORY_VGA);
     }
 
Signature · 1 line
2.9.3