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)
committerShuide Chen <shuide.chen@amlogic.com>
Tue, 29 Oct 2019 10:50:37 +0000 (03:50 -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>
(cherry picked from commit 035c54e5c273a23462d399a1507cfaff45be440e)

drivers/media/v4l2-core/videobuf2-v4l2.c
include/linux/amlogic/media/vfm/vframe.h
include/media/videobuf2-v4l2.h

index 7e45da4d52e1e1291d21a4d524a28e3386380dad..5c6cd60232196b882eae00a404bfa90ec2c1d6a9 100644 (file)
@@ -203,7 +203,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 755983100137a6fa183b3a19a713b3a0015b6745..f801aa94a46174636d61f819fb12955e7e03aa16 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 036127c54bbf2d051fd99d08758da389b4722c11..878d434f42a65a4ad9cc4c59542bcf2250edc481 100644 (file)
@@ -42,6 +42,7 @@ struct vb2_v4l2_buffer {
        __u32                   field;
        struct v4l2_timecode    timecode;
        __u32                   sequence;
+       __u32                   private;
 };
 
 /*