|
|
Subscribe / Log in / New account

DMA buffer sharing in 3.3

DMA buffer sharing in 3.3

Posted Jan 12, 2012 16:48 UTC (Thu) by robclark (subscriber, #74945)
Parent article: DMA buffer sharing in 3.3

just a very minor correction: attach()/detach() are not really for reference counting, that is handled with dma_buf_get()/dma_buf_put() (under the hood it is using 'struct file *' refcnting). Driver writers adding support for dmabuf should be sure to do a dma_buf_get() in their ioctl for importing the dmabuf, and keep the 'struct dma_buf *' ptr, rather than holding on to the file descriptor (int).

The attach()/detach() is really just advisory to the exporting driver to help it know the constraints of potentially multiple different devices that would be sharing the buffer. For example, a camera and encoder might share a single buffer w/ display/gpu.


to post comments

DMA buffer sharing in 3.3

Posted Jan 13, 2012 0:06 UTC (Fri) by jzbiciak (guest, #5246) [Link] (2 responses)

Not related to the article really... I think this is the first time I've noticed an AID here on LWN. :-)

(I'm also a TIer, but I'm here out of personal interest.)

DMA buffer sharing in 3.3

Posted Jan 13, 2012 2:55 UTC (Fri) by robclark (subscriber, #74945) [Link] (1 responses)

TI very kindly provides LWN subscription to employees, but I've no idea how to change my username to something other than my AID ;-)

Changing usernames

Posted Jan 13, 2012 3:01 UTC (Fri) by corbet (editor, #1) [Link]

Send us a note at lwn@lwn.net if you would like to change your account name; we can make that happen.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds