Re: [Linaro-mm-sig] [RFC] Synchronizing access to buffers shared with dma-buf between drivers/devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 8, 2012 at 3:56 PM, Erik Gilling <konkers@xxxxxxxxxxx> wrote:
>> I guess my other thought is that implicit vs explicit is not
>> mutually exclusive, though I'd guess there'd be interesting
>> deadlocks to have to debug if both were in use _at the same
>> time_. :-)
>
> I think this is an approach worth investigating.  I'd like a way to
> either opt out of implicit sync or have a way to check if a dma-buf
> has an attached fence and detach it.  Actually, that could work really
> well. Consider:
>
> * Each dma_buf has a single fence "slot"
> * on submission
>   * the driver will extract the fence from the dma_buf and queue a wait on it.
>   * the driver will replace that fence with it's own complettion
> fence before the job submission ioctl returns.
> * dma_buf will have two userspace ioctls:
>   * DETACH: will return the fence as an FD to userspace and clear the
> fence slot in the dma_buf
>   * ATTACH: takes a fence FD from userspace and attaches it to the
> dma_buf fence slot.  Returns an error if the fence slot is non-empty.
>
> In the android case, we can do a detach after every submission and an
> attach right before.

btw, I like this idea for implicit and explicit sync to coexist

BR,
-R
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux