Re: [PATCH v2] arm64: dts: renesas: r8a7795: Move nodes which have no reg property out of bus

2017-11-29 Thread Simon Horman
On Tue, Nov 28, 2017 at 10:04:00AM +0100, Geert Uytterhoeven wrote: > Hi Simon, > > On Tue, Nov 28, 2017 at 9:56 AM, Simon Horman wrote: > > On Mon, Nov 27, 2017 at 12:15:39PM +0100, Geert Uytterhoeven wrote: > >> On Mon, Nov 27, 2017 at 12:04 PM, Simon Horman wrote: > >> > I just noticed that w

RE: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-11-29 Thread Yoshihiro Shimoda
Hi, > From: Alan Stern, Sent: Wednesday, November 29, 2017 12:07 AM > > On Tue, 28 Nov 2017, Yoshihiro Shimoda wrote: > > > Hi Geert-san, > > > > > From: Geert Uytterhoeven, Sent: Tuesday, November 28, 2017 7:58 PM > > > > > > Hi Rafael, Shimoda-san, > > > > > > On Sun, Nov 12, 2017 at 1:27 AM,

RE: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-11-29 Thread Yoshihiro Shimoda
Hi, > From: Ulf Hansson, Sent: Wednesday, November 29, 2017 2:23 AM > > On 28 November 2017 at 13:48, Yoshihiro Shimoda > wrote: > > Hi Geert-san, > > > >> From: Geert Uytterhoeven, Sent: Tuesday, November 28, 2017 7:58 PM > >> > >> Hi Rafael, Shimoda-san, > >> > >> On Sun, Nov 12, 2017 at 1:27

Re: [PATCH/LOCAL] arm64: defconfig: Refresh renesas_defconfig

2017-11-29 Thread Simon Horman
On Tue, Nov 28, 2017 at 02:35:45PM +0100, Geert Uytterhoeven wrote: > RC_CORE defaults to n again since commit 5573d124292a01af ("[media] > media: default for RC_CORE should be n"). > > Signed-off-by: Geert Uytterhoeven > --- > arch/arm64/configs/renesas_defconfig | 1 - > 1 file changed, 1 dele

Re: [PATCH v4] ARM: dts: r8a7794: Add SMP support

2017-11-29 Thread Simon Horman
On Tue, Nov 28, 2017 at 02:39:01PM +0100, Geert Uytterhoeven wrote: > From: Sergei Shtylyov > > Add the device tree node for the Advanced Power Management Unit (APMU). > Use the "enable-method" prop to point out that the APMU should be used > for the SMP support. > > Signed-off-by: Sergei Shtyl

Re: [PATCH v4] ARM: dts: r8a7794: Add SMP support

2017-11-29 Thread Geert Uytterhoeven
Hi Simon, On Wed, Nov 29, 2017 at 9:26 AM, Simon Horman wrote: > On Tue, Nov 28, 2017 at 02:39:01PM +0100, Geert Uytterhoeven wrote: >> From: Sergei Shtylyov >> >> Add the device tree node for the Advanced Power Management Unit (APMU). >> Use the "enable-method" prop to point out that the APMU

Re: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-11-29 Thread Ulf Hansson
On 29 November 2017 at 09:21, Yoshihiro Shimoda wrote: > Hi, > >> From: Ulf Hansson, Sent: Wednesday, November 29, 2017 2:23 AM >> >> On 28 November 2017 at 13:48, Yoshihiro Shimoda >> wrote: >> > Hi Geert-san, >> > >> >> From: Geert Uytterhoeven, Sent: Tuesday, November 28, 2017 7:58 PM >> >> >>

Re: [PATCH 1/2] arm64: dts: renesas: r8a77970: add I2C support

2017-11-29 Thread Simon Horman
On Wed, Nov 22, 2017 at 02:06:59PM +0100, Geert Uytterhoeven wrote: > Hi Sergei, > > On Thu, Nov 16, 2017 at 10:06 PM, Sergei Shtylyov > wrote: > > Define the generic R8A77970 parts of the I2C[0-4] device node. > > > > Based on the original (and large) patch by Daisuke Matsushita > > . > > > > Si

Re: [PATCH 2/3] arm64: dts: r8a7795: add DMA for SCIF2

2017-11-29 Thread Simon Horman
On Thu, Nov 16, 2017 at 09:07:26AM +, Chris Paterson wrote: > Hello Ulrich, > > > From: linux-renesas-soc-ow...@vger.kernel.org [mailto:linux-renesas-soc- > > ow...@vger.kernel.org] On Behalf Of Ulrich Hecht > > Sent: 15 November 2017 15:25 > > > > Tested on Draak. > > I guess you meant for

Re: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-11-29 Thread Geert Uytterhoeven
Hi Ulf, On Wed, Nov 29, 2017 at 10:24 AM, Ulf Hansson wrote: > On 29 November 2017 at 09:21, Yoshihiro Shimoda > wrote: >>> From: Ulf Hansson, Sent: Wednesday, November 29, 2017 2:23 AM >>> On 28 November 2017 at 13:48, Yoshihiro Shimoda >>> wrote: >>> >> From: Geert Uytterhoeven, Sent: Tuesday

Re: [PATCH 2/2] arm64: dts: renesas: v3msk: add EtherAVB support

2017-11-29 Thread Simon Horman
On Fri, Nov 24, 2017 at 11:59:45PM +0300, Sergei Shtylyov wrote: > Define the V3M Starter Kit board dependent part of the EtherAVB > device node. > > Based on the original (and large) patch by Vladimir Barinov. > > Signed-off-by: Vladimir Barinov > Signed-off-by: Sergei Shtylyov > > --- > arc

Re: [PATCH 1/2] arm64: dts: renesas: initial V3MSK board device tree

2017-11-29 Thread Simon Horman
On Fri, Nov 24, 2017 at 11:59:44PM +0300, Sergei Shtylyov wrote: > Add the initial device tree for the V3M Starter Kit board. > The board has 1 debug serial port (SCIF0); include support for it, > so that the serial console can work. > > Based on the original (and large) patch by Vladimir Barinov

Re: [PATCH] rcar-vin: enable support for r8a77970

2017-11-29 Thread Simon Horman
On Sun, Nov 26, 2017 at 01:23:48AM +0100, Niklas Söderlund wrote: > Add the SoC specific information for Renesas r8a77970. > > Signed-off-by: Niklas Söderlund > --- > .../devicetree/bindings/media/rcar_vin.txt | 1 + > drivers/media/platform/rcar-vin/rcar-core.c| 40 > +

Re: [PATCH 0/3] arm64: dts: renesas: r8a77970: connect VIN to CSI40

2017-11-29 Thread Simon Horman
On Sun, Nov 26, 2017 at 01:50:09AM +0100, Niklas Söderlund wrote: > Hi, > > This series describes how to connect VIN0-3 to CSI40 and the HDMI input > of the adv7482 on the expansion board. It is tested on V3M together with > V3M enablement for VIN and CSI-2 drivers on-top of Kieran's > renesas-

Re: [PATCH 1/2] arm64: dts: renesas: r8a77970: use CPG core clock macros

2017-11-29 Thread Simon Horman
On Tue, Nov 28, 2017 at 11:15:44PM +0300, Sergei Shtylyov wrote: > Now that the commit ecadea00f588 ("dt-bindings: clock: Add R8A77970 CPG > core clock definitions") has hit Linus' tree, we can replace the bare > numbers (we had to use to avoid a cross tree dependency) with these macro > definitio

Re: [PATCH 2/2] arm64: dts: renesas: r8a77970: use SYSC power domain macros

2017-11-29 Thread Simon Horman
On Tue, Nov 28, 2017 at 11:15:45PM +0300, Sergei Shtylyov wrote: > Now that the commit 833bdb47c826 ("dt-bindings: power: add R8A77970 SYSC > power domain definitions") has hit Linus' tree, we can replace the bare > numbers (we had to use to avoid a cross tree dependency) with these macro > defin

Re: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-11-29 Thread Ulf Hansson
On 29 November 2017 at 10:43, Geert Uytterhoeven wrote: > Hi Ulf, > > On Wed, Nov 29, 2017 at 10:24 AM, Ulf Hansson wrote: >> On 29 November 2017 at 09:21, Yoshihiro Shimoda >> wrote: From: Ulf Hansson, Sent: Wednesday, November 29, 2017 2:23 AM On 28 November 2017 at 13:48, Yoshihiro

Re: [PATCH 1/2] arm64: dts: renesas: initial V3MSK board device tree

2017-11-29 Thread Sergei Shtylyov
Hello! On 11/29/2017 12:51 PM, Simon Horman wrote: Add the initial device tree for the V3M Starter Kit board. The board has 1 debug serial port (SCIF0); include support for it, so that the serial console can work. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vl

Re: [PATCH v4] ARM: dts: r8a7794: Add SMP support

2017-11-29 Thread Simon Horman
On Wed, Nov 29, 2017 at 09:30:03AM +0100, Geert Uytterhoeven wrote: > Hi Simon, > > On Wed, Nov 29, 2017 at 9:26 AM, Simon Horman wrote: > > On Tue, Nov 28, 2017 at 02:39:01PM +0100, Geert Uytterhoeven wrote: > >> From: Sergei Shtylyov > >> > >> Add the device tree node for the Advanced Power Ma

Re: [PATCH v4 00/12] ARM: dts: renesas: Update DTS for CMT DT binding rework

2017-11-29 Thread Simon Horman
On Tue, Nov 28, 2017 at 02:47:24PM +0100, Geert Uytterhoeven wrote: > Hi Simon, Magnus, > > This patch series updates the CMT device nodes in the various Renesas DTS > files sh_cmt clocksource driver for the recent DT binding rework that was > merged in v4.14-rc1 and v4.15-rc1. > > This ser

Re: [PATCH] arm64: renesas: document V3MSK board bindings

2017-11-29 Thread Simon Horman
On Sun, Nov 26, 2017 at 04:29:05PM -0600, Rob Herring wrote: > On Fri, Nov 24, 2017 at 11:47:39PM +0300, Sergei Shtylyov wrote: > > Document the V3M Starter Kit device tree bindings, listing it as > > a supported board. > > > > This allows to use checkpatch.pl to validate .dts files referring to >

Re: [RFC] v4l: i2c: ov7670: Implement mbus configuration

2017-11-29 Thread Sakari Ailus
Hi Jacopo, On Mon, Nov 27, 2017 at 11:26:53AM +0100, Jacopo Mondi wrote: > ov7670 currently supports configuration of a few parameters only through > platform data. Implement media bus configuration by parsing DT properties > at probe() time and opportunely configure REG_COM10 during s_format(). >

Re: [RFC] v4l: i2c: ov7670: Implement mbus configuration

2017-11-29 Thread Sakari Ailus
On Wed, Nov 29, 2017 at 01:04:30PM +0200, Sakari Ailus wrote: > Hi Jacopo, > > On Mon, Nov 27, 2017 at 11:26:53AM +0100, Jacopo Mondi wrote: > > ov7670 currently supports configuration of a few parameters only through > > platform data. Implement media bus configuration by parsing DT properties >

Re: [PATCH 1/2] arm64: dts: renesas: initial V3MSK board device tree

2017-11-29 Thread Simon Horman
On Wed, Nov 29, 2017 at 01:14:21PM +0300, Sergei Shtylyov wrote: > Hello! > > On 11/29/2017 12:51 PM, Simon Horman wrote: > > > > Add the initial device tree for the V3M Starter Kit board. > > > The board has 1 debug serial port (SCIF0); include support for it, > > > so that the serial console c

Re: [RFC] v4l: i2c: ov7670: Implement mbus configuration

2017-11-29 Thread jacopo mondi
Hi Sakari, thanks for the reply On Wed, Nov 29, 2017 at 01:06:49PM +0200, Sakari Ailus wrote: > On Wed, Nov 29, 2017 at 01:04:30PM +0200, Sakari Ailus wrote: > > Hi Jacopo, > > > > On Mon, Nov 27, 2017 at 11:26:53AM +0100, Jacopo Mondi wrote: > > > ov7670 currently supports configuration of a f

Re: [PATCH 0/3] arm64: dts: renesas: r8a77970: connect VIN to CSI40

2017-11-29 Thread Niklas Söderlund
Hi Simon, On 2017-11-29 10:53:17 +0100, Simon Horman wrote: > On Sun, Nov 26, 2017 at 01:50:09AM +0100, Niklas Söderlund wrote: > > Hi, > > > > This series describes how to connect VIN0-3 to CSI40 and the HDMI input > > of the adv7482 on the expansion board. It is tested on V3M together with >

Re: [PATCH v2] arm64: dts: renesas: r8a7795: Move nodes which have no reg property out of bus

2017-11-29 Thread Rob Herring
On Tue, Nov 28, 2017 at 3:04 AM, Geert Uytterhoeven wrote: > Hi Simon, > > On Tue, Nov 28, 2017 at 9:56 AM, Simon Horman wrote: >> On Mon, Nov 27, 2017 at 12:15:39PM +0100, Geert Uytterhoeven wrote: >>> On Mon, Nov 27, 2017 at 12:04 PM, Simon Horman wrote: >>> > I just noticed that with this pat

Re: [PATCH v2] arm64: dts: renesas: r8a7795: Move nodes which have no reg property out of bus

2017-11-29 Thread Geert Uytterhoeven
Hi Rob, On Wed, Nov 29, 2017 at 2:35 PM, Rob Herring wrote: > On Tue, Nov 28, 2017 at 3:04 AM, Geert Uytterhoeven > wrote: >> On Tue, Nov 28, 2017 at 9:56 AM, Simon Horman wrote: >>> On Mon, Nov 27, 2017 at 12:15:39PM +0100, Geert Uytterhoeven wrote: On Mon, Nov 27, 2017 at 12:04 PM, Simon

Re: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-11-29 Thread Geert Uytterhoeven
Hi Ulf, On Wed, Nov 29, 2017 at 10:59 AM, Ulf Hansson wrote: > On 29 November 2017 at 10:43, Geert Uytterhoeven wrote: >> On Wed, Nov 29, 2017 at 10:24 AM, Ulf Hansson wrote: >>> On 29 November 2017 at 09:21, Yoshihiro Shimoda >>> wrote: > From: Ulf Hansson, Sent: Wednesday, November 29, 2

Re: [PATCH v2] arm64: dts: renesas: r8a7795: Move nodes which have no reg property out of bus

2017-11-29 Thread Rob Herring
On Wed, Nov 29, 2017 at 7:58 AM, Geert Uytterhoeven wrote: > Hi Rob, > > On Wed, Nov 29, 2017 at 2:35 PM, Rob Herring wrote: >> On Tue, Nov 28, 2017 at 3:04 AM, Geert Uytterhoeven >> wrote: >>> On Tue, Nov 28, 2017 at 9:56 AM, Simon Horman wrote: On Mon, Nov 27, 2017 at 12:15:39PM +0100, G

[PATCH v2 2/2] arm64: dts: r8a77995: draak: enable SDHI2

2017-11-29 Thread Ulrich Hecht
The single SDHI controller is connected to eMMC. Signed-off-by: Ulrich Hecht --- arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 44 ++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts b/arch/arm64/boot/dts/renesas/r8a77995-d

[PATCH v2 1/2] mmc: renesas_sdhi: enable R-Car D3 (r8a77995) support

2017-11-29 Thread Ulrich Hecht
Whitelists for internal DMAC implementation. Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven --- drivers/mmc/host/renesas_sdhi_internal_dmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_

[PATCH v2 0/2] R-Car D3 (r8a77995) SDHI (eMMC) integration

2017-11-29 Thread Ulrich Hecht
Hi! This integrates the SDHI hardware on R-Car D3 and enables the Draak board's eMMC drive. This revision dumps the two patches that have been applied already, fixes the sdhi2_pins voltage, removes the redundant SDHI compatible string and makes the internal DMAC whitelisting pattern more conserva

Re: [PATCH 1/2] arm64: dts: renesas: r8a77970: use CPG core clock macros

2017-11-29 Thread Sergei Shtylyov
On 11/29/2017 12:55 PM, Simon Horman wrote: Now that the commit ecadea00f588 ("dt-bindings: clock: Add R8A77970 CPG core clock definitions") has hit Linus' tree, we can replace the bare numbers (we had to use to avoid a cross tree dependency) with these macro definitions... Signed-off-by: Serg

[PATCH 16/22] media: vsp1: add a missing kernel-doc parameter

2017-11-29 Thread Mauro Carvalho Chehab
Fix this warning: drivers/media/platform/vsp1/vsp1_dl.c:87: warning: No description found for parameter 'has_chain' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/vsp1/vsp1_dl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/vsp1/vsp1_dl.c b

[PATCH 19/22] media: drivers: remove "/**" from non-kernel-doc comments

2017-11-29 Thread Mauro Carvalho Chehab
Several comments are wrongly tagged as kernel-doc, causing those warnings: drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'irq' drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'data' drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: N

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

2017-11-29 Thread Niklas Söderlund
Hi, This is the latest incarnation of R-Car MIPI CSI-2 receiver driver. It's based on top of the media-tree and are tested on Renesas Salvator-X together with the out-of-tree patches for rcar-vin to add support for Gen3 VIN. I hope this is the last incarnation of this patch-set, I do think it is

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

2017-11-29 Thread Niklas Söderlund
A V4L2 driver for Renesas R-Car MIPI CSI-2 receiver. The driver supports the rcar-vin driver on R-Car Gen3 SoCs where separate CSI-2 hardware blocks are connected between the video sources and the video grabbers (VIN). Driver is based on a prototype by Koji Matsuoka in the Renesas BSP. Signed-off

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

2017-11-29 Thread Niklas Söderlund
Documentation for Renesas R-Car MIPI CSI-2 receiver. The CSI-2 receivers are located between the video sources (CSI-2 transmitters) and the video grabbers (VIN) on Gen3 of Renesas R-Car SoC. Each CSI-2 device is connected to more then one VIN device which simultaneously can receive video from the

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

2017-11-29 Thread Niklas Söderlund
Document the devicetree bindings for the CSI-2 inputs available on Gen3. There is a need to add a custom property 'renesas,id' and to define which CSI-2 input is described in which endpoint under the port@1 node. This information is needed since there are a set of predefined routes between each VI

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

2017-11-29 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a77970. Signed-off-by: Niklas Söderlund --- .../devicetree/bindings/media/rcar_vin.txt | 1 + drivers/media/platform/rcar-vin/rcar-core.c| 40 ++ 2 files changed, 41 insertions(+) diff --git a/Documentation/devi

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

2017-11-29 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 Reviewed-by: Kieran Bingham Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-core.c | 6 ++ drivers

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

2017-11-29 Thread Niklas Söderlund
Add the ability to process media device link change request. Link enabling is a bit complicated on Gen3, whether or not it's possible to enable a link depends on what other links already are enabled. On Gen3 the 8 VINs are split into two subgroup's (VIN0-3 and VIN4-7) and from a routing perspective

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

2017-11-29 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 Sö

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

2017-11-29 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 Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-core.c | 24 ++-- drivers/media/platform/rcar-vin/rcar-vin.h

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

2017-11-29 Thread Niklas Söderlund
When the driver runs in media controller mode it should not directly control the subdevice instead userspace will be responsible for configuring the pipeline. To be able to run in this mode a different set of v4l2 operations needs to be used. Add a new set of v4l2 operations to support the running

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

2017-11-29 Thread Niklas Söderlund
Parse the VIN Gen3 OF graph and register all CSI-2 devices in the VIN group common media device. Once all CSI-2 subdevices are added to the common media device create links between them. The parsing and registering CSI-2 subdevices with the v4l2 async framework is a collaborative effort shared bet

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

2017-11-29 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 Reviewed-by: Hans Verkuil ---

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

2017-11-29 Thread Niklas Söderlund
In media controller mode all VIN instances needs to be part of the same media graph. There is also a need to each VIN instance to know and in some cases be able to communicate with other VIN instances. Add an allocator framework where the first VIN instance to be probed creates a shared data struc

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

2017-11-29 Thread Niklas Söderlund
On Gen3 a media controller API needs to be used to allow userspace to configure the subdevices in the pipeline instead of directly controlling a single source subdevice, which is and will continue to be the mode of operation on Gen2. Prepare for these two modes of operation by adding a flag to str

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

2017-11-29 Thread Niklas Söderlund
The logic to preserve the requested format width and height are too complex and come from a premature optimization for Gen3. All Gen2 SoC can scale and the Gen3 implementation will not use these functions at all so simply preserve the width and height when interacting with the subdevice much like t

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

2017-11-29 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7796. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- .../devicetree/bindings/media/rcar_vin.txt | 1 + drivers/media/platform/rcar-vin/rcar-core.c| 64 ++ 2 files changed, 65 insertions(+) diff

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

2017-11-29 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 Reviewed-by: Hans Verkuil --- drivers/media/platform/rca

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

2017-11-29 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 Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-v4l2.c |

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

2017-11-29 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7795 ES1.x and ES2.0. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/Kconfig | 2 +- drivers/media/platform/rcar-vin/rcar-core.c | 150 2 files changed, 151 insertio

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

2017-11-29 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 Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-

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

2017-11-29 Thread Niklas Söderlund
When Gen3 support is added to the driver more than chip ID will be different for the different SoCs. To avoid a lot of if statements in the code create a struct chip_info to store this information. And while we are at it sort the compatible string entries and make use of of_device_get_match_data()

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

2017-11-29 Thread Niklas Söderlund
On Gen3 the CSI-2 routing is controlled by the VnCSI_IFMD register. One feature of this register is that it's only present in the VIN0 and VIN4 instances. The register in VIN0 controls the routing for VIN0-3 and the register in VIN4 controls routing for VIN4-7. To be able to control routing from a

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

2017-11-29 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 Reviewed-by: Kieran Bingham Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 ++-

[PATCH v8 10/28] rcar-vin: do not reset crop and compose when setting format

2017-11-29 Thread Niklas Söderlund
It was a bad idea to reset the crop and compose settings when a new format is set. This would overwrite any crop/compose set by s_select and cause unexpected behaviors, remove it. Also fold the reset helper in to the only remaining caller. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil

[PATCH v8 12/28] rcar-vin: read subdevice format for crop only when needed

2017-11-29 Thread Niklas Söderlund
Instead of caching the subdevice format each time the video device format is set read it directly when it's needed. As it turns out the format is only needed when figuring out the max rectangle for cropping. This simplifies the code and makes it clearer what the source format is used for. Signed-

[PATCH v8 04/28] rcar-vin: move subdevice handling to async callbacks

2017-11-29 Thread Niklas Söderlund
In preparation for Gen3 support move the subdevice initialization and clean up from rvin_v4l2_{register,unregister}() directly to the async callbacks. This simplifies the addition of Gen3 support as the rvin_v4l2_register() can be shared for both Gen2 and Gen3 while direct subdevice control are onl

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

2017-11-29 Thread Niklas Söderlund
If the video device was registered by the complete() callback it should be unregistered when the driver is removed. Protect from printing a uninitialized video device node name by adding a checking in rvin_v4l2_unregister() by checking that the video device is registered. Signed-off-by: Niklas Söd

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

2017-11-29 Thread Niklas Söderlund
It is possible on Gen2 to change the registers controlling composing and scaling while the stream is running. It is however not a good idea to do so and could result in trouble. There are also no good reasons to allow this, remove immediate reflection in hardware registers from vidioc_s_selection a

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

2017-11-29 Thread Niklas Söderlund
Hi, This series adds Gen3 VIN support to rcar-vin driver for Renesas r8a7795, r8a7796 and r8a77970. It is based on the media-tree and depends on some of Fabrizio Castro patches as they touches the order of the compatible strings in the documentation to reduce merge conflicts. The dependencies a

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

2017-11-29 Thread Niklas Söderlund
There was never proper support in the VIN driver to deliver ALTERNATING field format to user-space, remove this field option. For sources using this field format instead use the VIN hardware feature of combining the fields to an interlaced format. This mode of operation was previously the default b

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

2017-11-29 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 there intended function. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 10 +- drivers/media/platform/rcar-vin/rcar-d

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

2017-11-29 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 Reviewed-by: Hans Verkuil