[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c8616b15-0234-5377-b2d7-f9145c6f01a1@xs4all.nl>
Date: Thu, 18 Mar 2021 10:23:21 +0100
From: Hans Verkuil <hverkuil-cisco@...all.nl>
To: Ricardo Ribalda <ribalda@...omium.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
tfiga@...omium.org
Subject: Re: [PATCH v6 00/17] uvcvideo: Fix v4l2-compliance errors
On 17/03/2021 17:44, Ricardo Ribalda wrote:
> 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.
There is one remaining issue: if uvc_ioctl_s_try_ext_ctrls() calls uvc_ctrl_commit
and the 'commit' fails for a certain control, then you want error_idx to be the
index of the failing control. This is obviously something that v4l2-compliance cannot
test since it would rely on a buggy uvc HW implementation. But I can test it by
dropping patch 16/17: that should force the commit to fail and then I can verify
error_idx.
Regards,
Hans
>
> Changelog from v5 (Thanks to Hans)
> - Move more checks to framework
> - Rewrite the framework check_ext_ctrls
> - Rewrite ctrl_is_inactive
> - Add function ctrl_is_accessible
> - Use ioctl name instead of boolean values
>
> Hans Verkuil (1):
> uvc: use vb2 ioctl and fop helpers
>
> Ricardo Ribalda (16):
> media: v4l2-ioctl: check_ext_ctrls: Fix multiclass
> V4L2_CTRL_WHICH_DEF_VAL
> media: v4l2-ioctl: check_ext_ctrls: Return -EINVAL on
> V4L2_CTRL_WHICH_REQUEST_VAL
> media: v4l2-ioctl: check_ext_ctrls: Return the right error_idx
> media: v4l2-ioctl: check_ext_ctrls: Fix V4L2_CTRL_WHICH_DEF_VAL
> media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL
> media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
> media: uvcvideo: Set capability in s_param
> media: uvcvideo: Return -EIO for control errors
> 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: Use control names from framework
> media: uvcvideo: Check controls flags before accessing them
> media: uvcvideo: Return -EACCES to inactive controls
>
> drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 -
> drivers/media/usb/uvc/uvc_ctrl.c | 284 ++++++++++++++----
> 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 | 352 +++++------------------
> drivers/media/usb/uvc/uvc_video.c | 13 +-
> drivers/media/usb/uvc/uvcvideo.h | 43 +--
> drivers/media/v4l2-core/v4l2-ioctl.c | 59 ++--
> 9 files changed, 366 insertions(+), 562 deletions(-)
>
Powered by blists - more mailing lists