[PATCH 2/3] arm64: dts: renesas: eagle: expansion: enable and connect CSI40

2017-11-25 Thread Niklas Söderlund
On the extension board CSI40 is connected to the adv7482. Signed-off-by: Niklas Söderlund --- .../boot/dts/renesas/r8a77970-eagle-expansion.dtsi | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a77970-eagle-expansion.dtsi

[PATCH 3/3] arm64: dts: renesas: eagle: enable VIN

2017-11-25 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts b/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts index 41e3b4521a5aa39e..d3c6bcb82a5176c6

[PATCH 1/3] arm64: dts: renesas: r8a77970: add VIN and CSI-2

2017-11-25 Thread Niklas Söderlund
Define the nodes for CSI40 and VIN0-3. Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/r8a77970.dtsi | 151 ++ 1 file changed, 151 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77970.dtsi b/arch/arm64/boot/dts/renesas/r8a77970.dtsi index

[PATCH 0/2] rcar-csi2: enable support for r8a77970

2017-11-25 Thread Niklas Söderlund
s needed to add CSI-2 support on V3M but it would be great if more pipelines where tested before this series is picked up. Therefor I post it here so other developers working on video capture on V3M can use this for CSI-2 support. Niklas Söderlund (2): rcar-csi2: split Mbps calculation to se

[PATCH 1/2] rcar-csi2: split Mbps calculation to separate function

2017-11-25 Thread Niklas Söderlund
The calculation of the Mbps to configured the link with needs to be split out if other configuration procedures on new SoCs are to be able to reuse the calculation procedure. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-csi2.c | 32 + 1

[PATCH 2/2] rcar-csi2: enable support for r8a77970

2017-11-25 Thread Niklas Söderlund
Enable support for Renesas r8a77970 (V3M) by adding the new SoC specific setup procedure and device tree binding. Signed-off-by: Niklas Söderlund --- .../bindings/media/renesas,rcar-csi2.txt | 1 + drivers/media/platform/rcar-vin/rcar-csi2.c| 100 - 2

[PATCH] rcar-vin: enable support for r8a77970

2017-11-25 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(+) Hi, I plan to include this

Re: [PATCH/RFC 2/2] v4l: rcar-vin: Wait for device access to complete before unplugging

2017-11-16 Thread Niklas Söderlund
op of the R-Car VIN Gen3 enablement series. > > > > > if (!vin->info->use_mc) { > > v4l2_async_notifier_unregister(&vin->notifier); > > -- > > Regards, > > > > Laurent Pinchart > > > > -- > Sakari Ailus > e-mail: sakari.ai...@iki.fi -- Regards, Niklas Söderlund

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

2017-11-15 Thread Niklas Söderlund
ry. > > Fix the problem by implementing a V4L2 release handler for the video > node associated with the VIN instance (called when the last user of the > video node releases it), and freeing memory explicitly from the release > handler. > > Signed-off-by: Laurent Pinchart Acked-by:

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

2017-11-15 Thread Niklas Söderlund
Hi Rob, Thanks for your feedback. On 2017-11-15 13:59:36 -0600, Rob Herring wrote: > On Sat, Nov 11, 2017 at 01:25:25AM +0100, Niklas Söderlund wrote: > > Documentation for Renesas R-Car MIPI CSI-2 receiver. The CSI-2 receivers > > are located between the video sources (CSI-2 tr

Re: [PATCH v7 01/25] rcar-vin: add Gen3 devicetree bindings documentation

2017-11-15 Thread Niklas Söderlund
Hi Rob, Thanks for your feedback, much appreciated! On 2017-11-15 14:02:26 -0600, Rob Herring wrote: > On Sat, Nov 11, 2017 at 01:38:11AM +0100, Niklas Söderlund wrote: > > Document the devicetree bindings for the CSI-2 inputs available on Gen3. > > > > There is a need to

Re: [PATCH 3/3] vin-tests: Refactor mc_get_dev

2017-11-15 Thread Niklas Söderlund
ove to /sys/class/video4linux/*/name to also searches in v4l-subdevX directories to find thatt device. Also the return value changes from 'v4l-subdev42' to /dev/v4l-subdev42' so the set-edid tool needed a small update to handle that :-) I have applied this patch as-is, and then

Re: [PATCH 2/3] tools: 8camera-status: Expand to 9 cameras

2017-11-15 Thread Niklas Söderlund
+ print "| 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | 9 |" > + for (x=1; x <= 9; x++) { > printf "| " cameras[x] " " > if (x == 4) > printf("| ") > } > printf "|\n" > - print "" > + print "===" > } > > function Summarise() { > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 1/3] tools: 8camera-status: Fix write failure mis-allocations

2017-11-15 Thread Niklas Söderlund
camera-status > @@ -21,7 +21,7 @@ BEGIN { > print > } > > -/max9271_write/ { > +/max9271_write.*write failed/ { > max9271_write_fail++ > print > } > -- > 2.7.4 > -- Regards, Niklas Söderlund

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

2017-11-15 Thread Niklas Söderlund
Hi, I just noticed I made a small mistake in this patch, see bellow. I will send out a new version in a few days with this fix included but I don't want to spam the list too much so I give it a few more days if there is any other feedback. On 2017-11-11 01:25:26 +0100, Niklas Söderlund

[PATCH] v4l: async: use the v4l2_dev from the root notifier when matching sub-devices

2017-11-15 Thread Niklas Söderlund
otifiers to sub-devices") Signed-off-by: Niklas Söderlund --- drivers/media/v4l2-core/v4l2-async.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index a7c3464976f24361..e5acfab470a5ee6b 1006

[PATCH v7 05/25] rcar-vin: change name of video device

2017-11-10 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 v7 17/25] rcar-vin: use different v4l2 operations in media controller mode

2017-11-10 Thread Niklas Söderlund
running without directly interacting with the source subdevice. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-dma.c | 3 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 153 +++- drivers/media/platform/rcar-vin/rcar-vin.h

[PATCH v7 01/25] rcar-vin: add Gen3 devicetree bindings documentation

2017-11-10 Thread Niklas Söderlund
tween each 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 --- .../devicetree/bindings/media/rcar_vin.txt | 116 ++--- 1 file changed, 104

[PATCH v7 04/25] rcar-vin: move max width and height information to chip information

2017-11-10 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

[PATCH v7 08/25] rcar-vin: do not reset crop and compose when setting format

2017-11-10 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

[PATCH v7 06/25] rcar-vin: move functions regarding scaling

2017-11-10 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 v7 14/25] rcar-vin: add function to manipulate Gen3 CHSEL value

2017-11-10 Thread Niklas Söderlund
Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-dma.c | 25 + drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-d

[PATCH v7 02/25] rcar-vin: register the video device at probe time

2017-11-10 Thread Niklas Söderlund
initialized object, something is seriously wrong. To prevent this register the video device at probe time and don't allow user-space to open the video device if the subdevice is not bound yet. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c

[PATCH v7 03/25] rcar-vin: move chip information to own struct

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

[PATCH v7 07/25] rcar-vin: all Gen2 boards can scale simplify logic

2017-11-10 Thread Niklas Söderlund
the field is preserved simplifies the logic quite a bit. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-dma.c | 8 drivers/media/platform/rcar-vin/rcar-v4l2.c | 22 ++ drivers/media/platform/rcar-vin/rcar-vin.h

[PATCH v7 09/25] rcar-vin: do not allow changing scaling and composing while streaming

2017-11-10 Thread Niklas Söderlund
and only configure scaling and composing when the stream starts. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 --- drivers/media/platform/rcar-vin/rcar-vin.h | 3 --- 3 files

[PATCH v7 21/25] rcar-vin: parse Gen3 OF and setup media graph

2017-11-10 Thread Niklas Söderlund
: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-core.c | 297 +++- drivers/media/platform/rcar-vin/rcar-vin.h | 7 +- 2 files changed, 302 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers

[PATCH v7 15/25] rcar-vin: add flag to switch to media controller mode

2017-11-10 Thread Niklas Söderlund
struct rvin_info which will control which mode to use. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-core.c | 6 +- drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v7 16/25] rcar-vin: break out format alignment and checking

2017-11-10 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 v7 20/25] rcar-vin: add chsel information to rvin_info

2017-11-10 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 --- drivers/media/platform/rcar-vin/rcar-vin.h | 25

[PATCH v7 10/25] rcar-vin: read subdevice format for crop only when needed

2017-11-10 Thread Niklas Söderlund
igned-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 88 ++--- drivers/media/platform/rcar-vin/rcar-vin.h | 12 2 files changed, 42 insertions(+), 58 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar

[PATCH v7 18/25] rcar-vin: prepare for media controller mode initialization

2017-11-10 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 v7 13/25] rcar-vin: enable Gen3 hardware configuration

2017-11-10 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 v7 00/25] rcar-vin: Add Gen3 with media controller

2017-11-10 Thread Niklas Söderlund
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

[PATCH v7 19/25] rcar-vin: add group allocator functions

2017-11-10 Thread Niklas Söderlund
structure and creates a media device. Signed-off-by: Niklas Söderlund Reviewed-by: Hans Verkuil --- drivers/media/platform/rcar-vin/rcar-core.c | 179 +++- drivers/media/platform/rcar-vin/rcar-vin.h | 38 ++ 2 files changed, 216 insertions(+), 1 deletion(-) diff --git

[PATCH v7 24/25] rcar-vin: enable support for r8a7795

2017-11-10 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

[PATCH v7 11/25] rcar-vin: fix handling of single field frames (top, bottom and alternate fields)

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

[PATCH v7 12/25] rcar-vin: move media bus configuration to struct rvin_info

2017-11-10 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 Ve

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

2017-11-10 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 v7 25/25] rcar-vin: enable support for r8a7796

2017-11-10 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 v7 22/25] rcar-vin: add link notify for Gen3

2017-11-10 Thread Niklas Söderlund
le a new link due to hardware constrains the link_notifier callback will return -EMLINK. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 205 1 file changed, 205 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-cor

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

2017-11-10 Thread Niklas Söderlund
the responsibility of the VIN driver since the register to configure it belongs to the VIN hardware. Signed-off-by: Niklas Söderlund --- .../bindings/media/renesas,rcar-csi2.txt | 104 + MAINTAINERS| 1 + 2 files changed, 105

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

2017-11-10 Thread Niklas Söderlund
-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/Kconfig | 12 + drivers/media/platform/rcar-vin/Makefile| 1 + drivers/media/platform/rcar-vin/rcar-csi2.c | 896 3 files changed, 909 insertions(+) create mode 100644 drivers/media/platform/rcar

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

2017-11-10 Thread Niklas Söderlund
e DT bindings format "renesas,-", thanks Geert for pointing this out. 1. http://elinux.org/R-Car/Tests:rcar-vin Niklas Söderlund (2): media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver .../bindings/medi

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

2017-11-10 Thread Niklas Söderlund
Hej Sakari, On 2017-11-11 00:32:27 +0200, Sakari Ailus wrote: > Hej Niklas, > > Tack för uppdaterade lappar! Jag har några kommentar nedan... det ser bra > ut överallt. Tack för din feedback! > > On Fri, Nov 10, 2017 at 02:31:37PM +0100, Niklas Söderlund wrote: > > A V

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

2017-11-10 Thread Niklas Söderlund
Hej Sakari, Tack för din feedback. On 2017-11-11 00:11:13 +0200, Sakari Ailus wrote: > Hejssan, > > On Fri, Nov 10, 2017 at 02:31:36PM +0100, Niklas Söderlund wrote: > > Documentation for Renesas R-Car MIPI CSI-2 receiver. The CSI-2 receivers > > are located between the

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

2017-11-10 Thread Niklas Söderlund
the responsibility of the VIN driver since the register to configure it belongs to the VIN hardware. Signed-off-by: Niklas Söderlund --- .../devicetree/bindings/media/rcar-csi2.txt| 104 + MAINTAINERS| 1 + 2 files changed, 105

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

2017-11-10 Thread Niklas Söderlund
-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/Kconfig | 12 + drivers/media/platform/rcar-vin/Makefile| 1 + drivers/media/platform/rcar-vin/rcar-csi2.c | 934 3 files changed, 947 insertions(+) create mode 100644 drivers/media/platform/rcar

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

2017-11-10 Thread Niklas Söderlund
s_stream operation. - Use the DT bindings format "renesas,-", thanks Geert for pointing this out. 1. http://elinux.org/R-Car/Tests:rcar-vin Niklas Söderlund (2): media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation media: rcar-csi2: add Renesas R-Car MIPI CSI-2 r

Re: [PATCH] i2c: sh_mobile: send STOP according to datasheet

2017-11-10 Thread Niklas Söderlund
te a lot, so let's do it. I like this change and I checked the flow diagrams in chapter '56.4 Operation' of the Gen2 datasheet rev 2.0 and chapter '58.3 Operation' of the Gen3 datasheet rev 0.80, and it makes sens for both. > > Signed-off-by: Wolfram Sang For Ge

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

2017-11-10 Thread Niklas Söderlund
Hi Geert, On 2017-11-10 10:30:24 +0100, Geert Uytterhoeven wrote: > Hi Niklas, > > On Fri, Nov 10, 2017 at 12:43 AM, Niklas Söderlund > wrote: > > A V4L2 driver for Renesas R-Car MIPI CSI-2 receiver. The driver > > supports the rcar-vin driver on R-Car Gen3 S

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

2017-11-10 Thread Niklas Söderlund
Hi Geert, Thanks for your feedback. On 2017-11-10 09:09:39 +0100, Geert Uytterhoeven wrote: > Hi Niklas, > > On Fri, Nov 10, 2017 at 12:43 AM, Niklas Söderlund > wrote: > > Documentation for Renesas R-Car MIPI CSI-2 receiver. The CSI-2 receivers > > are located between

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

2017-11-09 Thread Niklas Söderlund
the responsibility of the VIN driver since the register to configure it belongs to the VIN hardware. Signed-off-by: Niklas Söderlund --- .../devicetree/bindings/media/rcar-csi2.txt| 103 + MAINTAINERS| 1 + 2 files changed, 104

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

2017-11-09 Thread Niklas Söderlund
Drop dependency on a pad aware s_stream operation. - Use the DT bindings format "renesas,-", thanks Geert for pointing this out. 1. http://elinux.org/R-Car/Tests:rcar-vin Niklas Söderlund (2): media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver documentation media: rcar-csi2: ad

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

2017-11-09 Thread Niklas Söderlund
-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/Kconfig | 12 + drivers/media/platform/rcar-vin/Makefile| 1 + drivers/media/platform/rcar-vin/rcar-csi2.c | 933 3 files changed, 946 insertions(+) create mode 100644 drivers/media/platform/rcar

Re: v4l: async: Match parent devices

2017-11-04 Thread Niklas Söderlund
uxtv.org/sailus/media_tree.git/log/?h=fwnode-const> > > > > The reason is that it depends on the V4L2 fwnode patches as well as the > > fwnode cleanup patches. It may well be possible to get it in earlier > > than the fwnode const patches, but for practical reasons it's in the > > same branch. > > -- Regards, Niklas Söderlund

[PATCH] media: v4l: async: fix unregister for implicitly registered sub-device notifiers

2017-11-03 Thread Niklas Söderlund
convenience function for registering sensors") Signed-off-by: Niklas Söderlund --- drivers/media/v4l2-core/v4l2-async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index 49f7eccc76dbbc3b..8684e00

Re: [PATCH v2 13/26] media: rcar: fix a debug printk

2017-11-02 Thread Niklas Söderlund
igital subdevice %pOF\n", > - to_of_node(vin->digital->asd.match.fwnode.fwnode)); > + vin_dbg(vin, "Found digital subdevice %s\n", > + to_of_node(vin->digital->asd.match.fwnode.fwnode)->full_name); For the same reasons as Laurent brings up in patch 14/26 I'm a bit sceptical to this change. > > vin->notifier.ops = &rvin_digital_notify_ops; > ret = v4l2_async_notifier_register(&vin->v4l2_dev, &vin->notifier); > -- > 2.13.6 > -- Regards, Niklas Söderlund

Re: renesas sdhi driver and DMA

2017-10-28 Thread Niklas Söderlund
So, the question is, which of these statements are correct? > > 1. wait_for_completion should not be called in a DMA callback > > 2. DMA engine drivers should use threaded IRQs instead of tasklets > > > The issue with #2 is that mic_x100_dma.c, sh/rcar-dmac.c and > sh/shdma-base.c are the only ones calling request_threaded_irq, > so you would think that tasklets are the correct method. > > > Thanks, > Chris > -- Regards, Niklas Söderlund

Re: [PATCH] net: ethtool: remove error check for legacy setting transceiver type

2017-10-20 Thread Niklas Söderlund
Hi Geert, On 2017-10-20 09:15:50 +0200, Geert Uytterhoeven wrote: > Hi Niklas, > > On Fri, Oct 20, 2017 at 1:32 AM, Niklas Söderlund > wrote: > > Commit 9cab88726929605 ("net: ethtool: Add back transceiver type") > > restores the transceiver type t

Re: [PATCH] net: ethtool: remove error check for legacy setting transceiver type

2017-10-20 Thread Niklas Söderlund
Hi Geert, On 2017-10-20 09:15:50 +0200, Geert Uytterhoeven wrote: > Hi Niklas, > > On Fri, Oct 20, 2017 at 1:32 AM, Niklas Söderlund > wrote: > > Commit 9cab88726929605 ("net: ethtool: Add back transceiver type") > > restores the transceiver type t

[PATCH] net: ethtool: remove error check for legacy setting transceiver type

2017-10-19 Thread Niklas Söderlund
/tx Fixes: 19cab88726929605 ("net: ethtool: Add back transceiver type") Signed-off-by: Niklas Söderlund --- net/core/ethtool.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Hi, The commit 9cab88726929605 ("net: ethtool: Add back transceiver type") itself is not enough to trigg

[PATCH v3] thermal: rcar_gen3_thermal: fix initialization sequence for H3 ES2.0

2017-10-17 Thread Niklas Söderlund
. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang --- drivers/thermal/rcar_gen3_thermal.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) * Changes from v2 - Removed & when assigning function pointers, thanks G

Re: [PATCH v2] thermal: rcar_gen3_thermal: fix initialization sequence for H3 ES2.0

2017-10-16 Thread Niklas Söderlund
Hi, I forgot the changes from v1, sorry about that. On 2017-10-16 16:52:59 +0200, Niklas Söderlund wrote: > The initialization sequence for H3 (r8a7795) ES1.x and ES2.0 is > different. H3 ES2.0 and later uses the same sequence as M3 (r8a7796) > ES1.0. Fix this by not looking at c

Re: [PATCH 10/10] [RFC] sh_eth: Remove obsolete explicit clock handling for WoL

2017-10-16 Thread Niklas Söderlund
eep wakeup sources active during system > suspend" and "clk: renesas: mstp: Keep wakeup sources active during > system suspend", this workaround is no longer needed. Hence remove all > explicit clock handling to keep the device active. > > Signed-off-by: Geert Uytterhoe

Re: [PATCH 09/10] [RFC] ravb: Remove obsolete explicit clock handling for WoL

2017-10-16 Thread Niklas Söderlund
eep wakeup sources active during system > suspend", this workaround is no longer needed. Hence remove all > explicit clock handling to keep the device active. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund > --- > This must not be applied before the

[PATCH v2] thermal: rcar_gen3_thermal: fix initialization sequence for H3 ES2.0

2017-10-16 Thread Niklas Söderlund
. Signed-off-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 203aca44a2bb4bdf..288104440226d90f

Re: [RFC] mmc: tmio: fix tuning for stubborn cards

2017-10-11 Thread Niklas Söderlund
Hi Simon, On 2017-10-11 09:36:48 +0200, Simon Horman wrote: > On Wed, Oct 11, 2017 at 02:08:14AM +0200, Niklas Söderlund wrote: > > The commit 43b0b361b0170030 ("mmc: tmio: always get number of taps") > > changed the behavior of the tuning. Before the commit the SCC was

[RFC] mmc: tmio: fix tuning for stubborn cards

2017-10-10 Thread Niklas Söderlund
are interrupt (CMD19) sh_mobile_sdhi ee10.sd: Tuning procedure with SCC enabled failed, retry with SCC disabled mmc0: new ultra high speed SDR50 SDHC card at address mmcblk0: mmc0: SU04G 3.69 GiB mmcblk0: p1 p2 Fixes: 43b0b361b0170030 ("mmc: tmio: always get number of taps"

Re: [PATCH] thermal: rcar_gen3_thermal: fix initialization sequence for H3 ES2.0

2017-09-13 Thread Niklas Söderlund
Hi Geert, Thanks for your feedback! On 2017-09-13 15:37:31 +0200, Geert Uytterhoeven wrote: > Hi Niklas, > > On Wed, Sep 13, 2017 at 12:55 PM, Niklas Söderlund > wrote: > > The initialization sequence for H3 (r8a7795) ES1.x and ES2.0 is > > different. H3 ES2.0 and late

[RFC 0/3] thermal: rcar_gen3_thermal: read calibration from hardware

2017-09-13 Thread Niklas Söderlund
ne or both of these concerns I will resend without the RFC prefix. The code is tested on H3 and M3-W where the calibration registers are not fused so only the fallback logic to pseudo values are truly tested. Niklas Söderlund (3): thermal: rcar_gen3_thermal: read calibration from hardware

[RFC 3/3] arm64: dts: r8a7796: update register size for thermal

2017-09-13 Thread Niklas Söderlund
To be able to read fused calibration values from hardware the size of the register resource of TSC1 needs to be incremented to cover one more register which holds the information if the calibration values have been fused or not. Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas

[RFC 1/3] thermal: rcar_gen3_thermal: read calibration from hardware

2017-09-13 Thread Niklas Söderlund
DT is to small. Signed-off-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 70 +++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 528a65b05b3

[RFC 2/3] arm64: dts: r8a7795: update register size for thermal

2017-09-13 Thread Niklas Söderlund
To be able to read fused calibration values from hardware the size of the register resource of TSC1 needs to be incremented to cover one more register which holds the information if the calibration values have been fused or not. Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas

[PATCH 2/2] arm64: dts: r8a7796: add thermal cooling management

2017-09-13 Thread Niklas Söderlund
Add nodes and properties for thermal cooling management support. Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/r8a7796.dtsi | 38 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts

[PATCH 0/2] arm64: dts: r8a7795: r8a7796: add thermal cooling management

2017-09-13 Thread Niklas Söderlund
work this should be reflected in this series. 1. https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git Niklas Söderlund (2): arm64: dts: r8a7795: add thermal cooling management arm64: dts: r8a7796: add thermal cooling management arch/arm64/boot/dts/renesas/r8a7795

[PATCH 1/2] arm64: dts: r8a7795: add thermal cooling management

2017-09-13 Thread Niklas Söderlund
Add nodes and properties for thermal cooling management support. Signed-off-by: Niklas Söderlund --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 40 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts

[PATCH] thermal: rcar_gen3_thermal: fix initialization sequence for H3 ES2.0

2017-09-13 Thread Niklas Söderlund
"ES1.*". Signed-off-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 54 ++--- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index 203aca

Re: [PATCH 20/20] arm64: dts: renesas: salvator: use VC1 for CVBS

2017-08-30 Thread Niklas Söderlund
Hi Simon, On 2017-08-30 09:36:37 +0200, Simon Horman wrote: > On Fri, Aug 11, 2017 at 11:57:03AM +0200, Niklas Söderlund wrote: > > In order to test Virtual Channels use VC1 for CVBS input from the > > adv748x. > > > > Signed-off-by: Niklas Söderlund > > ---

Re: [PATCH] arm64: dts: r8a7795: Add OPPs table for cpu devices

2017-08-29 Thread Niklas Söderlund
clock-latency-ns = <30>; > + }; > + opp@15 { > + opp-hz = /bits/ 64 <15>; > + opp-microvolt = <77>; > + clock-latency-ns = <30>; > + opp-suspend; > + }; > + opp@16 { > + opp-hz = /bits/ 64 <16>; > + opp-microvolt = <84>; > + clock-latency-ns = <30>; > + turbo-mode; > + }; > + opp@17 { > + opp-hz = /bits/ 64 <17>; > + opp-microvolt = <87>; > + clock-latency-ns = <30>; > + turbo-mode; > + }; > + }; > + > + cluster0_opp_tb7: opp_table7 { > + compatible = "operating-points-v2"; > + opp-shared; > + > + opp@5 { > + opp-hz = /bits/ 64 <5>; > + opp-microvolt = <76>; > + clock-latency-ns = <30>; > + }; > + opp@10 { > + opp-hz = /bits/ 64 <10>; > + opp-microvolt = <76>; > + clock-latency-ns = <30>; > + }; > + opp@15 { > + opp-hz = /bits/ 64 <15>; > + opp-microvolt = <76>; > + clock-latency-ns = <30>; > + opp-suspend; > + }; > + opp@16 { > + opp-hz = /bits/ 64 <16>; > + opp-microvolt = <83>; > + clock-latency-ns = <30>; > + turbo-mode; > + }; > + opp@17 { > + opp-hz = /bits/ 64 <17>; > + opp-microvolt = <86>; > + clock-latency-ns = <30>; > + turbo-mode; > + }; > + }; > + > + cluster1_opp_tb0: opp_table10 { > + compatible = "operating-points-v2"; > + opp-shared; > + > + opp@12 { > + opp-hz = /bits/ 64 <12>; > + opp-microvolt = <82>; > + clock-latency-ns = <30>; > + }; > + }; > + > extal_clk: extal { > compatible = "fixed-clock"; > #clock-cells = <0>; > -- > 2.1.4 > > -- Regards, Niklas Söderlund

Re: [PATCH 4/4] v4l: async: add comment about re-probing to v4l2_async_notifier_unregister()

2017-08-23 Thread Niklas Söderlund
Hi, On 2017-08-18 15:42:37 +0200, Niklas Söderlund wrote: > Hi Sakari and Laurent, > > Thanks for your feedback. > > On 2017-08-18 14:20:08 +0300, Laurent Pinchart wrote: > > Hello, > > > > On Tuesday 15 Aug 2017 19:09:33 Sakari Ailus wrote: > > >

[PATCH v6 02/25] rcar-vin: register the video device at probe time

2017-08-22 Thread Niklas Söderlund
initialized object, something is seriously wrong. To prevent this register the video device at prob time and don't allow user-space to open the video device if the subdevice have not yet been bound. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c

[PATCH v6 03/25] rcar-vin: move chip information to own struct

2017-08-22 Thread Niklas Söderlund
When Gen3 support is added to the driver more then chip id will be different for the different Soc. To avoid a lot of if statements in the code create a struct chip_info to contain this information. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham --- drivers/media/platform/rcar-vin

[PATCH v6 08/25] rcar-vin: do not reset crop and compose when setting format

2017-08-22 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 --- drivers/media

[PATCH v6 05/25] rcar-vin: change name of video device

2017-08-22 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 --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 ++- 1 file changed, 2

[PATCH v6 25/25] rcar-vin: enable support for r8a7796

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

[PATCH v6 24/25] rcar-vin: enable support for r8a7795

2017-08-22 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7795. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/Kconfig | 2 +- drivers/media/platform/rcar-vin/rcar-core.c | 145 2 files changed, 146 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v6 17/25] rcar-vin: use different v4l2 operations in media controller mode

2017-08-22 Thread Niklas Söderlund
running without directly interacting with the source subdevice. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-dma.c | 3 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 155 +++- drivers/media/platform/rcar-vin/rcar-vin.h | 1 + 3 files changed

[PATCH v6 19/25] rcar-vin: add group allocator functions

2017-08-22 Thread Niklas Söderlund
structure and creates a media device. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 179 +++- drivers/media/platform/rcar-vin/rcar-vin.h | 38 ++ 2 files changed, 216 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform

[PATCH v6 04/25] rcar-vin: move max width and height information to chip information

2017-08-22 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 --- drivers/media/platform/rcar-vin/rcar-core.c | 6 ++ drivers/media/platform/rcar-vin

[PATCH v6 09/25] rcar-vin: do not allow changing scaling and composing while streaming

2017-08-22 Thread Niklas Söderlund
only configure scaling and composing when the stream starts. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 --- drivers/media/platform/rcar-vin/rcar-vin.h | 3 --- 3 files changed, 1 insertion(+), 7

[PATCH v6 06/25] rcar-vin: move functions regarding scaling

2017-08-22 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 --- drivers/media/platform

[PATCH v6 15/25] rcar-vin: add flag to switch to media controller mode

2017-08-22 Thread Niklas Söderlund
struct rvin_graph_entity which will control which mode to use. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 6 +- drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rcar

[PATCH v6 16/25] rcar-vin: break out format alignment and checking

2017-08-22 Thread Niklas Söderlund
Part of the format aliment and checking can be shared with the Gen3 format handling. Break that part out to it's own function. While doing this clean up the checking and add more checks. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c

[PATCH v6 21/25] rcar-vin: parse Gen3 OF and setup media graph

2017-08-22 Thread Niklas Söderlund
been probed. Once the last VIN instance is probed this is detected and this instance registers all CSI-2 subdevices in its private async notifier. Once the .complete() callback of this notifier is called it creates the media controller links between all entities in the graph. Signed-off-by: Niklas

[PATCH v6 14/25] rcar-vin: add functions to manipulate Gen3 CHSEL value

2017-08-22 Thread Niklas Söderlund
ned-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-dma.c | 41 ++ drivers/media/platform/rcar-vin/rcar-vin.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-d

[PATCH v6 10/25] rcar-vin: read subdevice format for crop only when needed

2017-08-22 Thread Niklas Söderlund
-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 88 ++--- drivers/media/platform/rcar-vin/rcar-vin.h | 12 2 files changed, 42 insertions(+), 58 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform

[PATCH v6 20/25] rcar-vin: add chsel information to rvin_info

2017-08-22 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 --- drivers/media/platform/rcar-vin/rcar-vin.h | 22

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

2017-08-22 Thread Niklas Söderlund
The procedure to start or stop streaming using the none MC single subdevice and the MC graph and multiple subdevices are quiet 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

<    5   6   7   8   9   10   11   12   13   14   >