> > I'm not saying the 64MB alignment is not correct (I don't know what is > correct and assuming the Xorg driver was tested with real cards it's > possible this assumption holds) but maybe it comes from having a 64MB VRAM > BAR that contains twice the size of actual VRAM including the AGP window > which also satisfies the 32MB alignment for VRAM, so the commit message > may nees to be adjusted to say that instead of something not supported by > documentation. Do you have any PCI cards? There were PCI versions of > these. I wonder if they also have the same VRAM BAR. If not then no > problem, we can go with what works for known drivers. >
Unfortunately I don't have a PCI Rage 128. They actually seem to be somewhat rare compared to the AGP versions! Testing results from two Rage 128 AGP cards: Card VRAM PCI BAR0 CONFIG_MEMSIZE CONFIG_APER_SIZE AGP_APER_OFFSET ----------------------- ---- -------- -------------- ---------------- --------------- Rage 128 Pro Ultra TF 32MB 64MB 0x02000000 0x02000000 0x02000000 Rage 128 RF/SG AGP 16MB 64MB 0x01000000 0x02000000 0x02000000 * PCI BAR0 (Region 0) is fixed at 64MB for both cards, regardless of actual VRAM size. * CONFIG_MEMSIZE correctly reports actual VRAM size (32MB and 16MB). * CONFIG_APER_SIZE is fixed at 32MB (0x02000000) on both cards, regardless of: - Actual VRAM size - AGP enabled/disabled status - AGP_APER_SIZE configuration (tested with 8MB AGP enabled) This directly contradicts the Rage 128 Pro Register Reference Guide (pg. 3-202) which states: "Size of linear apertures (both 0 and 1). This includes both the frame buffer image and the AGP system memory image area." * AGP_APER_OFFSET is also fixed at 32MB (0x02000000) on both cards. On the 16MB card, this creates a 16MB gap between the end of framebuffer and the start of the AGP window. So for Rage 128, CONFIG_APER_SIZE should be set to a fixed 32MB value, not dynamically calculated from CONFIG_MEMSIZE + AGP space as the documentation suggests and as was previously implemented by me 😬. I'm less sure about the Radeon and your additional context around the Radeon on PowerPC makes me very nervous to change it right now. Especially given I have a single example of that card and it's for a PC. I think it makes more sense to leave the behavior of CONFIG_APER_SIZE for that card unchanged. I will send a v2 patch that: * Sets Rage 128 CONFIG_APER_SIZE to 32MB * Updates the commit message to reflect that * Leaves Radeon unchanged (half of the vram_size) * Addresses the style issues
