aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-03-23 15:19:50 (GMT)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-05-09 12:24:30 (GMT)
commit7b1e2101bd9286fd9b8e1b37292da32f02080a4f (patch)
tree87394e8be073984e24197278b645999c5d215e77
parentbbb9b78b7ab4739a392b4881ed9721d7943347c6 (diff)
usb: gadget: uvc: Set the vb2 queue timestamp flagsuvcvideo-gadget
The vb2 queue timestamp_flags field must be set by drivers, as enforced by a WARN_ON in vb2_queue_init. The UVC gadget driver failed to do so. This resulted in the following warning. [ 2.104371] g_webcam gadget: uvc_function_bind [ 2.105567] ------------[ cut here ]------------ [ 2.105567] ------------[ cut here ]------------ [ 2.106779] WARNING: CPU: 0 PID: 1 at drivers/media/v4l2-core/videobuf2-core.c:2207 vb2_queue_init+0xa3/0x113() Fix it. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/gadget/uvc_queue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c
index 305eb49..1c29bc9 100644
--- a/drivers/usb/gadget/uvc_queue.c
+++ b/drivers/usb/gadget/uvc_queue.c
@@ -137,6 +137,8 @@ static int uvc_queue_init(struct uvc_video_queue *queue,
queue->queue.buf_struct_size = sizeof(struct uvc_buffer);
queue->queue.ops = &uvc_queue_qops;
queue->queue.mem_ops = &vb2_vmalloc_memops;
+ queue->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
+ | V4L2_BUF_FLAG_TSTAMP_SRC_EOF;
ret = vb2_queue_init(&queue->queue);
if (ret)
return ret;

Privacy Policy