All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org
Subject: Re: vb2_queue type question
Date: Tue, 30 Mar 2021 11:18:09 +0300	[thread overview]
Message-ID: <0cea2812-7f04-e081-728c-8b39308ff0f9@ideasonboard.com> (raw)
In-Reply-To: <7abd695a-4a6d-e447-59d0-cf359c319a77@xs4all.nl>

Hi Hans,

On 26/03/2021 12:18, Hans Verkuil wrote:

> The only thing that you do is update the queue type when you set the
> video or metadata format. When you start allocating buffers the queue type
> of the last set format is used. At that moment any attempt to set the format
> to another type will fail since vb2_is_busy(queue) will be true.
> 
> So only the s_fmt ioctl will change the type. The g/try_fmt ioctls just must
> keep working as-is.

I noticed that v4l2-compliance complains about this. It first tests the 
format ioctls for both video and metadata buffers, and the last s_fmt is 
for metadata. Then it tests buffer ioctls, and reqbufs for video buffers 
fails as the queue is in metadata mode, not video mode.

I added a custom .vidioc_reqbufs function to the driver which sets the 
queue type and then calls vb2_ioctl_reqbufs normally. This makes 
v4l2-compliance pass.

But is that correct change, or should v4l2-compliance be changed?

  Tomi

  reply	other threads:[~2021-03-30  8:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22  9:18 vb2_queue type question Tomi Valkeinen
2021-03-22  9:49 ` Hans Verkuil
2021-03-22  9:59   ` Laurent Pinchart
2021-03-22 10:08     ` Hans Verkuil
2021-03-22 10:30   ` Tomi Valkeinen
2021-03-26  9:57   ` Tomi Valkeinen
2021-03-26 10:18     ` Hans Verkuil
2021-03-30  8:18       ` Tomi Valkeinen [this message]
2021-03-30  8:56         ` Hans Verkuil
2021-03-31  5:22           ` Tomi Valkeinen

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=0cea2812-7f04-e081-728c-8b39308ff0f9@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.