Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6266a9d9 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] bw-qcam: fix timestamp handling



bw-qcam didn't set the timestamp and it didn't set q->timestamp_type.

Tested-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 19ec9305
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -687,6 +687,7 @@ static int buffer_finish(struct vb2_buffer *vb)

	parport_release(qcam->pdev);
	mutex_unlock(&qcam->lock);
	v4l2_get_timestamp(&vb->v4l2_buf.timestamp);
	if (len != size)
		vb->state = VB2_BUF_STATE_ERROR;
	vb2_set_plane_payload(vb, 0, len);
@@ -964,6 +965,7 @@ static struct qcam *qcam_init(struct parport *port)
	q->drv_priv = qcam;
	q->ops = &qcam_video_qops;
	q->mem_ops = &vb2_vmalloc_memops;
	q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
	err = vb2_queue_init(q);
	if (err < 0) {
		v4l2_err(v4l2_dev, "couldn't init vb2_queue for %s.\n", port->name);