On Tue, 7 Oct 2025, BALATON Zoltan wrote:
Hello,
Thanks for the contribution.
On Tue, 30 Sep 2025, Chad Jablonski wrote:
Real Rage 128 cards always request 64MB for their linear (framebuffer)
aperture. This is regardless of the amount of physical VRAM on the
board. This is required for 64MB alignment which is important given the
26-bit addressing in src and dst registers.
This discrepancy caused X to segfault or display garbage depending on
the version tested. X expects this 64MB alignment.
The documentation does not mention 64MB alignment. It says apertures must be
on a 32MB boundary and src and dst offsets are 128 bit aligned but maybe I
don't have the right documentation for these chips or don't get what it
means.
This was confirmed by testing against the behavior of real 16MB and 32MB
Rage 128 cards.
Real Radeon R100 cards request 128MB for linear aperture. This was
tested against a Radeon 7200 with 64MB of VRAM.
Can you check what the CONFIG_APER_SIZE register contains on these cards? Do
all Rage 128 (and Pro) cards have 64MB and Radeon 7xxx/M6 have 128MB? The
documentation is again not clear on this because it lists default value of
0x2000000 for CONFIG_APER_SIZE on Rage 128 Pro and nothing for Radeon but in
a figure it shows this should contain both VRAM and AGP areas that suggests
64MB but it's possible that the documentation is wrong.
Signed-off-by: Chad Jablonski <[email protected]>
---
hw/display/ati.c | 26 ++++++++++++++++++++++++--
hw/display/ati_int.h | 1 +
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/hw/display/ati.c b/hw/display/ati.c
index f7c0006a87..db189e0767 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -30,9 +30,13 @@
#include "ui/console.h"
#include "hw/display/i2c-ddc.h"
#include "trace.h"
+#include "qemu/units.h"
#define ATI_DEBUG_HW_CURSOR 0
+#define ATI_RAGE128_LINEAR_APERTURE_SIZE (64 * MiB)
+#define ATI_RADEON_LINEAR_APERTURE_SIZE (128 * MiB)
Also maybe call it ATI_R100_APER_SIZE instead of RADEON as later Radeons
probably increased this.
Regards,
BALATON Zoltan