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

2018-10-10 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-10 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-10 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: [PATCH v6 1/4] venus: firmware: add routine to reset ARM9

2018-08-26 Thread Alexandre Courbot
On Fri, Aug 24, 2018 at 5:57 PM Stanimir Varbanov wrote: > > Hi Alex, > > On 08/24/2018 10:38 AM, Alexandre Courbot wrote: > > On Thu, Aug 23, 2018 at 11:29 PM Vikash Garodia > > wrote: > >> > >> Add routine to reset the ARM9 and brings it out of res

Re: [PATCH v6 2/4] venus: firmware: move load firmware in a separate function

2018-08-26 Thread Alexandre Courbot
On Fri, Aug 24, 2018 at 6:01 PM Stanimir Varbanov wrote: > > Hi Alex, > > On 08/24/2018 10:39 AM, Alexandre Courbot wrote: > > On Thu, Aug 23, 2018 at 11:29 PM Vikash Garodia > > wrote: > >> > >> Separate firmware loading part into a new functio

Re: [PATCH v6 3/4] venus: firmware: add no TZ boot and shutdown routine

2018-08-26 Thread Alexandre Courbot
On Fri, Aug 24, 2018 at 9:26 PM Vikash Garodia wrote: > > Hi Alex, > > On 2018-08-24 13:09, Alexandre Courbot wrote: > > On Thu, Aug 23, 2018 at 11:29 PM Vikash Garodia > > wrote: > > [snip] > > >> +struct video_firmware { > >> + s

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 i

[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 --- drivers/media/platform/qcom/venus/vdec.c | 13 +++-- drivers/media

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

2018-03-19 Thread Alexandre Courbot
On Thu, Mar 15, 2018 at 6:52 PM, Stanimir Varbanov 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 >> matches, and returns NULL if venus_helper_c

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 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 >> wrote: >> > Hi, >> > >> > On Thu, 2018-03-08 at 22:4

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 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 to work with an actual driver, but yo

[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 Change-Id: I4ff66e0b85172598efa59a6f01da8cb60597a6a5 --- drivers/media/platform/qcom/venus/vdec.c | 13 +++-- drivers/media/platform/qcom/venus/venc.c

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, Paul Kocialkowski wrote: >>> > Hi, >>> > >>> > Firs

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 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 can call to queue a buffer into a request &

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

2018-03-08 Thread Alexandre Courbot
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 the necessary ops for supporting

Re: [PATCH] arm64: defconfig: Enable typec-phy and extcon-usbc-cros-ec for rk3399

2018-02-28 Thread Alexandre Courbot
On Wed, Feb 28, 2018 at 11:02 PM, Enric Balletbo i Serra wrote: > Enables typec phyter and extcon driver for cable detection that is used by > USB 3.0 controller for Rockchip rk3399 SoCs. > > Signed-off-by: Enric Balletbo i Serra Tested-by: Alexandre Courbot Thanks! This

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 wrote: > On 02/21/2018 07:01 AM, Alexandre Courbot wrote: >> Hi Hans, >> >> On Tue, Feb 20, 2018 at 7:36 PM, Hans Verkuil wrote: >>> On 02/20/18 05:44, Alexandre Courbot wrote: > > > >

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 wrote: > On 02/20/18 05:44, Alexandre Courbot wrote: >> From: Hans Verkuil >> >> When queuing buffers allow for passing the request that should >> be associated with this buffer. >> >> Signed-off-by: Hans V

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 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 >> instead of directly

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

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

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 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 way can >> only control the

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 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 the >> UAPI and core

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 wrote: > On Tue, Feb 20, 2018 at 5:44 AM, 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 cont

[RFCv4 00/21] Request API

2018-02-19 Thread Alexandre Courbot
amera 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: suppor

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

2018-02-19 Thread Alexandre Courbot
(): decrease refcount and delete if it reaches 0. Signed-off-by: Hans Verkuil [acour...@chromium.org: turn v4l2_ctrl_request_alloc into init function] Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 106 ++- include/media/v4l2-ctrls.h | 7

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

2018-02-19 Thread Alexandre Courbot
we need to skip such controls. TODO: check drivers/staging/media/imx/imx-media-fim.c change. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/dvb-frontends/rtl2832_sdr.c | 5 +- drivers/media/pci/bt8xx/bttv-driver.c | 2 +- drivers/media/pci/cx23885/cx2

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

2018-02-19 Thread Alexandre Courbot
. Signed-off-by: Alexandre Courbot --- drivers/media/Kconfig | 3 + drivers/media/Makefile | 6 + drivers/media/media-request.c | 341 include/media/media-request.h | 349 + include/uapi/linux/media

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

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 37 +--- 1 file changed, 33 insertions(+), 4 deletions

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

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil 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 Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 18 +- 1 file changed, 9

[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 --- 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-ctrls.c index 166647817efb

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

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil Add a helper function that can set controls from a request. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 71 include/media/v4l2-ctrls.h | 2 + 2 files changed, 73 insertions

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

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil When queuing buffers allow for passing the request that should be associated with this buffer. Signed-off-by: Hans Verkuil [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 2 +- drivers

[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 --- include/media/v4l2-fh.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/media/v4l2-fh.h b/include/media

[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

[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 --- drivers/media/common/videobuf2/videobuf2-core.c | 3 +++ include/media/videobuf2-core.h | 4 2 files changed, 7 insertions(+) diff

[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 --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- include/uapi/linux/videodev2.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media

[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 --- drivers/media/platform/omap3isp/ispvideo.c | 2 +- drivers/media/v4l2-core/v4l2-ctrls.c | 98

[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 --- drivers/media/platform/vivid/Kconfig | 1 + drivers/media/platform/vivid/vivid-core.c | 63 ++- drivers/media/platform/vivid/vivid-core.h | 3 + .../media/platform/vivid

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

2018-02-19 Thread Alexandre Courbot
media entities. Signed-off-by: Alexandre Courbot --- 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/media.h | 2 ++ 5 files

[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 --- drivers/media/platform/Kconfig | 1 + drivers/media/platform/vim2m.c | 75 ++ 2 files changed, 76 insertions(+) diff --git a/drivers/media/platform/Kconfig b/drivers

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

2018-02-19 Thread Alexandre Courbot
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 --- .../media/common

[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 --- Documentation/media/uapi/v4l/buffer.rst | 9 +- Documentation/media/uapi/v4l/common.rst | 1 + Documentation/media/uapi/v4l/request

[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 --- drivers/media/v4l2-core/v4l2-mem2mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[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 --- drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2-core/v4l2-request.c | 178

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

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil Add a refcount and is_request bool to struct v4l2_ctrl_handler: this is used to refcount a handler that represents a request. Add a p_req field to struct v4l2_ctrl_ref that will store the request value. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot

[RFCv4 00/21] Request API

2018-02-19 Thread Alexandre Courbot
etime 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 vide

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

2018-02-06 Thread Alexandre Courbot
From: Laurent Pinchart The media request API is made of a new ioctl to implement request management. Document it. Signed-off-by: Laurent Pinchart [acour...@chromium.org: adapt for newest API] Signed-off-by: Alexandre Courbot --- Documentation/media/uapi/mediactl/media-funcs.rst | 1

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

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil When queuing buffers allow for passing the request that should be associated with this buffer. Signed-off-by: Hans Verkuil [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 3 ++- drivers

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

2018-02-06 Thread Alexandre Courbot
we need to skip such controls. TODO: check drivers/staging/media/imx/imx-media-fim.c change. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/dvb-frontends/rtl2832_sdr.c| 5 +-- drivers/media/pci/bt8xx/bttv-driver.c| 2 +- drivers/media/pci/cx238

[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 --- drivers/media/common/videobuf2/videobuf2-core.c

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

2018-02-06 Thread Alexandre Courbot
(): decrease refcount and delete if it reaches 0. Signed-off-by: Hans Verkuil [acour...@chromium.org: turn v4l2_ctrl_request_alloc into init function] Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 106 ++- include/media/v4l2-ctrls.h

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

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 37 1 file changed, 33 insertions(+), 4

[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 --- drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-request.c | 54

[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 --- drivers/media/v4l2-core/v4l2-ioctl.c | 36 1 file changed, 36

[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 --- drivers/media/platform/vim2m.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers/media

[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 --- drivers/media/platform/vim2m.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index

[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 --- Documentation/media/uapi/v4l/buffer.rst| 10 +- Documentation/media/uapi/v4l/common.rst| 1 + Documentation/media/uapi/v4l/request-api.rst | 236

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

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil Add a refcount and is_request bool to struct v4l2_ctrl_handler: this is used to refcount a handler that represents a request. Add a p_req field to struct v4l2_ctrl_ref that will store the request value. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot

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

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil 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 Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 18 +- 1 file changed, 9

[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 --- include/uapi/linux/videodev2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index

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

2018-02-06 Thread Alexandre Courbot
From: Hans Verkuil Add a helper function that can set controls from a request. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 71 include/media/v4l2-ctrls.h | 2 + 2 files changed, 73

[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 --- drivers/media/v4l2-core/v4l2-ioctl.c | 83 +++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2

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

2018-02-06 Thread Alexandre Courbot
. Signed-off-by: Alexandre Courbot --- drivers/media/Makefile | 3 +- drivers/media/media-device.c | 7 + drivers/media/media-request-mgr.c| 105 drivers/media/media-request.c| 311 +++ drivers/media/v4l2-core/v4l2

[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

[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 --- 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..ea73fef8bdc0 100644 --- a/include/media

[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 --- Documentation/medi

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

2018-02-04 Thread Alexandre Courbot
with -> which Signed-off-by: Alexandre Courbot --- 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-types.rst index 8d64b0c06

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 wrote: > On 01/31/2018 02:24 AM, Alexandre Courbot wrote: >> From: Laurent Pinchart >> >> The media request API is made of a new ioctl to implement request >> management. Document it. >> >> Sig

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

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil When queuing buffers allow for passing the request that should be associated with this buffer. Signed-off-by: Hans Verkuil [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot --- drivers/media/usb/cpia2/cpia2_v4l.c | 2 +- drivers

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

2018-01-31 Thread Alexandre Courbot
. Signed-off-by: Alexandre Courbot --- drivers/media/Makefile | 3 +- drivers/media/media-device.c | 7 + drivers/media/media-request-mgr.c| 105 drivers/media/media-request.c| 311 +++ drivers/media/v4l2-core/v4l2

[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 --- drivers/media/v4l2-core/v4l2-ioctl.c | 83 +++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2

[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 --- drivers/media/v4l2-core/Makefile | 2 +- drivers/media/v4l2-core/v4l2-request.c | 54

[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 --- include/uapi/linux/videodev2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index

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

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 37 1 file changed, 33 insertions(+), 4

[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 --- drivers/media/v4l2-core/v4l2-ioctl.c | 36 1 file changed, 36

[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 --- drivers/media/platform/vim2m.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers/media

[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 --- Documentation/media/uapi/v4l/buffer.rst| 10 +- Documentation/media/uapi/v4l/common.rst| 1 + Documentation/media/uapi/v4l/request-api.rst | 236

[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 --- drivers/media/platform/vim2m.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index

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

2018-01-31 Thread Alexandre Courbot
(): decrease refcount and delete if it reaches 0. Signed-off-by: Hans Verkuil [acour...@chromium.org: turn v4l2_ctrl_request_alloc into init function] Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 106 ++- include/media/v4l2-ctrls.h

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

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil Add a refcount and is_request bool to struct v4l2_ctrl_handler: this is used to refcount a handler that represents a request. Add a p_req field to struct v4l2_ctrl_ref that will store the request value. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot

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

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil Add a helper function that can set controls from a request. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 71 include/media/v4l2-ctrls.h | 2 + 2 files changed, 73

[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 --- drivers/media/v4l2-core/videobuf2-core.c | 133

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

2018-01-31 Thread Alexandre Courbot
we need to skip such controls. TODO: check drivers/staging/media/imx/imx-media-fim.c change. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/dvb-frontends/rtl2832_sdr.c| 5 +-- drivers/media/pci/bt8xx/bttv-driver.c| 2 +- drivers/media/pci/cx238

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

2018-01-31 Thread Alexandre Courbot
From: Hans Verkuil 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 Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 18 +- 1 file changed, 9

[RFCv2 00/17] Request API, take three

2018-01-31 Thread Alexandre Courbot
hould be used. Alexandre Courbot (9): media: add request API core and UAPI media: videobuf2: add support for requests media: vb2: add support for requests in QBUF ioctl v4l2: add request API support videodev2.h: add request_fd field to v4l2_ext_controls v4l2-ctrls: support reques

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

2018-01-31 Thread Alexandre Courbot
From: Laurent Pinchart The media request API is made of a new ioctl to implement request management. Document it. Signed-off-by: Laurent Pinchart [acour...@chromium.org: adapt for newest API] Signed-off-by: Alexandre Courbot --- Documentation/media/uapi/mediactl/media-funcs.rst | 1

Re: [RFC PATCH 5/8] media: Document the media request API

2018-01-29 Thread Alexandre Courbot
On Tue, Jan 30, 2018 at 1:04 AM, Hans Verkuil wrote: > On 01/26/2018 07:02 AM, Alexandre Courbot wrote: >> From: Laurent Pinchart >> >> The media request API is made of a new ioctl to implement request >> management. Document it. >> >> Signed-off-by: Laur

Re: [RFC PATCH 0/8] [media] Request API, take three

2018-01-29 Thread Alexandre Courbot
Hi Hans, On Mon, Jan 29, 2018 at 8:21 PM, Hans Verkuil wrote: > On 01/26/2018 07:02 AM, Alexandre Courbot wrote: >> Howdy. Here is your bi-weekly request API redesign! ;) >> >> Again, this is a simple version that only implements the flow of requests, >> without apply

Re: [RFC PATCH 6/8] v4l2: document the request API interface

2018-01-29 Thread Alexandre Courbot
On Tue, Jan 30, 2018 at 1:03 AM, Hans Verkuil wrote: > On 01/26/2018 07:02 AM, Alexandre Courbot wrote: >> Document how the request API can be used along with the existing V4L2 >> interface. >> >> Signed-off-by: Alexandre Courbot >> --- >> Documentati

Re: [RFC PATCH 1/9] media: add request API core and UAPI

2018-01-29 Thread Alexandre Courbot
variable size IOCTL argument support is no longer included. Do we need this for the request API? > > On Fri, Dec 15, 2017 at 04:56:17PM +0900, Alexandre Courbot wrote: >> The request API provides a way to group buffers and device parameters >> into units of work to be queued and

[RFC PATCH 1/8] media: add request API core and UAPI

2018-01-25 Thread Alexandre Courbot
. Signed-off-by: Alexandre Courbot --- drivers/media/Makefile | 3 +- drivers/media/media-device.c | 7 + drivers/media/media-request-mgr.c| 107 drivers/media/media-request.c| 308 +++ drivers/media/v4l2-core/v4l2

[RFC PATCH 2/8] videodev2.h: Add request field to v4l2_buffer

2018-01-25 Thread Alexandre Courbot
From: Hans Verkuil When queuing buffers allow for passing the request ID that should be associated with this buffer. Signed-off-by: Hans Verkuil [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot --- drivers/media/usb/cpia2/cpia2_v4l.c | 2 +- drivers

[RFC PATCH 3/8] media: videobuf2: add support for requests

2018-01-25 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 --- drivers/media/v4l2-core/videobuf2-core.c | 125

[RFC PATCH 5/8] media: Document the media request API

2018-01-25 Thread Alexandre Courbot
From: Laurent Pinchart The media request API is made of a new ioctl to implement request management. Document it. Signed-off-by: Laurent Pinchart [acour...@chromium.org: adapt for newest API] Signed-off-by: Alexandre Courbot --- Documentation/media/uapi/mediactl/media-funcs.rst | 1

[RFC PATCH 7/8] media: vim2m: add media device

2018-01-25 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 --- drivers/media/platform/vim2m.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers/media

[RFC PATCH 6/8] v4l2: document the request API interface

2018-01-25 Thread Alexandre Courbot
Document how the request API can be used along with the existing V4L2 interface. Signed-off-by: Alexandre Courbot --- Documentation/media/uapi/v4l/buffer.rst | 10 +- Documentation/media/uapi/v4l/common.rst | 1 + Documentation/media/uapi/v4l/request-api.rst | 194

[RFC PATCH 8/8] media: vim2m: add request support

2018-01-25 Thread Alexandre Courbot
Set the necessary ops for supporting requests in vim2m. Signed-off-by: Alexandre Courbot --- drivers/media/platform/vim2m.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index a32e8a7950eb

[RFC PATCH 4/8] media: vb2: add support for requests in QBUF ioctl

2018-01-25 Thread Alexandre Courbot
Support the request argument of the QBUF ioctl. Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ioctl.c | 79 +++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2

[RFC PATCH 0/8] [media] Request API, take three

2018-01-25 Thread Alexandre Courbot
objection to that? IIRC the earlier design documents mentioned this possibility. Alexandre Courbot (6): media: add request API core and UAPI media: videobuf2: add support for requests media: vb2: add support for requests in QBUF ioctl v4l2: document the request API interface media: vim2m: a

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