devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/9] Renesas Capture Engine Unit (CEU) V4L2 driver
@ 2018-01-16 21:44 Jacopo Mondi
  2018-01-16 21:44 ` [PATCH v6 1/9] dt-bindings: media: Add Renesas CEU bindings Jacopo Mondi
                   ` (10 more replies)
  0 siblings, 11 replies; 38+ messages in thread
From: Jacopo Mondi @ 2018-01-16 21:44 UTC (permalink / raw)
  To: laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw,
	magnus.damm-Re5JQEeQqe8AvxtiuMwx3w, geert-gXvu3+zWzMSzQB+pC5nmwQ,
	hverkuil-qWit8jRvyhVmR6Xm/wNWPw, mchehab-DgEjT+Ai2ygdnm+yROfE0A,
	festevam-Re5JQEeQqe8AvxtiuMwx3w, sakari.ailus-X3B1VOXEql0,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	pombredanne-od1rfyK75/E
  Cc: Jacopo Mondi, linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-sh-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hello,
   new version of CEU after Hans' review.

Added his Acked-by to most patches and closed review comments.
Running v4l2-compliance, I noticed a new failure introduced by the way I now
calculate the plane sizes in set/try_fmt.

This is the function used to update per-plane bytesperline and sizeimage:

static void ceu_update_plane_sizes(struct v4l2_plane_pix_format *plane,
				   unsigned int bpl, unsigned int szimage)
{
	if (plane->bytesperline < bpl)
		plane->bytesperline = bpl;
	if (plane->sizeimage < szimage)
		plane->sizeimage = szimage;
}

I'm seeing a failure as v4l2-compliance requires buffers with both bytesperline
and sizeimage set to MAX_INT . Hans, is this expected from v4l2-compliance?
How should I handle this, if that has to be handled by the single drivers?

Apart from that, here it is the output of v4l2-compliance, with the last tests
failing due to the above stated reason, and two errors in try/set format due to
the fact the driver is not setting ycbcr encoding after it receives an invalid
format. I would set those, but I'm not sure what it the correct value and not
all mainline drivers do that.

-------------------------------------------------------------------------------
v4l2-compliance SHA   : 1d3c611dee82090d9456730e24af368b51dcb4a9

Driver Info:
	Driver name   : renesas-ceu
	Card type     : Renesas CEU e8210000.ceu
	Bus info      : platform:renesas-ceu-e8210000.c
	Driver version: 4.14.0
	Capabilities  : 0x84201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second video open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

	Control ioctls:
		test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
		test VIDIOC_QUERYCTRL: OK
		test VIDIOC_G/S_CTRL: OK
		test VIDIOC_G/S/TRY_EXT_CTRLS: OK
		fail: v4l2-test-controls.cpp(782): subscribe event for control 'User Controls' failed
		test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
		test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
		Standard Controls: 12 Private Controls: 0

	Format ioctls:
		test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		fail: v4l2-test-formats.cpp(1162): ret && node->has_frmintervals
		test VIDIOC_G/S_PARM: FAIL
		test VIDIOC_G_FBUF: OK (Not Supported)
		test VIDIOC_G_FMT: OK
		fail: v4l2-test-formats.cpp(335): ycbcr_enc >= 0xff
		fail: v4l2-test-formats.cpp(451): testColorspace(pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization)
		fail: v4l2-test-formats.cpp(736): Video Capture Multiplanar is valid, but TRY_FMT failed to return a format
		test VIDIOC_TRY_FMT: FAIL
		fail: v4l2-test-formats.cpp(335): ycbcr_enc >= 0xff
		fail: v4l2-test-formats.cpp(451): testColorspace(pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization)
		fail: v4l2-test-formats.cpp(996): Video Capture Multiplanar is valid, but no S_FMT was implemented
		test VIDIOC_S_FMT: FAIL
		test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
		test Cropping: OK (Not Supported)
		test Composing: OK (Not Supported)
		test Scaling: OK (Not Supported)

	Codec ioctls:
		test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
		test VIDIOC_G_ENC_INDEX: OK (Not Supported)
		test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

	Buffer ioctls:
		test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
		test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 39, Failed: 4, Warnings: 0
-------------------------------------------------------------------------------

Thanks
   j

v5->v6:
- Add Hans' Acked-by to most patches
- Fix a bad change in ov772x get_selection
- Add .buf_prepare callack to CEU and verify plane sizes there
- Remove VB2_USERPTR from supported io_modes in CEU driver
- Remove read() fops in CEU driver

v4->v5:
- Added Rob's and Laurent's Reviewed-by tag to DT bindings
- Change CEU driver module license to "GPL v2" to match SPDX identifier as
  suggested by Philippe Ombredanne
- Make struct ceu_data static as suggested by Laurent and add his
  Reviewed-by to CEU driver.

v3->v4:
- Drop generic fallback compatible string "renesas,ceu"
- Addressed Laurent's comments on [3/9]
  - Fix error messages on irq get/request
  - Do not leak ceudev if irq_get fails
  - Make irq_mask a const field

v2->v3:
- Improved DT bindings removing standard properties (pinctrl- ones and
  remote-endpoint) not specific to this driver and improved description of
  compatible strings
- Remove ov772x's xlkc_rate property and set clock rate in Migo-R board file
- Made 'xclk' clock private to ov772x driver in Migo-R board file
- Change 'rstb' GPIO active output level and changed ov772x and tw9910 drivers
  accordingly as suggested by Fabio
- Minor changes in CEU driver to address Laurent's comments
- Moved Migo-R setup patch to the end of the series to silence 0-day bot
- Renamed tw9910 clock to 'xti' as per video decoder manual
- Changed all SPDX identifiers to GPL-2.0 from previous GPL-2.0+

v1->v2:
 - DT
 -- Addressed Geert's comments and added clocks for CEU to mstp6 clock source
 -- Specified supported generic video iterfaces properties in dt-bindings and
    simplified example

 - CEU driver
 -- Re-worked interrupt handler, interrupt management, reset(*) and capture
    start operation
 -- Re-worked querycap/enum_input/enum_frameintervals to fix some
    v4l2_compliance failures
 -- Removed soc_camera legacy operations g/s_mbus_format
 -- Update to new notifier implementation
 -- Fixed several comments from Hans, Laurent and Sakari

 - Migo-R
 -- Register clocks and gpios for sensor drivers in Migo-R setup
 -- Updated sensors (tw9910 and ov772x) drivers headers and drivers to close
    remarks from Hans and Laurent:
 --- Removed platform callbacks and handle clocks and gpios from sensor drivers
 --- Remove g/s_mbus_config operations

Jacopo Mondi (9):
  dt-bindings: media: Add Renesas CEU bindings
  include: media: Add Renesas CEU driver interface
  v4l: platform: Add Renesas CEU driver
  ARM: dts: r7s72100: Add Capture Engine Unit (CEU)
  v4l: i2c: Copy ov772x soc_camera sensor driver
  media: i2c: ov772x: Remove soc_camera dependencies
  v4l: i2c: Copy tw9910 soc_camera sensor driver
  media: i2c: tw9910: Remove soc_camera dependencies
  arch: sh: migor: Use new renesas-ceu camera driver

 .../devicetree/bindings/media/renesas,ceu.txt      |   81 +
 arch/arm/boot/dts/r7s72100.dtsi                    |   15 +-
 arch/sh/boards/mach-migor/setup.c                  |  225 ++-
 arch/sh/kernel/cpu/sh4a/clock-sh7722.c             |    2 +-
 drivers/media/i2c/Kconfig                          |   20 +
 drivers/media/i2c/Makefile                         |    2 +
 drivers/media/i2c/ov772x.c                         | 1183 ++++++++++++++
 drivers/media/i2c/tw9910.c                         | 1039 ++++++++++++
 drivers/media/platform/Kconfig                     |    9 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/renesas-ceu.c               | 1659 ++++++++++++++++++++
 include/media/drv-intf/renesas-ceu.h               |   26 +
 include/media/i2c/ov772x.h                         |    6 +-
 include/media/i2c/tw9910.h                         |    9 +
 14 files changed, 4146 insertions(+), 131 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/renesas,ceu.txt
 create mode 100644 drivers/media/i2c/ov772x.c
 create mode 100644 drivers/media/i2c/tw9910.c
 create mode 100644 drivers/media/platform/renesas-ceu.c
 create mode 100644 include/media/drv-intf/renesas-ceu.h

--
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2018-01-22 10:00 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 21:44 [PATCH v6 0/9] Renesas Capture Engine Unit (CEU) V4L2 driver Jacopo Mondi
2018-01-16 21:44 ` [PATCH v6 1/9] dt-bindings: media: Add Renesas CEU bindings Jacopo Mondi
2018-01-17  7:59   ` Sakari Ailus
2018-01-17  8:35     ` jacopo mondi
2018-01-17  8:55       ` Sakari Ailus
2018-01-16 21:44 ` [PATCH v6 2/9] include: media: Add Renesas CEU driver interface Jacopo Mondi
2018-01-16 21:44 ` [PATCH v6 3/9] v4l: platform: Add Renesas CEU driver Jacopo Mondi
2018-01-19 11:20   ` Hans Verkuil
2018-01-19 12:20     ` Laurent Pinchart
2018-01-19 12:25       ` Hans Verkuil
     [not found]         ` <4195ec6a-b99d-2fad-3898-9ce9c02fce00-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2018-01-22  0:52           ` Laurent Pinchart
2018-01-22  9:07             ` Hans Verkuil
2018-01-21  9:53     ` jacopo mondi
2018-01-21 10:21       ` Hans Verkuil
2018-01-21 10:23         ` Hans Verkuil
2018-01-21 17:29           ` jacopo mondi
2018-01-22  9:56             ` Hans Verkuil
2018-01-19 22:35   ` kbuild test robot
2018-01-20  2:11   ` kbuild test robot
2018-01-16 21:44 ` [PATCH v6 4/9] ARM: dts: r7s72100: Add Capture Engine Unit (CEU) Jacopo Mondi
2018-01-16 21:44 ` [PATCH v6 5/9] v4l: i2c: Copy ov772x soc_camera sensor driver Jacopo Mondi
2018-01-16 21:44 ` [PATCH v6 6/9] media: i2c: ov772x: Remove soc_camera dependencies Jacopo Mondi
2018-01-19 10:24   ` Hans Verkuil
     [not found]     ` <d67c21e5-2488-977b-39d8-561048409209-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2018-01-19 10:47       ` Hans Verkuil
2018-01-19 11:19         ` Sakari Ailus
2018-01-19 11:44           ` Hans Verkuil
     [not found]           ` <20180119111917.76wosrokgracbdrz-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2018-01-19 12:23             ` Laurent Pinchart
2018-01-21  9:31               ` jacopo mondi
2018-01-21 10:18                 ` Hans Verkuil
2018-01-16 21:44 ` [PATCH v6 7/9] v4l: i2c: Copy tw9910 soc_camera sensor driver Jacopo Mondi
2018-01-16 21:45 ` [PATCH v6 8/9] media: i2c: tw9910: Remove soc_camera dependencies Jacopo Mondi
2018-01-16 21:45 ` [PATCH v6 9/9] arch: sh: migor: Use new renesas-ceu camera driver Jacopo Mondi
2018-01-19 11:26 ` [PATCH v6 0/9] Renesas Capture Engine Unit (CEU) V4L2 driver Hans Verkuil
     [not found]   ` <6fcd22c1-19a5-e0b7-2b00-961e1cd1ebaa-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2018-01-21 17:49     ` jacopo mondi
2018-01-22 10:00       ` Hans Verkuil
2018-01-19 22:12 ` Randy Dunlap
2018-01-21 17:54   ` jacopo mondi
2018-01-21 18:04     ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).