[Linaro-mm-sig] [RFC] dma-shared-buf: Add buffer sharing framework
Sumit Semwal
sumit.semwal at linaro.org
Thu Aug 25 15:50:14 UTC 2011
On 25 August 2011 10:52, Sumit Semwal <sumit.semwal at linaro.org> wrote:
> Hi Rob,
>
> On 25 August 2011 06:33, Clark, Rob <rob at ti.com> wrote:
>
>> On Wed, Aug 10, 2011 at 7:11 AM, Sumit Semwal <sumit.semwal at ti.com>
>> wrote:
>> >
>> > +/**
>> > + * struct dma_buf - shared buffer object
>> > + * @file: file pointer used for sharing buffers across, and for
>> refcounting.
>> > + * @ops: dma_buf_ops associated with this buffer object
>> > + * @priv: user specific private data
>> > + */
>> > +struct dma_buf {
>> > + struct file *file;
>> > + struct dma_buf_ops *ops;
>> > + void *priv;
>> > +};
>> > +
>>
>> hmm, I wonder if we should stuff a ptr in there to store the creating
>> driver (or device?) ptr? This way if it somehow gets passed back to
>> the creating driver, it could realize that it is a dma_buf that it
>> created in the first place.. and that it was safe to cast and deref
>> the priv ptr.
>>
> Hmmm... Do you mean the platform driver (device?) ptr? That's a good idea -
> I will make these changes you suggested, and re-post. I'm thinking of
> posting the next version to the upstream mailing lists as well.
>
Btw, does this mean we can 'assume' that all users/allocators of dma-buf
would be platform devices?
BR,
~me.
>
> Everyone: if you could please spend some time for a review, it'd help me
> post something without obvious, stupid mistakes to the upstream mailing
> lists.
>
> Thanks and best regards,
> ~Sumit.
>
>>
>> BR,
>> -R
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linaro.org/pipermail/linaro-mm-sig/attachments/20110825/e7e97798/attachment.html>
More information about the Linaro-mm-sig
mailing list