From: Jeonghee Kim Date: Fri, 26 Jan 2018 05:25:28 +0000 (+0900) Subject: [COMMON] media: videobuf2-v4l2: keep the reserved2 field X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cca92bd1f7fee8f5aab45b81ee6f677b0d093ba5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: videobuf2-v4l2: keep the reserved2 field The reserved2 field should be keeped, because this is used for extension interface between user space and kernel space. Change-Id: I9bb33d4ffa599f48b97c1604848ccdc4d0095310 Signed-off-by: Ayoung Sim Signed-off-by: Jeonghee Kim --- diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c index 69ca8debb711..a71df456adf6 100644 --- a/drivers/media/v4l2-core/videobuf2-v4l2.c +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c @@ -202,7 +202,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb) b->timestamp = ns_to_timeval(vb->timestamp); b->timecode = vbuf->timecode; b->sequence = vbuf->sequence; - b->reserved2 = 0; + b->reserved2 = vbuf->reserved2; b->reserved = 0; if (q->is_multiplanar) { @@ -319,6 +319,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb, } vb->timestamp = 0; vbuf->sequence = 0; + vbuf->reserved2 = b->reserved2; if (V4L2_TYPE_IS_MULTIPLANAR(b->type)) { if (b->memory == VB2_MEMORY_USERPTR) { diff --git a/include/media/videobuf2-v4l2.h b/include/media/videobuf2-v4l2.h index 036127c54bbf..64bc7dfaddde 100644 --- a/include/media/videobuf2-v4l2.h +++ b/include/media/videobuf2-v4l2.h @@ -31,6 +31,7 @@ * @field: enum v4l2_field; field order of the image in the buffer * @timecode: frame timecode * @sequence: sequence count of this frame + * @reserved2: reserved field for future extensions * * 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 { __u32 field; struct v4l2_timecode timecode; __u32 sequence; + __u32 reserved2; }; /*