The memory_region_set_dirty used to mark changes should use stride value in vram which is normally only the same as surface_stride in 32 bit modes. This caused missed updates in 8 and 16 bit modes.
Signed-off-by: BALATON Zoltan <[email protected]> --- hw/display/ati_2d.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c index cf2d4a08e2..23527b2c50 100644 --- a/hw/display/ati_2d.c +++ b/hw/display/ati_2d.c @@ -70,6 +70,7 @@ static void ati_set_dirty(VGACommonState *vga, const ATI2DCtx *ctx) { DisplaySurface *ds = qemu_console_surface(vga->con); + (void)ds; DPRINTF("%p %u ds: %p %d %d rop: %x\n", vga->vram_ptr, vga->vbe_start_addr, surface_data(ds), surface_stride(ds), surface_bits_per_pixel(ds), ctx->rop3 >> 16); @@ -78,8 +79,8 @@ static void ati_set_dirty(VGACommonState *vga, const ATI2DCtx *ctx) vga->vbe_regs[VBE_DISPI_INDEX_YRES] * vga->vbe_line_offset) { memory_region_set_dirty(&vga->vram, vga->vbe_start_addr + ctx->dst_offset + - ctx->dst.y * surface_stride(ds), - ctx->dst.height * surface_stride(ds)); + ctx->dst.y * ctx->dst_stride, + ctx->dst.height * ctx->dst_stride); } } -- 2.41.3
