Re: [PATCH] android: fix warning when releasing active sync point

2015-12-15 Thread Gustavo Padovan
2015-12-15 Daniel Vetter : > On Mon, Dec 14, 2015 at 05:29:55PM -0800, Dmitry Torokhov wrote: > > Userspace can close the sync device while there are still active fence > > points, in which case kernel produces the following warning: > > > > [ 43.853176] [ cut here

Re: [PATCH] android: fix warning when releasing active sync point

2015-12-15 Thread Gustavo Padovan
2015-12-14 Dmitry Torokhov : > Userspace can close the sync device while there are still active fence > points, in which case kernel produces the following warning: > > [ 43.853176] [ cut here ] > [ 43.857834] WARNING: CPU: 0 PID: 892 at >

[PATCH 2/2] dma-buf/sync_file: improve Kconfig description for Sync Files

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> We've got a complaint saying that the description was quite obtuse and indeed it was. This patch tries to improve it. Cc: Dave Jones <da...@codemonkey.org.uk> Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk>

[PATCH 1/2] MAINTAINERS: add entry for the Sync File Framework

2016-05-31 Thread Gustavo Padovan
From: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Add Gustavo as maintainer for the Sync File Framework. Sumit is co-maintainer as he maintains drivers/dma-buf/. It also uses Sumit's tree as base. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Acked-by:

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

2016-04-11 Thread Gustavo Padovan
; include/linux/fence.h | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Gustavo -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

[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

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

2016-08-29 Thread Gustavo Padovan
omic > bit test that also causes serialisation between threads. > > Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> > Cc: Sumit Semwal <sumit.sem...@linaro.org> > Cc: Gustavo Padovan <gust...@padovan.org> > Cc: linux-media@vger.kernel.org &g

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 <gre...@linuxfoundation.org>: > On Tue, Sep 20, 2016 at 06:23:33PM +0530, Sumit Semwal wrote: > > Hi Baoyou, > > > > On 20 September 2016 at 16:43, Gustavo Padovan <gust...@padovan.org> wrote: > > > 20

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

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

Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support

2016-10-27 Thread Gustavo Padovan
2016-10-27 Brian Starkey <brian.star...@arm.com>: > On Wed, Oct 26, 2016 at 07:43:57PM -0200, Gustavo Padovan wrote: > > 2016-10-26 Brian Starkey <brian.star...@arm.com>: > > > > > If userspace has asked for an out-fence for the writeback, we add a > >

Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > If userspace has asked for an out-fence for the writeback, we add a > fence to malidp_mw_job, to be signaled when the writeback job has > completed. > > Signed-off-by: Brian Starkey > --- >

Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Some parts of setting up the CRTC out-fence can be re-used for > writeback out-fences. Factor this out into a separate function. > > Signed-off-by: Brian Starkey > --- > drivers/gpu/drm/drm_atomic.c | 64 >

Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Some parts of setting up the CRTC out-fence can be re-used for > writeback out-fences. Factor this out into a separate function. > > Signed-off-by: Brian Starkey > --- > drivers/gpu/drm/drm_atomic.c | 64 >

Re: [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback connectors

2016-10-26 Thread Gustavo Padovan
2016-10-26 Brian Starkey : > Add the OUT_FENCE_PTR property to writeback connectors, to enable > userspace to get a fence which will signal once the writeback is > complete. > > A timeline is added to drm_connector for use by the writeback > out-fences. It is up to drivers

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

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

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

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

2017-07-11 Thread Gustavo Padovan
2017-07-11 Hans Verkuil <hverk...@xs4all.nl>: > On 10/07/17 22:26, Gustavo Padovan wrote: > > 2017-07-10 Gustavo Padovan <gust...@padovan.org>: > > > >> 2017-07-07 Hans Verkuil <hverk...@xs4all.nl>: > >> > >>> On 07/07/2017 04:00 A

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

2017-07-10 Thread Gustavo Padovan
2017-07-07 Shuah Khan <shua...@osg.samsung.com>: > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > To enable vivid to be used with explicit synchronization we need > > to mark its queues as o

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

2017-07-10 Thread Gustavo Padovan
2017-07-07 Hans Verkuil <hverk...@xs4all.nl>: > On 07/07/2017 04:00 AM, Gustavo Padovan wrote: > > 2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > > > > > On 06/16/17 09:39, Gustavo Padovan wrote: > > > > From: Gustavo Padovan <gustavo.pado.

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

2017-07-10 Thread Gustavo Padovan
2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > On 06/30/17 14:04, Mauro Carvalho Chehab wrote: > > Em Fri, 16 Jun 2017 16:39:10 +0900 > > Gustavo Padovan <gust...@padovan.org> escreveu: > > > >> From: Gustavo Padovan <gustavo.pado...@collabora.com&

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

2017-07-10 Thread Gustavo Padovan
2017-07-07 Shuah Khan <shua...@osg.samsung.com>: > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Call v4l2_ctrl_subscribe_event to subscribe to more events supported by > > v4l.

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

2017-07-10 Thread Gustavo Padovan
2017-07-07 Hans Verkuil <hverk...@xs4all.nl>: > On 07/07/2017 03:53 AM, Gustavo Padovan wrote: > > > > > > > help > > > > If you want to use Webcams, Video grabber devices and/or TV > > > > devices > > > >

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 <shua...@osg.samsung.com>: > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Instead of assigning the global v4l2 device, assign the specific device. > > This was causi

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

2017-07-10 Thread Gustavo Padovan
2017-07-10 Gustavo Padovan <gust...@padovan.org>: > 2017-07-07 Hans Verkuil <hverk...@xs4all.nl>: > > > On 07/07/2017 04:00 AM, Gustavo Padovan wrote: > > > 2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > > > > > > > On 06/16/17 0

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

2017-07-10 Thread Gustavo Padovan
2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > On 06/16/17 09:39, Gustavo Padovan wrote: > > 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 fo

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 <mche...@osg.samsung.com>: > Em Fri, 16 Jun 2017 16:39:10 +0900 > Gustavo Padovan <gust...@padovan.org> escreveu: > > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Implement

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

2017-07-03 Thread Gustavo Padovan
Hi Mauro, 2017-06-30 Mauro Carvalho Chehab <mche...@osg.samsung.com>: > Em Fri, 16 Jun 2017 16:39:03 +0900 > Gustavo Padovan <gust...@padovan.org> escreveu: > > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Hi, > > > >

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 <mche...@osg.samsung.com>: > Em Fri, 16 Jun 2017 16:39:06 +0900 > Gustavo Padovan <gust...@padovan.org> escreveu: > > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Receive in-fence from

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

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > On 06/16/17 09:39, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer

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

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > On 06/16/17 09:39, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > In order to support explicit synchronization we need to divide > > vb2_core_qbuf() in two par

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

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > 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_vo

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

2017-07-06 Thread Gustavo Padovan
2017-07-06 Hans Verkuil <hverk...@xs4all.nl>: > On 06/16/17 09:39, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the buffer

Re: [PATCH] dma-buf: avoid scheduling on fence status query v2

2017-04-27 Thread Gustavo Padovan
2017-04-26 Christian König : > Am 26.04.2017 um 16:46 schrieb Andres Rodriguez: > > When a timeout of zero is specified, the caller is only interested in > > the fence status. > > > > In the current implementation, dma_fence_default_wait will always call > >

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

2017-07-25 Thread Gustavo Padovan
2017-07-10 Gustavo Padovan <gust...@padovan.org>: > 2017-07-07 Shuah Khan <shua...@osg.samsung.com>: > > > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > > > Call v4l2_c

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

2017-07-25 Thread Gustavo Padovan
2017-07-07 Shuah Khan <shua...@osg.samsung.com>: > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > Instead of assigning the global v4l2 device, assign the specific device. > > This was causi

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
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: [PATCH 08/12] [media] vb2: add 'ordered' property to queues

2017-06-26 Thread Gustavo Padovan
Hi Nicolas, 2017-06-16 Nicolas Dufresne <nico...@ndufresne.ca>: > Le vendredi 16 juin 2017 à 16:39 +0900, Gustavo Padovan a écrit : > > > From: Gustavo Padovan <gustavo.pado...@collabora.com> > > > > For explicit synchronization (and soon for HAL3/Requ

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

2017-06-26 Thread Gustavo Padovan
m] > > url: > 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 > rep

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

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

2017-06-16 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 to do the actual queueing of the buffer. Signed-off-by: Gustavo Padovan <gus

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

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

2017-06-16 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

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

2017-06-16 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. It only works with ordered queues. The fence is signaled on buffer_done(), when t

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

2017-06-16 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. Signed-off-by: Gustavo P

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

2017-06-16 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. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> ---

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

2017-06-16 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 which the buffer were queued by userspace. This is already true for many drivers, but we never had the need to say it. Sign

[PATCH 00/12] V4L2 explicit synchronization support

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

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

2017-06-16 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. v2:

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

2017-06-16 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

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

2017-06-16 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 04/12] [media] uvc: enable subscriptions to other events

2017-06-16 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

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

2017-06-16 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. Signed-off-by: Gustavo Padovan <gustavo.pado...@collabora.com> --- drivers/media/platform/vivid/vivid-core.c | 5 + 1 fil

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 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 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 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 v3 01/15] [media] v4l: Document explicit synchronization behaviour

2017-09-11 Thread Gustavo Padovan
2017-09-11 Hans Verkuil <hverk...@xs4all.nl>: > On 09/11/2017 03:18 PM, Gustavo Padovan wrote: > > 2017-09-11 Hans Verkuil <hverk...@xs4all.nl>: > > > >> On 09/11/2017 12:50 PM, Hans Verkuil wrote: > >>> On 09/07/2017 08:42 PM, Gustavo Padovan w

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

2017-09-11 Thread Gustavo Padovan
2017-09-11 Hans Verkuil <hverk...@xs4all.nl>: > On 09/11/2017 12:50 PM, Hans Verkuil wrote: > > On 09/07/2017 08:42 PM, Gustavo Padovan wrote: > >> From: Gustavo Padovan <gustavo.pado...@collabora.com> > >> > >> Add section to VIDIOC_QBUF abou

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

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
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 v2 14/14] [media] v4l: Document explicit synchronization behaviour

2017-09-04 Thread Gustavo Padovan
2017-09-02 Hans Verkuil <hverk...@xs4all.nl>: > On 09/01/2017 08:21 PM, Gustavo Padovan wrote: > > Hi Hans, > > > > 2017-09-01 Hans Verkuil <hverk...@xs4all.nl>: > > > >> Hi Gustavo, > >> > >> I think I concentrate on this last

Re: [PATCH v2 14/14] [media] v4l: Document explicit synchronization behaviour

2017-09-01 Thread Gustavo Padovan
ask stupid questions. On the other hand, others > with a similar lack of understanding of fences probably have similar > questions, > so it is a good indication where the documentation needs improvement :-) Please ask as many as you want, those are the best questions. :) > > On 01/09/17 03

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

2017-08-31 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 v2 03/14] [media] vb2: add in-fence support to QBUF

2017-08-31 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

  1   2   3   >