From: Hans Verkuil <hverkuil@xs4all.nl>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Fengguang Wu <fengguang.wu@intel.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Roland Scheidegger <rscheidegger_lists@hispeed.ch>
Subject: Re: [PATCH 2/2] usb: gadget: uvc: Set the vb2 queue timestamp flags
Date: Fri, 28 Mar 2014 09:51:27 +0100 [thread overview]
Message-ID: <5335380F.9070809@xs4all.nl> (raw)
In-Reply-To: <1395588754-20587-3-git-send-email-laurent.pinchart@ideasonboard.com>
On 03/23/2014 04:32 PM, Laurent Pinchart wrote:
> 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>
Regards,
Hans
> ---
> drivers/usb/gadget/uvc_queue.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c
> index d4561ba..4611e9c 100644
> --- a/drivers/usb/gadget/uvc_queue.c
> +++ b/drivers/usb/gadget/uvc_queue.c
> @@ -136,6 +136,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;
>
prev parent reply other threads:[~2014-03-28 8:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-23 0:10 [webcam] WARNING: CPU: 0 PID: 1 at drivers/media/v4l2-core/videobuf2-core.c:2207 vb2_queue_init() Fengguang Wu
2014-03-23 15:32 ` [PATCH 0/2] Clock fixes for UVC gadget driver Laurent Pinchart
2014-03-23 15:32 ` [PATCH 1/2] usb: gadget: uvc: Switch to monotonic clock for buffer timestamps Laurent Pinchart
2014-03-28 8:50 ` Hans Verkuil
2014-03-28 11:18 ` Laurent Pinchart
2014-03-23 15:32 ` [PATCH 2/2] usb: gadget: uvc: Set the vb2 queue timestamp flags Laurent Pinchart
2014-03-28 8:51 ` Hans Verkuil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5335380F.9070809@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=bigeasy@linutronix.de \
--cc=fengguang.wu@intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rscheidegger_lists@hispeed.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).