<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/usb/uvc/uvc_queue.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-01-22T07:18:50Z</updated>
<entry>
<title>media: uvcvideo: Return queued buffers on start_streaming() failure</title>
<updated>2026-01-22T07:18:50Z</updated>
<author>
<name>Michal Pecio</name>
</author>
<published>2025-10-15T11:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4cf3b6fd54ebb1ebc977bdc47fb6cfcf9a471a22'/>
<id>urn:sha1:4cf3b6fd54ebb1ebc977bdc47fb6cfcf9a471a22</id>
<content type='text'>
Return buffers if streaming fails to start due to uvc_pm_get() error.

This bug may be responsible for a warning I got running

    while :; do yavta -c3 /dev/video0; done

on an xHCI controller which failed under this workload.
I had no luck reproducing this warning again to confirm.

xhci_hcd 0000:09:00.0: HC died; cleaning up
usb 13-2: USB disconnect, device number 2
WARNING: CPU: 2 PID: 29386 at drivers/media/common/videobuf2/videobuf2-core.c:1803 vb2_start_streaming+0xac/0x120

Fixes: 7dd56c47784a ("media: uvcvideo: Remove stream-&gt;is_streaming field")
Cc: stable@vger.kernel.org
Signed-off-by: Michal Pecio &lt;michal.pecio@gmail.com&gt;
Reviewed-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Link: https://patch.msgid.link/20251015133642.3dede646.michal.pecio@gmail.com
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "media: uvcvideo: Remove nodrop parameter"</title>
<updated>2026-01-13T13:59:59Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2026-01-13T13:29:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17526c7e69d07395e9d39794aacba42dcb02ff49'/>
<id>urn:sha1:17526c7e69d07395e9d39794aacba42dcb02ff49</id>
<content type='text'>
This reverts commit 27ccc44a511b0cd76dc607e2a4893b876192ee1b.

A user has reported that the Zoom Video Conferencing tool is not capable
of handling invalid frames. Due to this, he has to continue using this
parameter.

We will keep working with Zoom so they can handle invalid frames
correctly, but for this cycle the safest option is to revert this
parameter drop.

Fixes: 27ccc44a511b ("media: uvcvideo: Remove nodrop parameter")
Reported-by: Ralf Jung &lt;post@ralfj.de&gt;
Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121718
Closes: https://lore.kernel.org/linux-media/uboug5ectzm4s32yfgopjbcxq2uhsoc4kluaby7a4b7nzfjave@boco7oocnftr/
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Remove nodrop parameter</title>
<updated>2026-01-05T11:21:21Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2025-11-19T19:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27ccc44a511b0cd76dc607e2a4893b876192ee1b'/>
<id>urn:sha1:27ccc44a511b0cd76dc607e2a4893b876192ee1b</id>
<content type='text'>
We announced the deprecation intentions one year ago in the commit
commit 40ed9e9b2808 ("media: uvcvideo: Announce the user our deprecation
intentions").

We have not hear any complains, lets remove the nodrop parameter.

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: Hans de Goede &lt;johannes.goede@oss.qualcomm.com&gt;
Signed-off-by: Hans de Goede &lt;johannes.goede@oss.qualcomm.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Remove stream-&gt;is_streaming field</title>
<updated>2025-07-11T17:27:28Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2025-06-16T15:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7dd56c47784a466b03df62ca766207f483353cdc'/>
<id>urn:sha1:7dd56c47784a466b03df62ca766207f483353cdc</id>
<content type='text'>
The is_streaming field is used by modular PM to know if the device is
currently streaming or not.

With the transition to vb2 and fop helpers, we can use vb2 functions for
the same functionality. The great benefit is that vb2 already tracks the
streaming state for us.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250616-uvc-fop-v4-4-250286570ee7@chromium.org
Reviewed-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Split uvc_stop_streaming()</title>
<updated>2025-07-11T17:27:27Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2025-06-16T15:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54828c0d4f909bd706e15cfaa29758f2c1d59212'/>
<id>urn:sha1:54828c0d4f909bd706e15cfaa29758f2c1d59212</id>
<content type='text'>
uvc_stop_streaming() is used for meta and video nodes. Split the function
in two to avoid confusion.

Use this opportunity to rename uvc_start_streaming() to
uvc_start_streaming_video(), as it is only called by the video nodes.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250616-uvc-fop-v4-3-250286570ee7@chromium.org
Reviewed-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Handle locks in uvc_queue_return_buffers</title>
<updated>2025-07-11T17:27:27Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2025-06-16T15:24:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7ef53670321327f45de8bde5d38f1215927336f'/>
<id>urn:sha1:b7ef53670321327f45de8bde5d38f1215927336f</id>
<content type='text'>
Most of the calls to uvc_queue_return_buffers() wrap the call with
spin_lock_irq()/spin_unlock_irq().

Rename uvc_queue_return_buffers to __uvc_queue_return_buffers to
indicate that this is the version that does not handle locks and create
a new version of the function that handles the lock.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250616-uvc-fop-v4-2-250286570ee7@chromium.org
Reviewed-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Use vb2 ioctl and fop helpers</title>
<updated>2025-07-11T17:27:27Z</updated>
<author>
<name>Hans Verkuil</name>
</author>
<published>2025-06-16T15:24:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c93d73c9c2cfa7658f7100d201a47c4856746222'/>
<id>urn:sha1:c93d73c9c2cfa7658f7100d201a47c4856746222</id>
<content type='text'>
When uvc was written the vb2 ioctl and file operation helpers didn't exist.

This patch switches uvc over to those helpers, which removes a lot of
boilerplate code and allows us to drop the 'privileges' scheme, since
that's now handled inside the vb2 helpers.

This makes it possible for uvc to fix the v4l2-compliance streaming tests:
 warn: v4l2-test-formats.cpp(1075): Could not set fmt2

This patch introduces a change on behavior on the uvcdriver to be
aligned with the rest of the subsystem. Now S_INPUT, S_PARM and
S_FORMAT do no grant exclusive ownership of the device.

There are other side effects, some better than others:
- Locking is now more coarse than before, the queue is locked for almost
  every ioctl.
- vidioc_querybuf() can now work when the queue is busy.

Future patches should look into the locking architecture of UVC to
remove one of stream-&gt;mutex or queue-&gt;mutex.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Reviewed-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Co-developed-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Link: https://lore.kernel.org/r/20250616-uvc-fop-v4-1-250286570ee7@chromium.org
Signed-off-by: Hans de Goede &lt;hansg@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Allow changing noparam on the fly</title>
<updated>2024-12-19T14:44:43Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2024-12-18T21:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8869eb654f2a7abb2dcdb79606fc95a4f092a449'/>
<id>urn:sha1:8869eb654f2a7abb2dcdb79606fc95a4f092a449</id>
<content type='text'>
Right now the parameter value is read during video_registration and
cannot be changed afterwards, despite its permissions 0644, that makes
the user believe that the value can be written.

The parameter only affects the behaviour of uvc_queue_buffer_complete(),
with only one check per buffer.

We can read the value directly from uvc_queue_buffer_complete() and
therefore allowing changing it with sysfs on the fly.

Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20241218-uvc-deprecate-v2-3-ab814139e983@chromium.org
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: uvcvideo: Propagate buf-&gt;error to userspace</title>
<updated>2024-12-19T14:44:43Z</updated>
<author>
<name>Ricardo Ribalda</name>
</author>
<published>2024-12-18T21:39:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87ce177654e388451850905a1d376658aebe8699'/>
<id>urn:sha1:87ce177654e388451850905a1d376658aebe8699</id>
<content type='text'>
Now we return VB2_BUF_STATE_DONE for valid and invalid frames. Propagate
the correct value, so the user can know if the frame is valid or not via
struct v4l2_buffer-&gt;flags.

Reported-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Closes: https://lore.kernel.org/linux-media/84b0f212-cd88-46bb-8e6f-b94ec3eccba6@redhat.com
Fixes: 6998b6fb4b1c ("[media] uvcvideo: Use videobuf2-vmalloc")
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://lore.kernel.org/r/20241218-uvc-deprecate-v2-1-ab814139e983@chromium.org
Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: usb: drop vb2_ops_wait_prepare/finish</title>
<updated>2024-10-28T08:19:56Z</updated>
<author>
<name>Hans Verkuil</name>
</author>
<published>2024-10-14T15:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30e932f5d942e7ed1424596b44f947734fa36d94'/>
<id>urn:sha1:30e932f5d942e7ed1424596b44f947734fa36d94</id>
<content type='text'>
Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish
are NULL") it is no longer needed to set the wait_prepare/finish
vb2_ops callbacks as long as the lock field in vb2_queue is set.

Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
we can safely drop these callbacks.

This simplifies the code and this is a step towards the goal of deleting
these callbacks.

Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
</content>
</entry>
</feed>
