2006/8/25, Timothy Miller <[EMAIL PROTECTED]>:
What we do is this: In a page of DMA buffer, we have some shared
variables between GPU and CPU. As the GPU consumes ring buffer
entries, it'll periodically update a shared variable that indicates
the "head" of the queue, where words are extracted from the circular
buffer. Similarly, as the driver fills commands into the ring buffer,
it'll update the "tail" pointer to indicate to the GPU where the end
of the queue is. Whenever the GPU runs to the end of what it thinks
locally is the tail pointer (no more DMA reads), it'll reread the
pointer in the host. If what it reads is different from the old
value, it keeps going. If what it reads is the same, it stops
(nothing more to do) and raises an interrupt.
When the driver thinking DMA is still running and
then trying to update the "tail" pointer, at the almost
same time, DMA might be thinking the "tail" pointer is
the same as old one. Then the DMA engine stops.
I think there may be some condition in the following:
1. CPU check if the DMA engine stops ==> NO
2. GPU check if the tail pounter updated
before letting DMA stopped ==> same old tail pointer, DMA stops
3. CPU update tail pointer
Then we have to add work-around in the driver to
fix the condition, right?
Joe
--
The sun is shinny but the ice is slippery.
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)