Skip to contentSkip to conversation

uvcvideo v4l2-compliance fixes

GIT PULL Laurent Pinchart 3 participants 5 messages Aug 23, 2021 – Sep 3, 2021 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi Mauro,

The following changes since commit d62cd4d277cc711f781a7bdec4109c6148529b25:

media: uvcvideo: Remove unused including <linux/version.h> (2021-08-21 09:11:04 +0200)

are available in the Git repository at:

git://linuxtv.org/pinchartl/media.git tags/uvc-next-20210823

for you to fetch changes up to 2bc2b78476b4bc5690186c2b9a4dd565be6a9913:

media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values() (2021-08-23 12:31:04 +0300)

This contains a subset of "[PATCH v10 00/21] Fix v4l2-compliance errors" as 17 out of the 21 patches are ready to go and don't need to be delayed.

----------------------------------------------------------------
- uvcvideo v4l2-compliance fixes

----------------------------------------------------------------
Hans Verkuil (1):
media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values()

Ricardo Ribalda (16):
media: v4l2-ioctl: Fix check_ext_ctrls
media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: v4l2-ioctl: S_CTRL output the right value
media: uvcvideo: Remove s_ctrl and g_ctrl
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: Set error_idx during ctrl_commit errors
media: docs: Document the behaviour of uvcvideo driver

 .../userspace-api/media/v4l/vidioc-g-ctrl.rst      |   3 +
 .../userspace-api/media/v4l/vidioc-g-ext-ctrls.rst |   3 +
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c           |   4 -
 drivers/media/usb/uvc/uvc_ctrl.c                   | 260 ++++++++++++++++-----
 drivers/media/usb/uvc/uvc_driver.c                 |  15 +-
 drivers/media/usb/uvc/uvc_metadata.c               |   2 +-
 drivers/media/usb/uvc/uvc_v4l2.c                   | 105 ++++-----
 drivers/media/usb/uvc/uvc_video.c                  |   5 +
 drivers/media/usb/uvc/uvcvideo.h                   |  17 +-
 drivers/media/v4l2-core/v4l2-ioctl.c               |  67 ++++--
 10 files changed, 317 insertions(+), 164 deletions(-)
Signature · 3 lines
Regards,

Laurent Pinchart
#1 lore raw

Re: [GIT PULL FOR v5.16] uvcvideo v4l2-compliance fixes (#76513)

From: [email protected]

Pull request: https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
Build log: https://builder.linuxtv.org/job/patchwork/132985/
Build time: 00:23:22

gpg: Signature made Mon 23 Aug 2021 09:31:23 AM UTC
gpg:                using RSA key CB9D6877529820CD53099B1B65F89C37BC54210D
gpg:                issuer "[email protected]"
gpg: Can't check signature: No public key

Summary: got 8/17 patches with issues, being 1 at build time, plus one error when buinding PDF document

Error/warnings:

patches/0001-media-v4l2-ioctl-Fix-check_ext_ctrls.patch:

allyesconfig: return code #0:
../scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr] ../scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] ../scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples

allyesconfig: return code #0:
../drivers/media/cec/core/cec-adap.c: ../drivers/media/cec/core/cec-adap.c:926 cec_transmit_msg_fh() warn: '&data->list' not removed from list ../drivers/media/rc/meson-ir-tx.c:22: warning: expecting prototype for meson(). Prototype was for DEVICE_NAME() instead SMATCH:../drivers/media/usb/siano/smsusb.c ../drivers/media/usb/siano/smsusb.c:53:38: :warning: array of flexible structures SPARSE:../drivers/media/usb/siano/smsusb.c ../drivers/media/usb/siano/smsusb.c:53:38: warning: array of flexible structures ../drivers/media/platform/mtk-vpu/mtk_vpu.c: ../drivers/media/platform/mtk-vpu/mtk_vpu.c:946 mtk_vpu_probe() warn: 'vpu->clk' not released on lines: 851. ../drivers/media/usb/em28xx/em28xx-video.c: ../drivers/media/usb/em28xx/em28xx-video.c:2894 em28xx_v4l2_init() parse error: turning off implications after 60 seconds

checkpatch.pl:

	$ cat patches/0001-media-v4l2-ioctl-Fix-check_ext_ctrls.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:23: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)

patches/0006-media-uvcvideo-Set-capability-in-s_param.patch:

checkpatch.pl:

	$ cat patches/0006-media-uvcvideo-Set-capability-in-s_param.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:9: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)

patches/0007-media-uvcvideo-Return-EIO-for-control-errors.patch:

checkpatch.pl:

	$ cat patches/0007-media-uvcvideo-Return-EIO-for-control-errors.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:12: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)

patches/0008-media-uvcvideo-refactor-__uvc_ctrl_add_mapping.patch:

checkpatch.pl:

	$ cat patches/0008-media-uvcvideo-refactor-__uvc_ctrl_add_mapping.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:33: CHECK: Alignment should match open parenthesis

patches/0009-media-uvcvideo-Add-support-for-V4L2_CTRL_TYPE_CTRL_C.patch:

checkpatch.pl:

	$ cat patches/0009-media-uvcvideo-Add-support-for-V4L2_CTRL_TYPE_CTRL_C.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:10: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)

patches/0011-media-uvcvideo-Set-unique-vdev-name-based-in-type.patch:

checkpatch.pl:

	$ cat patches/0011-media-uvcvideo-Set-unique-vdev-name-based-in-type.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:13: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)

patches/0013-media-uvcvideo-Use-control-names-from-framework.patch:

checkpatch.pl:

	$ cat patches/0013-media-uvcvideo-Use-control-names-from-framework.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:350: CHECK: Comparison to NULL could be written "!v4l2_ctrl_get_name"

patches/0014-media-uvcvideo-Check-controls-flags-before-accessing.patch:

checkpatch.pl:

	$ cat patches/0014-media-uvcvideo-Check-controls-flags-before-accessing.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:18: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
	-:82: CHECK: Alignment should match open parenthesis

Error #512 when building PDF docs

#2 lore raw
In reply to Laurent Pinchart

Em Mon, 23 Aug 2021 12:37:35 +0300
Laurent Pinchart <[email protected]> escreveu:

Quoted 25 lines

Hi Mauro,

The following changes since commit d62cd4d277cc711f781a7bdec4109c6148529b25:

media: uvcvideo: Remove unused including <linux/version.h> (2021-08-21 09:11:04 +0200)

are available in the Git repository at:

git://linuxtv.org/pinchartl/media.git tags/uvc-next-20210823

for you to fetch changes up to 2bc2b78476b4bc5690186c2b9a4dd565be6a9913:

media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values() (2021-08-23 12:31:04 +0300)

This contains a subset of "[PATCH v10 00/21] Fix v4l2-compliance errors" as 17 out of the 21 patches are ready to go and don't need to be delayed.

----------------------------------------------------------------
- uvcvideo v4l2-compliance fixes

----------------------------------------------------------------
Hans Verkuil (1):
media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values()

Quoted 13 lines

Ricardo Ribalda (16):
media: v4l2-ioctl: Fix check_ext_ctrls
media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: v4l2-ioctl: S_CTRL output the right value
media: uvcvideo: Remove s_ctrl and g_ctrl
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

Patches applied.

Quoted 3 lines

media: uvcvideo: Use control names from framework
media: uvcvideo: Check controls flags before accessing them
media: uvcvideo: Set error_idx during ctrl_commit errors

I didn't apply those three. The first one seems to be causing memory leaks, and the other two are dependent on the first one.

So, I opted to skip them when merging this PR. This way, Ricardo can just re-submit 3 patches instead of the hole series.

Quoted 1 line

media: docs: Document the behaviour of uvcvideo driver

Patches applied.

Quoted 12 lines
 .../userspace-api/media/v4l/vidioc-g-ctrl.rst      |   3 +
 .../userspace-api/media/v4l/vidioc-g-ext-ctrls.rst |   3 +
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c           |   4 -
 drivers/media/usb/uvc/uvc_ctrl.c                   | 260 ++++++++++++++++-----
 drivers/media/usb/uvc/uvc_driver.c                 |  15 +-
 drivers/media/usb/uvc/uvc_metadata.c               |   2 +-
 drivers/media/usb/uvc/uvc_v4l2.c                   | 105 ++++-----
 drivers/media/usb/uvc/uvc_video.c                  |   5 +
 drivers/media/usb/uvc/uvcvideo.h                   |  17 +-
 drivers/media/v4l2-core/v4l2-ioctl.c               |  67 ++++--
 10 files changed, 317 insertions(+), 164 deletions(-)

Thanks,
Mauro

#3 lore raw

Hi Mauro,

Quoted 42 lines · Mauro Carvalho Chehab

Em Mon, 23 Aug 2021 12:37:35 +0300
Laurent Pinchart <[email protected]> escreveu:

Quoted 25 lines

Hi Mauro,

The following changes since commit d62cd4d277cc711f781a7bdec4109c6148529b25:

media: uvcvideo: Remove unused including <linux/version.h> (2021-08-21 09:11:04 +0200)

are available in the Git repository at:

git://linuxtv.org/pinchartl/media.git tags/uvc-next-20210823

for you to fetch changes up to 2bc2b78476b4bc5690186c2b9a4dd565be6a9913:

media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values() (2021-08-23 12:31:04 +0300)

This contains a subset of "[PATCH v10 00/21] Fix v4l2-compliance errors" as 17 out of the 21 patches are ready to go and don't need to be delayed.

----------------------------------------------------------------
- uvcvideo v4l2-compliance fixes

----------------------------------------------------------------
Hans Verkuil (1):
media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values()

Quoted 13 lines

Ricardo Ribalda (16):
media: v4l2-ioctl: Fix check_ext_ctrls
media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: v4l2-ioctl: S_CTRL output the right value
media: uvcvideo: Remove s_ctrl and g_ctrl
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

Quoted 8 lines

Patches applied.

Quoted 3 lines

media: uvcvideo: Use control names from framework
media: uvcvideo: Check controls flags before accessing them
media: uvcvideo: Set error_idx during ctrl_commit errors

I didn't apply those three. The first one seems to be causing memory leaks, and the other two are dependent on the first one.

Ricardo has replied to your review.

Quoted 20 lines

So, I opted to skip them when merging this PR. This way, Ricardo can just re-submit 3 patches instead of the hole series.

Quoted 1 line

media: docs: Document the behaviour of uvcvideo driver

Patches applied.

Quoted 12 lines
 .../userspace-api/media/v4l/vidioc-g-ctrl.rst      |   3 +
 .../userspace-api/media/v4l/vidioc-g-ext-ctrls.rst |   3 +
 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c           |   4 -
 drivers/media/usb/uvc/uvc_ctrl.c                   | 260 ++++++++++++++++-----
 drivers/media/usb/uvc/uvc_driver.c                 |  15 +-
 drivers/media/usb/uvc/uvc_metadata.c               |   2 +-
 drivers/media/usb/uvc/uvc_v4l2.c                   | 105 ++++-----
 drivers/media/usb/uvc/uvc_video.c                  |   5 +
 drivers/media/usb/uvc/uvcvideo.h                   |  17 +-
 drivers/media/v4l2-core/v4l2-ioctl.c               |  67 ++++--
 10 files changed, 317 insertions(+), 164 deletions(-)
Signature · 3 lines
Regards,

Laurent Pinchart
#4 lore raw

Em Fri, 3 Sep 2021 15:41:22 +0300
Laurent Pinchart <[email protected]> escreveu:

Quoted 47 lines

Hi Mauro,

Quoted 44 lines · Mauro Carvalho Chehab

Em Mon, 23 Aug 2021 12:37:35 +0300
Laurent Pinchart <[email protected]> escreveu:

Quoted 25 lines

Hi Mauro,

The following changes since commit d62cd4d277cc711f781a7bdec4109c6148529b25:

media: uvcvideo: Remove unused including <linux/version.h> (2021-08-21 09:11:04 +0200)

are available in the Git repository at:

git://linuxtv.org/pinchartl/media.git tags/uvc-next-20210823

for you to fetch changes up to 2bc2b78476b4bc5690186c2b9a4dd565be6a9913:

media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values() (2021-08-23 12:31:04 +0300)

This contains a subset of "[PATCH v10 00/21] Fix v4l2-compliance errors" as 17 out of the 21 patches are ready to go and don't need to be delayed.

----------------------------------------------------------------
- uvcvideo v4l2-compliance fixes

----------------------------------------------------------------
Hans Verkuil (1):
media: uvcvideo: Don't spam the log in uvc_ctrl_restore_values()

Quoted 13 lines

Ricardo Ribalda (16):
media: v4l2-ioctl: Fix check_ext_ctrls
media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: v4l2-ioctl: S_CTRL output the right value
media: uvcvideo: Remove s_ctrl and g_ctrl
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

Patches applied.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

media: uvcvideo: Use control names from framework
media: uvcvideo: Check controls flags before accessing them
media: uvcvideo: Set error_idx during ctrl_commit errors

I didn't apply those three. The first one seems to be causing memory leaks, and the other two are dependent on the first one.

Ricardo has replied to your review.

OK. Patches applied.

Thanks,
Mauro