On Mon, 20 Oct 2003, Emmanuel ALLAUD wrote: >> unavoidable to get out of the statu quo : M. Voijkovich asked about >> the use of sched_yield() in order to wait for the FIFO to process a >> big enough part of the DMA buffer before we try to refill it; his idea >> was to smartly release the CPU because we know that the driver will >> have to wait quite a while before the GPU has processed the datas. But >> we also need to get the CPU back fast enough in order to have a >> unbroken stream of data fed to the GPU.Now the driver is busy looping >> (correct me if I wrong) which is a waste of CPU. Using sched_yield() >> for 2.6.x linux kernels will lead to bad latency (basically we will >> reacquire the CPU very lately). The last alternative (at least >> following R. Russel and R.M. Love) is to have a kernel module which >> can poll the DMA to see how much has already been sent to the GPU, and >> when enough has been processed, this kernel module wakes up the driver >> in userland (using futexes). This approach could work with all these >> types of "rather long" waits where it is not really smart to busy loop >> (one assumption is that the wait can be long enough that we will >> consume our whole timeslice busy looping, which will also lead to a >> bad score on "interactiveness" on newer linux kernels, and also we >> will have to wait until we reacquire the CPU). R. Russel seems to be >> OK to help if the XFree guys wanted to go this way. I must add that M. >> Vojkovich did not like the idea of a kernel module. >> My 2 cents... >> Bye >> Manu > >Hmm, replying to myself : I read that the DRI kernel module addresses >certain issues with DMA/IRQ and others. Is there any good reason that >would prevent 2D drivers to use the API provided by this module?
The DRI is currently mainly used to provide 3D acceleration support infrastructure for video drivers, however there's nothing inherent in the DRI that limits it to just 3D acceleration - although most people tend to use the term "DRI enabled" and "3D enabled" synonymously. The "radeon" driver uses the DRI interfaces to do both 3D and 2D acceleration using the Radeon CP engine. It's worked in this manner for a very long time now, possibly even since Radeon DRI support was included. The initial Radeon DRI 2D accel support was not 100% complete until 4.2.0 or possibly 4.3.0 however, so 2D was faster with DRI disabled on Radeon hardware until more recently, however it is quite complete IIRC in 4.3.0 at least. If DRI is disabled, then the Radeon driver will use the older MMIO mechanism to do 2D acceleration. I don't know what if any of the other drivers will use DRI for 2D or Xvideo currently, however any hardware that supports using DMA/IRQ for 2D accelration or other stuff theoretically at least can use the DRI to do it. Hope this helps. -- Mike A. Harris _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
