On Wed, 09 Apr 2008 20:35:07 +0200
Thomas Hellström <[EMAIL PROTECTED]> wrote:

> 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

Thanks Thomas, this was a bug on my side one of the path in
my superioctl did not have the drm_putback_buffer_objects :(
I need to cleanup a bit more the code so i have one error
path and one success path, this would make such bug more trivial
to find.

Cheers,
Jerome Glisse <[EMAIL PROTECTED]>

-------------------------------------------------------------------------
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