mbox series

[v5,00/13] uvcvideo: Fix v4l2-compliance errors

Message ID 20210316180004.1605727-1-ribalda@chromium.org
Headers show
Series uvcvideo: Fix v4l2-compliance errors | expand

Message

Ricardo Ribalda March 16, 2021, 5:59 p.m. UTC
v4l2-compliance -m /dev/media0 -a -f
Total for uvcvideo device /dev/media0: 8, Succeeded: 6, Failed: 2, Warnings: 0
Total for uvcvideo device /dev/video0: 54, Succeeded: 50, Failed: 4, Warnings: 2
Total for uvcvideo device /dev/video1: 46, Succeeded: 46, Failed: 0, Warnings: 0
Grand Total for uvcvideo device /dev/media0: 108, Succeeded: 102,
Failed: 6, Warnings: 2

After fixing all of them we go down to:

Total for uvcvideo device /dev/media0: 8, Succeeded: 8, Failed: 0, Warnings: 0
Total for uvcvideo device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 0
Total for uvcvideo device /dev/video1: 46, Succeeded: 46, Failed: 0, Warnings: 0
Grand Total for uvcvideo device /dev/media0: 108, Succeeded: 108,
Failed: 0, Warnings: 0

YES, NO MORE WARNINGS :)

Note that we depend on:
https://patchwork.linuxtv.org/project/linux-media/patch/20210315172531.101694-1-ribalda@chromium.org/

With Hans patch we can also pass v4l2-compliance -s.

Changelog  from v4 (Thanks to Hans and Laurent)
- Use framework names for controls
- Check the control flags before accessing them
- Drop meta headers instead of returning error
- Fix error_idx handling in v4l2-ioctl

Hans Verkuil (1):
  uvc: use vb2 ioctl and fop helpers

Ricardo Ribalda (12):
  media: v4l2-ioctl: Fix check_ext_ctrls
  media: uvcvideo: Set capability in s_param
  media: uvcvideo: Return -EIO for control errors
  media: uvcvideo: Check controls flags before accessing them
  media: uvcvideo: refactor __uvc_ctrl_add_mapping
  media: uvcvideo: Add support for V4L2_CTRL_TYPE_CTRL_CLASS
  media: uvcvideo: Use dev->name for querycap()
  media: uvcvideo: Set unique vdev name based in type
  media: uvcvideo: Increase the size of UVC_METADATA_BUF_SIZE
  media: uvcvideo: Return -EACCES to inactive controls
  media: uvcvideo: Use control names from framework
  media: v4l2-ioctl: Set error_idx to the right value

 drivers/media/usb/uvc/uvc_ctrl.c     | 209 +++++++++++----
 drivers/media/usb/uvc/uvc_driver.c   |  22 +-
 drivers/media/usb/uvc/uvc_metadata.c |   8 +-
 drivers/media/usb/uvc/uvc_queue.c    | 143 ----------
 drivers/media/usb/uvc/uvc_v4l2.c     | 373 ++++++---------------------
 drivers/media/usb/uvc/uvc_video.c    |  13 +-
 drivers/media/usb/uvc/uvcvideo.h     |  41 +--
 drivers/media/v4l2-core/v4l2-ioctl.c |  40 ++-
 8 files changed, 303 insertions(+), 546 deletions(-)