Thomas Hellström wrote: > Jerome Glisse wrote: > >> Hi again Thomas, >> >> It seems that if a fence is created with a userobject in superioctl, >> one ref on the fence from one of the associated bo (the EXE bo i think) >> is not properly unreferenced automagicly by kernel on program exit >> if program never wait or ask for the status on each BO. So for instance >> -SIOCTL CMD BUFFER, BO_DATA1, BO_DATA2 >> - create fence & emit (fence refcount = 1) >> - associate buffer & fence (fence refcount = 4 3buffers) >> - program exit (doesn't do any more thing) >> - fence wait & flush >> - fence fully signaled >> - bo data1 & data2 deref the fence (fence refcount = 2) >> - fence is destructed (fence refcount = 1 so no destruction) >> (i am not showing temporary refcounting which happen while the fence >> is in use by a function) >> >> You end up with a fence signaled but still referenced by a BO, it looks like >> that drm doesn't properly unreference the fence from the associated EXE BO. >> Shouldn't the BO associated with a fence deref this fence in fence_handler ? >> Or where should i look to find why one of the BO is not properly derefing >> the fence. >> >> Cheers, >> Jerome Glisse <[EMAIL PROTECTED]> >> >> Jerome,
The above sequence should ideally look like this: - create fence & emit (fence refcount = 5, referencing is the fence pointer returned from the drm_fence_buffer_objects() function and the user object associated with the fence + three buffer objects). - dereference fence pointer returned from drm_fence_buffer_objects (refcount = 4) - program exit, automatically derefereneces the user object associated with the fence (refcount = 3) - fence wait & flush - fence fully signaled - bo cmd_buffer deref the fence (refcount = 2) - bo data1 & data2 deref the fence (fence refcount = 0, fence is destroyed). /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