[PATCH v9 09/28] rcar-vin: all Gen2 boards can scale simplify logic

2017-12-07 Thread Niklas Söderlund
the field is preserved simplifies the logic quite a bit. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-dma.c | 8 drivers/media/platform/rcar-vin/rcar

[PATCH v9 16/28] rcar-vin: add function to manipulate Gen3 chsel value

2017-12-07 Thread Niklas Söderlund
-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-dma.c | 25 + drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 27 insertions(+) diff --g

[PATCH v9 08/28] rcar-vin: move functions regarding scaling

2017-12-07 Thread Niklas Söderlund
In preparation of refactoring the scaling code move the code regarding scaling to to the top of the file to avoid the need to add forward declarations. No code is changed in this commit only whole functions moved inside the same file. Signed-off-by: Niklas Söderlund <niklas.soderlund+r

[PATCH v9 11/28] rcar-vin: do not allow changing scaling and composing while streaming

2017-12-07 Thread Niklas Söderlund
and only configure scaling and composing when the stream starts. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/rcar-vin/rca

[PATCH v9 25/28] rcar-vin: extend {start,stop}_streaming to work with media controller

2017-12-07 Thread Niklas Söderlund
The procedure to start or stop streaming using the non-MC single subdevice and the MC graph and multiple subdevices are quite different. Create a new function to abstract which method is used based on which mode the driver is running in and add logic to start the MC graph. Signed-off-by: Niklas

[PATCH v9 24/28] rcar-vin: add link notify for Gen3

2017-12-07 Thread Niklas Söderlund
to hardware constrains the link_notifier callback will return -EMLINK. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-core.c | 205 1 file

[PATCH v9 06/28] rcar-vin: move max width and height information to chip information

2017-12-07 Thread Niklas Söderlund
On Gen3 the max supported width and height will be different from Gen2. Move the limits to the struct rvin_info to prepare for Gen3 support. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham+rene...@ideasonboard.com&

[PATCH v9 13/28] rcar-vin: fix handling of single field frames (top, bottom and alternate fields)

2017-12-07 Thread Niklas Söderlund
best to scale the top or bottom to the requested format and cropping and scaling do not work as expected. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-dma.c | 15 +-

[PATCH v9 18/28] rcar-vin: break out format alignment and checking

2017-12-07 Thread Niklas Söderlund
Part of the format alignment and checking can be shared with the Gen3 format handling. Break that part out to its own function. While doing this clean up the checking and add more checks. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <

[PATCH v9 17/28] rcar-vin: add flag to switch to media controller mode

2017-12-07 Thread Niklas Söderlund
to struct rvin_info which will control which mode to use. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-core.c | 6 +- drivers/media/platform/rcar-vin/rcar-vin.h | 2

[PATCH v9 22/28] rcar-vin: add chsel information to rvin_info

2017-12-07 Thread Niklas Söderlund
Each Gen3 SoC has a limited set of predefined routing possibilities for which CSI-2 device and virtual channel can be routed to which VIN instance. Prepare to store this information in the struct rvin_info. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by

[PATCH v9 05/28] rcar-vin: move chip information to own struct

2017-12-07 Thread Niklas Söderlund
() which will always work as the driver is DT only, so there's always a valid match. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham+rene...@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com>

[PATCH v9 07/28] rcar-vin: change name of video device

2017-12-07 Thread Niklas Söderlund
The rcar-vin driver needs to be part of a media controller to support Gen3. Give each VIN instance a unique name so it can be referenced from userspace. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham+rene...@ideason

[PATCH v9 01/28] rcar-vin: add Gen3 devicetree bindings documentation

2017-12-07 Thread Niklas Söderlund
VIN and CSI-2 block. This routing table will be kept inside the driver but in order for it to act on it it must know which VIN and CSI-2 is which. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bi

[PATCH v9 14/28] rcar-vin: move media bus configuration to struct rvin_info

2017-12-07 Thread Niklas Söderlund
Bus configuration will once the driver is extended to support Gen3 contain information not specific to only the directly connected parallel subdevice. Move it to struct rvin_info to show it's not always coupled to the parallel subdevice. Signed-off-by: Niklas Söderlund <niklas.soderlund+r

[PATCH v9 00/28] rcar-vin: Add Gen3 with media controller

2017-12-07 Thread Niklas Söderlund
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 (28): rcar-vin: add Gen3 devicetree bindings documentation rcar-vin: rename poorly named initialize and cleanup

[PATCH v9 15/28] rcar-vin: enable Gen3 hardware configuration

2017-12-07 Thread Niklas Söderlund
Add the register needed to work with Gen3 hardware. This patch adds the logic for how to work with the Gen3 hardware. More work is required to enable the subdevice structure needed to configure capturing. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by

[PATCH v9 20/28] rcar-vin: prepare for media controller mode initialization

2017-12-07 Thread Niklas Söderlund
When running in media controller mode a media pad is needed, register one. Also set the media bus format to CSI-2. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar

[PATCH v9 27/28] rcar-vin: enable support for r8a7796

2017-12-07 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7796. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bindings/media/rcar_vin.txt |

[PATCH v9 23/28] rcar-vin: parse Gen3 OF and setup media graph

2017-12-07 Thread Niklas Söderlund
. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-core.c | 320 +++- drivers/media/platform/rcar-vin/rcar-vin.h | 10 +- 2 files changed, 326 inse

[PATCH v9 21/28] rcar-vin: add group allocator functions

2017-12-07 Thread Niklas Söderlund
structure and creates a media device. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-core.c | 179 +++- drivers/media/platform/rcar-vin/rcar-

[PATCH v9 02/28] rcar-vin: rename poorly named initialize and cleanup functions

2017-12-07 Thread Niklas Söderlund
The functions to initialize and cleanup the hardware and video device where poorly named from the start. Rename them to better describe their intended function. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bin

[PATCH v9 19/28] rcar-vin: use different v4l2 operations in media controller mode

2017-12-07 Thread Niklas Söderlund
the running without directly interacting with the source subdevice. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/rcar-dma.c | 3 +- drivers/media/platform/rcar-vin/rcar-

[PATCH v9 26/28] rcar-vin: enable support for r8a7795

2017-12-07 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7795 ES1.x and ES2.0. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reviewed-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/platform/rcar-vin/Kconfig | 2 +- drivers/media/platform/rcar-vin

[PATCH v9 28/28] rcar-vin: enable support for r8a77970

2017-12-07 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a77970. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Tested-by: Kieran Bingham <kieran.bingham+rene...@ideasonboard.com> Acked-by: Rob Herring <r...@kernel.org> Reviewed-by: Hans Verkuil <h

Re: [PATCH 1/1] v4l: fwnode: Add debug prints for V4L2 endpoint property parsing

2017-12-05 Thread Niklas Söderlund
Hi Sakari, Thanks for your patch. On 2017-12-04 23:45:01 +0200, Sakari Ailus wrote: > Print debug info as standard V4L2 endpoint are parsed. > > Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se&

Re: [PATCH v9 13/28] rcar-vin: fix handling of single field frames (top, bottom and alternate fields)

2017-12-08 Thread Niklas Söderlund
Hi Laurent, Thanks for your feedback. On 2017-12-08 11:35:18 +0200, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Friday, 8 December 2017 03:08:27 EET Niklas Söderlund wrote: > > There was never proper support in the VIN driver to deliver ALTERNA

Re: [PATCH v9 11/28] rcar-vin: do not allow changing scaling and composing while streaming

2017-12-08 Thread Niklas Söderlund
Hi Laurent, Thanks for your feedback. On 2017-12-08 11:04:26 +0200, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Friday, 8 December 2017 03:08:25 EET Niklas Söderlund wrote: > > It is possible on Gen2 to change the registers controlling comp

Re: [PATCH v9 01/28] rcar-vin: add Gen3 devicetree bindings documentation

2017-12-08 Thread Niklas Söderlund
Hi Laurent, Thanks for your comments! On 2017-12-08 09:46:24 +0200, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Friday, 8 December 2017 03:08:15 EET Niklas Söderlund wrote: > > Document the devicetree bindings for the CSI-2 inp

Re: [PATCH v9 02/28] rcar-vin: rename poorly named initialize and cleanup functions

2017-12-08 Thread Niklas Söderlund
Hi Laurent, Thanks for your comments. On 2017-12-08 09:49:55 +0200, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Friday, 8 December 2017 03:08:16 EET Niklas Söderlund wrote: > > The functions to initialize and cleanup the hardware and video de

Re: [PATCH v9 03/28] rcar-vin: unregister video device on driver removal

2017-12-08 Thread Niklas Söderlund
Hi Laurent, Thanks for your comments. On 2017-12-08 09:54:31 +0200, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Friday, 8 December 2017 03:08:17 EET Niklas Söderlund wrote: > > If the video device was registered by the complete

Re: [PATCH v12 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver

2017-12-02 Thread Niklas Söderlund
Hej Sakari, Thanks for your feedback. On 2017-12-02 16:05:08 +0200, Sakari Ailus wrote: > Hejssan, > > On Sat, Dec 02, 2017 at 12:08:21PM +0100, Niklas Söderlund wrote: > ... > > > > +static int rcar_csi2_parse_dt(struct rcar_csi2 *priv) > > > > +{ &g

Re: [PATCH] v4l: rcar-vin: Implement V4L2 video node release handler

2017-12-04 Thread Niklas Söderlund
Hi Hans, On 2017-12-04 10:05:35 +0100, Hans Verkuil wrote: > Hi Niklas, > > On 11/16/2017 01:27 AM, Laurent Pinchart wrote: > > Hi Niklas, > > > > On Thursday, 16 November 2017 01:34:33 EET Niklas Söderlund wrote: > >> On 2017-11-16 00:49:07 +0200, Lauren

Re: [RFC 1/1] v4l: async: Use endpoint node, not device node, for fwnode match

2017-12-06 Thread Niklas Söderlund
ore/v4l2-async.c > +++ b/drivers/media/v4l2-core/v4l2-async.c > @@ -539,8 +539,12 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd) >* (struct v4l2_subdev.dev), and async sub-device does not >* exist independently of the device at any point of time. >*/ > - if (!sd->fwnode && sd->dev) > - sd->fwnode = dev_fwnode(sd->dev); > + if (!sd->fwnode && sd->dev) { > + sd->fwnode = fwnode_graph_get_next_endpoint( > + dev_fwnode(sd->dev), NULL); > + if (!sd->fwnode) > + sd->fwnode = dev_fwnode(sd->dev); > + } > > mutex_lock(_lock); > > diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c > b/drivers/media/v4l2-core/v4l2-fwnode.c > index fb72c7ac04d4..9c17a26d544c 100644 > --- a/drivers/media/v4l2-core/v4l2-fwnode.c > +++ b/drivers/media/v4l2-core/v4l2-fwnode.c > @@ -360,7 +360,7 @@ static int v4l2_async_notifier_fwnode_parse_endpoint( > > asd->match_type = V4L2_ASYNC_MATCH_FWNODE; > asd->match.fwnode.fwnode = > - fwnode_graph_get_remote_port_parent(endpoint); > + fwnode_graph_get_remote_endpoint(endpoint); > if (!asd->match.fwnode.fwnode) { > dev_warn(dev, "bad remote port parent\n"); > ret = -EINVAL; > -- > 2.11.0 > -- Regards, Niklas Söderlund

Re: [PATCH v9 07/28] rcar-vin: change name of video device

2017-12-20 Thread Niklas Söderlund
8 December 2017 03:08:21 EET Niklas Söderlund wrote: > > > > The rcar-vin driver needs to be part of a media controller to support > > > > Gen3. Give each VIN instance a unique name so it can be referenced from > > > > userspace. > > > > > &

Re: [PATCH v9 13/28] rcar-vin: fix handling of single field frames (top, bottom and alternate fields)

2017-12-20 Thread Niklas Söderlund
Hi Laurent, Thanks for your comments. On 2017-12-08 21:30:20 +0200, Laurent Pinchart wrote: > Hi Niklas, > > On Friday, 8 December 2017 16:06:58 EET Niklas Söderlund wrote: > > On 2017-12-08 11:35:18 +0200, Laurent Pinchart wrote: > > > On Friday, 8 December 2017 03:08

Re: [PATCH v9 09/28] rcar-vin: all Gen2 boards can scale simplify logic

2017-12-20 Thread Niklas Söderlund
Hi Laurent, Thanks for your comment. On 2017-12-08 10:33:32 +0200, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Friday, 8 December 2017 03:08:23 EET Niklas Söderlund wrote: > > The logic to preserve the requested format width and height are too

Re: [PATCH v9 11/28] rcar-vin: do not allow changing scaling and composing while streaming

2017-12-20 Thread Niklas Söderlund
Hi Laurent, On 2017-12-08 21:20:48 +0200, Laurent Pinchart wrote: > Hi Niklas, > > On Friday, 8 December 2017 16:14:23 EET Niklas Söderlund wrote: > > On 2017-12-08 11:04:26 +0200, Laurent Pinchart wrote: > > > On Friday, 8 December 2017 03:08:25 EET Niklas Söderlund wrot

Re: [PATCH] media: i2c: adv748x: Fix pixel rate values

2018-05-04 Thread Niklas Söderlund
Hi Laurent, On 2018-04-25 01:36:42 +0200, Niklas Söderlund wrote: > Hi Laurent, > > Thanks for your patch. > > On 2018-04-21 15:44:44 +0300, Laurent Pinchart wrote: > > The pixel rate, as reported by the V4L2_CID_PIXEL_RATE control, must > > include both horizontal

Re: [PATCH] media: i2c: adv748x: Fix pixel rate values

2018-05-05 Thread Niklas Söderlund
Hi Laurent, On 2018-05-05 12:48:58 +0300, Laurent Pinchart wrote: > Hi Niklas, > > On Saturday, 5 May 2018 01:58:10 EEST Niklas Söderlund wrote: > > On 2018-04-25 01:36:42 +0200, Niklas Söderlund wrote: > > > On 2018-04-21 15:44:44 +0300, Laurent Pinchart wrot

Re: [PATCH v15 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver

2018-05-14 Thread Niklas Söderlund
Hi Jacopo, Thanks for your feedback. On 2018-05-14 15:14:48 +0200, Jacopo Mondi wrote: > Hi Niklas, >thanks for the patch > > On Sun, May 13, 2018 at 09:19:17PM +0200, Niklas Söderlund wrote: > > A V4L2 driver for Renesas R-Car MIPI CSI-2 receiver. The driver > >

[PATCH v16 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver

2018-05-14 Thread Niklas Söderlund
priv->pads); + if (ret) + goto error; + + pm_runtime_enable(>dev); + + ret = v4l2_async_register_subdev(>subdev); + if (ret < 0) + goto error; + + dev_info(priv->dev, "%d lanes found\n", priv->lanes); + + return 0; + +error: + v4l2_async_notifier_unregister(>notifier); + v4l2_async_notifier_cleanup(>notifier); + + return ret; +} + +static int rcsi2_remove(struct platform_device *pdev) +{ + struct rcar_csi2 *priv = platform_get_drvdata(pdev); + + v4l2_async_notifier_unregister(>notifier); + v4l2_async_notifier_cleanup(>notifier); + v4l2_async_unregister_subdev(>subdev); + + pm_runtime_disable(>dev); + + return 0; +} + +static struct platform_driver rcar_csi2_pdrv = { + .remove = rcsi2_remove, + .probe = rcsi2_probe, + .driver = { + .name = "rcar-csi2", + .of_match_table = rcar_csi2_of_table, + }, +}; + +module_platform_driver(rcar_csi2_pdrv); + +MODULE_AUTHOR("Niklas Söderlund <niklas.soderl...@ragnatech.se>"); +MODULE_DESCRIPTION("Renesas R-Car MIPI CSI-2 receiver driver"); +MODULE_LICENSE("GPL"); -- 2.17.0

[PATCH v16 1/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation

2018-05-14 Thread Niklas Söderlund
-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Acked-by: Rob Herring <r...@kernel.org> Acked-by: Sakari Ailus <sakari.ai...@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo+rene...@jmondi.org

[PATCH v16 0/2] rcar-csi2: add Renesas R-Car MIPI CSI-2

2018-05-14 Thread Niklas Söderlund
YUYV8/UYVY8/ Changes since v1: - Drop dependency on a pad aware s_stream operation. - Use the DT bindings format "renesas,-", thanks Geert for pointing this out. Niklas Söderlund (2): rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation rcar-csi2: add Renesas R-Car MIPI

Re: [PATCH] v4l: vsp1: Fix vsp1_regs.h license header

2018-04-28 Thread Niklas Söderlund
l version of the driver. Fix > it. > > Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu...@renesas.com> > Cc: Kieran Bingham <kieran.bingham+rene...@ideasonboard.com> > Cc: Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> > Cc: Niklas Söderlund <niklas.soderlund+rene...@ra

Re: [PATCH v14 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver

2018-04-28 Thread Niklas Söderlund
> > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * Driver for Renesas R-Car MIPI CSI-2 Receiver > > + * > > + * Copyright (C) 2018 Renesas Electronics Corp. > > + */ [snip] > > +MODULE_AUTHOR("Niklas Söderlund <niklas.soderl...@ragnatech.se>&

Re: [PATCH v2] media: i2c: adv748x: Fix pixel rate values

2018-05-12 Thread Niklas Söderlund
Hi Kieran, Thanks for your feedback. On 2018-05-12 09:04:18 +0100, Kieran Bingham wrote: > Hi Niklas, Laurent, > > Thanks for the updated patch and detailed investigation to get this right. > > On 11/05/18 15:04, Niklas Söderlund wrote: > > From: Laurent Pinchart &

Re: [PATCH] media: rcar-vin: Drop unnecessary register properties from example vin port

2018-05-13 Thread Niklas Söderlund
Hi Simon, Thanks for your patch. On 2018-05-09 20:45:58 +0200, Simon Horman wrote: > The example vin port node does not have an address and thus does not > need address-cells or address size-properties. > > Signed-off-by: Simon Horman <horms+rene...@verge.net.au> Acked-by

[PATCH] media: dt-bindings: media: rcar_vin: add support for r8a77965

2018-05-13 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- Documentation/devicetree/bindings/media/rcar_vin.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt

Re: [PATCH v14 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver

2018-05-13 Thread Niklas Söderlund
Hi Laurent, On 2018-04-28 19:01:37 +0300, Laurent Pinchart wrote: > Hi Niklas, > > On Friday, 27 April 2018 02:28:32 EEST Niklas Söderlund wrote: > > On 2018-04-27 00:30:25 +0300, Laurent Pinchart wrote: > > > On Thursday, 26 April 2018 23:21:21 EEST Niklas Söderlund wro

[PATCH v15 2/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver

2018-05-13 Thread Niklas Söderlund
NR_OF_RCAR_CSI2_PAD; i++) + priv->pads[i].flags = MEDIA_PAD_FL_SOURCE; + + ret = media_entity_pads_init(>subdev.entity, NR_OF_RCAR_CSI2_PAD, +priv->pads); + if (ret) + goto error; + + pm_runtim

[PATCH v15 1/2] rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation

2018-05-13 Thread Niklas Söderlund
-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Acked-by: Rob Herring <r...@kernel.org> Acked-by: Sakari Ailus <sakari.ai...@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> --- * Changes since v14. - Added compatible string f

[PATCH v15 0/2] rcar-csi2: add Renesas R-Car MIPI CSI-2

2018-05-13 Thread Niklas Söderlund
format error s/YUYV8/UYVY8/ Changes since v1: - Drop dependency on a pad aware s_stream operation. - Use the DT bindings format "renesas,-", thanks Geert for pointing this out. Niklas Söderlund (2): rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation rcar-csi2: add Ren

[PATCH] media: rcar-vin: enable support for r8a77965

2018-05-13 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a77965. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-core.c | 48 + 1 file changed, 48 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-cor

Re: [PATCH 4/5] media: rcar-vin: Do not use crop if not configured

2018-05-11 Thread Niklas Söderlund
Hi again, On 2018-05-11 13:10:37 +0200, Niklas Söderlund wrote: > Hi Jacopo, > > Thanks for your work. > > On 2018-05-11 11:59:40 +0200, Jacopo Mondi wrote: > > The crop_scale routine uses the crop rectangle memebers to configure the > > VIN clipping rectangle. When

Re: [PATCH 4/5] media: rcar-vin: Do not use crop if not configured

2018-05-11 Thread Niklas Söderlund
; default: > rvin_write(vin, vin->crop.top, VNSLPRC_REG); > - rvin_write(vin, vin->crop.top + vin->crop.height - 1, > -VNELPRC_REG); > + rvin_write(vin, height - 1, VNELPRC_REG); > break; > } > > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 2/5] media: rcar-vin: Add digital input subdevice parsing

2018-05-11 Thread Niklas Söderlund
urces are CSI-2 */ > - vin->mbus_cfg.type = V4L2_MBUS_CSI2; > - vin->mbus_cfg.flags = 0; > - > vin->pad.flags = MEDIA_PAD_FL_SINK; > ret = media_entity_pads_init(>vdev.entity, 1, >pad); > if (ret) > diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h > b/drivers/media/platform/rcar-vin/rcar-vin.h > index c2aef78..a63f3c6 100644 > --- a/drivers/media/platform/rcar-vin/rcar-vin.h > +++ b/drivers/media/platform/rcar-vin/rcar-vin.h > @@ -52,6 +52,19 @@ enum rvin_csi_id { > }; > > /** > + * enum rvin_port_id > + * > + * List the available VIN port functions. > + * > + * RVIN_PORT_DIGITAL - Input port for digital video connection > + * RVIN_PORT_CSI2- Input port for CSI-2 video connection > + */ > +enum rvin_port_id { > + RVIN_PORT_DIGITAL, > + RVIN_PORT_CSI2 > +}; This enum is never used in the patch-set is it used later by a different patch-set or a left over from refactoring? > + > +/** > * STOPPED - No operation in progress > * RUNNING - Operation in progress have buffers > * STOPPING - Stopping operation > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 1/5] media: rcar-vin: Add support for R-Car R8A77995 SoC

2018-05-11 Thread Niklas Söderlund
n that capture on R8A77995 is now ready to be used. But for the change itself. Reviewed-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> > --- > drivers/media/platform/rcar-vin/rcar-core.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/drivers

[PATCH v2 1/2] Revert "media: rcar-vin: enable field toggle after a set number of lines for Gen3"

2018-05-11 Thread Niklas Söderlund
. This reverts commit 015060cb7795eac34454696cc9c9f8b76926a401. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-dma.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/rc

[PATCH v2 2/2] rcar-vin: fix crop and compose handling for Gen3

2018-05-11 Thread Niklas Söderlund
: 5e7c623632fcf8f5 ("media: rcar-vin: use different v4l2 operations in media controller mode") Reported-by: Jacopo Mondi <jacopo+rene...@jmondi.org> Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 6 +++

[PATCH v2 0/2] Fix potential buffer overrun root cause

2018-05-11 Thread Niklas Söderlund
ted format resulting in the DMA engine not properly stopping before writing outside the buffer. This series reverts the incorrect fix in 1/2 and applies a correct one in 2/2. I think this should be picked up for v4.18. * Changes since v1 - Add commit message to 1/2. Niklas Söderlund (2): Revert "

[PATCH 2/2] rcar-vin: fix crop and compose handling for Gen3

2018-05-11 Thread Niklas Söderlund
: 5e7c623632fcf8f5 ("media: rcar-vin: use different v4l2 operations in media controller mode") Reported-by: Jacopo Mondi <jacopo+rene...@jmondi.org> Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 6 +++

[PATCH 1/2] Revert "media: rcar-vin: enable field toggle after a set number of lines for Gen3"

2018-05-11 Thread Niklas Söderlund
This reverts commit 015060cb7795eac34454696cc9c9f8b76926a401. --- drivers/media/platform/rcar-vin/rcar-dma.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c index

[PATCH 0/2] rcar-vin: Fix potential buffer overrun root cause

2018-05-11 Thread Niklas Söderlund
requested format resulting in the DMA engine not properly stopping before writing outside the buffer. This series reverts the incorrect fix in 1/2 and applies a correct one in 2/2. I think this should be picked up for v4.18. Niklas Söderlund (2): Revert "media: rcar-vin: enable field tog

[PATCH v2] media: i2c: adv748x: Fix pixel rate values

2018-05-11 Thread Niklas Söderlund
80 MHz. Signed-off-by: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com> [Niklas: Update AFE fixed pixel rate] Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- * Changes since v1 - Update AFE fixed pixel rate. --- drivers/media/i2c/adv748x/a

Re: [PATCH v2 1/4] media: rcar-vin: Parse digital input in mc-path

2018-05-17 Thread Niklas Söderlund
Hi Jacopo, On 2018-05-17 12:13:06 +0200, Jacopo Mondi wrote: > Hi Niklas, >thanks for review. > > On Wed, May 16, 2018 at 10:32:49PM +0200, Niklas Söderlund wrote: > > Hi Jacopo, > > > > Thanks for your work! > > > > First let me apo

Re: [PATCH] v4l: Add support for STD ioctls on subdev nodes

2018-05-17 Thread Niklas Söderlund
Hi Hans, Thanks for your feedback. On 2018-05-17 10:04:35 +0200, Hans Verkuil wrote: > On 17/05/18 04:00, Niklas Söderlund wrote: > > Missing commit log. I checked other commits doing the same thing, they had no commit log and that was enough reason for me to be lazy. Will

[PATCH v2 1/2] v4l2-ioctl: create helper to fill in v4l2_standard for ENUMSTD

2018-05-17 Thread Niklas Söderlund
Prepare for adding a new IOCTL VIDIOC_SUBDEV_ENUMSTD which would enumerate the standards for a subdevice by breaking out the code which could be shared between the video and subdevice versions of this IOCTL. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- d

[PATCH v2 0/2] v4l: Add support for STD ioctls on subdev nodes

2018-05-17 Thread Niklas Söderlund
://git.ragnatech.se/v4l-utils#subdev-std * Changes since v1 - Add VIDIOC_SUBDEV_ENUMSTD. Niklas Söderlund (2): v4l2-ioctl: create helper to fill in v4l2_standard for ENUMSTD v4l: Add support for STD ioctls on subdev nodes .../media/uapi/v4l/vidioc-enumstd.rst | 11 ++-- Documentation

[PATCH v2 2/2] v4l: Add support for STD ioctls on subdev nodes

2018-05-17 Thread Niklas Söderlund
be controlled on the subdev device directly. Add four new ioctls to be able to directly interact with subdevices and control the video standard; VIDIOC_SUBDEV_ENUMSTD, VIDIOC_SUBDEV_G_STD, VIDIOC_SUBDEV_S_STD and VIDIOC_SUBDEV_QUERYSTD. Signed-off-by: Niklas Söderlund <niklas.soderlund+r

[PATCH] rcar-csi2: set default format if a unsupported one is requested

2018-05-16 Thread Niklas Söderlund
Instead of failing the set_fmt() if a unsupported format is requested set a default one and return the changed format to the user. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reported-by: Sakari Ailus <sakari.ai...@iki.fi> --- drivers/media/platform/rcar-v

[PATCH] rcar-vin: sync which hardware buffer to start capture from

2018-05-16 Thread Niklas Söderlund
turing so that the driver always returns buffers in the same order they are queued and prepare for SEQ_TB/BT output. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-dma.c | 16 +++- drivers/media/platform/rcar-vin/rcar-v

[PATCH] dt-bindings: media: rcar_vin: fix style for ports and endpoints

2018-05-16 Thread Niklas Söderlund
The style for referring to ports and endpoint are wrong. Refer to them using lowercase and a unit address, port@x and endpoint@x. Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org> --- .../devicetree/bi

Re: [PATCH v2 1/4] dt-bindings: media: rcar-vin: Describe optional ep properties

2018-05-22 Thread Niklas Söderlund
di.org> > Acked-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> > --- > Documentation/devicetree/bindings/media/rcar_vin.txt | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/media/rcar_vin.

Re: [PATCH v2 2/4] dt-bindings: media: rcar-vin: Document data-active

2018-05-22 Thread Niklas Söderlund
the rest of the rcar_vin.txt file only spaces are used for indentation. > + > - port 1 - sub-nodes describing one or more endpoints connected to >the VIN from local SoC CSI-2 receivers. The endpoint numbers must >use the following schema. > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v2 3/4] media: rcar-vin: Handle CLOCKENB pin polarity

2018-05-22 Thread Niklas Söderlund
eeded here. Would not something like this be much more readable? /* Clock Enable signal polarity select. */ if (vin->parallel->mbus_flags & V4L2_MBUS_DATA_ACTIVE_LOW) dmr2 |= VNDMR2_CES; /* Use HSYNC as clock enable if VIn_CLKENB is not available. */ if (!(vin->parallel->mbus_flags & (V4L2_MBUS_DATA_ACTIVE_LOW | V4L2_MBUS_DATA_ACTIVE_HIGH))) dmr2 |= VNDMR2_CHS; > + } > > /* >* Output format > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v3 1/9] media: rcar-vin: Rename 'digital' to 'parallel'

2018-05-23 Thread Niklas Söderlund
truct v4l2_async_subdev *asd) > +static void rvin_parallel_notify_unbind(struct v4l2_async_notifier *notifier, > + struct v4l2_subdev *subdev, > + struct v4l2_async_subdev *asd) When I run my indentation script this i

Re: [PATCH v3 2/9] media: rcar-vin: Remove two empty lines

2018-05-23 Thread Niklas Söderlund
Hi Jacopo, Thanks for your work. On 2018-05-18 16:40:38 +0200, Jacopo Mondi wrote: > Remove un-necessary empty lines. > > Signed-off-by: Jacopo Mondi <jacopo+rene...@jmondi.org> Acked-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> > --- > drivers/m

Re: [PATCH v3 3/9] media: rcar-vin: Create a group notifier

2018-05-24 Thread Niklas Söderlund
bled VIN instances found in DT > - * @notifier:pointer to the notifier of a VIN which handles > the > - * groups async sub-devices. > + * @notifier:group notifier for CSI-2 async subdevices > * @vin: VIN instances which are part of the group > * @csi: array of pairs of fwnode and subdev pointers > * to all CSI-2 subdevices. > @@ -238,7 +239,7 @@ struct rvin_group { > > struct mutex lock; > unsigned int count; > - struct v4l2_async_notifier *notifier; > + struct v4l2_async_notifier notifier; > struct rvin_dev *vin[RCAR_VIN_NUM]; > > struct { > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v3 4/9] media: rcar-vin: Cache the mbus configuration flags

2018-05-24 Thread Niklas Söderlund
scriptor > * > * @group: Gen3 CSI group > * @id: Gen3 group id for this VIN > @@ -164,7 +171,8 @@ struct rvin_info { > * @sequence:V4L2 buffers sequence number > * @state: keeps track of operation state > * > - * @mbus_cfg:media bus configuration from DT > + * @is_csi: flag to mark the VIN as using a CSI-2 subdevice > + * > * @mbus_code: media bus format code > * @format: active V4L2 pixel format > * > @@ -182,7 +190,8 @@ struct rvin_dev { > struct v4l2_device v4l2_dev; > struct v4l2_ctrl_handler ctrl_handler; > struct v4l2_async_notifier notifier; > - struct rvin_graph_entity *parallel; > + > + struct rvin_parallel_entity *parallel; > > struct rvin_group *group; > unsigned int id; > @@ -199,7 +208,8 @@ struct rvin_dev { > unsigned int sequence; > enum rvin_dma_state state; > > - struct v4l2_mbus_config mbus_cfg; > + bool is_csi; > + > u32 mbus_code; > struct v4l2_pix_format format; > > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v3 5/9] media: rcar-vin: Parse parallel input on Gen3

2018-05-24 Thread Niklas Söderlund
_init(vin); > - else > - ret = rvin_parallel_graph_init(vin); > - if (ret < 0) > + > + if (vin->info->use_mc) { > + vin->pad.flags = MEDIA_PAD_FL_SINK; > + ret = media_entity_pads_init(>vdev.entity, 1, >pad); > + if (ret) > + return ret; > + > + ret = rvin_group_get(vin); > + if (ret) > + return ret; > + } > + > + ret = rvin_parallel_init(vin); > + if (ret < 0 && ret != -ENOTCONN) > goto error; > > + ret = rvin_mc_init(vin); > + if (ret) > + return ret; > + I think that if you first call rvin_mc_init() and then rvin_parallel_init() you can remove the delay of registering the VIN local notifier as the media device will have then been created and there is no reason to delay the notifier registration. And in the process this patch becomes much simpler (I think). > pm_suspend_ignore_children(>dev, true); > pm_runtime_enable(>dev); > > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v3 6/9] media: rcar-vin: Link parallel input media entities

2018-05-24 Thread Niklas Söderlund
rst. > Check if the device is already registered, to avoid double registrations. > > Signed-off-by: Jacopo Mondi <jacopo+rene...@jmondi.org> Acked-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> > --- > drivers/media/platform/rcar-vin/rcar-core.c | 26 +

Re: [PATCH v3 7/9] media: rcar-vin: Handle parallel subdev in link_notify

2018-05-24 Thread Niklas Söderlund
oup_csi_pad_to_channel(link->source->index); I think you should move the channel = ...; bellow the new if statement the same way you do with mask_new. > - mask_new = mask & rvin_group_get_mask(vin, csi_id, channel); > + csi_id = rvin_group_entity_to_csi_id(group,

Re: [PATCH v3 8/9] media: rcar-vin: Rename _rcar_info to rcar_info

2018-05-24 Thread Niklas Söderlund
Hi Jacopo, Thanks for your work. On 2018-05-18 16:40:44 +0200, Jacopo Mondi wrote: > Remove trailing underscore to align all rcar_group_route structure > declarations. > > Signed-off-by: Jacopo Mondi <jacopo+rene...@jmondi.org> With Sergei's comment addressed: Acked-by

Re: [PATCH v4 5/9] media: rcar-vin: Parse parallel input on Gen3

2018-05-24 Thread Niklas Söderlund
et) > + return ret; > + > + ret = rvin_group_get(vin); > + if (ret) > + return ret; > + } I don't see why you need to move the media pad creation out of rvin_mc_init(). With the reorder of the rvin_mc_init() rvin_parallel_init() I would keep this in rvin_mc_init(). > + > + ret = rvin_mc_init(vin); > + if (ret) > + return ret; > + > + ret = rvin_parallel_init(vin); > + if (ret < 0 && ret != -ENOTCONN) > goto error; > > pm_suspend_ignore_children(>dev, true); > -- > 2.7.4 > -- Regards, Niklas Söderlund

[PATCH] v4l: Add support for STD ioctls on subdev nodes

2018-05-16 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> --- Documentation/media/uapi/v4l/vidioc-g-std.rst| 14 ++ Documentation/media/uapi/v4l/vidioc-querystd.rst | 11 +++ drivers/media/v4l2-core/v4l2-subdev.c| 12 includ

Re: [PATCH 0/6] media: rcar-vin: Brush endpoint properties

2018-05-16 Thread Niklas Söderlund
/arm/boot/dts/r8a7794-alt.dts| 2 +- > arch/arm/boot/dts/r8a7794-silk.dts | 2 +- > drivers/media/platform/rcar-vin/rcar-core.c | 10 -- > drivers/media/platform/rcar-vin/rcar-dma.c | 11 +++ > 9 files changed, 42 insertions(+), 15 deletions(-) > > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 4/6] media: rcar-vin: Handle CLOCKENB pin polarity

2018-05-16 Thread Niklas Söderlund
t */ if (!(vin->mbus_cfg.flags & V4L2_MBUS_DATA_ACTIVE_LOW)) dmr2 |= VNDMR2_CES; /* Use HSYNC as clock enable if VIn_CLKENB is not available. */ if (!(vin->mbus_cfg.flags & (V4L2_MBUS_DATA_ACTIVE_LOW | V4L2_MBUS_DATA_ACTIVE_HIGH))) dmr2 |= VNDMR2_CHS; Or am I misunderstanding something? > + > + /* >* Output format >*/ > switch (vin->format.pixelformat) { > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 2/6] dt-bindings: media: rcar-vin: Document data-active

2018-05-16 Thread Niklas Söderlund
ne or more endpoints connected to >the VIN from local SoC CSI-2 receivers. The endpoint numbers must >use the following schema. > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 3/6] media: rcar-vin: Handle data-active property

2018-05-16 Thread Niklas Söderlund
TIVE_LOW)) { > + vin_err(vin, > + "Missing data enable signal polarity > property\n"); I fear this can't be an error as that would break backward comp ability with existing dtb's. > + return -EINVAL; > + } > break; > default: > vin_err(vin, "Unknown media bus type\n"); > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 5/6] ARM: dts: rcar-gen2: Remove unused VIN properties

2018-05-16 Thread Niklas Söderlund
44 > --- a/arch/arm/boot/dts/r8a7794-alt.dts > +++ b/arch/arm/boot/dts/r8a7794-alt.dts > @@ -380,7 +380,6 @@ > > vin0ep: endpoint { > remote-endpoint = <>; > - bus-width = <8>; > }; > }; > }; > diff --git a/arch/arm/boot/dts/r8a7794-silk.dts > b/arch/arm/boot/dts/r8a7794-silk.dts > index 351cb3b..c0c5d31 100644 > --- a/arch/arm/boot/dts/r8a7794-silk.dts > +++ b/arch/arm/boot/dts/r8a7794-silk.dts > @@ -480,7 +480,6 @@ > > vin0ep: endpoint { > remote-endpoint = <>; > - bus-width = <8>; > }; > }; > }; > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 6/6] ARM: dts: rcar-gen2: Add 'data-active' property

2018-05-16 Thread Niklas Söderlund
> b/arch/arm/boot/dts/r8a7794-silk.dts > index c0c5d31..ed17376 100644 > --- a/arch/arm/boot/dts/r8a7794-silk.dts > +++ b/arch/arm/boot/dts/r8a7794-silk.dts > @@ -480,6 +480,7 @@ > > vin0ep: endpoint { > remote-endpoint = <>; > + data-active = <1>; > }; > }; > }; > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v2 4/4] media: rcar-vin: Add support for R-Car R8A77995 SoC

2018-05-16 Thread Niklas Söderlund
Hi Jacopo, On 2018-05-16 14:16:56 +0200, Jacopo Mondi wrote: > Add R-Car R8A77995 SoC to the rcar-vin supported ones. > > Signed-off-by: Jacopo Mondi <jacopo+rene...@jmondi.org> > Reviewed-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> > Reviewed-by: Laur

Re: [PATCH v2 1/4] media: rcar-vin: Parse digital input in mc-path

2018-05-16 Thread Niklas Söderlund
> > /** > + * enum rvin_port_id > + * > + * List the available VIN port functions. > + * > + * RVIN_PORT_DIGITAL - Input port for digital video connection > + * RVIN_PORT_CSI2- Input port for CSI-2 video connection > + */ > +enum rvin_port_id { > + RVIN_PORT_DIGITAL, > + RVIN_PORT_CSI2 > +}; > + > +/** > * STOPPED - No operation in progress > * RUNNING - Operation in progress have buffers > * STOPPING - Stopping operation > @@ -225,6 +238,7 @@ struct rvin_dev { > * > * @lock:protects the count, notifier, vin and csi members > * @count: number of enabled VIN instances found in DT > + * @v4l2_dev:pointer to the group v4l2 device I pray there is a away to avoid adding this here, it feels awkward :-( > * @notifier:pointer to the notifier of a VIN which handles > the > * groups async sub-devices. > * @vin: VIN instances which are part of the group > @@ -238,6 +252,7 @@ struct rvin_group { > > struct mutex lock; > unsigned int count; > + struct v4l2_device *v4l2_dev; > struct v4l2_async_notifier *notifier; > struct rvin_dev *vin[RCAR_VIN_NUM]; > > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v2 2/4] media: rcar-vin: Handle mc in digital notifier ops

2018-05-16 Thread Niklas Söderlund
e probed. > + */ > + if (vin->info->use_mc) > + return 0; > + > vin->notifier.ops = _digital_notify_ops; > ret = v4l2_async_notifier_register(>v4l2_dev, >notifier); > if (ret < 0) { > @@ -596,7 +631,8 @@ static int rvin_group_notify_complete(struct > v4l2_async_notifier *notifier) > > /* Register all video nodes for the group. */ > for (i = 0; i < RCAR_VIN_NUM; i++) { > - if (vin->group->vin[i]) { > + if (vin->group->vin[i] && > + !video_is_registered(>group->vin[i]->vdev)) { > ret = rvin_v4l2_register(vin->group->vin[i]); > if (ret) > return ret; > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH v2 3/4] media: rcar-vin: Handle digital subdev in link_notify

2018-05-16 Thread Niklas Söderlund
ame); > + ret = -ENODEV; > + goto out; > + } I like this patch, you made it so simple. I feared this would be the ugly part when adding parallel support to Gen3. All that is missing is handling of vin->mbus_cfg or how you think we best handle that for the

Re: [PATCH 1/6] dt-bindings: media: rcar-vin: Describe optional ep properties

2018-05-16 Thread Niklas Söderlund
e...@jmondi.org> Acked-by: Niklas Söderlund <niklas.soderlund+rene...@ragnatech.se> > --- > Documentation/devicetree/bindings/media/rcar_vin.txt | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/media/rca

[PATCH v2] dt-bindings: media: rcar_vin: fix style for ports and endpoints

2018-05-28 Thread Niklas Söderlund
The style for referring to ports and endpoint are wrong. Refer to them using lowercase and a unit address, port@x and endpoint@x. Signed-off-by: Niklas Söderlund Reported-by: Geert Uytterhoeven Reviewed-by: Rob Herring --- * Changes since v1. - Fixed spelling reported by Sergei, s/then/than

[PATCH v2] rcar-vin: sync which hardware buffer to start capture from

2018-05-28 Thread Niklas Söderlund
turing so that the driver always returns buffers in the same order they are queued and prepare for SEQ_TB/BT output. Signed-off-by: Niklas Söderlund --- * Changes since v1 - Fix spelling in commit message pointed out by Sergei. s/writing/written/ and s/outputing/outputting/. --- drivers/media

[PATCH v2] media: rcar-vin: enable support for r8a77965

2018-05-28 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a77965. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- * Changes since v1 - Fixed typo in variable name, s/_rcar_info_r8a77965_routes/rcar_info_r8a77965_routes/. - Collected Laurents tag. --- drivers/media/platform/rcar-vin

<    2   3   4   5   6   7   8   9   10   >