From: BALATON Zoltan Date: Sat, 21 Mar 2026 16:30:13 +0000 (+0100) Subject: ati-vga: Do not add crtc offset to src and dst data address X-Git-Tag: v11.0.0-rc1~5^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eca8b4c99bdf58a8f20180ed2c5ce140265fb012;p=thirdparty%2Fqemu.git ati-vga: Do not add crtc offset to src and dst data address Drivers seem to program these registers with values that already include the crtc offset so this is not needed. This fixes blit outside of vram errors with non-0 crtc offset. Signed-off-by: BALATON Zoltan Reviewed-by: Chad Jablonski Message-ID: <7d96c67f864845893d4903b988a4da7c7b010f66.1774110169.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c index 0cbbdc33f47..cf2d4a08e29 100644 --- a/hw/display/ati_2d.c +++ b/hw/display/ati_2d.c @@ -110,7 +110,6 @@ static void setup_2d_blt_ctx(const ATIVGAState *s, ATI2DCtx *ctx) ctx->dst_stride = s->regs.dst_pitch; ctx->dst_bits = s->vga.vram_ptr + s->regs.dst_offset; if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) { - ctx->dst_bits += s->regs.crtc_offset & 0x07ffffff; ctx->dst_stride *= ctx->bpp; } @@ -121,7 +120,6 @@ static void setup_2d_blt_ctx(const ATIVGAState *s, ATI2DCtx *ctx) ctx->src_stride = s->regs.src_pitch; ctx->src_bits = s->vga.vram_ptr + s->regs.src_offset; if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) { - ctx->src_bits += s->regs.crtc_offset & 0x07ffffff; ctx->src_stride *= ctx->bpp; } DPRINTF("%d %d %d, %d %d %d, (%d,%d) -> (%d,%d) %dx%d %c %c\n",