mbox series

[GIT,PULL,FOR,v6.15] uvcvideo improvements

Message ID 20250301222207.GA15528@pendragon.ideasonboard.com (mailing list archive)
State New
Headers show
Series [GIT,PULL,FOR,v6.15] uvcvideo improvements | expand

Pull-request

https://gitlab.freedesktop.org/linux-media/users/uvc.git tags/next-media-uvc-20250301

Message

Laurent Pinchart March 1, 2025, 10:22 p.m. UTC
Hi Mauro, Hans,

(This time CC'ing linux-media)

The following changes since commit 2014c95afecee3e76ca4a56956a936e23283f05b:

  Linux 6.14-rc1 (2025-02-02 15:39:26 -0800)

are available in the Git repository at:

  https://gitlab.freedesktop.org/linux-media/users/uvc.git tags/next-media-uvc-20250301

for you to fetch changes up to 1e7ce5414ea8548c450f06dc0f4a5124bac12d3e:

  media: uvcvideo: Drop the uvc_driver structure (2025-02-23 21:31:12 +0200)

----------------------------------------------------------------
uvcvideo improvements:

- Support for UVC 1.5 Region of Interest (ROI) control
- Quirk for Actions UVC05 device
- Misc cleanup

----------------------------------------------------------------
Hans Verkuil (1):
      media: v4l2-ctrls: add support for V4L2_CTRL_WHICH_MIN/MAX_VAL

Laurent Pinchart (1):
      media: uvcvideo: Drop the uvc_driver structure

Ricardo Ribalda (11):
      media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value
      media: uvcvideo: Handle uvc menu translation inside uvc_set_le_value
      media: uvcvideo: refactor uvc_ioctl_g_ext_ctrls
      media: uvcvideo: uvc_ioctl_(g|s)_ext_ctrls: handle NoP case
      media: uvcvideo: Support any size for mapping get/set
      media: uvcvideo: Factor out clamping from uvc_ctrl_set
      media: uvcvideo: Factor out query_boundaries from query_ctrl
      media: uvcvideo: let v4l2_query_v4l2_ctrl() work with v4l2_query_ext_ctrl
      media: uvcvideo: Introduce uvc_mapping_v4l2_size
      media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map
      media: uvcvideo: Add quirk for Actions UVC05

Yunke Cao (6):
      media: v4l2_ctrl: Add V4L2_CTRL_TYPE_RECT
      media: vivid: Add a rectangle control
      media: uvcvideo: add support for compound controls
      media: uvcvideo: support V4L2_CTRL_WHICH_MIN/MAX_VAL
      media: uvcvideo: implement UVC v1.5 ROI
      media: uvcvideo: document UVC v1.5 ROI

 .../userspace-api/media/drivers/uvcvideo.rst       |  64 ++
 .../userspace-api/media/v4l/vidioc-g-ext-ctrls.rst |  26 +-
 .../userspace-api/media/v4l/vidioc-queryctrl.rst   |  14 +
 .../userspace-api/media/videodev2.h.rst.exceptions |   4 +
 drivers/media/i2c/imx214.c                         |   4 +-
 drivers/media/platform/qcom/venus/venc_ctrls.c     |   9 +-
 drivers/media/test-drivers/vivid/vivid-ctrls.c     |  34 +
 drivers/media/usb/uvc/uvc_ctrl.c                   | 799 ++++++++++++++++-----
 drivers/media/usb/uvc/uvc_driver.c                 |  44 +-
 drivers/media/usb/uvc/uvc_v4l2.c                   |  85 +--
 drivers/media/usb/uvc/uvcvideo.h                   |  32 +-
 drivers/media/v4l2-core/v4l2-ctrls-api.c           |  54 +-
 drivers/media/v4l2-core/v4l2-ctrls-core.c          | 167 ++++-
 drivers/media/v4l2-core/v4l2-ioctl.c               |   4 +-
 include/media/v4l2-ctrls.h                         |  38 +-
 include/uapi/linux/usb/video.h                     |   1 +
 include/uapi/linux/uvcvideo.h                      |  13 +
 include/uapi/linux/v4l2-controls.h                 |   7 +
 include/uapi/linux/videodev2.h                     |   5 +
 19 files changed, 1088 insertions(+), 316 deletions(-)

Comments

Laurent Pinchart March 2, 2025, 12:17 a.m. UTC | #1
Ricardo, should I drop those patches and wait for a new version, or is
everybody happy ignoring those warnings ? Some of the warnings look
reasonable to me, were they ignored, or was the last version of the
series run through CI ?

On Sat, Mar 01, 2025 at 04:10:14PM -0800, Patchwork Integration wrote:
> Dear Laurent Pinchart:
> 
> Thanks for your patches! Unfortunately the Media CI robot detected some
> issues:
> 
> # Test checkpatch:./0001-media-v4l2_ctrl-Add-V4L2_CTRL_TYPE_RECT.patch checkpatch
> WARNING: Avoid logging continuation uses where feasible
> #83: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:374:
> +pr_cont("%ux%u@%dx%d",
> 
> total: 0 errors, 1 warnings, 0 checks, 98 lines checked
> 
> # Test checkpatch:./0002-media-v4l2-ctrls-add-support-for-V4L2_CTRL_WHICH_MIN.patch checkpatch
> CHECK: Alignment should match open parenthesis
> #286: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:186:
> +static void std_min_compound(const struct v4l2_ctrl *ctrl, u32 idx,
> +    union v4l2_ctrl_ptr ptr)
> 
> CHECK: Alignment should match open parenthesis
> #297: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:197:
> +static void std_max_compound(const struct v4l2_ctrl *ctrl, u32 idx,
>      union v4l2_ctrl_ptr ptr)
> 
> total: 0 errors, 0 warnings, 2 checks, 598 lines checked
> 
> # Test checkpatch:./0008-media-uvcvideo-Support-any-size-for-mapping-get-set.patch checkpatch
> CHECK: Alignment should match open parenthesis
> #282: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1406:
> +v4l2_ctrl->default_value = uvc_mapping_get_s32(mapping,
> +UVC_GET_DEF, uvc_ctrl_data(ctrl, UVC_CTRL_DATA_DEF));
> 
> CHECK: Alignment should match open parenthesis
> #293: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1440:
> +v4l2_ctrl->minimum = uvc_mapping_get_s32(mapping, UVC_GET_MIN,
> +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MIN));
> 
> CHECK: Alignment should match open parenthesis
> #299: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1444:
> +v4l2_ctrl->maximum = uvc_mapping_get_s32(mapping, UVC_GET_MAX,
> +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MAX));
> 
> CHECK: Alignment should match open parenthesis
> #305: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1448:
> +v4l2_ctrl->step = uvc_mapping_get_s32(mapping, UVC_GET_RES,
> +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES));
> 
> total: 0 errors, 0 warnings, 4 checks, 332 lines checked
> 
> # Test checkpatch:./0017-media-uvcvideo-document-UVC-v1.5-ROI.patch checkpatch
> WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
> #10: 
> https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/release-R121-15699.B/camera/hal/usb/
> 
> total: 0 errors, 1 warnings, 0 checks, 73 lines checked
> 
> 
> 
> Please fix your series, and upload a new version. If you have a patchwork
> account, do not forget to mark the current series as Superseded.
> 
> For more details, check the full report at:
> https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/72096058/artifacts/report.htm .
> 
> 
> 
> Best regards, and Happy Hacking!
> Media CI robot on behalf of the linux-media community.
> 
> ---
> Check the latest rules for contributing your patches at:
> https://docs.kernel.org/driver-api/media/maintainer-entry-profile.html
> 
> If you believe that the CI is wrong, kindly open an issue at
> https://gitlab.freedesktop.org/linux-media/media-ci/-/issues or reply-all
> to this message.
Ricardo Ribalda March 3, 2025, 8:31 a.m. UTC | #2
Hi Laurent

On Sun, 2 Mar 2025 at 01:17, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Ricardo, should I drop those patches and wait for a new version, or is
> everybody happy ignoring those warnings ? Some of the warnings look
> reasonable to me, were they ignored, or was the last version of the
> series run through CI ?

I am happy ignoring the changes. All the versions went through CI.

They are just checkpatch warnings, CI will pass.

Regards!



>
> On Sat, Mar 01, 2025 at 04:10:14PM -0800, Patchwork Integration wrote:
> > Dear Laurent Pinchart:
> >
> > Thanks for your patches! Unfortunately the Media CI robot detected some
> > issues:
> >
> > # Test checkpatch:./0001-media-v4l2_ctrl-Add-V4L2_CTRL_TYPE_RECT.patch checkpatch
> > WARNING: Avoid logging continuation uses where feasible
> > #83: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:374:
> > +pr_cont("%ux%u@%dx%d",
> >
> > total: 0 errors, 1 warnings, 0 checks, 98 lines checked
> >
> > # Test checkpatch:./0002-media-v4l2-ctrls-add-support-for-V4L2_CTRL_WHICH_MIN.patch checkpatch
> > CHECK: Alignment should match open parenthesis
> > #286: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:186:
> > +static void std_min_compound(const struct v4l2_ctrl *ctrl, u32 idx,
> > +    union v4l2_ctrl_ptr ptr)
> >
> > CHECK: Alignment should match open parenthesis
> > #297: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:197:
> > +static void std_max_compound(const struct v4l2_ctrl *ctrl, u32 idx,
> >      union v4l2_ctrl_ptr ptr)
> >
> > total: 0 errors, 0 warnings, 2 checks, 598 lines checked
> >
> > # Test checkpatch:./0008-media-uvcvideo-Support-any-size-for-mapping-get-set.patch checkpatch
> > CHECK: Alignment should match open parenthesis
> > #282: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1406:
> > +v4l2_ctrl->default_value = uvc_mapping_get_s32(mapping,
> > +UVC_GET_DEF, uvc_ctrl_data(ctrl, UVC_CTRL_DATA_DEF));
> >
> > CHECK: Alignment should match open parenthesis
> > #293: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1440:
> > +v4l2_ctrl->minimum = uvc_mapping_get_s32(mapping, UVC_GET_MIN,
> > +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MIN));
> >
> > CHECK: Alignment should match open parenthesis
> > #299: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1444:
> > +v4l2_ctrl->maximum = uvc_mapping_get_s32(mapping, UVC_GET_MAX,
> > +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MAX));
> >
> > CHECK: Alignment should match open parenthesis
> > #305: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1448:
> > +v4l2_ctrl->step = uvc_mapping_get_s32(mapping, UVC_GET_RES,
> > +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES));
> >
> > total: 0 errors, 0 warnings, 4 checks, 332 lines checked
> >
> > # Test checkpatch:./0017-media-uvcvideo-document-UVC-v1.5-ROI.patch checkpatch
> > WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
> > #10:
> > https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/release-R121-15699.B/camera/hal/usb/
> >
> > total: 0 errors, 1 warnings, 0 checks, 73 lines checked
> >
> >
> >
> > Please fix your series, and upload a new version. If you have a patchwork
> > account, do not forget to mark the current series as Superseded.
> >
> > For more details, check the full report at:
> > https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/72096058/artifacts/report.htm .
> >
> >
> >
> > Best regards, and Happy Hacking!
> > Media CI robot on behalf of the linux-media community.
> >
> > ---
> > Check the latest rules for contributing your patches at:
> > https://docs.kernel.org/driver-api/media/maintainer-entry-profile.html
> >
> > If you believe that the CI is wrong, kindly open an issue at
> > https://gitlab.freedesktop.org/linux-media/media-ci/-/issues or reply-all
> > to this message.
>
> --
> Regards,
>
> Laurent Pinchart
Hans Verkuil March 3, 2025, 8:53 a.m. UTC | #3
On 03/03/2025 09:31, Ricardo Ribalda wrote:
> Hi Laurent
> 
> On Sun, 2 Mar 2025 at 01:17, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
>>
>> Ricardo, should I drop those patches and wait for a new version, or is
>> everybody happy ignoring those warnings ? Some of the warnings look
>> reasonable to me, were they ignored, or was the last version of the
>> series run through CI ?
> 
> I am happy ignoring the changes. All the versions went through CI.
> 
> They are just checkpatch warnings, CI will pass.
> 
> Regards!
> 
> 
> 
>>
>> On Sat, Mar 01, 2025 at 04:10:14PM -0800, Patchwork Integration wrote:
>>> Dear Laurent Pinchart:
>>>
>>> Thanks for your patches! Unfortunately the Media CI robot detected some
>>> issues:
>>>
>>> # Test checkpatch:./0001-media-v4l2_ctrl-Add-V4L2_CTRL_TYPE_RECT.patch checkpatch
>>> WARNING: Avoid logging continuation uses where feasible
>>> #83: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:374:
>>> +pr_cont("%ux%u@%dx%d",
>>>
>>> total: 0 errors, 1 warnings, 0 checks, 98 lines checked
>>>
>>> # Test checkpatch:./0002-media-v4l2-ctrls-add-support-for-V4L2_CTRL_WHICH_MIN.patch checkpatch
>>> CHECK: Alignment should match open parenthesis
>>> #286: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:186:
>>> +static void std_min_compound(const struct v4l2_ctrl *ctrl, u32 idx,
>>> +    union v4l2_ctrl_ptr ptr)
>>>
>>> CHECK: Alignment should match open parenthesis
>>> #297: FILE: drivers/media/v4l2-core/v4l2-ctrls-core.c:197:
>>> +static void std_max_compound(const struct v4l2_ctrl *ctrl, u32 idx,
>>>      union v4l2_ctrl_ptr ptr)

I fixed up these two alignment warnings, the others I left as-is since they
are reasonable.

I'm currently running the pipeline. Note that I am also testing it with a
patch v4l-utils to test the new 'which' values:

https://patchwork.linuxtv.org/project/linux-media/cover/20241106061537.211002-1-ming.qian@oss.nxp.com/

Regards,

	Hans

>>>
>>> total: 0 errors, 0 warnings, 2 checks, 598 lines checked
>>>
>>> # Test checkpatch:./0008-media-uvcvideo-Support-any-size-for-mapping-get-set.patch checkpatch
>>> CHECK: Alignment should match open parenthesis
>>> #282: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1406:
>>> +v4l2_ctrl->default_value = uvc_mapping_get_s32(mapping,
>>> +UVC_GET_DEF, uvc_ctrl_data(ctrl, UVC_CTRL_DATA_DEF));
>>>
>>> CHECK: Alignment should match open parenthesis
>>> #293: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1440:
>>> +v4l2_ctrl->minimum = uvc_mapping_get_s32(mapping, UVC_GET_MIN,
>>> +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MIN));
>>>
>>> CHECK: Alignment should match open parenthesis
>>> #299: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1444:
>>> +v4l2_ctrl->maximum = uvc_mapping_get_s32(mapping, UVC_GET_MAX,
>>> +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MAX));
>>>
>>> CHECK: Alignment should match open parenthesis
>>> #305: FILE: drivers/media/usb/uvc/uvc_ctrl.c:1448:
>>> +v4l2_ctrl->step = uvc_mapping_get_s32(mapping, UVC_GET_RES,
>>> +uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES));
>>>
>>> total: 0 errors, 0 warnings, 4 checks, 332 lines checked
>>>
>>> # Test checkpatch:./0017-media-uvcvideo-document-UVC-v1.5-ROI.patch checkpatch
>>> WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
>>> #10:
>>> https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/release-R121-15699.B/camera/hal/usb/
>>>
>>> total: 0 errors, 1 warnings, 0 checks, 73 lines checked
>>>
>>>
>>>
>>> Please fix your series, and upload a new version. If you have a patchwork
>>> account, do not forget to mark the current series as Superseded.
>>>
>>> For more details, check the full report at:
>>> https://linux-media.pages.freedesktop.org/-/users/patchwork/-/jobs/72096058/artifacts/report.htm .
>>>
>>>
>>>
>>> Best regards, and Happy Hacking!
>>> Media CI robot on behalf of the linux-media community.
>>>
>>> ---
>>> Check the latest rules for contributing your patches at:
>>> https://docs.kernel.org/driver-api/media/maintainer-entry-profile.html
>>>
>>> If you believe that the CI is wrong, kindly open an issue at
>>> https://gitlab.freedesktop.org/linux-media/media-ci/-/issues or reply-all
>>> to this message.
>>
>> --
>> Regards,
>>
>> Laurent Pinchart
> 
> 
>