Thread (10 messages) 10 messages, 3 authors, 2021-03-31

Re: vb2_queue type question

From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Date: 2021-03-30 08:18:53

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help