From 035c54e5c273a23462d399a1507cfaff45be440e Mon Sep 17 00:00:00 2001 From: Nanxin Qin Date: Mon, 9 Sep 2019 19:10:50 +0800 Subject: [PATCH] media: add a member private for struct vb2_v4l2_buffer. [1/2] PD#SWPL-5313 Problem: Decoder V4L2 interface Phase3(AFBC&MMU Support) Solution: 1. add a member private for struct vb2_v4l2_buffer 2. add vframe type VIDTYPE_V4L_EOS Verify: u212 Change-Id: Iaa1f8c9a09845248f5012b90beda82ec487a2afd Signed-off-by: Nanxin Qin --- drivers/media/v4l2-core/videobuf2-v4l2.c | 2 +- include/linux/amlogic/media/vfm/vframe.h | 1 + include/media/videobuf2-v4l2.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c index 52ef883..aed82f8 100644 --- a/drivers/media/v4l2-core/videobuf2-v4l2.c +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c @@ -204,7 +204,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->private; b->reserved = 0; if (q->is_multiplanar) { diff --git a/include/linux/amlogic/media/vfm/vframe.h b/include/linux/amlogic/media/vfm/vframe.h index 7559831..f801aa9 100644 --- a/include/linux/amlogic/media/vfm/vframe.h +++ b/include/linux/amlogic/media/vfm/vframe.h @@ -51,6 +51,7 @@ #define VIDTYPE_SUPPORT_COMPRESS 0x8000000 #define VIDTYPE_PRE_DI_AFBC 0x10000000 #define VIDTYPE_RGB_444 0x20000000 +#define VIDTYPE_V4L_EOS 0x80000000 /* 2019-04-22 Suggestions from brian.zhu*/ #define VIDTYPE_DI_PW 0x40000000 diff --git a/include/media/videobuf2-v4l2.h b/include/media/videobuf2-v4l2.h index 036127c..878d434 100644 --- a/include/media/videobuf2-v4l2.h +++ b/include/media/videobuf2-v4l2.h @@ -42,6 +42,7 @@ struct vb2_v4l2_buffer { __u32 field; struct v4l2_timecode timecode; __u32 sequence; + __u32 private; }; /* -- 2.7.4