linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/25] rcar-vin: Add Gen3 with media controller
@ 2017-08-22 23:26 Niklas Söderlund
  2017-08-22 23:26 ` [PATCH v6 01/25] rcar-vin: add Gen3 devicetree bindings documentation Niklas Söderlund
                   ` (24 more replies)
  0 siblings, 25 replies; 53+ messages in thread
From: Niklas Söderlund @ 2017-08-22 23:26 UTC (permalink / raw)
  To: Laurent Pinchart, Hans Verkuil
  Cc: Kieran Bingham, Sakari Ailus, tomoharu.fukawa.eb, linux-media,
	linux-renesas-soc, Niklas Söderlund

Hi,

This series adds Gen3 VIN support to rcar-vin driver for Renesas r8a7795 
and r8a7796. It is based on the media-tree.

The driver is tested on both Renesas H3 (r8a7795, ES1.x + ES2.0) and 
M3-W (r8a7796) together with the rcar-csi2 driver (posted separately and 
not yet upstream) and the Salvator-X onboard ADV7482.

It is possible to capture both CVBS and HDMI video streams, 
v4l2-compliance passes with no errors and media-ctl can be used to 
change the routing and formats for the different entities in the media 
graph.

Gen2 compatibility is verified on Koelsch and no problems where found, video
can be captured just like before and v4l2-compliance passes without errors or
warnings just like before this series.

I have started on a very basic test suite for the VIN driver at:

  https://git.ragnatech.se/vin-tests

And as before the state of the driver and information about how to test it can
be found on the elinux wiki:

  http://elinux.org/R-Car/Tests:rcar-vin

* Changes since v5
- Extract and make use of common format checking for both Gen2 and Gen3.
- Assign pad at declaration time in rvin_get_sd_format()
- Always call pm_runtime_{get_sync,put}() and v4l2_pipeline_pm_use() 
  when opening/closing a video device, remove the check of  
  v4l2_fh_is_singular_file().
- Make rvin_set_chsel() return void instead of int since it always
  return 0.
- Simplify the VIN group allocator functions.
- Make the group notifier callbacks and setup more robust.
- Moved the video device registration back to probe time.
- Add H3 ES2.0 support.
- Fix handling of single field formats (top, bottom, alternate) as this 
  was obviously wrong before but hidden by the Gen2 scaler support.
- Added review tags from Kieran.

* Changes since v4 (Not posted to ML)
- Updated to the new fwnode functions.
- Moved the registration of the video devices to the async notification 
  callback.

* Changes since v3
- Only add neighboring subdevices to the async notifier. Instead of 
  parsing the whole OF graph depend on incremental async subnotifier to
  discover the whole pipeline. This is needed to support arbitrarily
  long graphs and support the new ADV7482 prototype driver which Kieran
  is working on.
- Fix warning from lockdep, reported by Kieran.
- Fix commit messages from feedback from Sergei, thanks.
- Fix chip info an OF device ids sorting order, thanks Geert.
- Use subdev->of_node instead of subdev->dev->of_node, thanks Kieran.

* Changes since v2
- Do not try to control the subdevices in the media graph from the rcar-vin
  driver. Have user-space configure to format in the pipeline instead.
- Add link validation before starting the stream.
- Rework on how the subdevices are and the video node behave by defining
  specific V4L2 operations for the MC mode of operation, this simplified the
  driver quit a bit, thanks Laurent!
- Add a new 'renesas,id' DT property which is needed to to be able to keep the
  VIN to CSI-2 routing table inside the driver. Previously this information was
  taken from the CSI-2 DT node which is obviusly the wrong way to do things.
  Thanks Laurent for pointing this out.
- Fixed a memory leek in the group allocator function.
- Return -EMLINK instead of -EBUSY if a MC link is not possible given the
  current routing setup.
- Add comments to clarify that the 4 channels from the CSI-2 node is not
  directly related to CSI-2 virtual channels, the CSI-2 node can output any VC
  on any of its output channels.

* Changes since v1
- Remove unneeded casts as pointed out by Geert.
- Fix spelling and DT documentation as pointed out by Geert and Sergei, thanks!
- Refresh patch 2/32 with an updated version, thanks Sakari for pointing this
  out.
- Add Sakaris Ack to patch 1/32.
- Rebase on top of v4.9-rc1 instead of v4.9-rc3 to ease integration testing
  together with renesas-drivers tree.


Niklas Söderlund (25):
  rcar-vin: add Gen3 devicetree bindings documentation
  rcar-vin: register the video device at probe time
  rcar-vin: move chip information to own struct
  rcar-vin: move max width and height information to chip information
  rcar-vin: change name of video device
  rcar-vin: move functions regarding scaling
  rcar-vin: all Gen2 boards can scale simplify logic
  rcar-vin: do not reset crop and compose when setting format
  rcar-vin: do not allow changing scaling and composing while streaming
  rcar-vin: read subdevice format for crop only when needed
  rcar-vin: fix handling of single field frames (top, bottom and
    alternate fields)
  rcar-vin: move media bus configuration to struct rvin_info
  rcar-vin: enable Gen3 hardware configuration
  rcar-vin: add functions to manipulate Gen3 CHSEL value
  rcar-vin: add flag to switch to media controller mode
  rcar-vin: break out format alignment and checking
  rcar-vin: use different v4l2 operations in media controller mode
  rcar-vin: prepare for media controller mode initialization
  rcar-vin: add group allocator functions
  rcar-vin: add chsel information to rvin_info
  rcar-vin: parse Gen3 OF and setup media graph
  rcar-vin: add link notify for Gen3
  rcar-vin: extend {start,stop}_streaming to work with media controller
  rcar-vin: enable support for r8a7795
  rcar-vin: enable support for r8a7796

 .../devicetree/bindings/media/rcar_vin.txt         |  107 +-
 drivers/media/platform/rcar-vin/Kconfig            |    2 +-
 drivers/media/platform/rcar-vin/rcar-core.c        | 1021 +++++++++++++++++++-
 drivers/media/platform/rcar-vin/rcar-dma.c         | 1000 +++++++++++--------
 drivers/media/platform/rcar-vin/rcar-v4l2.c        |  443 +++++----
 drivers/media/platform/rcar-vin/rcar-vin.h         |  119 ++-
 6 files changed, 2044 insertions(+), 648 deletions(-)

-- 
2.14.0

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

end of thread, other threads:[~2017-10-03  8:30 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22 23:26 [PATCH v6 00/25] rcar-vin: Add Gen3 with media controller Niklas Söderlund
2017-08-22 23:26 ` [PATCH v6 01/25] rcar-vin: add Gen3 devicetree bindings documentation Niklas Söderlund
2017-08-23  8:14   ` Laurent Pinchart
2017-08-22 23:26 ` [PATCH v6 02/25] rcar-vin: register the video device at probe time Niklas Söderlund
2017-08-23  8:43   ` Laurent Pinchart
2017-08-22 23:26 ` [PATCH v6 03/25] rcar-vin: move chip information to own struct Niklas Söderlund
2017-08-23 15:49   ` Laurent Pinchart
2017-09-25  9:44   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 04/25] rcar-vin: move max width and height information to chip information Niklas Söderlund
2017-09-25  9:45   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 05/25] rcar-vin: change name of video device Niklas Söderlund
2017-09-25  9:46   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 06/25] rcar-vin: move functions regarding scaling Niklas Söderlund
2017-09-25  9:46   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 07/25] rcar-vin: all Gen2 boards can scale simplify logic Niklas Söderlund
2017-09-25  9:48   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 08/25] rcar-vin: do not reset crop and compose when setting format Niklas Söderlund
2017-09-25  9:49   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 09/25] rcar-vin: do not allow changing scaling and composing while streaming Niklas Söderlund
2017-09-25  9:50   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 10/25] rcar-vin: read subdevice format for crop only when needed Niklas Söderlund
2017-09-25  9:54   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 11/25] rcar-vin: fix handling of single field frames (top, bottom and alternate fields) Niklas Söderlund
2017-09-25  9:58   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 12/25] rcar-vin: move media bus configuration to struct rvin_info Niklas Söderlund
2017-09-25 10:00   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 13/25] rcar-vin: enable Gen3 hardware configuration Niklas Söderlund
2017-09-25 10:01   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 14/25] rcar-vin: add functions to manipulate Gen3 CHSEL value Niklas Söderlund
2017-09-25 10:04   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 15/25] rcar-vin: add flag to switch to media controller mode Niklas Söderlund
2017-09-25 10:04   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 16/25] rcar-vin: break out format alignment and checking Niklas Söderlund
2017-09-25 10:08   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 17/25] rcar-vin: use different v4l2 operations in media controller mode Niklas Söderlund
2017-09-25 10:11   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 18/25] rcar-vin: prepare for media controller mode initialization Niklas Söderlund
2017-09-25 10:11   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 19/25] rcar-vin: add group allocator functions Niklas Söderlund
2017-09-25 10:22   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 20/25] rcar-vin: add chsel information to rvin_info Niklas Söderlund
2017-09-25 10:26   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 21/25] rcar-vin: parse Gen3 OF and setup media graph Niklas Söderlund
2017-09-25 10:36   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 22/25] rcar-vin: add link notify for Gen3 Niklas Söderlund
2017-09-25 10:43   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 23/25] rcar-vin: extend {start,stop}_streaming to work with media controller Niklas Söderlund
2017-09-25 10:46   ` Hans Verkuil
2017-08-22 23:26 ` [PATCH v6 24/25] rcar-vin: enable support for r8a7795 Niklas Söderlund
2017-09-25 10:47   ` Hans Verkuil
2017-10-03  8:30   ` Geert Uytterhoeven
2017-08-22 23:26 ` [PATCH v6 25/25] rcar-vin: enable support for r8a7796 Niklas Söderlund
2017-09-25 10:47   ` Hans Verkuil

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).