From: Hans Verkuil Date: Fri, 10 May 2013 11:06:50 +0000 (-0300) Subject: [media] bw-qcam: fix timestamp handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6266a9d9b0e9824562c3c5604dd812d3befc72f1;p=openwrt%2Fstaging%2Fblogic.git [media] bw-qcam: fix timestamp handling bw-qcam didn't set the timestamp and it didn't set q->timestamp_type. Tested-by: Borislav Petkov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/parport/bw-qcam.c b/drivers/media/parport/bw-qcam.c index 06231b85e1a9..d12bd33f39cb 100644 --- a/drivers/media/parport/bw-qcam.c +++ b/drivers/media/parport/bw-qcam.c @@ -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);