Thomas Hellström wrote:
> Jerome Glisse wrote:
>   
>> Hi Thomas,
>>
>> As i am in the process of cleaning up and making radeon
>> fence things bullet proof I am wondering what are the
>> difference btw fence flags and fence types ? Well i guess
>> the questions is more why fence flags are needed ?
>>
>> My understanding is that fence_flags (DRM_FENCE_FLAG_EMIT,
>> DRM_FENCE_FLAG_SHAREABLE, DRM_FENCE_FLAG_WAIT_LAZY,
>> DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS, DRM_FENCE_FLAG_NO_USER)
>> are their to give clue to fence driver on the importance
>> of the fence at least this is my understanding of
>> DRM_FENCE_FLAG_WAIT_LAZY but i don't fully get the others
>> flag supposed meaning would be nice if you can shed some
>> light on them for me :)
>>
>> Corollary why has_irq callback take flag ? I would expect
>> this to be based on fence type and not fence flag.
>>
>> Last question flush callback is their to ask that cmd before
>> highest_received_sequence are all finished and that RW is
>> done on all buffer referenced in all cmds preceding
>> this sequence right ? Does this callback have to do the
>> flush and spin until this true or can it emit what's
>> necessary to flush and return and let poll update this
>> once the flush ended ? Or dooes flush need to stop all
>> current rendering (so stop gpu from doing its rendering)
>> and do the flush ?
>>     
Some additional info on this:
flush() only needs to start a flush, and poll() will report it when it's 
done, but note that on, for example intel, the flush mechanism currently 
implemented doesn't have an IRQ that reports when it's done. Hence the 
polling part of the intel fence wait. A better way of implementing this 
is to have flushes go through a high-priority ring, accompanied by a 
user irq. Not done yet.
A third way is to just add an MI_FLUSH to the ring and keep track of its 
execution. The disadvantage of this is that the ring might be full of 
rendering commands that will take a lot of time to complete and we will 
drain the ring waiting for idle buffers.

Note also, that if poll() sees that fc->flush_pending is non-zero, it 
should also start a flush and clear fc->flush_pending. It can be set to 
non-zero in the drm fence handler.

/Thomas











-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to