Hi!

I wonder why you went so quiet on IRC, just to discover my bridge 
computer had given in completely. Need to resort to the lappy.

Anyway to avoid any misunderstandings: Here is my view on how this ought 
to be implemented:

1) X server schedules a pageflip.
2) When a client tries to render to the old front, the client blocks 
while the old front is displayed.
This block happens in the execbuf or cs ioctl. The kernel recognizes 
that one of the buffers on the validated list is a pending swap buffer 
and blocks or returns busy.
3) No event is sent to the master on flip completion. The master needs 
to obtain needed info from DRM.

This solution is compatible with DRI1, DRI2, triple-buffering and 
simplifies EGL since no event parsing is needed.
The drawback is AIGLX that will block the server in command submission, 
unless triple buffering is used. However, AIGLX would block frequently 
waiting for the GPU anyway (for example during throttling).

Generic implementation details of 2):
This would be handled as you would handle hardware with multiple FIFOs. 
If, when validating buffers, a buffer is busy on another fifo, we block 
(or insert barriers) until that buffer is idle.
Now, imagine that you had a hardware FIFO that could only do 
pageflipping, and finally,
 implement that FIFO in software.  This last step is trivial.

If TTM fencing and synchronization is used, handling multiple FIFOs is 
also trivial since they would be represented using different fence 
classes. I haven't looked enough into GEM's syncronization mechanisms to 
know how it would be implemented there. And no. TTM fences don't idle 
the pipeline. I'm not sure why / if NV fences do.

On IRC you stated that the event mechanism is needed anyway, even if 
it's not used for scheduling, to notify the X server that a flip has 
happened. What's the exact use of this info that is not relevant for 
non-pageflipping clients? Of course if there is no way around an event 
mechanism, we must have it but I don't see why we _must_ have an event 
mechanism for an accurate swap count.


/Thomas





------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to