Jerome Glisse wrote:
> Hi Thomas,
>
> What should be done when unfenced list is not empty on module
> unload, i call drm_bo_mm_cleanup with unfenced not empty end
> i trigger :
> BUG_ON(!list_empty(&bm->unfenced))
>
> Should the core try to flush everythings instead of BUG_ON ?
> Or should i make sure my self in the driver that everythings
> is clean ?
>
> Cheers,
> Jerome Glisse <[EMAIL PROTECTED]>
>   
Jerome,

The unfenced list should only be populated during a superioctl 
(execbuffer) call.
At the end of that call, the driver should either call
a) drm_fence_buffer_objects() to fence the buffers,
b) drm_putback_buffer_objects() if command submission didn't succeed.
(see i915_handle_copyback())

Note that drm_fence_buffer_objects() can fail.
In that case, the driver should idle the appropriate engine and call 
drm_putback_buffer_objects. (see i915_fence_or_sync())

If, in addition, the exebuf() call is made atomic by means of a mutex, 
(replacing the hardware lock) this will guarantee that the unfenced list 
is always empty after an execbuf.

Strictly speaking, that mutex is protecting the unfenced list.

/Thomas






-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to