OK, I've checked in my changes and here's what I added: The bus master test now uses the pci pool already allocated by dma_init rather than creating another temporary one. It allocates the data buffer from the pool, but we could change this to make it grab a buffer from the freelist of mapped DMA buffers. I pared down the syslog output of the test and moved most of it into debug statements, so you can still get the full output with drm_opts=debug.
If the DMA test succeeds, DMA is enabled otherwise the driver will fall back to MMIO, and the syslog will show which is used. This test is only done on X server startup. You can still force MMIO mode at compile time by defining MACH64_USE_DMA to 0 in mach64_drv.h. I added a return code to _dispatch_vertex and made the flush function in the Mesa client check it and bail out on an error. If the wait for idle fails (DMA) or wait for FIFO fails (MMIO), the DRM will return -EBUSY and the Mesa client will cause the app to exit with a message including the return code. This is needed now for DMA because it's synchronous. So, in the event of a lockup, the engine will reset. If you restart X, you'll get MMIO mode (assuming the DMA test fails), but you'll need to cold restart to get DMA back. -- Leif Delgass http://www.retinalburn.net