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 <balaton@eik.bme.hu> Reviewed-by: Chad Jablonski <chad@jablonski.xyz> Message-ID: <7d96c67f864845893d4903b988a4da7c7b010f66.1774110169.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
BALATON Zoltan committed
Mar 21, 2026 at 17:30 UTC
eca8b4c99bdf58a8f20180ed2c5ce140265fb012
1 file changed
-2
hw/display/ati_2d.c
-2
@@ -110,7 +110,6 @@ static void setup_2d_blt_ctx(const ATIVGAState *s, ATI2DCtx *ctx)
110
ctx->dst_stride = s->regs.dst_pitch;
111
ctx->dst_bits = s->vga.vram_ptr + s->regs.dst_offset;
112
if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
113
- ctx->dst_bits += s->regs.crtc_offset & 0x07ffffff;
113
ctx->dst_stride *= ctx->bpp;
114
}
115
@@ -121,7 +120,6 @@ static void setup_2d_blt_ctx(const ATIVGAState *s, ATI2DCtx *ctx)
120
ctx->src_stride = s->regs.src_pitch;
121
ctx->src_bits = s->vga.vram_ptr + s->regs.src_offset;
122
if (s->dev_id == PCI_DEVICE_ID_ATI_RAGE128_PF) {
124
- ctx->src_bits += s->regs.crtc_offset & 0x07ffffff;
123
ctx->src_stride *= ctx->bpp;
124
}
125
DPRINTF("%d %d %d, %d %d %d, (%d,%d) -> (%d,%d) %dx%d %c %c\n",