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

2018-02-19 Thread Alexandre Courbot
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 into the vb2 queue if relevent. This function expects that drivers invoking it are using instances of v4l2_request_entity and v4l2_request_e

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

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

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

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

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

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

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

2018-02-19 Thread Alexandre Courbot
Only standard controls can be successfully cloned: handler_new_ref, used by v4l2_ctrl_request_clone(), forcibly calls v4l2_ctrl_new_std() which fails to find custom controls names, and we eventually hit the condition that name == NULL in v4l2_ctrl_new(). This prevents us from using non-standard co

[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 04/21] v4l2-ctrls: add core request API

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil Add the four core request functions: v4l2_ctrl_request_init() initializes a new (empty) request. v4l2_ctrl_request_clone() resets a request based on another request (or clears it if that request is NULL). v4l2_ctrl_request_get(): increase refcount v4l2_ctrl_request_put(): decr

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

[RFCv4 00/21] Request API

2018-02-19 Thread Alexandre Courbot
Hi everyone, And thanks for all the feedback on the previous version! I have tried to address as much as possible, which results in (another) almost rewrite. But I think the behavior and structure are converging to something satisfying and usable. Besides the buffer queuing behavior that has b

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

2018-02-19 Thread Alexandre Courbot
From: Hans Verkuil Add a 'bool from_other_dev' argument: set to true if the two handlers refer to different devices (e.g. it is true when inheriting controls from a subdev into a main v4l2 bridge driver). This will be used later when implementing support for the request API since we need to skip

[RFCv4 00/21] Request API

2018-02-19 Thread Alexandre Courbot
(resending with correct word-wrap - sorry for the inconvenience) Hi everyone, And thanks for all the feedback on the previous version! I have tried to address as much as possible, which results in (another) almost rewrite. But I think the behavior and structure are converging to something satisfy

Re: [PATCH v9 07/11] media: i2c: ov772x: Support frame interval handling

2018-02-19 Thread kbuild test robot
Hi Jacopo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.16-rc2 next-20180220] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com

[RFC PATCH] media: i2c: ov772x: ov772x_frame_intervals[] can be static

2018-02-19 Thread kbuild test robot
Fixes: 42b7d5be5f1f ("media: i2c: ov772x: Support frame interval handling") Signed-off-by: Fengguang Wu --- ov772x.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index eba71d97..0d8ce2a 100644 --- a/drivers/media/i

Hello Beautiful

2018-02-19 Thread Jack
Good day dear, i hope this mail meets you well? my name is Jack, from the U.S. I know this may seem inappropriate so i ask for your forgiveness but i wish to get to know you better, if I may be so bold. I consider myself an easy-going man, adventurous, honest and fun loving person but I am curre

[PATCH v2] Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c.

2018-02-19 Thread Quytelda Kahja
Fix a coding style problem. Signed-off-by: Quytelda Kahja --- This is the patch without the unnecessary fixes for line length. drivers/staging/media/bcm2048/radio-bcm2048.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/media/bcm2048

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

2018-02-19 Thread Philippe Ombredanne
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 controls. > > Signed-off-by: Alexandre Courbot > --- /dev/null > +++ b/drivers/media/v4l2-core/v4l2-r

<    1   2