[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57927A64.6000307@osg.samsung.com>
Date: Fri, 22 Jul 2016 20:56:20 +0100
From: Luis de Bethencourt <luisbg@....samsung.com>
To: Javier Martinez Canillas <javier@....samsung.com>,
linux-kernel@...r.kernel.org
CC: Sakari Ailus <sakari.ailus@....fi>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Mauro Carvalho Chehab <mchehab@...pensource.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Pawel Osciak <pawel@...iak.com>, linux-media@...r.kernel.org,
Hans Verkuil <hverkuil@...all.nl>,
Shuah Khan <shuahkh@....samsung.com>
Subject: Re: [PATCH] [media] vb2: move dma-buf unmap from __vb2_dqbuf() to
vb2_buffer_done()
On 20/07/16 19:22, Javier Martinez Canillas wrote:
> Currently the dma-buf is unmapped when the buffer is dequeued by userspace
> but it's not used anymore after the driver finished processing the buffer.
>
> So instead of doing the dma-buf unmapping in __vb2_dqbuf(), it can be made
> in vb2_buffer_done() after the driver notified that buf processing is done.
>
> Decoupling the buffer dequeue from the dma-buf unmapping has also the side
> effect of making possible to add dma-buf fence support in the future since
> the buffer could be dequeued even before the driver has finished using it.
>
> Signed-off-by: Javier Martinez Canillas <javier@....samsung.com>
>
> ---
> Hello,
>
> I've tested this patch doing DMA buffer sharing between a
> vivid input and output device with both v4l2-ctl and gst:
>
> $ v4l2-ctl -d0 -e1 --stream-dmabuf --stream-out-mmap
> $ v4l2-ctl -d0 -e1 --stream-mmap --stream-out-dmabuf
> $ gst-launch-1.0 v4l2src device=/dev/video0 io-mode=dmabuf ! v4l2sink device=/dev/video1 io-mode=dmabuf-import
>
> And I didn't find any issues but more testing will be appreciated.
>
> Best regards,
> Javier
>
Hello all,
Tested this using the same GStreamer pipeline as Javier mentions above.
It works nicely.
Thanks,
Luis
Tested-by: Luis de Bethencourt <luisbg@....samsung.com>
Powered by blists - more mailing lists