From: Hans Verkuil <hverkuil@xs4all.nl>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org, pawel@osciak.com,
Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFC PATCH 03/11] videodev2.h: rename reserved2 to config_store in v4l2_buffer.
Date: Mon, 17 Nov 2014 09:41:31 +0100 [thread overview]
Message-ID: <5469B4BB.2040208@xs4all.nl> (raw)
In-Reply-To: <20141114144202.GD8907@valkosipuli.retiisi.org.uk>
On 11/14/2014 03:42 PM, Sakari Ailus wrote:
> Hi Hans,
>
> On Sun, Sep 21, 2014 at 04:48:21PM +0200, Hans Verkuil wrote:
>> From: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> When queuing buffers allow for passing the configuration store ID that
>> should be associated with this buffer. Use the 'reserved2' field for this.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> ---
>> drivers/media/usb/cpia2/cpia2_v4l.c | 2 +-
>> drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 4 ++--
>> drivers/media/v4l2-core/videobuf2-core.c | 4 +++-
>> include/uapi/linux/videodev2.h | 3 ++-
>> 4 files changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/media/usb/cpia2/cpia2_v4l.c b/drivers/media/usb/cpia2/cpia2_v4l.c
>> index 9caea83..0f28d2b 100644
>> --- a/drivers/media/usb/cpia2/cpia2_v4l.c
>> +++ b/drivers/media/usb/cpia2/cpia2_v4l.c
>> @@ -952,7 +952,7 @@ static int cpia2_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
>> buf->sequence = cam->buffers[buf->index].seq;
>> buf->m.offset = cam->buffers[buf->index].data - cam->frame_buffer;
>> buf->length = cam->frame_size;
>> - buf->reserved2 = 0;
>> + buf->config_store = 0;
>> buf->reserved = 0;
>> memset(&buf->timecode, 0, sizeof(buf->timecode));
>>
>> diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
>> index e502a5f..5afef3a 100644
>> --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
>> +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
>> @@ -324,7 +324,7 @@ struct v4l2_buffer32 {
>> __s32 fd;
>> } m;
>> __u32 length;
>> - __u32 reserved2;
>> + __u32 config_store;
>> __u32 reserved;
>> };
>>
>> @@ -489,7 +489,7 @@ static int put_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user
>> put_user(kp->timestamp.tv_usec, &up->timestamp.tv_usec) ||
>> copy_to_user(&up->timecode, &kp->timecode, sizeof(struct v4l2_timecode)) ||
>> put_user(kp->sequence, &up->sequence) ||
>> - put_user(kp->reserved2, &up->reserved2) ||
>> + put_user(kp->config_store, &up->config_store) ||
>> put_user(kp->reserved, &up->reserved))
>> return -EFAULT;
>>
>> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
>> index 7e6aff6..e3b6c50 100644
>> --- a/drivers/media/v4l2-core/videobuf2-core.c
>> +++ b/drivers/media/v4l2-core/videobuf2-core.c
>> @@ -655,7 +655,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, struct v4l2_buffer *b)
>>
>> /* Copy back data such as timestamp, flags, etc. */
>> memcpy(b, &vb->v4l2_buf, offsetof(struct v4l2_buffer, m));
>> - b->reserved2 = vb->v4l2_buf.reserved2;
>> + b->config_store = vb->v4l2_buf.config_store;
>> b->reserved = vb->v4l2_buf.reserved;
>>
>> if (V4L2_TYPE_IS_MULTIPLANAR(q->type)) {
>> @@ -680,6 +680,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, struct v4l2_buffer *b)
>> else if (q->memory == V4L2_MEMORY_DMABUF)
>> b->m.fd = vb->v4l2_planes[0].m.fd;
>> }
>> + b->config_store = vb->v4l2_buf.config_store;
>
> Either this chunk or the one above it is redundant. I'd keep the upper one.
Well spotted. I agree, I'll keep the upper one.
Regards,
Hans
next prev parent reply other threads:[~2014-11-17 8:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-21 14:48 [RFC PATCH 00/11] Add configuration store support Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 01/11] videodev2.h: add V4L2_CTRL_FLAG_CAN_STORE Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 02/11] videodev2.h: add config_store to v4l2_ext_controls Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 03/11] videodev2.h: rename reserved2 to config_store in v4l2_buffer Hans Verkuil
2014-11-14 14:42 ` Sakari Ailus
2014-11-17 8:41 ` Hans Verkuil [this message]
2014-11-14 15:35 ` Sakari Ailus
2014-11-17 8:41 ` Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 04/11] v4l2-ctrls: add config store support Hans Verkuil
2014-11-14 15:44 ` Sakari Ailus
2014-11-17 8:46 ` Hans Verkuil
2015-12-02 12:03 ` Enric Balletbo Serra
2015-12-02 12:33 ` Hans Verkuil
2015-12-02 14:09 ` Enric Balletbo Serra
2014-09-21 14:48 ` [RFC PATCH 05/11] v4l2-ctrls: add function to apply a configuration store Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 06/11] videodev2.h: add new v4l2_ext_control flags field Hans Verkuil
2014-11-15 14:18 ` Sakari Ailus
2014-11-15 17:44 ` Sakari Ailus
2014-11-17 8:57 ` Hans Verkuil
2014-11-17 14:35 ` Sakari Ailus
2014-11-17 8:48 ` Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 07/11] v4l2-ctrls: implement 'ignore after use' support Hans Verkuil
2014-11-15 21:10 ` Sakari Ailus
2014-11-17 9:02 ` Hans Verkuil
2014-11-17 9:31 ` Sakari Ailus
2014-11-17 9:46 ` Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 08/11] vivid: add test config store for the contrast control Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 09/11] videodev2.h: add v4l2_ctrl_selection compound control type Hans Verkuil
2014-10-17 14:59 ` Sakari Ailus
2014-09-21 14:48 ` [RFC PATCH 10/11] v4l2-ctrls: add multi-selection controls Hans Verkuil
2014-09-21 14:48 ` [RFC PATCH 11/11] vivid: add crop/compose selection control support Hans Verkuil
2014-10-09 11:55 ` [RFC PATCH 00/11] Add configuration store support Sakari Ailus
2014-10-09 12:46 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5469B4BB.2040208@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=pawel@osciak.com \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.