mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
CHROMIUM: videodev2.h: rename reserved2 to config_store in v4l2_buffer.
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> BUG=chrome-os-partner:33728 TEST=build Signed-off-by: Pawel Osciak <posciak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/232583 Trybot-Ready: Tomasz Figa <tfiga@chromium.org> Tested-by: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Wu-cheng Li <wuchengli@chromium.org> Commit-Queue: Tomasz Figa <tfiga@chromium.org> Conflicts: drivers/media/v4l2-core/videobuf2-core.c [rebase44(groeck): fixed conflicts; structural changes to match v4.4] Signed-off-by: Guenter Roeck <groeck@chromium.org> Conflicts: drivers/media/v4l2-core/v4l2-compat-ioctl32.c Change-Id: Ibb823e9369bec79645e09651b0dda006ed53ecc5 Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
This commit is contained in:
parent
932660ce7e
commit
07dc8fde53
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ struct v4l2_buffer32 {
|
|||
__s32 fd;
|
||||
} m;
|
||||
__u32 length;
|
||||
__u32 reserved2;
|
||||
__u32 config_store;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
|
|
@ -508,7 +508,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) ||
|
||||
put_user(kp->length, &up->length))
|
||||
return -EFAULT;
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ static int __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb)
|
|||
b->timestamp = vbuf->timestamp;
|
||||
b->timecode = vbuf->timecode;
|
||||
b->sequence = vbuf->sequence;
|
||||
b->reserved2 = 0;
|
||||
b->config_store = vbuf->config_store;
|
||||
b->reserved = 0;
|
||||
|
||||
if (q->is_multiplanar) {
|
||||
|
|
@ -414,6 +414,8 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
|
|||
vbuf->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
|
||||
}
|
||||
|
||||
vbuf->config_store = b->config_store;
|
||||
|
||||
if (V4L2_TYPE_IS_OUTPUT(b->type)) {
|
||||
/*
|
||||
* For output buffers mask out the timecode flag:
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
* @timestamp: frame timestamp
|
||||
* @timecode: frame timecode
|
||||
* @sequence: sequence count of this frame
|
||||
* @config_store: this buffer should use this configuration store
|
||||
* Should contain enough information to be able to cover all the fields
|
||||
* of struct v4l2_buffer at videodev2.h
|
||||
*/
|
||||
|
|
@ -42,6 +43,7 @@ struct vb2_v4l2_buffer {
|
|||
struct timeval timestamp;
|
||||
struct v4l2_timecode timecode;
|
||||
__u32 sequence;
|
||||
__u32 config_store;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -844,6 +844,7 @@ struct v4l2_plane {
|
|||
* @length: size in bytes of the buffer (NOT its payload) for single-plane
|
||||
* buffers (when type != *_MPLANE); number of elements in the
|
||||
* planes array for multi-plane buffers
|
||||
* @config_store: this buffer should use this configuration store
|
||||
*
|
||||
* Contains data exchanged by application and driver using one of the Streaming
|
||||
* I/O methods.
|
||||
|
|
@ -867,7 +868,7 @@ struct v4l2_buffer {
|
|||
__s32 fd;
|
||||
} m;
|
||||
__u32 length;
|
||||
__u32 reserved2;
|
||||
__u32 config_store;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user