Re: Invite for IRC meeting: Re: [PATCHv4 01/10] videodev2.h: add tag support

2018-12-07 Thread Alexandre Courbot
Hi Hans, On Fri, Dec 7, 2018 at 12:08 AM Hans Verkuil wrote: > > Mauro raised a number of objections on irc regarding tags: > > https://linuxtv.org/irc/irclogger_log/media-maint?date=2018-12-06,Thu > > I would like to setup an irc meeting to discuss this and come to a > conclusion, since we need

Re: [PATCHv2 0/9] vb2/cedrus: add tag support

2018-11-21 Thread Alexandre Courbot
4l2_m2m_buf_copy_data helper function > vb2: add new supports_tags queue flag > vim2m: add tag support > vicodec: add tag support > cedrus: add tag support Good call on the v4l2_m2m_buf_copy_data() function! Reviewed-by: Alexandre Courbot > > Documentation/media/ua

Re: [RFC PATCH 0/5] vb2/cedrus: add cookie support

2018-11-11 Thread Alexandre Courbot
Hi Hans, On Fri, Nov 9, 2018 at 6:56 PM Hans Verkuil wrote: > > As was discussed here (among other places): > > https://lkml.org/lkml/2018/10/19/440 > > using capture queue buffer indices to refer to reference frames is > not a good idea. A better idea is to use 'cookies' (a better name is >

Re: [RFC PATCH 1/5] videodev2.h: add cookie support

2018-11-11 Thread Alexandre Courbot
On Fri, Nov 9, 2018 at 6:56 PM Hans Verkuil wrote: > > From: Hans Verkuil > > Add support for 'cookies' to struct v4l2_buffer. These can be used to This "to" seems unneeded.

Re: [PATCH] media: venus: support VB2_USERPTR IO mode

2018-10-11 Thread Alexandre Courbot
On Thu, Oct 11, 2018 at 5:26 PM Stanimir Varbanov wrote: > > Hi Alex, > > On 10/11/2018 09:50 AM, Alexandre Courbot wrote: > > Please ignore this patch - I did not notice that a similar one has > > been sent before. > > The difference is that you made it for decoder

Re: [PATCH] media: venus: add support for USERPTR to queue

2018-10-11 Thread Alexandre Courbot
On Tue, Oct 9, 2018 at 4:52 PM Malathi Gottam wrote: > > Add USERPTR to queue access methods by adding this > support to io_modes on both the planes. > > Signed-off-by: Malathi Gottam Tested-by: Alexandre Courbot

Re: [PATCH] media: venus: support VB2_USERPTR IO mode

2018-10-11 Thread Alexandre Courbot
Please ignore this patch - I did not notice that a similar one has been sent before. >_< On Thu, Oct 11, 2018 at 3:46 PM Alexandre Courbot wrote: > > The venus codec can work just fine with USERPTR buffers. Enable this > possibility. > > Signed-off-by: Alexandre Courbot &

[PATCH] media: venus: support VB2_USERPTR IO mode

2018-10-11 Thread Alexandre Courbot
The venus codec can work just fine with USERPTR buffers. Enable this possibility. Signed-off-by: Alexandre Courbot --- drivers/media/platform/qcom/venus/vdec.c | 4 ++-- drivers/media/platform/qcom/venus/venc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers

Re: [RFC] Request API and V4L2 capabilities

2018-08-21 Thread Alexandre Courbot
On Tue, Aug 21, 2018 at 6:15 PM Tomasz Figa wrote: > > On Wed, Aug 15, 2018 at 11:18 PM Hans Verkuil wrote: > > > > On 15/08/18 14:11, Mauro Carvalho Chehab wrote: > > > Em Sat, 4 Aug 2018 15:50:04 +0200 > > > Hans Verkuil escreveu: > > > > > >> Hi all, > > >> > > >> While the Request API patch

Re: [ANN v2] Complex Camera Workshop - Tokyo - Jun, 19

2018-06-07 Thread Alexandre Courbot
This should include: > > - the kernel drivers (V4L2-compliant and usable without any closed-source > userspace component); > - the 3A library > - any other component that could be shared (for instance a possible > request API library). > > The rest of the code will mostly be

Re: [PATCH v2 02/10] media-request: Add a request complete operation to allow m2m scheduling

2018-04-20 Thread Alexandre Courbot
On Fri, Apr 20, 2018 at 12:43 AM Paul Kocialkowski < paul.kocialkow...@bootlin.com> wrote: > When using the request API in the context of a m2m driver, the > operations that come with a m2m run scheduling call in their > (m2m-specific) ioctl handler are delayed until the request is queued > (for

Re: [RFCv11 PATCH 00/29] Request API

2018-04-17 Thread Alexandre Courbot
On Tue, Apr 17, 2018 at 8:41 PM Paul Kocialkowski < paul.kocialkow...@bootlin.com> wrote: > Hi, > On Tue, 2018-04-17 at 06:17 +0000, Alexandre Courbot wrote: > > On Tue, Apr 17, 2018 at 3:12 PM Hans Verkuil <hverk...@xs4all.nl> > > wrote: > > > > > On

Re: [RFCv11 PATCH 00/29] Request API

2018-04-17 Thread Alexandre Courbot
On Tue, Apr 17, 2018 at 3:12 PM Hans Verkuil <hverk...@xs4all.nl> wrote: > On 04/17/2018 06:33 AM, Alexandre Courbot wrote: > > On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil <hverk...@xs4all.nl> wrote: > > > >> From: Hans Verkuil <hans.verk...@cisco.com> &

Re: [RFCv11 PATCH 25/29] media: vim2m: add media device

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil <hverk...@xs4all.nl> wrote: > From: Alexandre Courbot <acour...@chromium.org> > Request API requires a media node. Add one to the vim2m driver so we can > use requests with it. > This probably needs a bit more work to

Re: [RFCv11 PATCH 27/29] vim2m: support requests

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > From: Hans Verkuil > Add support for requests to vim2m. > Signed-off-by: Hans Verkuil > --- > drivers/media/platform/vim2m.c | 25 + > 1 file

Re: [RFCv11 PATCH 20/29] videobuf2-v4l2: integrate with media requests

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: > From: Hans Verkuil > This implements the V4L2 part of the request support. The main > change is that vb2_qbuf and vb2_prepare_buf now have a new > media_device pointer. This required changes to

Re: [RFCv11 PATCH 07/29] media-request: add media_request_object_find

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: > From: Hans Verkuil > Add media_request_object_find to find a request object inside a > request based on ops and/or priv values. > Objects of the same type (vb2 buffer, control handler) will have

Re: [RFCv11 PATCH 04/29] media-request: core request support

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: > From: Hans Verkuil > Implement the core of the media request processing. > Drivers can bind request objects to a request. These objects > can then be marked completed if the driver finished using

Re: [RFCv11 PATCH 01/29] v4l2-device.h: always expose mdev

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: > From: Hans Verkuil > The mdev field is only present if CONFIG_MEDIA_CONTROLLER is set. > But since we will need to pass the media_device to vb2 snd the Typo: s/snd/and > control framework it is

Re: [RFCv11 PATCH 02/29] uapi/linux/media.h: add request API

2018-04-16 Thread Alexandre Courbot
equest in order to queue the > contents of the request to the driver and to re-initialize the > request. > Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Like it that the API stays simple, with request ioctls tied to request FDs. Acked-by: Alexandre Courbot <acour...@chromium.org&

Re: [RFCv11 PATCH 00/29] Request API

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > From: Hans Verkuil > Hi all, > This is a cleaned up version of the v10 series (never posted to > the list since it was messy). Hi Hans, It took me a while to test and review this, but finally

Re: [RFCv11 PATCH 03/29] media-request: allocate media requests

2018-04-16 Thread Alexandre Courbot
On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > From: Hans Verkuil > Add support for allocating a new request. This is only supported > if mdev->ops->req_queue is set, i.e. the driver indicates that it > supports queueing requests. >

Re: [RFC v2 00/10] Preparing the request API

2018-03-25 Thread Alexandre Courbot
widely extensible as well. Anything that is performed in a deferred way can fail (for now, S_EXT_CTRLS and QBUF), so maybe this ioctl should return errors in the same format as these calls. The request would be interrupted upon first error, so we could just return the code of the ioctl that would have f

[PATCH v2] venus: vdec: fix format enumeration

2018-03-19 Thread Alexandre Courbot
this by moving the call to venus_helper_check_codec() into the loop, and keep enumerating when it fails. Fixes: 29f0133ec6 media: venus: use helper function to check supported codecs Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/qcom/venus/vdec.

Re: [PATCH] venus: vdec: fix format enumeration

2018-03-19 Thread Alexandre Courbot
On Thu, Mar 15, 2018 at 6:52 PM, Stanimir Varbanov <stanimir.varba...@linaro.org> wrote: > Hi Alex, > > Thanks for the patch! > > On 13.03.2018 11:11, Alexandre Courbot wrote: >> find_format_by_index() stops enumerating formats as soon as the index &

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-19 Thread Alexandre Courbot
On Wed, Mar 14, 2018 at 10:25 PM, Paul Kocialkowski <paul.kocialkow...@bootlin.com> wrote: > Hi, > > On Tue, 2018-03-13 at 19:24 +0900, Alexandre Courbot wrote: >> On Fri, Mar 9, 2018 at 11:35 PM, Paul Kocialkowski >> <paul.kocialkow...@bootlin.com> wrote: >

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-13 Thread Alexandre Courbot
On Fri, Mar 9, 2018 at 11:35 PM, Paul Kocialkowski <paul.kocialkow...@bootlin.com> wrote: > Hi, > > On Thu, 2018-03-08 at 22:48 +0900, Alexandre Courbot wrote: >> Hi Paul! >> >> Thanks a lot for taking the time to try this! I am also working on >> getting it

[PATCH] venus: vdec: fix format enumeration

2018-03-13 Thread Alexandre Courbot
this by moving the call to venus_helper_check_codec() into the loop, and keep enumerating when it fails. Signed-off-by: Alexandre Courbot <acour...@chromium.org> Change-Id: I4ff66e0b85172598efa59a6f01da8cb60597a6a5 --- drivers/media/platform/qcom/venus/vdec.c | 13 +++-- drivers

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-12 Thread Alexandre Courbot
On Mon, Mar 12, 2018 at 5:15 PM, Tomasz Figa wrote: > Hi Paul, Dmitry, > > On Mon, Mar 12, 2018 at 5:10 PM, Paul Kocialkowski > wrote: >> Hi, >> >> On Sun, 2018-03-11 at 22:42 +0300, Dmitry Osipenko wrote: >>> Hello, >>> >>> On 07.03.2018 19:37,

Re: [RFCv4,13/21] media: videobuf2-v4l2: support for requests

2018-03-08 Thread Alexandre Courbot
On Thu, Mar 8, 2018 at 1:50 AM, Paul Kocialkowski <paul.kocialkow...@bootlin.com> wrote: > Hi, > > On Tue, 2018-02-20 at 13:44 +0900, Alexandre Courbot wrote: >> Add a new vb2_qbuf_request() (a request-aware version of vb2_qbuf()) >> that request-aware drivers

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-08 Thread Alexandre Courbot
in need of this API. > > I have a few comments based on my experience integrating this request > API with the Cedrus VPU driver (and the associated libva backend), that > also concern the vim2m driver. > > On Tue, 2018-02-20 at 13:44 +0900, Alexandre Courbot wrote: >> Set

[PATCH v4l-utils] v4l2-compliance/v4l2-test-formats: fix typo

2018-03-01 Thread Alexandre Courbot
When using planar formats, we want to check pix_mp, not pix. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- utils/v4l2-compliance/v4l2-test-formats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp b/util

Re: [RFCv4 01/21] media: add request API core and UAPI

2018-02-22 Thread Alexandre Courbot
On Wed, Feb 21, 2018 at 4:29 PM, Hans Verkuil <hverk...@xs4all.nl> wrote: > On 02/21/2018 07:01 AM, Alexandre Courbot wrote: >> Hi Hans, >> >> On Tue, Feb 20, 2018 at 7:36 PM, Hans Verkuil <hverk...@xs4all.nl> wrote: >>> On 02/20/18 05:44, Ale

Re: [RFCv4 01/21] media: add request API core and UAPI

2018-02-20 Thread Alexandre Courbot
Hi Hans, On Tue, Feb 20, 2018 at 7:36 PM, Hans Verkuil <hverk...@xs4all.nl> wrote: > On 02/20/18 05:44, Alexandre Courbot wrote: >> The request API provides a way to group buffers and device parameters >> into units of work to be queued and executed. This patch introduces

Re: [RFCv4 10/21] videodev2.h: Add request_fd field to v4l2_buffer

2018-02-20 Thread Alexandre Courbot
On Wed, Feb 21, 2018 at 12:20 AM, Hans Verkuil <hverk...@xs4all.nl> wrote: > On 02/20/18 05:44, Alexandre Courbot wrote: >> From: Hans Verkuil <hans.verk...@cisco.com> >> >> When queuing buffers allow for passing the request that should >> be associated with

Re: [RFCv4 13/21] media: videobuf2-v4l2: support for requests

2018-02-20 Thread Alexandre Courbot
On Wed, Feb 21, 2018 at 1:18 AM, Hans Verkuil <hverk...@xs4all.nl> wrote: > On 02/20/2018 05:44 AM, Alexandre Courbot wrote: >> Add a new vb2_qbuf_request() (a request-aware version of vb2_qbuf()) >> that request-aware drivers can call to queue a buffer into a request &

Re: [RFCv4 11/21] media: v4l2_fh: add request entity field

2018-02-20 Thread Alexandre Courbot
On Wed, Feb 21, 2018 at 12:24 AM, Hans Verkuil <hverk...@xs4all.nl> wrote: > On 02/20/18 05:44, Alexandre Courbot wrote: >> Allow drivers to assign a request entity to v4l2_fh. This will be useful >> for request-aware ioctls to find out which request entity to use. >>

Re: [RFCv4 16/21] v4l2: video_device: support for creating requests

2018-02-20 Thread Alexandre Courbot
On Wed, Feb 21, 2018 at 1:35 AM, Hans Verkuil <hverk...@xs4all.nl> wrote: > On 02/20/2018 05:44 AM, Alexandre Courbot wrote: >> Add a new VIDIOC_NEW_REQUEST ioctl, which allows to instanciate requests >> on devices that support the request API. Requests created that wa

Re: [RFCv4 09/21] v4l2: add request API support

2018-02-20 Thread Alexandre Courbot
On Tue, Feb 20, 2018 at 10:25 PM, Hans Verkuil <hverk...@xs4all.nl> wrote: > On 02/20/18 05:44, Alexandre Courbot wrote: >> Add a v4l2 request entity data structure that takes care of storing the >> request-related state of a V4L2 device ; in this case, its controls. >>

Re: [RFCv4 09/21] v4l2: add request API support

2018-02-20 Thread Alexandre Courbot
Hi Philippe, On Tue, Feb 20, 2018 at 4:36 PM, Philippe Ombredanne <pombreda...@nexb.com> wrote: > On Tue, Feb 20, 2018 at 5:44 AM, Alexandre Courbot > <acour...@chromium.org> wrote: >> Add a v4l2 request entity data structure that takes care of storing the >> r

[RFCv4 00/21] Request API

2018-02-19 Thread Alexandre Courbot
driver sometime soon. Alexandre Courbot (14): media: add request API core and UAPI [WAR] v4l2-ctrls: do not clone non-standard controls v4l2: add request API support media: v4l2_fh: add request entity field media: videobuf2: add support for requests media: videobuf2-v4l2: support

[RFCv4 02/21] v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev

2018-02-19 Thread Alexandre Courbot
equest API since we need to skip such controls. TODO: check drivers/staging/media/imx/imx-media-fim.c change. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/dvb-frontends/rtl2832_sdr.c | 5 +- drive

[RFCv4 00/21] Request API

2018-02-19 Thread Alexandre Courbot
soon. Alexandre Courbot (14): media: add request API core and UAPI [WAR] v4l2-ctrls: do not clone non-standard controls v4l2: add request API support media: v4l2_fh: add request entity field media: videobuf2: add support for requests media: videobuf2-v4l2: support for requests videodev2

[RFCv4 03/21] v4l2-ctrls: prepare internal structs for request API

2018-02-19 Thread Alexandre Courbot
hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + include/media/v4l2-ctrls.h | 4 2 files changed, 5 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c

[RFCv4 04/21] v4l2-ctrls: add core request API

2018-02-19 Thread Alexandre Courbot
fcount v4l2_ctrl_request_put(): decrease refcount and delete if it reaches 0. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> [acour...@chromium.org: turn v4l2_ctrl_request_alloc into init function] Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/

[RFCv4 06/21] v4l2-ctrls: support g/s_ext_ctrls for requests

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core

[RFCv4 07/21] v4l2-ctrls: add v4l2_ctrl_request_setup

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> Add a helper function that can set controls from a request. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core

[RFCv4 05/21] v4l2-ctrls: use ref in helper instead of ctrl

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> The next patch needs the reference to a control instead of the control itself, so change struct v4l2_ctrl_helper accordingly. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.or

[RFCv4 08/21] [WAR] v4l2-ctrls: do not clone non-standard controls

2018-02-19 Thread Alexandre Courbot
controls with requests, but that is enough for testing purposes. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ctrls.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-c

[RFCv4 11/21] media: v4l2_fh: add request entity field

2018-02-19 Thread Alexandre Courbot
Allow drivers to assign a request entity to v4l2_fh. This will be useful for request-aware ioctls to find out which request entity to use. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- include/media/v4l2-fh.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include

[RFCv4 09/21] v4l2: add request API support

2018-02-19 Thread Alexandre Courbot
Add a v4l2 request entity data structure that takes care of storing the request-related state of a V4L2 device ; in this case, its controls. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2-core/v4l2-request.c

[RFCv4 10/21] videodev2.h: Add request_fd field to v4l2_buffer

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> When queuing buffers allow for passing the request that should be associated with this buffer. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot <acour.

[RFCv4 12/21] media: videobuf2: add support for requests

2018-02-19 Thread Alexandre Courbot
Make vb2 core aware of requests. Drivers can specify whether a given queue accepts requests or not. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/common/videobuf2/videobuf2-core.c | 3 +++ include/media/videobuf2-core.h | 4 2 files chan

[RFCv4 17/21] media: mem2mem: support for requests

2018-02-19 Thread Alexandre Courbot
Add generic support for requests to the mem2mem framework. This just requires calling vb2_qbuf_request() instead of vb2_qbuf() in v4l2_m2m_qbuf(). Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-mem2mem.c | 3 ++- 1 file changed, 2 insertions

[RFCv4 13/21] media: videobuf2-v4l2: support for requests

2018-02-19 Thread Alexandre Courbot
and v4l2_request_entity_data to describe their entity and entity data respectively. Also add the vb2_request_submit() helper function which drivers can invoke in order to queue all the buffers previously queued into a request into the regular vb2 queue. Signed-off-by: Alexandre Courbot <acour...@chromium.

[RFCv4 14/21] videodev2.h: add request_fd field to v4l2_ext_controls

2018-02-19 Thread Alexandre Courbot
Allow to specify a request to be used with the S_EXT_CTRLS and G_EXT_CTRLS operations. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- include/uapi/linux/videodev2.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)

[RFCv4 15/21] v4l2-ctrls: support requests in EXT_CTRLS ioctls

2018-02-19 Thread Alexandre Courbot
Read and use the request_fd field of struct v4l2_ext_controls to apply VIDIOC_G_EXT_CTRLS or VIDIOC_S_EXT_CTRLS to a request when asked by userspace. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/omap3isp/ispvideo.c | 2 +- drivers/media/v4l2-cor

[RFCv4 16/21] v4l2: video_device: support for creating requests

2018-02-19 Thread Alexandre Courbot
Add a new VIDIOC_NEW_REQUEST ioctl, which allows to instanciate requests on devices that support the request API. Requests created that way can only control the device they originate from, making them suitable for simple devices, but not complex pipelines. Signed-off-by: Alexandre Courbot <ac

[RFCv4 20/21] media: vivid: add request support for the video capture device

2018-02-19 Thread Alexandre Courbot
Allow to use requests with the video capture device. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/vivid/Kconfig | 1 + drivers/media/platform/vivid/vivid-core.c | 63 ++- drivers/media/platform/vivid/vivid-core.h

[RFCv4 18/21] Documentation: v4l: document request API

2018-02-19 Thread Alexandre Courbot
Document the request API for V4L2 devices, and amend the documentation of system calls influenced by it. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- Documentation/media/uapi/v4l/buffer.rst | 9 +- Documentation/media/uapi/v4l/common.rst | 1 + Documentation

[RFCv4 21/21] [WIP] media: media-device: support for creating requests

2018-02-19 Thread Alexandre Courbot
to media entities. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/media-device.c | 11 +++ include/media/mc-request.h | 33 + include/media/media-device.h | 1 + include/media/media-entity.h | 5 + include/uapi/linux/m

[RFCv4 19/21] media: vim2m: add request support

2018-02-19 Thread Alexandre Courbot
Set the necessary ops for supporting requests in vim2m. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/Kconfig | 1 + drivers/media/platform/vim2m.c | 75 ++ 2 files changed, 76 insertions(+) diff --git a/drivers

[RFCv4 01/21] media: add request API core and UAPI

2018-02-19 Thread Alexandre Courbot
. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/Kconfig | 3 + drivers/media/Makefile | 6 + drivers/media/media-request.c | 341 include/media/media-request.h

[RFCv3 00/17] Request API, take three

2018-02-06 Thread Alexandre Courbot
As discussed yesterday, here is a rebase on the media master branch. A few minor fixes for typos have also slept in, but otherwise this is equivalent to v2. I expect to have the buffer queueing behavior fixed in the next version. Alexandre Courbot (9): media: add request API core and UAPI

[RFCv3 02/17] videodev2.h: Add request_fd field to v4l2_buffer

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> When queuing buffers allow for passing the request that should be associated with this buffer. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot <acour.

[RFCv3 01/17] media: add request API core and UAPI

2018-02-06 Thread Alexandre Courbot
. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/Makefile | 3 +- drivers/media/media-device.c | 7 + drivers/media/media-request-mgr.c| 105 drivers/media/media-request.c

[RFCv3 06/17] v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev

2018-02-06 Thread Alexandre Courbot
equest API since we need to skip such controls. TODO: check drivers/staging/media/imx/imx-media-fim.c change. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/dvb-frontends/rtl2832_sdr.c| 5 +--

[RFCv3 08/17] v4l2-ctrls: add core request API

2018-02-06 Thread Alexandre Courbot
fcount v4l2_ctrl_request_put(): decrease refcount and delete if it reaches 0. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> [acour...@chromium.org: turn v4l2_ctrl_request_alloc into init function] Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/

[RFCv3 04/17] media: vb2: add support for requests in QBUF ioctl

2018-02-06 Thread Alexandre Courbot
Support the request argument of the QBUF ioctl. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ioctl.c | 83 +++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioct

[RFCv3 07/17] v4l2-ctrls: prepare internal structs for request API

2018-02-06 Thread Alexandre Courbot
hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + include/media/v4l2-ctrls.h | 4 2 files changed, 5 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c

[RFCv3 05/17] media: Document the media request API

2018-02-06 Thread Alexandre Courbot
] Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- Documentation/media/uapi/mediactl/media-funcs.rst | 1 + .../media/uapi/mediactl/media-ioc-request-cmd.rst | 142 + 2 files changed, 143 insertions(+) create mode 100644 Documentation/media/uapi/mediactl/media-i

[RFCv3 10/17] v4l2-ctrls: support g/s_ext_ctrls for requests

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core

[RFCv3 12/17] v4l2: add request API support

2018-02-06 Thread Alexandre Courbot
Add a v4l2 request entity data structure that takes care of storing the request-related state of a V4L2 device ; in this case, its controls. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-request.

[RFCv3 11/17] v4l2-ctrls: add v4l2_ctrl_request_setup

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> Add a helper function that can set controls from a request. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core

[RFCv3 16/17] media: vim2m: add media device

2018-02-06 Thread Alexandre Courbot
Request API requires a media node. Add one to the vim2m driver so we can use requests with it. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/vim2m.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/media/platform/v

[RFCv3 13/17] videodev2.h: add request_fd field to v4l2_ext_controls

2018-02-06 Thread Alexandre Courbot
Allow to specify a request to be used with the S_EXT_CTRLS and G_EXT_CTRLS operations. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- include/uapi/linux/videodev2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/videodev2.h b/includ

[RFCv3 15/17] v4l2: document the request API interface

2018-02-06 Thread Alexandre Courbot
Document how the request API can be used along with the existing V4L2 interface. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- Documentation/media/uapi/v4l/buffer.rst| 10 +- Documentation/media/uapi/v4l/common.rst| 1 + Documentation/media/ua

[RFCv3 17/17] media: vim2m: add request support

2018-02-06 Thread Alexandre Courbot
Set the necessary ops for supporting requests in vim2m. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/vim2m.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers

[RFCv3 14/17] v4l2-ctrls: support requests in EXT_CTRLS ioctls

2018-02-06 Thread Alexandre Courbot
Read and use the request_fd field of struct v4l2_ext_controls to apply VIDIOC_G_EXT_CTRLS or VIDIOC_S_EXT_CTRLS to a request when asked by userspace. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ioctl.c | 36 +

[RFCv3 09/17] v4l2-ctrls: use ref in helper instead of ctrl

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> The next patch needs the reference to a control instead of the control itself, so change struct v4l2_ctrl_helper accordingly. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.or

[RFCv3 03/17] media: videobuf2: add support for requests

2018-02-06 Thread Alexandre Courbot
Make vb2 aware of requests. Drivers can specify whether a given queue can accept requests or not. Queues that accept requests will block on a buffer that is part of a request until that request is submitted. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/

Re: Compliance tests for new public API features

2018-02-05 Thread Alexandre Courbot
Hi Hans, On Sun, Feb 4, 2018 at 10:30 PM, Hans Verkuil wrote: > Hi Gustavo, Alexandre, > > As you may have seen I have been extending the v4l2-compliance utility with > tests > for v4l-subdevX and mediaX devices. In the process of doing that I promptly > found a bunch of

[PATCH] media: v4l2_fh.h: add missing kconfig.h include

2018-02-04 Thread Alexandre Courbot
v4l2_fh.h uses the IS_ENABLED() macro and thus should include kconfig.h. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- include/media/v4l2-fh.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h index 62633e7d2630..ea73fe

[PATCH] v4l: vidioc-prepare-buf.rst: fix link to VIDIOC_QBUF

2018-02-04 Thread Alexandre Courbot
The description for VIDIOC_PREPARE_BUF results in the following sentence: "...before actually enqueuing it, using the ioctl VIDIOC_QBUF, VIDIOC_DQBUF ioctl...". The intent is to only refer to VIDIOC_QBUF though, so fix this. Signed-off-by: Alexandre Courbot <acour...

[PATCH] media: media-types.rst: fix typo

2018-02-04 Thread Alexandre Courbot
with -> which Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- Documentation/media/uapi/mediactl/media-types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/media/uapi/mediactl/media-types.rst b/Documentation/media/uapi/mediactl/media-

Re: [RFCv2 05/17] media: Document the media request API

2018-02-01 Thread Alexandre Courbot
Hi Randy, On Fri, Feb 2, 2018 at 3:14 AM, Randy Dunlap <rdun...@infradead.org> wrote: > On 01/31/2018 02:24 AM, Alexandre Courbot wrote: >> From: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com> >> >> The media request API is made of a new ioctl t

[RFCv2 02/17] videodev2.h: Add request_fd field to v4l2_buffer

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> When queuing buffers allow for passing the request that should be associated with this buffer. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot <acour.

[RFCv2 04/17] media: vb2: add support for requests in QBUF ioctl

2018-01-31 Thread Alexandre Courbot
Support the request argument of the QBUF ioctl. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ioctl.c | 83 +++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioct

[RFCv2 01/17] media: add request API core and UAPI

2018-01-31 Thread Alexandre Courbot
. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/Makefile | 3 +- drivers/media/media-device.c | 7 + drivers/media/media-request-mgr.c| 105 drivers/media/media-request.c

[RFCv2 08/17] v4l2-ctrls: add core request API

2018-01-31 Thread Alexandre Courbot
fcount v4l2_ctrl_request_put(): decrease refcount and delete if it reaches 0. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> [acour...@chromium.org: turn v4l2_ctrl_request_alloc into init function] Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/

[RFCv2 12/17] v4l2: add request API support

2018-01-31 Thread Alexandre Courbot
Add a v4l2 request entity data structure that takes care of storing the request-related state of a V4L2 device ; in this case, its controls. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-request.

[RFCv2 13/17] videodev2.h: add request_fd field to v4l2_ext_controls

2018-01-31 Thread Alexandre Courbot
Allow to specify a request to be used with the S_EXT_CTRLS and G_EXT_CTRLS operations. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- include/uapi/linux/videodev2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/videodev2.h b/includ

[RFCv2 10/17] v4l2-ctrls: support g/s_ext_ctrls for requests

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core

[RFCv2 14/17] v4l2-ctrls: support requests in EXT_CTRLS ioctls

2018-01-31 Thread Alexandre Courbot
Read and use the request_fd field of struct v4l2_ext_controls to apply VIDIOC_G_EXT_CTRLS or VIDIOC_S_EXT_CTRLS to a request when asked by userspace. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ioctl.c | 36 +

[RFCv2 17/17] media: vim2m: add request support

2018-01-31 Thread Alexandre Courbot
Set the necessary ops for supporting requests in vim2m. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/vim2m.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers

[RFCv2 16/17] media: vim2m: add media device

2018-01-31 Thread Alexandre Courbot
Request API requires a media node. Add one to the vim2m driver so we can use requests with it. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/platform/vim2m.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/media/platform/v

[RFCv2 15/17] v4l2: document the request API interface

2018-01-31 Thread Alexandre Courbot
Document how the request API can be used along with the existing V4L2 interface. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- Documentation/media/uapi/v4l/buffer.rst| 10 +- Documentation/media/uapi/v4l/common.rst| 1 + Documentation/media/ua

[RFCv2 07/17] v4l2-ctrls: prepare internal structs for request API

2018-01-31 Thread Alexandre Courbot
hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + include/media/v4l2-ctrls.h | 4 2 files changed, 5 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c

[RFCv2 11/17] v4l2-ctrls: add v4l2_ctrl_request_setup

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil <hans.verk...@cisco.com> Add a helper function that can set controls from a request. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l2-core

[RFCv2 03/17] media: videobuf2: add support for requests

2018-01-31 Thread Alexandre Courbot
Make vb2 aware of requests. Drivers can specify whether a given queue can accept requests or not. Queues that accept requests will block on a buffer that is part of a request until that request is submitted. Signed-off-by: Alexandre Courbot <acour...@chromium.org> --- drivers/media/v4l

  1   2   >