media: add a member private for struct vb2_v4l2_buffer. [1/2]
authorNanxin Qin <nanxin.qin@amlogic.com>
Mon, 9 Sep 2019 11:10:50 +0000 (19:10 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 28 Oct 2019 11:12:12 +0000 (04:12 -0700)
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 <nanxin.qin@amlogic.com>
drivers/media/v4l2-core/videobuf2-v4l2.c
include/linux/amlogic/media/vfm/vframe.h
include/media/videobuf2-v4l2.h

index 52ef883..aed82f8 100644 (file)
@@ -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) {
index 7559831..f801aa9 100644 (file)
@@ -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
index 036127c..878d434 100644 (file)
@@ -42,6 +42,7 @@ struct vb2_v4l2_buffer {
        __u32                   field;
        struct v4l2_timecode    timecode;
        __u32                   sequence;
+       __u32                   private;
 };
 
 /*