mbox series

[GIT,PULL,FOR,v6.4] cx18: convert to vb2

Message ID 17754260-d77f-cd6b-c753-06b57373151d@xs4all.nl
State New
Headers show
Series [GIT,PULL,FOR,v6.4] cx18: convert to vb2 | expand

Pull-request

git://linuxtv.org/hverkuil/media_tree.git tags/br-cx18

Message

Hans Verkuil Feb. 27, 2023, 10 a.m. UTC
This patch series converts cx18 to vb2. It also fixes a number of
compliance issues.

The first two patches fix core bugs that only appear with a somewhat weird
driver like cx18: video0 only supports read() but streaming ioctls were
incorrectly enabled in the core; also vb2_fop_read had an ownership issue in
case vb2_read would return an error.

cx18 now passes the v4l2-compliance tests.

As usual, the vb2 conversion patch is pretty much unreviewable. It's
impossible to do an incremental vb2 conversion, it's all or nothing.

Regards,

	Hans

The following changes since commit 3e62aba8284de0994a669d07983299242e68fe72:

  media: imx-mipi-csis: Check csis_fmt validity before use (2023-02-26 11:21:33 +0100)

are available in the Git repository at:

  git://linuxtv.org/hverkuil/media_tree.git tags/br-cx18

for you to fetch changes up to 9dba815c0cbbd283586b9066f652da32e1a9381b:

  cx18: fix format compliance issues (2023-02-27 10:26:18 +0100)

----------------------------------------------------------------
Tag branch

----------------------------------------------------------------
Hans Verkuil (8):
      vb2: set owner before calling vb2_read
      v4l2-dev.c: check for V4L2_CAP_STREAMING to enable streaming ioctls
      cx18: convert to vb2
      cx18: fix incorrect input counting
      cx18: properly report pixelformats
      cx18: missing CAP_AUDIO for vbi stream
      cx18: reorder fmt_vid_cap functions in cx18-ioctl.c
      cx18: fix format compliance issues

 drivers/media/common/videobuf2/videobuf2-v4l2.c |   5 +-
 drivers/media/pci/cx18/Kconfig                  |   2 +-
 drivers/media/pci/cx18/cx18-driver.c            |   4 +-
 drivers/media/pci/cx18/cx18-driver.h            |  24 ++--
 drivers/media/pci/cx18/cx18-fileops.c           |  85 +++-----------
 drivers/media/pci/cx18/cx18-fileops.h           |   3 +-
 drivers/media/pci/cx18/cx18-ioctl.c             | 391 ++++++++++++++++++++++++++--------------------------------------
 drivers/media/pci/cx18/cx18-mailbox.c           |  27 ++---
 drivers/media/pci/cx18/cx18-streams.c           | 278 +++++++++++++++++++++++----------------------
 drivers/media/v4l2-core/v4l2-dev.c              |   5 +-
 10 files changed, 357 insertions(+), 467 deletions(-)

Comments

Jenkins March 19, 2023, 2:56 a.m. UTC | #1
From: builder@linuxtv.org

Pull request: https://patchwork.linuxtv.org/project/linux-media/patch/17754260-d77f-cd6b-c753-06b57373151d@xs4all.nl/
Build log: https://builder.linuxtv.org/job/patchwork/290881/
Build time: 00:20:17
Link: https://lore.kernel.org/linux-media/17754260-d77f-cd6b-c753-06b57373151d@xs4all.nl

gpg: Signature made Mon 27 Feb 2023 09:47:31 AM UTC
gpg:                using EDDSA key 52ADCAAE8A4F70B99ACD8D726B425DF79B1C1E76
gpg: Good signature from "Hans Verkuil <hverkuil-cisco@xs4all.nl>" [unknown]
gpg:                 aka "Hans Verkuil <hverkuil@xs4all.nl>" [full]

Summary: got 2/8 patches with issues, being 1 at build time

Error/warnings:

patches/0001-vb2-set-owner-before-calling-vb2_read.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
	../drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:415 ov2680_s_stream() warn: missing error code 'ret'
	../drivers/staging/media/atomisp/pci/atomisp_cmd.c: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:3357 atomisp_cp_dvs_6axis_config() warn: missing unwind goto?
	../drivers/staging/media/atomisp/pci/atomisp_cmd.c: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:3456 atomisp_cp_morph_table() warn: missing unwind goto?

    allyesconfig: return code #0:
	../drivers/media/i2c/adp1653.c: ../drivers/media/i2c/adp1653.c:444 adp1653_of_init() warn: missing unwind goto?
	../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c: ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:2485 mxc_jpeg_probe() warn: missing unwind goto?
	SMATCH:../drivers/media/usb/siano/smsusb.c ../drivers/media/usb/siano/smsusb.c:53:38: :warning: array of flexible structures
	../drivers/media/i2c/ov5645.c: ../drivers/media/i2c/ov5645.c:687 ov5645_set_power_on() warn: 'ov5645->xclk' from clk_prepare_enable() not released on lines: 687.
	../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2570 dvb_register() parse error: OOM: 3000028Kb sm_state_count = 1939314
	../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2570 dvb_register() warn: Function too hairy.  No more merges.
	../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2570 dvb_register() parse error: __split_smt: function too hairy.  Giving up after 54 seconds
	../drivers/media/usb/pvrusb2/pvrusb2-hdw.c: ../drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3293 pvr2_hdw_get_tuner_status() warn: inconsistent indenting

patches/0007-cx18-reorder-fmt_vid_cap-functions-in-cx18-ioctl.c.patch:

   checkpatch.pl:
	$ cat patches/0007-cx18-reorder-fmt_vid_cap-functions-in-cx18-ioctl.c.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:116: CHECK: multiple assignments should be avoided
	-:117: CHECK: multiple assignments should be avoided
Jenkins March 19, 2023, 11:06 a.m. UTC | #2
From: builder@linuxtv.org

Pull request: https://patchwork.linuxtv.org/project/linux-media/patch/17754260-d77f-cd6b-c753-06b57373151d@xs4all.nl/
Build log: https://builder.linuxtv.org/job/patchwork/290886/
Build time: 00:20:33
Link: https://lore.kernel.org/linux-media/17754260-d77f-cd6b-c753-06b57373151d@xs4all.nl

gpg: Signature made Mon 27 Feb 2023 09:47:31 AM UTC
gpg:                using EDDSA key 52ADCAAE8A4F70B99ACD8D726B425DF79B1C1E76
gpg: Good signature from "Hans Verkuil <hverkuil-cisco@xs4all.nl>" [unknown]
gpg:                 aka "Hans Verkuil <hverkuil@xs4all.nl>" [full]

Summary: got 2/8 patches with issues, being 1 at build time

Error/warnings:

patches/0001-vb2-set-owner-before-calling-vb2_read.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
	../drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:415 ov2680_s_stream() warn: missing error code 'ret'
	../drivers/staging/media/atomisp/pci/atomisp_cmd.c: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:3357 atomisp_cp_dvs_6axis_config() warn: missing unwind goto?
	../drivers/staging/media/atomisp/pci/atomisp_cmd.c: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:3456 atomisp_cp_morph_table() warn: missing unwind goto?

    allyesconfig: return code #0:
	../drivers/media/i2c/adp1653.c: ../drivers/media/i2c/adp1653.c:444 adp1653_of_init() warn: missing unwind goto?
	../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c: ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:2485 mxc_jpeg_probe() warn: missing unwind goto?
	SMATCH:../drivers/media/usb/siano/smsusb.c ../drivers/media/usb/siano/smsusb.c:53:38: :warning: array of flexible structures
	../drivers/media/i2c/ov5645.c: ../drivers/media/i2c/ov5645.c:687 ov5645_set_power_on() warn: 'ov5645->xclk' from clk_prepare_enable() not released on lines: 687.
	../drivers/media/i2c/ov5670.c: ../drivers/media/i2c/ov5670.c:2670 ov5670_probe() warn: passing zero to 'PTR_ERR'
	../drivers/media/usb/em28xx/em28xx-video.c: ../drivers/media/usb/em28xx/em28xx-video.c:2884 em28xx_v4l2_init() parse error: turning off implications after 60 seconds
	../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2570 dvb_register() parse error: OOM: 3000028Kb sm_state_count = 1940269
	../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2570 dvb_register() warn: Function too hairy.  No more merges.
	../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2570 dvb_register() parse error: __split_smt: function too hairy.  Giving up after 54 seconds
	../drivers/media/usb/pvrusb2/pvrusb2-hdw.c: ../drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3293 pvr2_hdw_get_tuner_status() warn: inconsistent indenting

patches/0007-cx18-reorder-fmt_vid_cap-functions-in-cx18-ioctl.c.patch:

   checkpatch.pl:
	$ cat patches/0007-cx18-reorder-fmt_vid_cap-functions-in-cx18-ioctl.c.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:116: CHECK: multiple assignments should be avoided
	-:117: CHECK: multiple assignments should be avoided