staging: bcm2835-camera: Set the field value within each buffer
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Sat, 29 Jun 2019 19:31:42 +0000 (21:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jul 2019 07:10:19 +0000 (09:10 +0200)
Fixes a v4l2-compliance failure
v4l2-test-buffers.cpp(415): g_field() == V4L2_FIELD_ANY

The driver only ever produces progresive frames, so field should
always be set to V4L2_FIELD_NONE.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c

index 80988ac..99e197a 100644 (file)
@@ -405,6 +405,7 @@ static void buffer_cb(struct vchiq_mmal_instance *instance,
                buf->vb.vb2_buf.timestamp = ktime_get_ns();
        }
        buf->vb.sequence = dev->capture.sequence++;
+       buf->vb.field = V4L2_FIELD_NONE;
 
        vb2_set_plane_payload(&buf->vb.vb2_buf, 0, length);
        if (mmal_flags & MMAL_BUFFER_HEADER_FLAG_KEYFRAME)