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 v6 5/8] ati-vga: Fix display updates in non-32 bit modes
Date: Sat, 21 Mar 2026 17:30:16 +0100 (CET) [thread overview]
Message-ID: <6e1b83ef3fe7a1ebc246b474eb2b0c7cd05d5deb.1774110169.git.balaton@eik.bme.hu> (raw)
In-Reply-To: <cover.1774110169.git.balaton@eik.bme.hu>
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 <balaton@eik.bme.hu>
Reviewed-by: Chad Jablonski <chad@jablonski.xyz>
---
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
next prev parent reply other threads:[~2026-03-21 16:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 16:30 [PATCH v6 0/8] ati-vga fixes BALATON Zoltan
2026-03-21 16:30 ` [PATCH v6 1/8] ati-vga: Fix colors when frame buffer endianness does not match host BALATON Zoltan
2026-03-21 16:30 ` [PATCH v6 2/8] ati-vga: Also switch mode on HW cursor enable bit change BALATON Zoltan
2026-03-21 16:30 ` [PATCH v6 3/8] ati-vga: Do not add crtc offset to src and dst data address BALATON Zoltan
2026-03-21 16:30 ` [PATCH v6 4/8] ati-vga: Avoid warnings about sign extension BALATON Zoltan
2026-03-21 16:30 ` BALATON Zoltan [this message]
2026-03-21 16:30 ` [PATCH v6 6/8] ati-vga: Add work around for fuloong2e BALATON Zoltan
2026-03-21 16:30 ` [PATCH v6 7/8] ati-vga: Simplify pointer image handling BALATON Zoltan
2026-03-23 12:21 ` Philippe Mathieu-Daudé
2026-03-23 12:25 ` Philippe Mathieu-Daudé
2026-03-23 13:39 ` BALATON Zoltan
2026-03-23 13:38 ` BALATON Zoltan
2026-03-24 14:17 ` Chad Jablonski
2026-03-24 14:49 ` BALATON Zoltan
2026-03-25 13:10 ` Chad Jablonski
2026-03-21 16:30 ` [PATCH v6 8/8] ati-vga: Make sure hardware cursor data is within vram BALATON Zoltan
2026-03-24 13:29 ` Chad Jablonski
2026-03-23 12:01 ` [PATCH v6 0/8] ati-vga fixes BALATON Zoltan
2026-03-24 13:38 ` Michael Tokarev
2026-03-24 14:31 ` Michael Tokarev
2026-03-24 14:39 ` 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=6e1b83ef3fe7a1ebc246b474eb2b0c7cd05d5deb.1774110169.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