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 14/15] fs/files: export close_fd() symbol

2017-09-07 Thread Gustavo Padovan
On Fri, 2017-09-08 at 00:09 +0200, Hans Verkuil wrote: > On 09/07/2017 08:42 PM, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Rename __close_fd() to close_fd() and export it to be able close > > files >

Re: [PATCH v3 14/15] fs/files: export close_fd() symbol

2017-09-07 Thread Gustavo Padovan
On Fri, 2017-09-08 at 00:09 +0200, Hans Verkuil wrote: > On 09/07/2017 08:42 PM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Rename __close_fd() to close_fd() and export it to be able close > > files > > in modules using file descriptors. &g

Re: [PATCH v3 14/15] fs/files: export close_fd() symbol

2017-09-07 Thread Gustavo Padovan
2017-09-07 Al Viro <v...@zeniv.linux.org.uk>: > On Thu, Sep 07, 2017 at 03:42:25PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Rename __close_fd() to close_fd() and export it to be able close files >

Re: [PATCH v3 14/15] fs/files: export close_fd() symbol

2017-09-07 Thread Gustavo Padovan
2017-09-07 Al Viro : > On Thu, Sep 07, 2017 at 03:42:25PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Rename __close_fd() to close_fd() and export it to be able close files > > in modules using file descriptors. > > > > The usecase tha

[PATCH v3 03/15] [media] vb2: check earlier if stream can be started

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> To support explicit synchronization we need to run all operations that can fail before we queue the buffer to the driver. With fences the queueing will be delayed if the fence is not signaled yet and it will be better if such callb

[PATCH v3 03/15] [media] vb2: check earlier if stream can be started

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan To support explicit synchronization we need to run all operations that can fail before we queue the buffer to the driver. With fences the queueing will be delayed if the fence is not signaled yet and it will be better if such callback do not fail. For that we move

[PATCH v3 05/15] [media] uvc: enable subscriptions to other events

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Call v4l2_ctrl_subscribe_event to subscribe to the BUF_QUEUED event as well. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v3 05/15] [media] uvc: enable subscriptions to other events

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan Call v4l2_ctrl_subscribe_event to subscribe to the BUF_QUEUED event as well. 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 v3 07/15] [media] v4l: add V4L2_EVENT_BUF_QUEUED event

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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. v2: - Add missing Documentation (Mauro) Signed-off-by: Gustavo P

[PATCH v3 09/15] [media] v4l: add support to BUF_QUEUED event

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Implement the needed pieces to let userspace subscribe for V4L2_EVENT_BUF_QUEUED events. Videobuf2 will queue the event for the DQEVENT ioctl. v3: - Do not call v4l2 event API from vb2 (Mauro) v2: - Use VIDEO_MAX_FRAME to al

[PATCH v3 09/15] [media] v4l: add support to BUF_QUEUED event

2017-09-07 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. v3: - Do not call v4l2 event API from vb2 (Mauro) v2: - Use VIDEO_MAX_FRAME to allocate room for events

[PATCH v3 07/15] [media] v4l: add V4L2_EVENT_BUF_QUEUED event

2017-09-07 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. v2: - Add missing Documentation (Mauro) Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l

[PATCH v3 11/15] [media] vivid: mark vivid queues as ordered

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> To enable vivid to be used with explicit synchronization we need to mark its queues as ordered. vivid queues are already ordered by default so we no changes are needed. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.c

[PATCH v3 11/15] [media] vivid: mark vivid queues as ordered

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan To enable vivid to be used with explicit synchronization we need to mark its queues as ordered. vivid queues are already ordered by default so we no changes are needed. Signed-off-by: Gustavo Padovan Acked-by: Hans Verkuil --- drivers/media/platform/vivid/vivid-core.c

[PATCH v3 13/15] [media] vb2: add infrastructure to support out-fences

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- drivers/media/v4l2-core/videobuf2-core.c | 55 include/med

[PATCH v3 13/15] [media] vb2: add infrastructure to support out-fences

2017-09-07 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 | 55 include/media/videobuf2-core.h | 34 2 files changed

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

2017-09-07 Thread Gustavo Padovan
From: Javier Martinez Canillas <jav...@osg.samsung.com> 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 <jav...@osg.samsung.com> Signed-off-by: Gustavo Padovan &

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

2017-09-07 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 v3 08/15] [media] vb2: add .buffer_queued() to notify queueing in the driver

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> With the upcoming explicit synchronization support to V4L2 we need a way to notify userspace when buffers are queued to the driver - buffers with fences attached to it can only be queued once the fence signal, so the queueing to the

[PATCH v3 08/15] [media] vb2: add .buffer_queued() to notify queueing in the driver

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan With the upcoming explicit synchronization support to V4L2 we need a way to notify userspace when buffers are queued to the driver - buffers with fences attached to it can only be queued once the fence signal, so the queueing to the driver might be deferred. Yet, userspace

[PATCH v3 14/15] fs/files: export close_fd() symbol

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Rename __close_fd() to close_fd() and export it to be able close files in modules using file descriptors. The usecase that motivates this change happens in V4L2 where we send events to userspace with a fd that has file ins

[PATCH v3 14/15] fs/files: export close_fd() symbol

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan Rename __close_fd() to close_fd() and export it to be able close files in modules using file descriptors. The usecase that motivates this change happens in V4L2 where we send events to userspace with a fd that has file installed in it. But if for some reason we have

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

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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

[PATCH v3 04/15] [media] vb2: add in-fence support to QBUF

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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. v4: - Add a c

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

2017-09-07 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

[PATCH v3 04/15] [media] vb2: add in-fence support to QBUF

2017-09-07 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. v4: - Add a comment about dma_fence_add_callback

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

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> For explicit synchronization (and soon for HAL3/Request API) we need the v4l2-driver to guarantee the ordering in which the buffers were queued by userspace. This is already true for many drivers, but we never needed to say it. Sign

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

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create an out_fence and sent to userspace on the V4L2_EVENT_BUF_QUEUED when the buffer is queued to the driver. The out fence fd returned references the next buffer to be

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

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

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

2017-09-07 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 sent to userspace on the V4L2_EVENT_BUF_QUEUED when the buffer is queued to the driver. The out fence fd returned references the next buffer to be queued to the driver and not the buffer

[PATCH v3 06/15] [media] vivid: assign the specific device to the vb2_queue->dev

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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. This is needed for the up

[PATCH v3 06/15] [media] vivid: assign the specific device to the vb2_queue->dev

2017-09-07 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. This is needed for the upcoming V4L2_EVENT_BUF_QUEUED support

[PATCH v3 00/15] V4L2 Explicit Synchronization support

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Hi, Refer to the documentation on the first patch for the details. The previous iteration is here: https://www.mail-archive.com/linux-media@vger.kernel.org/msg118077.html The 2nd patch proposes an userspace API for fences, then on p

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

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Add section to VIDIOC_QBUF about it v2: - mention that fences are files (Hans) - rework for the new API Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- Documentation/media/uapi/v4l/vidioc-q

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

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan Add section to VIDIOC_QBUF about it v2: - mention that fences are files (Hans) - rework for the new API Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 31 1 file changed, 31 insertions

[PATCH v3 00/15] V4L2 Explicit Synchronization support

2017-09-07 Thread Gustavo Padovan
From: Gustavo Padovan Hi, Refer to the documentation on the first patch for the details. The previous iteration is here: https://www.mail-archive.com/linux-media@vger.kernel.org/msg118077.html The 2nd patch proposes an userspace API for fences, then on patch 3 we prepare to the addition

Re: [PATCH 0/3] selftests: sync test conversion to TAP13

2017-07-28 Thread Gustavo Padovan
_test.c | 71 +- > -- >  tools/testing/selftests/sync/synctest.h  |  3 +- >  3 files changed, 58 insertions(+), 26 deletions(-) All looks good to me, so for the 3 patches: Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.com> Gustavo -- Gustavo Padovan Collabora Ltd.

Re: [PATCH 0/3] selftests: sync test conversion to TAP13

2017-07-28 Thread Gustavo Padovan
_test.c | 71 +- > -- >  tools/testing/selftests/sync/synctest.h  |  3 +- >  3 files changed, 58 insertions(+), 26 deletions(-) All looks good to me, so for the 3 patches: Reviewed-by: Gustavo Padovan Gustavo -- Gustavo Padovan Collabora Ltd.

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

2017-06-09 Thread Gustavo Padovan
2017-06-08 Shuah Khan <shuahk...@gmail.com>: > Hi Gustavo, > > On Thu, Jun 8, 2017 at 2:17 PM, Mauro Carvalho Chehab > <mche...@osg.samsung.com> wrote: > > Hi Gustavo, > > > > Em Wed, 24 May 2017 21:31:01 -0300 > > Gustavo Padovan <gust...@pad

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

2017-06-09 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'

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

2017-06-09 Thread Gustavo Padovan
Hi Mauro, 2017-06-08 Mauro Carvalho Chehab <mche...@osg.samsung.com>: > Hi Gustavo, > > Em Wed, 24 May 2017 21:31:01 -0300 > Gustavo Padovan <gust...@padovan.org> escreveu: > > > Hi all, > > > > I've been working on the v2 of this series, but I t

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

2017-06-09 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 th

Re: [PATCH] selftests: sync: Skip the test if kernel support is not found

2017-05-31 Thread Gustavo Padovan
} > + > int main(void) > { > int err = 0; > > + if (!sync_api_supported()) { > + printf("SKIP: Sync framework not supported by kernel\n"); > + return 0; > + } > + > printf("[RUN]\tTesting sync framework\n"); > > err += RUN_TEST(test_alloc_timeline); > Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.com> -- Gustavo Padovan Collabora Ltd.

Re: [PATCH] selftests: sync: Skip the test if kernel support is not found

2017-05-31 Thread Gustavo Padovan
t; { > int err = 0; > > + if (!sync_api_supported()) { > + printf("SKIP: Sync framework not supported by kernel\n"); > + return 0; > + } > + > printf("[RUN]\tTesting sync framework\n"); > > err += RUN_TEST(test_alloc_timeline); > Reviewed-by: Gustavo Padovan -- Gustavo Padovan Collabora Ltd.

Re: [PATCH 20/29] sync_file.txt: standardize document format

2017-05-24 Thread Gustavo Padovan
Hi Mauro, 2017-05-18 Mauro Carvalho Chehab : > Each text file under Documentation follows a different > format. Some doesn't even have titles! > > Change its representation to follow the adopted standard, > using ReST markups for it to be parseable by Sphinx: > - Use

Re: [PATCH 20/29] sync_file.txt: standardize document format

2017-05-24 Thread Gustavo Padovan
Hi Mauro, 2017-05-18 Mauro Carvalho Chehab : > Each text file under Documentation follows a different > format. Some doesn't even have titles! > > Change its representation to follow the adopted standard, > using ReST markups for it to be parseable by Sphinx: > - Use markup for document title

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

2017-05-24 Thread Gustavo Padovan
not a V4L2 expert, so I don't know all the consequences of such a change. Any other ideas? The current patchset is at: https://git.kernel.org/pub/scm/linux/kernel/git/padovan/linux.git/log/?h=v4l2-fences Regards, Gustavo 2017-03-13 Gustavo Padovan <gust...@padovan.org>: > From: Gustav

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

2017-05-24 Thread Gustavo Padovan
not a V4L2 expert, so I don't know all the consequences of such a change. Any other ideas? The current patchset is at: https://git.kernel.org/pub/scm/linux/kernel/git/padovan/linux.git/log/?h=v4l2-fences Regards, Gustavo 2017-03-13 Gustavo Padovan : > From: Gustavo Padovan > > Hi, >

Re: [PATCH 4/4] dma-buf: Use seq_putc() in two functions

2017-05-08 Thread Gustavo Padovan
Thus use the corresponding function "seq_putc". > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> > --- > drivers/dma-buf/sync_debug.c | 6 +++--- > 1 file changed, 3 insertion

Re: [PATCH 4/4] dma-buf: Use seq_putc() in two functions

2017-05-08 Thread Gustavo Padovan
his issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring > --- > drivers/dma-buf/sync_debug.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH 3/4] dma-buf: Adjust a null pointer check in dma_buf_attach()

2017-05-08 Thread Gustavo Padovan
ULL could be written "!attach" > > Thus adjust this expression. > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> > --- > drivers/dma-buf/dma-buf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.com> Gustavo

Re: [PATCH 3/4] dma-buf: Adjust a null pointer check in dma_buf_attach()

2017-05-08 Thread Gustavo Padovan
pression. > > Signed-off-by: Markus Elfring > --- > drivers/dma-buf/dma-buf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH 2/4] dma-buf: Improve a size determination in dma_buf_attach()

2017-05-08 Thread Gustavo Padovan
e operator "sizeof" to make the corresponding size > determination a bit safer according to the Linux coding style convention. > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> > --- > drivers/dma-buf/dma-buf.c | 2 +- > 1 file changed, 1 insertion(

Re: [PATCH 2/4] dma-buf: Improve a size determination in dma_buf_attach()

2017-05-08 Thread Gustavo Padovan
safer according to the Linux coding style convention. > > Signed-off-by: Markus Elfring > --- > drivers/dma-buf/dma-buf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show()

2017-05-08 Thread Gustavo Padovan
ingle function call instead. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> > --- > drivers/dma-buf/dma-buf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.com> Gustavo

Re: [PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show()

2017-05-08 Thread Gustavo Padovan
e Coccinelle software. > > Signed-off-by: Markus Elfring > --- > drivers/dma-buf/dma-buf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

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

2017-04-06 Thread Gustavo Padovan
Hi Javier, 2017-04-05 Javier Martinez Canillas <jav...@osg.samsung.com>: > Hello Gustavo, > > On 04/05/2017 11:09 AM, Gustavo Padovan wrote: > > 2017-04-03 Javier Martinez Canillas <jav...@osg.samsung.com>: > > > >> Hello Mauro and Gustavo, > &

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: [RFC 00/10] V4L2 explicit synchronization support

2017-04-05 Thread Gustavo Padovan
Hi Sakari, 2017-04-04 Sakari Ailus <sakari.ai...@iki.fi>: > 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 <gustavo.pado...@collabora.com&g

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-05 Thread Gustavo Padovan
2017-04-03 Javier Martinez Canillas <jav...@osg.samsung.com>: > 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 <gust...@padovan.org&

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 Padova

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

2017-04-05 Thread Gustavo Padovan
Hi Philipp, 2017-04-03 Philipp Zabel <p.za...@pengutronix.de>: > Hi Gustavo, > > On Mon, 2017-03-13 at 16:20 -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Turn the reserved2 field into fence_fd t

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 re

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

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 use

[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

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

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Call v4l2_ctrl_subscribe_event to subscribe to more events supported by v4l. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[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 <gustavo.pado...@collabora.com> 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 P

[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 08/10] [media] vb2: add videobuf2 dma-buf fence helpers

2017-03-13 Thread Gustavo Padovan
From: Javier Martinez Canillas <jav...@osg.samsung.com> 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 <jav...@osg.samsung.com> Signed-off-by: Gustavo Padovan &

[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 10/10] [media] vb2: add out-fence support to QBUF

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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:

[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 09/10] [media] vb2: add infrastructure to support out-fences

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- drivers/media/v4l2-core/videobuf2-core.c | 31 +++ include/med

[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 05/10] [media] vivid: assign the specific device to the vb2_queue->dev

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 P

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

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 <gustavo.pado...@coll

[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 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 07/10] [media] v4l: add support to BUF_QUEUED event

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 <gustavo.pado...@collabora.com> --- drivers/media/v4

[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 03/10] [media] vb2: add in-fence support to QBUF

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Receive in-fence from userspace and support for waiting on them before queueing the buffer for the driver. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- drivers/media/Kconfig| 1 + driver

[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 00/10] V4L2 explicit synchronization support

2017-03-13 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 th

[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 Explicit

[PATCH] drm/virtio: call drm_plane_cleanup() at destroy phase

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> virtio was missing this call to clean up core plane usage. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> --- drivers/gpu/drm/virtio/virtgpu_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dri

[PATCH] drm/virtio: call drm_plane_cleanup() at destroy phase

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan virtio was missing this call to clean up core plane usage. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index

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

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> Simplify logic and call v4l2_ctrl_subscribe_event() directly instead of copying its content over to ivtv_subscribe_event(). Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- drivers/media/pci/ivtv/ivtv-ioctl.c

[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

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

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 <gustavo.pado...@coll

[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

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

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 <gustavo.pado...@coll

[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 5/6] [media] vivid: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 <gustavo.pado...@coll

[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 3/6] [media] solo6x10: improve subscribe event handling

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 <gustavo.pado...@coll

[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 1/6] [media] vb2: only check ret if we assigned it

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.com> 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 <gustavo.pado...@collabora.com> --- drivers/media/v4l2-core/videobuf2

<    1   2   3   4   5   6   7   8   9   10   >