[PATCHv2 3/9] v4l: add buffer exporting via dmabuf
Rémi Denis-Courmont
remi at remlab.net
Tue Jul 31 06:39:00 PDT 2012
Le mardi 31 juillet 2012 14:56:14 Laurent Pinchart, vous avez écrit :
> > For that matter, wouldn't it be useful to support exporting a userptr
> > buffer at some point in the future?
>
> Shouldn't USERPTR usage be discouraged once we get dma-buf support ?
USERPTR, where available, is currently the only way to perform zero-copy from
kernel to userspace. READWRITE does not support zero-copy at all. MMAP only
supports zero-copy if userspace knows a boundary on the number of concurrent
buffers *and* the device can deal with that number of buffers; in general,
MMAP requires memory copying.
I am not sure DMABUF even supports transmitting data efficiently to userspace.
In my understanding, it's meant for transmitting data between DSP's bypassing
userspace entirely, in other words the exact opposite of what USERBUF does.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the dri-devel
mailing list