[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/47] hw/display/artist: Fix bug in coordinate extraction in art
From: |
Michael Roth |
Subject: |
[PATCH 10/47] hw/display/artist: Fix bug in coordinate extraction in artist_vram_read() and artist_vram_write() |
Date: |
Tue, 14 Dec 2021 18:00:48 -0600 |
From: Helge Deller <deller@gmx.de>
The CDE desktop on HP-UX 10 shows wrongly rendered pixels when the local screen
menu is closed. This bug was introduced by commit c7050f3f167b
("hw/display/artist: Refactor x/y coordination extraction") which converted the
coordinate extraction in artist_vram_read() and artist_vram_write() to use the
ADDR_TO_X and ADDR_TO_Y macros, but forgot to right-shift the address by 2 as
it was done before.
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: c7050f3f167b ("hw/display/artist: Refactor x/y coordination extraction")
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Sven Schnelle <svens@stackframe.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <YK1aPb8keur9W7h2@ls3530>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 01f750f5fef1afd8f6abc0548910f87d473e26d5)
Signed-off-by: Michael Roth <michael.roth@amd.com>
---
hw/display/artist.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/display/artist.c b/hw/display/artist.c
index aa7bd594aa..21b7fd1b44 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -1170,8 +1170,8 @@ static void artist_vram_write(void *opaque, hwaddr addr,
uint64_t val,
}
buf = vram_write_buffer(s);
- posy = ADDR_TO_Y(addr);
- posx = ADDR_TO_X(addr);
+ posy = ADDR_TO_Y(addr >> 2);
+ posx = ADDR_TO_X(addr >> 2);
if (!buf->size) {
return;
@@ -1232,8 +1232,8 @@ static uint64_t artist_vram_read(void *opaque, hwaddr
addr, unsigned size)
return 0;
}
- posy = ADDR_TO_Y(addr);
- posx = ADDR_TO_X(addr);
+ posy = ADDR_TO_Y(addr >> 2);
+ posx = ADDR_TO_X(addr >> 2);
if (posy > buf->height || posx > buf->width) {
return 0;
--
2.25.1
- [PATCH 00/47] Patch Round-up for stable 6.1.1, freeze on 2021-12-21, Michael Roth, 2021/12/14
- [PATCH 09/47] libvhost-user: fix VHOST_USER_REM_MEM_REG skipping mmap_addr, Michael Roth, 2021/12/14
- [PATCH 10/47] hw/display/artist: Fix bug in coordinate extraction in artist_vram_read() and artist_vram_write(),
Michael Roth <=
- [PATCH 11/47] i386/cpu: Remove AVX_VNNI feature from Cooperlake cpu model, Michael Roth, 2021/12/14
- [PATCH 12/47] 9pfs: fix crash in v9fs_walk(), Michael Roth, 2021/12/14
- [PATCH 13/47] plugins/execlog: removed unintended "s" at the end of log lines., Michael Roth, 2021/12/14
- [PATCH 14/47] plugins: do not limit exported symbols if modules are active, Michael Roth, 2021/12/14
- [PATCH 15/47] qemu-sockets: fix unix socket path copy (again), Michael Roth, 2021/12/14
- [PATCH 16/47] vhost-vsock: fix migration issue when seqpacket is supported, Michael Roth, 2021/12/14
- [PATCH 17/47] hw/arm/virt: Rename default_bus_bypass_iommu, Michael Roth, 2021/12/14
- [PATCH 18/47] hw/i386: Rename default_bus_bypass_iommu, Michael Roth, 2021/12/14
- [PATCH 19/47] bios-tables-test: allow changes in DSDT ACPI tables for q35, Michael Roth, 2021/12/14
- [PATCH 20/47] hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35, Michael Roth, 2021/12/14