Re: [PATCH] dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)

2016-08-29 Thread Gustavo Padovan
that also causes serialisation between threads. > > Signed-off-by: Chris Wilson > Cc: Sumit Semwal > Cc: Gustavo Padovan > Cc: linux-media@vger.kernel.org > Cc: dri-de...@lists.freedesktop.org > Cc: linaro-mm-...@lists.linaro.org > --- > drivers/dma-buf/sync_file.c | 3 ++- &g

Re: [PATCH] dma-buf/sw_sync: mark sync_timeline_create() static

2016-09-20 Thread Gustavo Padovan
t; declared and don't need a declaration, but can be made static. > So this patch marks it 'static'. > > Signed-off-by: Baoyou Xie > --- > drivers/dma-buf/sw_sync.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks for finding this. Reviewed-by: Gustavo

Re: [PATCH] dma-buf/sw_sync: mark sync_timeline_create() static

2016-09-25 Thread Gustavo Padovan
Hi Baoyou, 2016-09-22 Greg Kroah-Hartman : > On Tue, Sep 20, 2016 at 06:23:33PM +0530, Sumit Semwal wrote: > > Hi Baoyou, > > > > On 20 September 2016 at 16:43, Gustavo Padovan wrote: > > > 2016-09-18 Baoyou Xie : > > > > > >> We get 1 warnin

Re: [RFC PATCH 9/9] media: vim2m: add request support

2017-12-18 Thread Gustavo Padovan
Hi Alex, 2017-12-15 Alexandre Courbot : > Set the necessary ops for supporting requests in vim2m. > > Signed-off-by: Alexandre Courbot > --- > drivers/media/platform/vim2m.c | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/drivers/media/platform/vim2m.c b/drive

Re: [PATCH v6 0/6] V4L2 Explicit Synchronization

2017-12-21 Thread Gustavo Padovan
2017-12-21 Mauro Carvalho Chehab : > Em Mon, 11 Dec 2017 16:27:35 -0200 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > Hi, > > > > One more iteration of the explicit fences patches, please refer > > to the previous version[1] for

Re: [PATCH v6 1/6] [media] vb2: add is_unordered callback for drivers

2017-12-21 Thread Gustavo Padovan
2017-12-21 Mauro Carvalho Chehab : > Em Mon, 11 Dec 2017 16:27:36 -0200 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > Explicit synchronization benefits a lot from ordered queues, they fit > > better in a pipeline with DRM for example so cr

Re: [PATCH v6 3/6] [media] vb2: add explicit fence user API

2017-12-21 Thread Gustavo Padovan
2017-12-21 Mauro Carvalho Chehab : > Em Mon, 11 Dec 2017 16:27:38 -0200 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > Turn the reserved2 field into fence_fd that we will use to send > > an in-fence to the kernel and return an out-fence

Re: [PATCH v6 4/6] [media] vb2: add in-fence support to QBUF

2017-12-21 Thread Gustavo Padovan
2017-12-21 Mauro Carvalho Chehab : > Em Mon, 11 Dec 2017 16:27:39 -0200 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer to the driver. Buffers

[PATCH v7 0/6] V4L2 Explicit Synchronization

2018-01-10 Thread Gustavo Padovan
From: Gustavo Padovan Hi, v7 bring a fix for a crash when not using fences and a uAPI fix. I've done a bit more of testing on it and also measured some performance. On a intel laptop a DRM<->V4L2 pipeline with fences is runnning twice as faster than the same pipeline with no fences

[PATCH v7 4/6] [media] vb2: add in-fence support to QBUF

2018-01-10 Thread Gustavo Padovan
From: Gustavo Padovan Receive in-fence from userspace and add support for waiting on them before queueing the buffer to the driver. Buffers can't be queued to the driver before its fences signal. And a buffer can't be queue to the driver out of the order they were queued from users

[PATCH v7 5/6] [media] vb2: add out-fence support to QBUF

2018-01-10 Thread Gustavo Padovan
From: Gustavo Padovan If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create an out_fence and send its fd to userspace on the fence_fd field as a return arg for the QBUF call. The fence is signaled on buffer_done(), when the job on the buffer is finished. v8: - return 0

[PATCH v7 1/6] [media] vb2: add is_unordered callback for drivers

2018-01-10 Thread Gustavo Padovan
From: Gustavo Padovan Explicit synchronization benefits a lot from ordered queues, they fit better in a pipeline with DRM for example so create a opt-in way for drivers notify videobuf2 that the queue is unordered. Drivers don't need implement it if the queue is ordered. Signed-off-by: Gu

[PATCH v7 2/6] [media] v4l: add 'unordered' flag to format description ioctl

2018-01-10 Thread Gustavo Padovan
From: Gustavo Padovan For explicit synchronization it important for userspace to know if the format being used by the driver can deliver the buffers back to userspace in the same order they were queued with QBUF. Ordered streams fits nicely in a pipeline with DRM for example, where ordered

[PATCH v7 3/6] [media] vb2: add explicit fence user API

2018-01-10 Thread Gustavo Padovan
From: Gustavo Padovan Turn the reserved2 field into fence_fd that we will use to send an in-fence to the kernel and return an out-fence from the kernel to userspace. Two new flags were added, V4L2_BUF_FLAG_IN_FENCE, that should be used when sending a fence to the kernel to be waited on, and

[PATCH v7 6/6] [media] v4l: Document explicit synchronization behavior

2018-01-10 Thread Gustavo Padovan
From: Gustavo Padovan Add section to VIDIOC_QBUF about it v5: - Remove V4L2_CAP_ORDERED - Add doc about V4L2_FMT_FLAG_UNORDERED v4: - Document ordering behavior for in-fences - Document V4L2_CAP_ORDERED capability - Remove doc about OUT_FENCE event

Re: [PATCH v7 0/6] V4L2 Explicit Synchronization

2018-01-10 Thread Gustavo Padovan
2018-01-10 Nicolas Dufresne : > Le mercredi 10 janvier 2018 à 14:07 -0200, Gustavo Padovan a écrit : > > v7 bring a fix for a crash when not using fences and a uAPI fix. > > I've done a bit more of testing on it and also measured some > > performance. On a intel laptop

Re: [PATCH v7 1/6] [media] vb2: add is_unordered callback for drivers

2018-01-15 Thread Gustavo Padovan
2018-01-15 Alexandre Courbot : > On Thu, Jan 11, 2018 at 1:07 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Explicit synchronization benefits a lot from ordered queues, they fit > > better in a pipeline with DRM for example so create a opt-in way for &

Re: [PATCH v7 1/6] [media] vb2: add is_unordered callback for drivers

2018-01-15 Thread Gustavo Padovan
2018-01-15 Hans Verkuil : > On 01/15/2018 01:01 PM, Gustavo Padovan wrote: > > 2018-01-15 Alexandre Courbot : > > > >> On Thu, Jan 11, 2018 at 1:07 AM, Gustavo Padovan > >> wrote: > >>> From: Gustavo Padovan > >>> > >>>

Re: [PATCH v7 4/6] [media] vb2: add in-fence support to QBUF

2018-01-18 Thread Gustavo Padovan
Hi Hans, 2018-01-12 Hans Verkuil : > On 01/10/18 17:07, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer to the driver. Buffers can't be queued to the >

Re: [PATCH v7 5/6] [media] vb2: add out-fence support to QBUF

2018-01-19 Thread Gustavo Padovan
2018-01-12 Hans Verkuil : > On 01/10/18 17:07, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create > > an out_fence and send its fd to userspace on the fence_fd field as a > > return ar

Re: [PATCH v7 5/6] [media] vb2: add out-fence support to QBUF

2018-01-19 Thread Gustavo Padovan
2018-01-15 Alexandre Courbot : > On Thu, Jan 11, 2018 at 1:07 AM, Gustavo Padovan wrote: > > /* > > * vb2_start_streaming() - Attempt to start streaming. > > * @q: videobuf2 queue > > @@ -1489,18 +1562,16 @@ int vb2_core_qbuf(struct vb2_queue *q, unsign

[PATCH] [media] buffer.rst: fix link text of VIDIOC_QBUF

2018-01-22 Thread Gustavo Padovan
From: Gustavo Padovan The link was showing both VIDIOC_QBUF, VIDIOC_DQBUF while it should show only VIDIOC_QBUF in this case. Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l/buffer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/media/uapi

Re: [PATCH v9 11/15] vb2: add in-fence support to QBUF

2018-05-08 Thread Gustavo Padovan
Hi Hans, On Mon, 2018-05-07 at 14:07 +0200, Hans Verkuil wrote: > On 04/05/18 22:06, Ezequiel Garcia wrote: > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer to the driver. Buffers

Re: [PATCH] dma-fence: Make dma_fence_add_callback() fail if signaled with error

2018-05-09 Thread Gustavo Padovan
Hi Ezequiel, On Wed, 2018-05-09 at 17:14 -0300, Ezequiel Garcia wrote: > Change how dma_fence_add_callback() behaves, when the fence > has error-signaled by the time it is being add. After this commit, > dma_fence_add_callback() returns the fence error, if it > has error-signaled before dma_fence_

Re: [RESEND] fence: add missing descriptions for fence

2016-04-11 Thread Gustavo Padovan
ethencourt > Reviewed-by: Javier Martinez Canillas > --- > Hi, > > Just resending this patch since it hasn't had any reviews in since > March 21st. > > Thanks, > Luis > > include/linux/fence.h | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Gustav

Re: [RFC 00/10] V4L2 explicit synchronization support

2017-06-08 Thread Gustavo Padovan
Hi Mauro, 2017-06-08 Mauro Carvalho Chehab : > Hi Gustavo, > > Em Wed, 24 May 2017 21:31:01 -0300 > Gustavo Padovan escreveu: > > > Hi all, > > > > I've been working on the v2 of this series, but I think I hit a blocker > > when trying to cover t

Re: [RFC 00/10] V4L2 explicit synchronization support

2017-06-08 Thread Gustavo Padovan
2017-06-08 Shuah Khan : > Hi Gustavo, > > On Thu, Jun 8, 2017 at 2:17 PM, Mauro Carvalho Chehab > wrote: > > Hi Gustavo, > > > > Em Wed, 24 May 2017 21:31:01 -0300 > > Gustavo Padovan escreveu: > > > >> Hi all, > >> > >> I&

[PATCH 02/12] [media] vb2: split out queueing from vb_core_qbuf()

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan In order to support explicit synchronization we need to divide vb2_core_qbuf() in two parts, one to be executed before the fence signals and another one to do the actual queueing of the buffer. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/videobuf2-core.c

[PATCH 01/12] [media] vb2: add explicit fence user API

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Turn the reserved2 field into fence_fd that we will use to send an in-fence to the kernel and return an out-fence from the kernel to userspace. Two new flags were added, V4L2_BUF_FLAG_IN_FENCE, that should be used when sending a fence to the kernel to be waited on, and

[PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Receive in-fence from userspace and add support for waiting on them before queueing the buffer to the driver. Buffers are only queued to the driver once they are ready. A buffer is ready when its in-fence signals. v2: - fix vb2_queue_or_prepare_buf() ret check

[PATCH 05/12] [media] vivid: assign the specific device to the vb2_queue->dev

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Instead of assigning the global v4l2 device, assign the specific device. This was causing trouble when using using V4L2 events with vivid devices. The device's queue should be the same we opened in userspace. Signed-off-by: Gustavo Padovan --- drivers/media/pla

[PATCH 06/12] [media] v4l: add V4L2_EVENT_BUF_QUEUED event

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Add a new event the userspace can subscribe to receive notifications when a buffer is queued onto the driver. The event provides the index of the queued buffer. Signed-off-by: Gustavo Padovan --- include/uapi/linux/videodev2.h | 6 ++ 1 file changed, 6 insertions

[PATCH 08/12] [media] vb2: add 'ordered' property to queues

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan For explicit synchronization (and soon for HAL3/Request API) we need the v4l2-driver to guarantee the ordering which the buffer were queued by userspace. This is already true for many drivers, but we never had the need to say it. Signed-off-by: Gustavo Padovan

[PATCH 00/12] V4L2 explicit synchronization support

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This adds support for Explicit Synchronization of shared buffers in V4L2. It uses the Sync File Framework[1] as vector to communicate the fences between kernel and userspace. Explicit Synchronization allows us to control the synchronization of shared buffers from

[PATCH 04/12] [media] uvc: enable subscriptions to other events

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Call v4l2_ctrl_subscribe_event to subscribe to more events supported by v4l. Signed-off-by: Gustavo Padovan --- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc

[PATCH 11/12] [media] vb2: add infrastructure to support out-fences

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/videobuf2-core.c | 31 +++ include/media/videobuf2-core.h | 5 + 2 files changed, 36 insertions

[PATCH 10/12] [media] vb2: add videobuf2 dma-buf fence helpers

2017-06-16 Thread Gustavo Padovan
From: Javier Martinez Canillas Add a videobuf2-fence.h header file that contains different helpers for DMA buffer sharing explicit fence support in videobuf2. Signed-off-by: Javier Martinez Canillas Signed-off-by: Gustavo Padovan --- include/media/videobuf2-fence.h | 49

[PATCH 07/12] [media] v4l: add support to BUF_QUEUED event

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan Implement the needed pieces to let userspace subscribe for V4L2_EVENT_BUF_QUEUED events. Videobuf2 will queue the event for the DQEVENT ioctl. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/v4l2-ctrls.c | 6 +- drivers/media/v4l2-core/videobuf2

[PATCH 12/12] [media] vb2: add out-fence support to QBUF

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create an out_fence for the buffer and return it to userspace on the fence_fd field. It only works with ordered queues. The fence is signaled on buffer_done(), when the job on the buffer is finished. v2: check

[PATCH 09/12] [media] vivid: mark vivid queues as ordered

2017-06-16 Thread Gustavo Padovan
From: Gustavo Padovan To enable vivid to be used with explicit synchronization we need to mark its queues as ordered. Signed-off-by: Gustavo Padovan --- drivers/media/platform/vivid/vivid-core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/vivid/vivid-core.c

Re: [PATCH 08/12] [media] vb2: add 'ordered' property to queues

2017-06-26 Thread Gustavo Padovan
Hi Nicolas, 2017-06-16 Nicolas Dufresne : > Le vendredi 16 juin 2017 à 16:39 +0900, Gustavo Padovan a écrit : > > > From: Gustavo Padovan > > > > For explicit synchronization (and soon for HAL3/Request API) we need > > the v4l2-driver to guarantee the orderin

Re: [PATCH 01/12] [media] vb2: add explicit fence user API

2017-06-26 Thread Gustavo Padovan
https://github.com/0day-ci/linux/commits/Gustavo-Padovan/vb2-add-explicit-fence-user-API/20170618-210740 > base: git://linuxtv.org/media_tree.git master > config: x86_64-allmodconfig (attached as .config) > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > reproduce: >

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-03 Thread Gustavo Padovan
Hi Mauro, 2017-06-30 Mauro Carvalho Chehab : > Em Fri, 16 Jun 2017 16:39:06 +0900 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer to the drive

Re: [PATCH 07/12] [media] v4l: add support to BUF_QUEUED event

2017-07-03 Thread Gustavo Padovan
Hi Mauro, 2017-06-30 Mauro Carvalho Chehab : > Em Fri, 16 Jun 2017 16:39:10 +0900 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > Implement the needed pieces to let userspace subscribe for > > V4L2_EVENT_BUF_QUEUED events. Videobuf2 will qu

Re: [PATCH 00/12] V4L2 explicit synchronization support

2017-07-03 Thread Gustavo Padovan
Hi Mauro, 2017-06-30 Mauro Carvalho Chehab : > Em Fri, 16 Jun 2017 16:39:03 +0900 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > Hi, > > > > This adds support for Explicit Synchronization of shared buffers in V4L2. > > It

Re: [PATCH 02/12] [media] vb2: split out queueing from vb_core_qbuf()

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil : > On 06/16/17 09:39, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > In order to support explicit synchronization we need to divide > > vb2_core_qbuf() in two parts, one to be executed before the fence > > signals and another

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil : > On 07/03/17 20:16, Gustavo Padovan wrote: > >>> @@ -1436,6 +1481,11 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned > >>> int index, void *pb) > >>> if (pb) > >>> call_void_bufop(q, fill_user_bu

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil : > On 06/16/17 09:39, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer to the driver. Buffers are only queued > > to the driver

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil : > On 06/16/17 09:39, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer to the driver. Buffers are only queued > > to the driver

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-10 Thread Gustavo Padovan
2017-07-07 Hans Verkuil : > On 07/07/2017 04:00 AM, Gustavo Padovan wrote: > > 2017-07-06 Hans Verkuil : > > > > > On 06/16/17 09:39, Gustavo Padovan wrote: > > > > From: Gustavo Padovan > > > > > > > > Receive in-fence from userspace

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-10 Thread Gustavo Padovan
2017-07-07 Hans Verkuil : > On 07/07/2017 03:53 AM, Gustavo Padovan wrote: > > > > > > > help > > > > If you want to use Webcams, Video grabber devices and/or TV > > > > devices > > > > enable this option

Re: [PATCH 05/12] [media] vivid: assign the specific device to the vb2_queue->dev

2017-07-10 Thread Gustavo Padovan
2017-07-07 Shuah Khan : > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Instead of assigning the global v4l2 device, assign the specific device. > > This was causing trouble when using using V4L2 events with vivid > > devices.

Re: [PATCH 04/12] [media] uvc: enable subscriptions to other events

2017-07-10 Thread Gustavo Padovan
2017-07-07 Shuah Khan : > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Call v4l2_ctrl_subscribe_event to subscribe to more events supported by > > v4l. > > > > Signed-off-by: Gustavo Padovan > > --- > >

Re: [PATCH 07/12] [media] v4l: add support to BUF_QUEUED event

2017-07-10 Thread Gustavo Padovan
2017-07-06 Hans Verkuil : > On 06/30/17 14:04, Mauro Carvalho Chehab wrote: > > Em Fri, 16 Jun 2017 16:39:10 +0900 > > Gustavo Padovan escreveu: > > > >> From: Gustavo Padovan > >> > >> Implement the needed pieces to let userspace subscribe for &

Re: [PATCH 09/12] [media] vivid: mark vivid queues as ordered

2017-07-10 Thread Gustavo Padovan
2017-07-07 Shuah Khan : > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > To enable vivid to be used with explicit synchronization we need > > to mark its queues as ordered. > > > > Signed-off-by: Gustavo Padovan > >

Re: [PATCH 12/12] [media] vb2: add out-fence support to QBUF

2017-07-10 Thread Gustavo Padovan
2017-07-06 Hans Verkuil : > On 06/16/17 09:39, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create > > an out_fence for the buffer and return it to userspace on the fence_fd > > field.

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-10 Thread Gustavo Padovan
2017-07-10 Gustavo Padovan : > 2017-07-07 Hans Verkuil : > > > On 07/07/2017 04:00 AM, Gustavo Padovan wrote: > > > 2017-07-06 Hans Verkuil : > > > > > > > On 06/16/17 09:39, Gustavo Padovan wrote: > > > > > From: Gustavo Padovan >

Re: [PATCH 03/12] [media] vb2: add in-fence support to QBUF

2017-07-11 Thread Gustavo Padovan
2017-07-11 Hans Verkuil : > On 10/07/17 22:26, Gustavo Padovan wrote: > > 2017-07-10 Gustavo Padovan : > > > >> 2017-07-07 Hans Verkuil : > >> > >>> On 07/07/2017 04:00 AM, Gustavo Padovan wrote: > >>>> 2017-07-06 Hans Verku

[PATCH v8 06/13] [media] cobalt: add .is_unordered() for cobalt

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan The cobalt driver may reorder the capture buffers so we need to report it as such. v2: - use vb2_ops_set_unordered() helper Signed-off-by: Gustavo Padovan --- drivers/media/pci/cobalt/cobalt-v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/pci

[PATCH v8 13/13] [media] v4l: Document explicit synchronization behavior

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Add section to VIDIOC_QBUF and VIDIOC_QUERY_BUF about it v6: - Close some gaps in the docs (Hans) v5: - Remove V4L2_CAP_ORDERED - Add doc about V4L2_FMT_FLAG_UNORDERED v4: - Document ordering behavior for in-fences - Document

[PATCH v8 10/13] [media] vb2: add out-fence support to QBUF

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create an out_fence and send its fd to userspace on the fence_fd field as a return arg for the QBUF call. The fence is signaled on buffer_done(), when the job on the buffer is finished. v9: - remove in

[PATCH v8 12/13] [media] v4l: Add V4L2_CAP_FENCES to drivers

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Drivers that use videobuf2 are capable of using fences and should report that to userspace. The coding style is following what each drivers was already doing. Signed-off-by: Gustavo Padovan --- drivers/media/pci/cobalt/cobalt-v4l2.c | 3 ++- drivers/media

[PATCH v8 09/13] [media] vb2: add in-fence support to QBUF

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Receive in-fence from userspace and add support for waiting on them before queueing the buffer to the driver. Buffers can't be queued to the driver before its fences signal. And a buffer can't be queue to the driver out of the order they were queued from users

[PATCH v8 11/13] [media] v4l: introduce the fences capability

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Drivers capable of using fences (vb2 drivers) should report the V4L2_CAP_FENCES to userspace, so add this flag to the uapi. Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l/vidioc-querycap.rst | 3 +++ include/uapi/linux/videodev2.h | 1

[PATCH v8 08/13] [media] vb2: add explicit fence user API

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Turn the reserved2 field into fence_fd that we will use to send an in-fence to the kernel or return an out-fence from the kernel to userspace. Two new flags were added, V4L2_BUF_FLAG_IN_FENCE, that should be used when sending a fence to the kernel to be waited on, and

[PATCH v8 05/13] [media] v4l: add 'unordered' flag to format description ioctl

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan For explicit synchronization it important for userspace to know if the format being used by the driver can deliver the buffers back to userspace in the same order they were queued with QBUF. Ordered streams fits nicely in a pipeline with DRM for example, where ordered

[PATCH v8 07/13] [media] vb2: mark codec drivers as unordered

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan In preparation to have full support to explicit fence we are marking codec as non-ordered preventively. It is easier and safer from an uAPI point of view to move from unordered to ordered than the opposite. Signed-off-by: Gustavo Padovan --- drivers/media/platform/coda

[PATCH v8 04/13] [media] vb2: add is_unordered callback for drivers

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Explicit synchronization benefits a lot from ordered queues, they fit better in a pipeline with DRM for example so create a opt-in way for drivers notify videobuf2 that the queue is unordered. Drivers don't need implement it if the queue is ordered. v2: - im

[PATCH v8 02/13] [media] hackrf: group device capabilities

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Instead of putting V4L2_CAP_STREAMING and V4L2_CAP_READWRITE everywhere, set device_caps earlier with these values. Signed-off-by: Gustavo Padovan --- drivers/media/usb/hackrf/hackrf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a

[PATCH v8 03/13] [media] omap3isp: group device capabilities

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Instead of putting V4L2_CAP_STREAMING everywhere, set device_caps earlier with this value. Signed-off-by: Gustavo Padovan --- drivers/media/platform/omap3isp/ispvideo.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform

[PATCH v8 01/13] [media] xilinx: regroup caps on querycap

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan To better organize the code we concentrate the setting of V4L2_CAP_STREAMING in one place. Signed-off-by: Gustavo Padovan --- drivers/media/platform/xilinx/xilinx-dma.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform

[PATCH v8 00/13] V4L2 Explicit Synchronization

2018-03-09 Thread Gustavo Padovan
From: Gustavo Padovan Hi, So v8 is finally out addressing the comments from the previous version[1]. For more info see v5 cover letter[2]. The most important points I address here is the handling of fences that signal with error to follow Hans suggestion. I also added V4L2_CAP_FENCES to all vb2

[PATCH 5/6] [media] vivid: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this fuction to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/platform/vivid/vivid-vid-out.c | 4 +--- 1 file

[PATCH 4/6] [media] tw5864: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/pci/tw5864/tw5864-video.c | 5 ++--- 1 file

[PATCH 3/6] [media] solo6x10: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move the function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 5 ++--- 1 file

[PATCH 2/6] [media] ivtv: improve subscribe_event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan Simplify logic and call v4l2_ctrl_subscribe_event() directly instead of copying its content over to ivtv_subscribe_event(). Signed-off-by: Gustavo Padovan --- drivers/media/pci/ivtv/ivtv-ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[PATCH 1/6] [media] vb2: only check ret if we assigned it

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan Move the ret check to the right level under if (pb). It is not used by the code before that point if pb is NULL. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/videobuf2-core.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a

[PATCH 6/6] [media] go7007: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan --- drivers/media/usb/go7007/go7007-v4l2.c | 5 ++--- 1 file changed

[RFC 00/10] V4L2 explicit synchronization support

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Hi, This RFC adds support for Explicit Synchronization of shared buffers in V4L2. It uses the Sync File Framework[1] as vector to communicate the fences between kernel and userspace. I'm sending this to start the discussion on the best approach to implement Exp

[RFC 06/10] [media] v4l: add V4L2_EVENT_BUF_QUEUED event

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Add a new event the userspace can subscribe to receive notifications about when a buffer was enqueued onto the driver. The event provides the index of the enqueued buffer. Signed-off-by: Gustavo Padovan --- include/uapi/linux/videodev2.h | 6 ++ 1 file changed, 6

[RFC 05/10] [media] vivid: assign the specific device to the vb2_queue->dev

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Instead of assign the global v4l2 device assigned the specific device, this was causing trouble when using using V4L2 events with vivid devices. The queue device should be the same one we opened in userspace. Signed-off-by: Gustavo Padovan --- drivers/media/platform

[RFC 09/10] [media] vb2: add infrastructure to support out-fences

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/videobuf2-core.c | 31 +++ include/media/videobuf2-core.h | 5 + 2 files changed, 36 insertions

[RFC 07/10] [media] v4l: add support to BUF_QUEUED event

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Implement the needed pieces to let userspace subscribe for V4L2_EVENT_BUF_QUEUED events. Videobuf2 will queue the event for the DQEVENT ioctl. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/v4l2-ctrls.c | 6 +- drivers/media/v4l2-core/videobuf2

[RFC 08/10] [media] vb2: add videobuf2 dma-buf fence helpers

2017-03-13 Thread Gustavo Padovan
From: Javier Martinez Canillas Add a videobuf2-fence.h header file that contains different helpers for DMA buffer sharing explicit fence support in videobuf2. Signed-off-by: Javier Martinez Canillas Signed-off-by: Gustavo Padovan --- include/media/videobuf2-fence.h | 49

[RFC 04/10] [media] uvc: enable subscriptions to other events

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Call v4l2_ctrl_subscribe_event to subscribe to more events supported by v4l. Signed-off-by: Gustavo Padovan --- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc

[RFC 02/10] [media] vb2: split out queueing from vb_core_qbuf()

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan In order to support explicit synchronization we need to divide vb2_core_qbuf() in two parts one, to be executed before the fence signals and another one after that, to do the actual queueing of the buffer. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core

[RFC 10/10] [media] vb2: add out-fence support to QBUF

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create an out_fence for the buffer and return it to userspace on the fence_fd field. The fence is signaled on buffer_done(), when the job on the buffer is finished. TODO: clean up on __vb2_queue_cancel

[RFC 03/10] [media] vb2: add in-fence support to QBUF

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Receive in-fence from userspace and support for waiting on them before queueing the buffer for the driver. Signed-off-by: Gustavo Padovan --- drivers/media/Kconfig| 1 + drivers/media/v4l2-core/videobuf2-core.c | 24 drivers

[RFC 01/10] [media] vb2: add explicit fence user API

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan Turn the reserved2 field into fence_fd that we will use to send an in-fence to the kernel return an out-fence from the kernel to userspace. Two new flags were added, V4L2_BUF_FLAG_IN_FENCE and V4L2_BUF_FLAG_OUT_FENCE. They should be used when setting in-fence and out-fence

Re: [PATCH] dma-buf: fence debugging

2017-03-31 Thread Gustavo Padovan
Hi Russell, 2017-03-31 Russell King : > Add debugfs output to report shared and exclusive fences on a dma_buf > object. This produces output such as: > > Dma-buf Objects: > sizeflags modecount exp_name > 0829440000050005drm > E

Re: [RFC 01/10] [media] vb2: add explicit fence user API

2017-04-05 Thread Gustavo Padovan
Hi Philipp, 2017-04-03 Philipp Zabel : > Hi Gustavo, > > On Mon, 2017-03-13 at 16:20 -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Turn the reserved2 field into fence_fd that we will use to send > > an in-fence to the kernel retur

Re: [RFC 00/10] V4L2 explicit synchronization support

2017-04-05 Thread Gustavo Padovan
2017-04-03 Javier Martinez Canillas : > Hello Mauro and Gustavo, > > On 04/03/2017 07:16 AM, Mauro Carvalho Chehab wrote: > > Hi Gustavo, > > > > Em Mon, 13 Mar 2017 16:20:25 -0300 > > Gustavo Padovan escreveu: > > > >> From: Gustavo Padovan &

Re: [RFC 00/10] V4L2 explicit synchronization support

2017-04-05 Thread Gustavo Padovan
Hi Sakari, 2017-04-04 Sakari Ailus : > Hi Gustavo, > > Thank you for the patchset. Please see my comments below. > > On Mon, Mar 13, 2017 at 04:20:25PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Hi, > > > > This RFC adds s

Re: [RFC 00/10] V4L2 explicit synchronization support

2017-04-06 Thread Gustavo Padovan
Hi Javier, 2017-04-05 Javier Martinez Canillas : > Hello Gustavo, > > On 04/05/2017 11:09 AM, Gustavo Padovan wrote: > > 2017-04-03 Javier Martinez Canillas : > > > >> Hello Mauro and Gustavo, > >> > >> On 04/03/2017 07:16 AM, Mauro Carvalho Ch

Re: [PATCH v3 01/15] [media] v4l: Document explicit synchronization behaviour

2017-09-11 Thread Gustavo Padovan
2017-09-11 Hans Verkuil : > On 09/11/2017 12:50 PM, Hans Verkuil wrote: > > On 09/07/2017 08:42 PM, Gustavo Padovan wrote: > >> From: Gustavo Padovan > >> > >> Add section to VIDIOC_QBUF about it > >> > >> v2: > >>- mentio

Re: [PATCH v3 01/15] [media] v4l: Document explicit synchronization behaviour

2017-09-11 Thread Gustavo Padovan
2017-09-11 Hans Verkuil : > On 09/11/2017 03:18 PM, Gustavo Padovan wrote: > > 2017-09-11 Hans Verkuil : > > > >> On 09/11/2017 12:50 PM, Hans Verkuil wrote: > >>> On 09/07/2017 08:42 PM, Gustavo Padovan wrote: > >>>> From: Gustavo Padovan

Re: [ANN] Call for topics for the media mini-summit on Friday Oct 27 in Prague

2017-10-04 Thread Gustavo Padovan
Hi Hans, On Fri, Sep 1, 2017 at 6:46 AM, Hans Verkuil wrote: > Hi all, > > We are organizing a media mini-summit on Friday October 27 in Prague, > co-located > with the ELCE conference: > > http://events.linuxfoundation.org/events/embedded-linux-conference-europe > > This is a call for topics

Re: [PATCH v3 00/15] V4L2 Explicit Synchronization support

2017-10-04 Thread Gustavo Padovan
Hi Brian, On Mon, 2017-10-02 at 14:41 +0100, Brian Starkey wrote: > Hi Gustavo, > > On Thu, Sep 07, 2017 at 03:42:11PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Hi, > > > > Refer to the documentation on the first patch for the det

Re: [PATCH v3 02/15] [media] vb2: add explicit fence user API

2017-10-04 Thread Gustavo Padovan
On Mon, 2017-10-02 at 14:42 +0100, Brian Starkey wrote: > Hi, > > On Thu, Sep 07, 2017 at 03:42:13PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Turn the reserved2 field into fence_fd that we will use to send > > an in-fence to the kernel

Re: [PATCH v3 10/15] [media] vb2: add 'ordered' property to queues

2017-10-04 Thread Gustavo Padovan
On Mon, 2017-10-02 at 14:43 +0100, Brian Starkey wrote: > Hi, > > On Thu, Sep 07, 2017 at 03:42:21PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > For explicit synchronization (and soon for HAL3/Request API) we > > need > > the v4l2-dr

  1   2   3   >