Re: Linux Testing Microconference at LPC

2019-04-18 Thread Gustavo Padovan
Hi, On Thursday, April 11, 2019 14:37 -03, Dhaval Giani wrote: > Hi Folks, > > This is a call for participation for the Linux Testing microconference > at LPC this year. > > For those who were at LPC last year, as the closing panel mentioned, > testing is probably the next big push needed

Re: [Announce] LPC 2018: Testing and Fuzzing Microconference

2018-11-05 Thread Gustavo Padovan
m together. Could you do that? Thanks, Gustavo Gustavo Padovan Collabora Ltd

Re: [RFC RESEND PATCH] drm/rockchip: update cursors asynchronously through atomic.

2018-07-23 Thread Gustavo Padovan
_disable, + .atomic_async_check = vop_plane_atomic_async_check, + .atomic_async_update = vop_plane_atomic_async_update, }; static const struct drm_plane_funcs vop_plane_funcs = { -- 2.18.0 -- Gustavo Padovan Collabora Ltd

Re: [RFC PATCH] drm/atomic: add ASYNC_UPDATE flag to the Atomic IOCTL.

2018-07-06 Thread Gustavo Padovan
Hi Ville, On Thu, 2018-06-28 at 16:35 +0300, Ville Syrjälä wrote: > On Wed, Jun 27, 2018 at 11:25:06PM +0200, Enric Balletbo i Serra > wrote: > > From: Gustavo Padovan > > > > This flag tells core to jump ahead the queued update if the > > conditions > >

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

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

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

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

[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

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

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

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

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

2017-12-11 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 v6 3/6] [media] vb2: add explicit fence user API

2017-12-11 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 v6 5/6] [media] vb2: add out-fence support to QBUF

2017-12-11 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. v7: - merge

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

2017-12-11 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

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

2017-12-11 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 v6 2/6] [media] v4l: add 'unordered' flag to format description ioctl

2017-12-11 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 v6 0/6] V4L2 Explicit Synchronization

2017-12-11 Thread Gustavo Padovan
From: Gustavo Padovan Hi, One more iteration of the explicit fences patches, please refer to the previous version[1] for more details about the general mechanism This version makes the patchset and the implementation much more simple, to start we are not using a ordered capability anymore, but

Re: [RFC v5 00/11] V4L2 Explicit Synchronization

2017-11-30 Thread Gustavo Padovan
Hi Smitha, 2017-11-20 Smitha T Murthy : > Hi Gustavo, > > I am currently referring to your implementation for explicit > synchronisation. For the same I needed your testapp, but I am unable > to download the same at the link provided > “https://gitlab.collabora.com/padovan/v4l2-fences-test” > >

Re: [RFC v5 07/11] [media] vb2: add in-fence support to QBUF

2017-11-17 Thread Gustavo Padovan
2017-11-17 Gustavo Padovan : > 2017-11-17 Hans Verkuil : > > > On 15/11/17 18:10, Gustavo Padovan wrote: > > > From: Gustavo Padovan > > > > > > Receive in-fence from userspace and add support for waiting on them > > > before queueing the buff

Re: [RFC v5 07/11] [media] vb2: add in-fence support to QBUF

2017-11-17 Thread Gustavo Padovan
2017-11-17 Hans Verkuil : > On 15/11/17 18:10, 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: [RFC v5 07/11] [media] vb2: add in-fence support to QBUF

2017-11-17 Thread Gustavo Padovan
2017-11-17 Mauro Carvalho Chehab : > Em Fri, 17 Nov 2017 11:12:48 -0200 > Gustavo Padovan escreveu: > > > > > /* > > > > * If streamon has been called, and we haven't yet called > > > > * start_streaming() since not eno

Re: [RFC v5 07/11] [media] vb2: add in-fence support to QBUF

2017-11-17 Thread Gustavo Padovan
2017-11-17 Mauro Carvalho Chehab : > Em Wed, 15 Nov 2017 15:10:53 -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

Re: [RFC v5 07/11] [media] vb2: add in-fence support to QBUF

2017-11-17 Thread Gustavo Padovan
2017-11-17 Mauro Carvalho Chehab : > Em Fri, 17 Nov 2017 15:49:23 +0900 > Alexandre Courbot escreveu: > > > > @@ -178,6 +179,12 @@ static int vb2_queue_or_prepare_buf(struct > > > vb2_queue *q, struct v4l2_buffer *b, > > > return -EINVAL; > > > } > > > > > > + if ((b->fence_fd !=

Re: [RFC v5 07/11] [media] vb2: add in-fence support to QBUF

2017-11-17 Thread Gustavo Padovan
2017-11-17 Alexandre Courbot : > Hi Gustavo, > > I am coming a bit late in this series' review, so apologies if some of my > comments have already have been discussed in an earlier revision. > > On Thursday, November 16, 2017 2:10:53 AM JST, Gustavo Padovan wrote: &g

Re: [RFC v5 03/11] [media] vb2: add 'ordered_in_driver' property to queues

2017-11-17 Thread Gustavo Padovan
Hi Mauro, 2017-11-17 Mauro Carvalho Chehab : > Em Wed, 15 Nov 2017 15:10:49 -0200 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > We use ordered_in_driver property to optimize for the case where > > the driver can deliver the buffers in a

Re: [RFC v5 01/11] [media] v4l: add V4L2_CAP_ORDERED to the uapi

2017-11-17 Thread Gustavo Padovan
2017-11-17 Mauro Carvalho Chehab : > Em Wed, 15 Nov 2017 15:10:47 -0200 > Gustavo Padovan escreveu: > > > From: Gustavo Padovan > > > > When using explicit synchronization userspace needs to know if > > the queue can deliver everything back in the same order,

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

2017-11-17 Thread Gustavo Padovan
2017-11-17 Alexandre Courbot : > On Thursday, November 16, 2017 2:10:56 AM JST, 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_f

Re: [RFC v5 09/11] [media] vb2: add infrastructure to support out-fences

2017-11-17 Thread Gustavo Padovan
2017-11-17 Alexandre Courbot : > On Thursday, November 16, 2017 2:10:55 AM JST, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. > > > > v3: > > - Do not hold yet anot

Re: [RFC v5 08/11] [media] vb2: add videobuf2 dma-buf fence helpers

2017-11-17 Thread Gustavo Padovan
2017-11-17 Alexandre Courbot : > On Friday, November 17, 2017 4:02:56 PM JST, Alexandre Courbot wrote: > > On Thursday, November 16, 2017 2:10:54 AM JST, Gustavo Padovan wrote: > > > From: Javier Martinez Canillas > > > > > > Add a videobuf2-fence.h header

Re: [RFC v5 03/11] [media] vb2: add 'ordered_in_driver' property to queues

2017-11-17 Thread Gustavo Padovan
2017-11-17 Alexandre Courbot : > On Thursday, November 16, 2017 2:10:49 AM JST, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > We use ordered_in_driver property to optimize for the case where > > the driver can deliver the buffers in an ordered fashion. Wh

Re: [PATCH] drm: mali-dp: Disable planes when their CRTC gets disabled.

2017-11-15 Thread Gustavo Padovan
> 1 file changed, 3 insertions(+) Reviewed-by: Gustavo Padovan Gustavo

Re: [PATCH] drm: mali-dp: Separate static internal data into a read-only structure.

2017-11-15 Thread Gustavo Padovan
t; 5 files changed, 93 insertions(+), 80 deletions(-) Reviewed-by: Gustavo Padovan Gustavo

[RFC v5 07/11] [media] vb2: add in-fence support to QBUF

2017-11-15 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

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

2017-11-15 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. v2: - use fence context provided by the caller in vb2_fence_alloc() Signed-off-by: Javier Martinez Canillas Signed-off-by: Gustavo

[RFC v5 11/11] [media] v4l: Document explicit synchronization behavior

2017-11-15 Thread Gustavo Padovan
From: Gustavo Padovan Add section to VIDIOC_QBUF about it v4: - Document ordering behavior for in-fences - Document V4L2_CAP_ORDERED capability - Remove doc about OUT_FENCE event - Document immediate return of out-fence in QBUF v3: - make the out_fence

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

2017-11-15 Thread Gustavo Padovan
From: Gustavo Padovan Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. v3: - Do not hold yet another ref to the out_fence (Brian Starkey) v2: - change it to reflect fd_install at DQEVENT - add fence context for out-fences Signed-off-by: Gustavo

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

2017-11-15 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. With out-fences we do

[RFC v5 01/11] [media] v4l: add V4L2_CAP_ORDERED to the uapi

2017-11-15 Thread Gustavo Padovan
From: Gustavo Padovan When using explicit synchronization userspace needs to know if the queue can deliver everything back in the same order, so we added a new capability that drivers can use to report that they are capable of keeping ordering. In videobuf2 core when using fences we also make

[RFC v5 02/11] [media] vivid: add the V4L2_CAP_ORDERED capability

2017-11-15 Thread Gustavo Padovan
From: Gustavo Padovan vivid guarantees the ordering of buffer when processing then, so add the V4L2_CAP_ORDERED capability to inform userspace of that. Signed-off-by: Gustavo Padovan --- drivers/media/platform/vivid/vivid-core.c | 19 --- 1 file changed, 12 insertions(+), 7

[RFC v5 06/11] [media] vb2: add explicit fence user API

2017-11-15 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

[RFC v5 05/11] [media] vb2: check earlier if stream can be started

2017-11-15 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 the

[RFC v5 03/11] [media] vb2: add 'ordered_in_driver' property to queues

2017-11-15 Thread Gustavo Padovan
From: Gustavo Padovan We use ordered_in_driver property to optimize for the case where the driver can deliver the buffers in an ordered fashion. When it is ordered we can use the same fence context for all fences, but when it is not we need to a new context for each out-fence. So the

[RFC v5 04/11] [media] vivid: mark vivid queues as ordered_in_driver

2017-11-15 Thread Gustavo Padovan
From: Gustavo Padovan ordered_in_driver is used to optimize the use of explicit synchronization when the driver guarantees ordering we can use the same fence context for out-fences. In this case userspace will know that the buffers won't be signaling out of order. vivid queues are al

[RFC v5 00/11] V4L2 Explicit Synchronization

2017-11-15 Thread Gustavo Padovan
From: Gustavo Padovan Hi, After the comments received in the last patchset[1] and during the media summit [2] here is the new and improved version of the patchset. The implementation is simpler, smaller and cover a lot more cases. If you look to the last patchset I got rid of a few things

Re: [RFC v4 13/17] [media] vb2: add in-fence support to QBUF

2017-11-10 Thread Gustavo Padovan
2017-10-25 Brian Starkey : > Hi Gustavo, > > On Fri, Oct 20, 2017 at 07:50:08PM -0200, 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. B

Re: [RFC v4 17/17] [media] v4l: Document explicit synchronization behaviour

2017-11-03 Thread Gustavo Padovan
Hi Hans, 2017-11-03 Hans Verkuil : > On 10/20/2017 11:50 PM, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Add section to VIDIOC_QBUF about it > > > > v3: > > - make the out_fence refer to the current buffer (Hans) > > - Note wh

Re: [RFC v4 16/17] [media] vb2: add out-fence support to QBUF

2017-11-02 Thread Gustavo Padovan
Hi Brian, 2017-10-27 Brian Starkey : > Hi Gustavo, > > On Fri, Oct 20, 2017 at 07:50:11PM -0200, 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 to user

Re: [PATCH] dma-buf: Cleanup comments on dma_buf_map_attachment()

2017-11-02 Thread Gustavo Padovan
Hi Liviu, 2017-11-01 Liviu Dudau : > Mappings need to be unmapped by calling dma_buf_unmap_attachment() and > not by calling again dma_buf_map_attachment(). Also fix some spelling > mistakes. > > Signed-off-by: Liviu Dudau > --- > drivers/dma-buf/dma-buf.c | 6 +++--- > 1 file changed, 3 inser

Re: [PATCH] drm/stm: checkpatch strict minor updates

2017-11-01 Thread Gustavo Padovan
gt; +++ b/drivers/gpu/drm/stm/ltdc.c > @@ -556,7 +556,7 @@ static int ltdc_plane_atomic_check(struct drm_plane > *plane, > src_h = state->src_h >> 16; > > /* Reject scaling */ > - if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) { > + if (src_w != state->crtc_w || src_h != state->crtc_h) { > DRM_ERROR("Scaling is not supported"); > return -EINVAL; Reviewed-by: Gustavo Padovan

Re: [PATCH] drm/stm: dsi: Rename driver name

2017-11-01 Thread Gustavo Padovan
-stm.c > @@ -342,7 +342,7 @@ static int dw_mipi_dsi_stm_remove(struct platform_device > *pdev) > .remove = dw_mipi_dsi_stm_remove, > .driver = { > .of_match_table = dw_mipi_dsi_stm_dt_ids, > - .name = "dw_mipi_d

Re: [RFC PATCH 0/9] V4L2 Jobs API WIP

2017-10-23 Thread Gustavo Padovan
2017-10-16 Hans Verkuil : > Hi Alexandre, > > Thank you very much for working on this. Much appreciated! > > I only did a very high-level review of the patch series: there is not much > point IMHO of doing a detailed review given the upcoming discussions in > Prague. It's better to wait until we

[RFC v4 02/17] [media] v4l: use v4l2_subscribe_event_v4l2() on vtables

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan In all places that we were calling v4l2_ctrl_subscribe event() we now call v4l2_subscribe_event_v4l2() that embed v4l2_ctrl_subscribe event() and can be expanded to support more events. Signed-off-by: Gustavo Padovan --- drivers/media/common/saa7146/saa7146_video.c

[RFC v4 01/17] [media] v4l: create v4l2_event_subscribe_v4l2()

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan We need a common function to subscribe all the common events in drivers, so far we had only V4L2_EVENT_CTRL, so such a function wasn't necessary, but we are about to introduce a new event for the upcoming explicit fences implementation, thus a common place is n

[RFC v4 04/17] WIP: [media] v4l2: add v4l2_event_queue_fh_with_cb()

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan For some type of events we may require the event user in the kernel to run some operation when DQ_EVENT() is called. V4L2_EVENT_OUT_FENCE is the first user of this mechanism as it needs to call v4l2 core back to install a file descriptor. This is WIP, I believe we are able

[RFC v4 07/17] [media] vivid: assign the specific device to the vb2_queue->dev

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Instead of assigning the global v4l2 device, assign the specific device. This was causing trouble when 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_OUT_FENCE support

[RFC v4 09/17] [media] vb2: add 'ordered_in_vb2' property to queues

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan By setting this member on vb2_queue the driver tell vb2 core that it requires the buffers queued in QBUF to be queued with same order to the driver. Signed-off-by: Gustavo Padovan --- include/media/videobuf2-core.h | 4 1 file changed, 4 insertions(+) diff --git a

[RFC v4 12/17] [media] vb2: add explicit fence user API

2017-10-20 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

[RFC v4 14/17] [media] vb2: add videobuf2 dma-buf fence helpers

2017-10-20 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. v2: - use fence context provided by the caller in vb2_fence_alloc() Signed-off-by: Javier Martinez Canillas Signed-off-by: Gustavo

[RFC v4 11/17] [media] vb2: check earlier if stream can be started

2017-10-20 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 the

[RFC v4 13/17] [media] vb2: add in-fence support to QBUF

2017-10-20 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. For queues that require vb2 to queue buffers to the v4l2

[RFC v4 15/17] [media] vb2: add infrastructure to support out-fences

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Add vb2_setup_out_fence() and the needed members to struct vb2_buffer. v2: - change it to reflect fd_install at DQEVENT - add fence context for out-fences Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/videobuf2-core.c | 31

[RFC v4 16/17] [media] vb2: add out-fence support to QBUF

2017-10-20 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 to userspace on the V4L2_EVENT_OUT_FENCE when the buffer is queued to the driver, or right away if the queue is ordered both in VB2 and in the driver. The fence is signaled on

[RFC v4 17/17] [media] v4l: Document explicit synchronization behaviour

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Add section to VIDIOC_QBUF about it v3: - make the out_fence refer to the current buffer (Hans) - Note what happens when the IN_FENCE is not set (Hans) v2: - mention that fences are files (Hans) - rework for the new API Signed-off-by

[RFC v4 10/17] [media] vivid: mark vivid queues as ordered_in_driver

2017-10-20 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. v2: rename 'ordered' to 'ordered_in_driver' to avoid confusion. Signed-off-by: Gu

[RFC v4 08/17] [media] vb2: add 'ordered_in_driver' property to queues

2017-10-20 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. v2: rename property to 'ordered_in_drive

[RFC v4 06/17] [media] vb2: add .send_out_fence() to notify userspace of out_fence_fd

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

[RFC v4 03/17] [media] v4l: use v4l2_subscribe_event_v4l2() on drivers

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Driver that implement their own .vidioc_subscribe_event function should be using v4l2_subscribe_event_v4l2() instead of v4l2_ctrl_subscribe_event(). Signed-off-by: Gustavo Padovan --- drivers/media/pci/cobalt/cobalt-v4l2.c | 2 +- drivers/media/pci/ivtv/ivtv

[RFC v4 05/17] [media] v4l: add V4L2_EVENT_OUT_FENCE event

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Add a new event the userspace can subscribe to receive notifications of the out_fence_fd when a buffer is queued onto the driver. The event provides the index of the queued buffer and the out_fence_fd. v3: - Rename event to V4L2_EVENT_OUT_FENCE v2: - Add missing

[RFC v4 00/17] V4L2 Explicit Synchronization support

2017-10-20 Thread Gustavo Padovan
From: Gustavo Padovan Hi, I renamed this back to RFC as many things are still under discussion/open but it integrates all comments received on the previous round[1]. My main goal now is to fit as many use cases as possible into this Explicit Synchronization implementation, but first I'd

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

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

  1   2   3   4   5   6   7   8   9   >