public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: qemu-devel@nongnu.org
Cc: "Gerd Hoffmann" <kraxel@redhat.com>,
	marcandre.lureau@redhat.com,
	"Chad Jablonski" <chad@jablonski.xyz>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v5 3/8] ati-vga: Do not add crtc offset to src and dst data address
Date: Sat, 21 Mar 2026 02:04:21 +0100 (CET)	[thread overview]
Message-ID: <7d96c67f864845893d4903b988a4da7c7b010f66.1774054635.git.balaton@eik.bme.hu> (raw)
In-Reply-To: <cover.1774054635.git.balaton@eik.bme.hu>

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>
---
 hw/display/ati_2d.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
index 0cbbdc33f4..cf2d4a08e2 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",
-- 
2.41.3



  parent reply	other threads:[~2026-03-21  1:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21  1:04 [PATCH v5 0/8] ati-vga fixes BALATON Zoltan
2026-03-21  1:04 ` [PATCH v5 1/8] ati-vga: Fix colors when frame buffer endianness does not match host BALATON Zoltan
2026-03-21  1:04 ` [PATCH v5 2/8] ati-vga: Also switch mode on HW cursor enable bit change BALATON Zoltan
2026-03-21  1:04 ` BALATON Zoltan [this message]
2026-03-21  1:04 ` [PATCH v5 4/8] ati-vga: Avoid warnings about sign extension BALATON Zoltan
2026-03-21  1:04 ` [PATCH v5 5/8] ati-vga: Fix display updates in non-32 bit modes BALATON Zoltan
2026-03-21  1:04 ` [PATCH v5 6/8] ati-vga: Add work around for fuloong2e BALATON Zoltan
2026-03-21  1:04 ` [PATCH v5 7/8] ati-vga: Fix mouse pointer on big endian frame buffer BALATON Zoltan
2026-03-21  1:04 ` [PATCH v5 8/8] ati-vga: Make sure hardware cursor data is within vram BALATON Zoltan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d96c67f864845893d4903b988a4da7c7b010f66.1774054635.git.balaton@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=chad@jablonski.xyz \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox