media: uvcvideo: Use vb2 ioctl and fop helpers
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->mutex or queue->mutex. Reviewed-by:Hans de Goede <hansg@kernel.org> Reviewed-by:
Hans Verkuil <hverkuil@xs4all.nl> Co-developed-by:
Ricardo Ribalda <ribalda@chromium.org> Signed-off-by:
Ricardo Ribalda <ribalda@chromium.org> Link: https://lore.kernel.org/r/20250616-uvc-fop-v4-1-250286570ee7@chromium.org Signed-off-by:
Hans de Goede <hansg@kernel.org> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
Loading
Please sign in to comment