> Then comes the kernel. :( I started looking that the ILOAD code in > mga_state.c. Basically, it looks like everything assume the source > buffers are in AGP space. I'm guessing that I could just look at the > flags field in the drm_device_dma structure and only set the > MGA_SRCACC_AGP bit if _DRM_DMA_USE_AGP bit is set. Is _DRM_DMA_USE_SG > *always* set for PCI DMA transfers? I don't want to exclude the > possability of sourcing vertex data from on-card memory in the future. > > In the DRM, if there's no AGP available, then PCI memory has to be used > for DMA. It looks like the setup for that happens in the DDX driver in > MGADRIAgpInit (in mga_dri.c). In looking at that routine, it's not > immediatly clear what to do. Obviously, DRM_AGP wouldn't be passed to > any of the drmAddMap calls. Looking at radeon_dri.c, it looks like > RADEONPciInit is the same as RADEONDRIAgpInit except it uses > DRM_SCATTER_GATHER instead of DRM_AGP and drmScatterGatherAlloc instead > of drmAgpAcquire / drmAgpAlloc / drmAgpBind. Is that right?
If the card has non PCI GART (like ATIs have), you can probably still use the machine's IOMMU to perform like an AGP GART, that is create a mapping of scattered memory pages that is shown as contiguous for your card. The current PCI interface to the iommu doesn't allow you to explicitely ask an sg list to be force-merged into a single segment though that could be added via some platform hooks. That would probably work if that is the only DMA allocation you do on this TCE table. Those machines have a TCE table per PCI brigde and one bridge per slot, no ? Ben. ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel