On Tue, 2005-05-03 at 15:24 +1000, Benjamin Herrenschmidt wrote: > > The radeon DRM has some interesting bug that paul and I discovered to > cause all sort of problems like crashing the machine on suspend/resume > (go figure ...) etc... > > dev_priv->gart_vm_start = dev_priv->fb_location > + RADEON_READ( RADEON_CONFIG_APER_SIZE ); > > The "aim" of this code is to setup the card memory map so that the GART > sits just after the framebuffer. However, CONFIG_APER_SIZE is _not_ a > good indication of the framebuffer size.
Indeed, I apologize for this 'bogosity'. Seemed like a good idea at the time... > CONFIG_APER_SIZE is only the size of the visible aperture on the PCI > bus. Some setups (like some Macs for example) can use the dual split > aperture mecanism, in which case CONFIG_APER_SIZE is only half of the > VRAM. I can imagine cards overloaded with memory to have more vram that > is directly accessible from PCI in other circumstances too (though the > split aperture case is a real world scenario we encountered on paul's > laptop at least). Yeah, cards with 256 MB of VRAM or more only have a 128 MB PCI aperture. So this fix might also help with the issues people have with such cards. > In practice, you are setting up the card's memory map, so > CONFIG_APER_SIZE should be totally irrelevant anyway since it only > affects the PCI window to the vram. What is relevant here is > CONFIG_MEMSIZE I would say... > > dev_priv->gart_vm_start = dev_priv->fb_location > + RADEON_READ( RADEON_CONFIG_MEMSIZE ); > > If we want to be totally paranoid, we may want to use the max of > CONFIG_MEMSIZE > and CONFIG_APER_SIZE (to avoid leaving part of the GART mapped though the > PCI aperture. Makes sense. > Note that with huge VRAM sizes appearing, we also want to make sure that > wheverver we put it won't overlap the 32 bits space since CONFIG_MEM_SIZE > can be huge nowadays... and if it does, put the GART just _before_ the > framebuffer instead. Again, this is all cards space, not bus view, so that > shouldn't matter where we put these things. Another constraint is that the GART doesn't overlap with the bus address range of system RAM. -- Earthling Michel DÃnzer | Debian (powerpc), X and DRI developer Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
