[PATCH 01/16] rcar-vin: reset bytesperline and sizeimage when resetting format

2017-03-14 Thread Niklas Söderlund
These two where forgotten when refactoring the format reset code. If they are not also reset at the same time as width and height the format returned from G_FMT will not match reality. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 +++ 1 file changed, 3

[PATCH 03/16] rcar-vin: fix how pads are handled for v4l2 subdevice operations

2017-03-14 Thread Niklas Söderlund
subdevice pad number have been updated to not store the incoming pad and simply restore it to 0 after the subdevice operation is complete. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 26 ++ 1 file changed, 14 insertions(+), 12

[PATCH 00/16] rcar-vin: fix issues with format and capturing

2017-03-14 Thread Niklas Söderlund
od reviews a large part of that series where dropped. Niklas Söderlund (16): rcar-vin: reset bytesperline and sizeimage when resetting format rcar-vin: use rvin_reset_format() in S_DV_TIMINGS rcar-vin: fix how pads are handled for v4l2 subdevice operations rcar-vin: fix standard in input e

[PATCH 10/16] rcar-vin: move functions which acts on hardware

2017-03-14 Thread Niklas Söderlund
This only moves whole structs, defines and functions around, no code is changed inside any function. The reason for moving this code around is to prepare for refactoring and fixing of a start/stop stream bug without having to use forward declarations. Signed-off-by: Niklas Söderlund --- drivers

[PATCH 06/16] rcar-vin: refactor pad lookup code

2017-03-14 Thread Niklas Söderlund
The pad lookup code can be broken out to increase readability and to reduce code duplication. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 38 + 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/drivers/media

[PATCH 15/16] rcar-vin: add missing error check to propagate error

2017-03-14 Thread Niklas Söderlund
The return value of __rvin_try_format_source is not checked, add a check and propagate the error. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c

[PATCH v3 02/27] media: entity: Add has_route entity operation

2017-03-14 Thread Niklas Söderlund
From: Laurent Pinchart The optional operation can be used by entities to report whether two pads are internally connected. Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus --- include/media/media-entity.h | 5 + 1 file

[PATCH v3 00/27] rcar-vin: Add Gen3 with media controller support

2017-03-14 Thread Niklas Söderlund
n testing together with renesas-drivers tree. Laurent Pinchart (2): media: entity: Add has_route entity operation media: entity: Add media_entity_has_route() function Niklas Söderlund (24): rcar-vin: add Gen3 devicetree bindings documentation rcar-vin: move chip information to own str

[PATCH v3 24/27] rcar-vin: add link notify for Gen3

2017-03-14 Thread Niklas Söderlund
o hardware constrains the link_notifier callback will return -EMLINK. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 204 1 file changed, 204 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platfor

[PATCH v3 22/27] rcar-vin: add chsel information to rvin_info

2017-03-14 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 v3 16/27] rcar-vin: add functions to manipulate Gen3 CHSEL value

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

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

2017-03-14 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 v3 26/27] rcar-vin: enable support for r8a7795

2017-03-14 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 | 72 + 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/drivers

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

2017-03-14 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 v3 20/27] rcar-vin: register a media pad if running in media controller mode

2017-03-14 Thread Niklas Söderlund
When running in media controller mode a media pad is needed, register one. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 9 + drivers/media/platform/rcar-vin/rcar-vin.h | 4 2 files changed, 13 insertions(+) diff --git a/drivers/media/platform

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

2017-03-14 Thread Niklas Söderlund
running without directly interacting with the source subdevice. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 25 ++- drivers/media/platform/rcar-vin/rcar-dma.c | 3 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 239 drivers/media

[PATCH v3 15/27] rcar-vin: enable Gen3 hardware configuration

2017-03-14 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 --- drivers/media/platform/rcar-vin/rcar-dma.c | 94

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

2017-03-14 Thread Niklas Söderlund
the field is preserved simplifies the logic quiet a bit. Signed-off-by: Niklas Söderlund --- 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 | 2 -- 3 files changed, 10

[PATCH v3 21/27] rcar-vin: add group allocator functions

2017-03-14 Thread Niklas Söderlund
structure and creates a media device. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 112 +++- drivers/media/platform/rcar-vin/rcar-vin.h | 40 ++ 2 files changed, 149 insertions(+), 3 deletions(-) diff --git a/drivers/media

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

2017-03-14 Thread Niklas Söderlund
f the CSI2 group. Which ever rcar-vin instance which fist sees a new subdevice in the graph adds it to its private v4l2 async notifier and once it's bound it will be available for the whole CSI2 group. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-co

[PATCH v3 13/27] rcar-vin: do not cut height in two for top, bottom or alternate fields

2017-03-14 Thread Niklas Söderlund
not the VIN will do it's 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 --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/media/platform

[PATCH v3 18/27] rcar-vin: add flag to switch to media controller mode

2017-03-14 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 | 3 +++ drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b

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

2017-03-14 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

[PATCH v3 08/27] rcar-vin: move functions regarding scaling

2017-03-14 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 v3 12/27] rcar-vin: read subdevice format for crop only when needed

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

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

2017-03-14 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 v3 05/27] rcar-vin: move chip information to own struct

2017-03-14 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 --- drivers/media/platform/rcar-vin/rcar-core.c | 49

[PATCH v3 17/27] rcar-vin: prepare digital notifier for group notifier

2017-03-14 Thread Niklas Söderlund
The media bus parsing functions used by the digital subdevice V4L2 notifier can be shared with the upcoming CSI-2 notifier. To prepare for this move and rename the function to reflect it's generic. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c

[PATCH v3 01/27] rcar-vin: add Gen3 devicetree bindings documentation

2017-03-14 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 | 122 +++-- 1 file changed, 112

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

2017-03-14 Thread Niklas Söderlund
On Gen3 the max supported width and height will be different from Gen2. Move the limits to the struct chip_info to prepare for Gen3 support. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 6 ++ drivers/media/platform/rcar-vin/rcar-v4l2.c | 6

[PATCH v3 04/27] media: entity: Swap pads if route is checked from source to sink

2017-03-14 Thread Niklas Söderlund
From: Sakari Ailus This way the pads are always passed to the has_route() op sink pad first. Makes sense. Signed-off-by: Sakari Ailus Signed-off-by: Niklas Söderlund --- drivers/media/media-entity.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/media-entity.c b

[PATCH v3 07/27] rcar-vin: change name of video device

2017-03-14 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 --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 03/27] media: entity: Add media_entity_has_route() function

2017-03-14 Thread Niklas Söderlund
From: Laurent Pinchart This is a wrapper around the media entity has_route operation. Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek Signed-off-by: Sakari Ailus Signed-off-by: Niklas Söderlund --- drivers/media/media-entity.c | 16 include/media/media-entity.h

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

2017-03-14 Thread Niklas Söderlund
Bus configuration will once the driver is extended to 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 --- drivers/

Re: [PATCH 03/16] rcar-vin: fix how pads are handled for v4l2 subdevice operations

2017-03-15 Thread Niklas Söderlund
Hi Sergei, Thanks for your feedback. On 2017-03-15 12:12:21 +0300, Sergei Shtylyov wrote: > Hello! > > On 3/14/2017 9:59 PM, Niklas Söderlund wrote: > > > The rcar-vin driver only uses one pad, pad number 0. > > > > - All v4l2 operations that did not chec

Re: [PATCH v3 27/27] rcar-vin: enable support for r8a7796

2017-03-16 Thread Niklas Söderlund
Hi Geert, Thanks for your comments. On 2017-03-16 09:36:01 +0100, Geert Uytterhoeven wrote: > Hi Niklas, > > On Tue, Mar 14, 2017 at 8:03 PM, Niklas Söderlund > wrote: > > Add the SoC specific information for Renesas r8a7796. > > > > Signed-off-by: Niklas Söderlun

Re: [PATCH 5/7] thermal: rcar_gen3_thermal: enable hardware interrupts for trip points

2017-03-17 Thread Niklas Söderlund
Hi Wolfram, Thanks for your feedback. On 2017-03-07 20:55:33 +0100, Wolfram Sang wrote: > Hi Niklas, > > thanks for your work! > > On Mon, Mar 06, 2017 at 09:03:59PM +0100, Niklas Söderlund wrote: > > Enable hardware trip points by implementing the set_trips callback. The

Re: [PATCH 5/7] thermal: rcar_gen3_thermal: enable hardware interrupts for trip points

2017-03-17 Thread Niklas Söderlund
Hi Geert, Thanks for your feedback. On 2017-03-07 16:36:00 +0100, Geert Uytterhoeven wrote: > On Mon, Mar 6, 2017 at 9:03 PM, Niklas Söderlund > wrote: > > Enable hardware trip points by implementing the set_trips callback. The > > thermal core will take care of setting the

Re: [PATCH 2/7] thermal: rcar_gen3_thermal: fix probe error path

2017-03-17 Thread Niklas Söderlund
Hi Wolfram, Thanks for your feedback. On 2017-03-07 20:52:03 +0100, Wolfram Sang wrote: > On Mon, Mar 06, 2017 at 09:03:56PM +0100, Niklas Söderlund wrote: > > If the memory resource for a TSC is unviable probe should fail not try > > to go ahead with the remaining TSC. This fix

[PATCH v2 6/7] thermal: rcar_gen3_thermal: store device match data in private structure

2017-03-17 Thread Niklas Söderlund
The device match data needs to be accessible outside the probe function, store it in the private data structure. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang --- drivers/thermal/rcar_gen3_thermal.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH v2 5/7] thermal: rcar_gen3_thermal: enable hardware interrupts for trip points

2017-03-17 Thread Niklas Söderlund
or all-off design. When an interrupt happens all TSCs are checked and all thermal zones are updated. This could be refined to be more fine grained but the thermal core takes care of only updating the thermal zones that have left their trip point window. Signed-off-by: Niklas Söderlund --- drivers

[PATCH v2 2/7] thermal: rcar_gen3_thermal: remove unneeded mutex

2017-03-17 Thread Niklas Söderlund
There is no point in protecting a register read with a lock. This is most likely a leftover from when the driver was reworked before submitted for upstream. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang --- drivers/thermal/rcar_gen3_thermal.c | 7

[PATCH v2 1/7] thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796

2017-03-17 Thread Niklas Söderlund
tions. This should have been done in the initial commit which adds the driver as the same issue was found and corrected for r8a7795. Fixes: 564e73d283af9d4c ("thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver") Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Revie

[PATCH v2 4/7] thermal: rcar_gen3_thermal: record and check number of TSCs found

2017-03-17 Thread Niklas Söderlund
Record how many TSCs are found in struct rcar_gen3_thermal_priv, this is needed to be able to add hardware interrupts for trip points later. Also add a check to make sure at least one TSC is found. Signed-off-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 7 +++ 1 file

[PATCH v2 3/7] thermal: rcar_gen3_thermal: check that TSC exists before memory allocation

2017-03-17 Thread Niklas Söderlund
Move the check for a TSC resource before allocating memory for a new TSC. If no TSC is found there is little point in allocating memory for it. Signed-off-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH v2 0/7] thermal: rcar_gen3_thermal: add support for interrupt triggerd trip points

2017-03-17 Thread Niklas Söderlund
of_thermal_get_ntrips() - Fixed spelling in commit messages - Add Reviewed-by tags Niklas Söderlund (7): thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796 thermal: rcar_gen3_thermal: remove unneeded mutex thermal: rcar_gen3_thermal: check that TSC exists before memory

[PATCH v2 7/7] thermal: rcar_gen3_thermal: add suspend and resume support

2017-03-17 Thread Niklas Söderlund
To restore operation it's easiest to reinitialise all TSCs. In order to do this the current trip window needs to be stored in the TSC structure so that it can be restored upon resume. Signed-off-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c

[PATCH 1/3] dmaengine: rcar-dmac: store channel IRQ in struct rcar_dmac_chan

2017-03-28 Thread Niklas Söderlund
The IRQ number is needed after probe to be able to add synchronisation points in other places in the driver when freeing resources and to implement a device_synchronize() callback. Store the IRQ number in the struct rcar_dmac_chan so that it can be used later. Signed-off-by: Niklas Söderlund

[PATCH 2/3] dmaengine: rcar-dmac: implement device_synchronize()

2017-03-28 Thread Niklas Söderlund
completed. Signed-off-by: Niklas Söderlund --- drivers/dma/sh/rcar-dmac.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 3038654f11b5c6ed..4b90deb40d559bed 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar

[PATCH 3/3] dmaengine: rcar-dmac: wait for ISR to finish before freeing resources

2017-03-28 Thread Niklas Söderlund
. Signed-off-by: Niklas Söderlund --- drivers/dma/sh/rcar-dmac.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 4b90deb40d559bed..0ec63600ebcc3a27 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar

[PATCH 0/3] dmaengine: rcar-dmac: fix resource freeing synchronization

2017-03-28 Thread Niklas Söderlund
resources I feel the synchronisation for freeing channel resources are in a much better shape. It also solves the issue in the original mail thread. The series is based on v4.11-rc1 and is tested on r8a7795 Salvator-X. 1. https://patchwork.kernel.org/patch/9557691/ Niklas Söderlund (3

Re: [PATCH 3/3] dmaengine: rcar-dmac: wait for ISR to finish before freeing resources

2017-03-29 Thread Niklas Söderlund
Hi Geert, On 2017-03-29 14:31:33 +0200, Geert Uytterhoeven wrote: > Hi Niklas, > > On Wed, Mar 29, 2017 at 12:40 AM, Niklas Söderlund > wrote: > > This fixes a race condition where the channel resources could be freed > > before the ISR had finished running res

[PATCH v3 4/7] thermal: rcar_gen3_thermal: record and check number of TSCs found

2017-03-29 Thread Niklas Söderlund
Record how many TSCs are found in struct rcar_gen3_thermal_priv, this is needed to be able to add hardware interrupts for trip points later. Also add a check to make sure at least one TSC is found. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang

[PATCH v3 3/7] thermal: rcar_gen3_thermal: check that TSC exists before memory allocation

2017-03-29 Thread Niklas Söderlund
Move the check for a TSC resource before allocating memory for a new TSC. If no TSC is found there is little point in allocating memory for it. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang --- drivers/thermal/rcar_gen3_thermal.c | 8 1

[PATCH v3 1/7] thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796

2017-03-29 Thread Niklas Söderlund
tions. This should have been done in the initial commit which adds the driver as the same issue was found and corrected for r8a7795. Fixes: 564e73d283af9d4c ("thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver") Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Revie

[PATCH v3 0/7] thermal: rcar_gen3_thermal: add support for interrupt triggerd trip points

2017-03-29 Thread Niklas Söderlund
in commit messages - Add Reviewed-by tags Niklas Söderlund (7): thermal: rcar_gen3_thermal: add delay in .thermal_init on r8a7796 thermal: rcar_gen3_thermal: remove unneeded mutex thermal: rcar_gen3_thermal: check that TSC exists before memory allocation thermal: rcar_gen3_thermal: record

[PATCH v3 2/7] thermal: rcar_gen3_thermal: remove unneeded mutex

2017-03-29 Thread Niklas Söderlund
There is no point in protecting a register read with a lock. This is most likely a leftover from when the driver was reworked before being submitted for upstream. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang --- drivers/thermal/rcar_gen3_thermal.c

[PATCH v3 5/7] thermal: rcar_gen3_thermal: enable hardware interrupts for trip points

2017-03-29 Thread Niklas Söderlund
or all-off design. When an interrupt happens all TSCs are checked and all thermal zones are updated. This could be refined to be more fine grained but the thermal core takes care of only updating the thermal zones that have left their trip point window. Signed-off-by: Niklas Söderlund --- drivers

[PATCH v3 7/7] thermal: rcar_gen3_thermal: add suspend and resume support

2017-03-29 Thread Niklas Söderlund
To restore operation it's easiest to reinitialise all TSCs. In order to do this the current trip window needs to be stored in the TSC structure so that it can be restored upon resume. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang --- drivers/thermal/rcar_gen3_thermal.c

[PATCH v3 6/7] thermal: rcar_gen3_thermal: store device match data in private structure

2017-03-29 Thread Niklas Söderlund
The device match data needs to be accessible outside the probe function, store it in the private data structure. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang --- drivers/thermal/rcar_gen3_thermal.c | 7 --- 1 file changed, 4 insertions(+), 3

Re: [PATCH 3/3] dmaengine: rcar-dmac: wait for ISR to finish before freeing resources

2017-03-30 Thread Niklas Söderlund
Hi Geert, On 2017-03-29 15:30:42 +0200, Niklas Söderlund wrote: > Hi Geert, > > On 2017-03-29 14:31:33 +0200, Geert Uytterhoeven wrote: > > Hi Niklas, > > > > On Wed, Mar 29, 2017 at 12:40 AM, Niklas Söderlund > > wrote: > > > This fixes a race cond

Re: [PATCH] ARM: dts: koelsch: Correct clock frequency of X2 DU clock input

2017-04-04 Thread Niklas Söderlund
can you please fire up your display? Thanks! Console during boot works and modetest -M rcar-du -s 46:1920x1080-60Hz modetest -M rcar-du -s 46:1280x720-60Hz modetest -M rcar-du -s 46:720x480-60Hz Produce stable test patterns. Tested-by: Niklas Söderlund > > > Acked-by: Laurent Pin

Re: [PATCH 3/3] dmaengine: rcar-dmac: wait for ISR to finish before freeing resources

2017-04-05 Thread Niklas Söderlund
Hi Vinod, On 2017-04-05 08:55:31 +0530, Vinod Koul wrote: > On Thu, Mar 30, 2017 at 09:38:39AM +0200, Niklas Söderlund wrote: > > Hi Geert, > > > > On 2017-03-29 15:30:42 +0200, Niklas Söderlund wrote: > > > Hi Geert, > > > > > > On 201

Re: [PATCH 2/8] [RFC] arm64: dts: renesas: Add R-Car H3 SiP (4 x 1 GiB) support

2017-04-20 Thread Niklas Söderlund
> + device_type = "memory"; > + reg = <0x6 0x 0 0x4000>; > + }; > + > + memory@7 { > + device_type = "memory"; > + reg = <0x7 0x 0 0x4000>; > + }; > +}; > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH 2/2] rcar-vin: group: use correct of_node

2017-04-25 Thread Niklas Söderlund
stdata(subdev, vin); > > mutex_lock(&vin->group->lock); > for (i = 0; i < RVIN_CSI_MAX; i++) { > - struct device_node *new = subdev->dev->of_node; > > if (vin->group->bridge[i].asd.match.of.node == new) { > vin_dbg(vin, "Bound bridge %s\n", subdev->name); And I will squash these fixes in to the next version of my 'Gen3 with media controller support' series since that is not yet picked up. Is that OK with you? > -- > 2.7.4 > -- Regards, Niklas Söderlund

Re: [PATCH] rcar-vin: Use of_nodes as specified by the subdev

2017-04-26 Thread Niklas Söderlund
n/rcar-core.c:161:ep = of_graph_get_endpoint_by_regs(vin->dev->of_node, 0, 0); Here vin->dev->of_node is correct and subdev->dev->of_node should be fixed by Kieran patch. I'm only asking to be sure I did not miss anything. In renesas-drivers the Gen3 patches are included and more references to subdev->dev->of_node exists, but as Kieran sates these fixes will be squashed into those patches since they are not yet picked up. -- Regards, Niklas Söderlund

[PATCH] v4l2-async: add subnotifier registration for subdevices

2017-04-27 Thread Niklas Söderlund
ff-by: Niklas Söderlund --- drivers/media/v4l2-core/v4l2-async.c | 91 +--- include/media/v4l2-async.h | 22 + 2 files changed, 95 insertions(+), 18 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c

[PATCH 2/2] media: entity: Add media_entity_pad_from_dt_regs() function

2017-04-27 Thread Niklas Söderlund
This is a wrapper around the media entity pad_from_dt_regs operation. Signed-off-by: Niklas Söderlund --- drivers/media/media-entity.c | 21 + include/media/media-entity.h | 22 ++ 2 files changed, 43 insertions(+) diff --git a/drivers/media/media

[PATCH 1/2] media: entity: Add pad_from_dt_regs entity operation

2017-04-27 Thread Niklas Söderlund
The optional operation can be used by entities to report how it maps its DT node ports and endpoints to media pad numbers. This is useful for devices which require more advanced mappings of pads then DT port number is equivalent with media port number. Signed-off-by: Niklas Söderlund

[PATCH 0/2] media: entity: add operation to help map DT node to media pad

2017-04-27 Thread Niklas Söderlund
number correspond to the DT endpoint the driver used to bind subdevice in the first place. I have updated my R-Car CSI-2 patch series to use this new function to ask it's subdevice to resolve the media pad. 1. [PATCH 0/5] RFC: ADV748x HDMI/Analog video receiver Niklas Söderlund (2):

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

2017-04-27 Thread Niklas Söderlund
YVY8/ Changes since v1: - 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 documen

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

2017-04-27 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| 116 + 1 file changed, 116 insertions(+) create mode 100644 Documentation/devicetree

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

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

[PATCH v4 04/27] media: entity: Swap pads if route is checked from source to sink

2017-04-27 Thread Niklas Söderlund
From: Sakari Ailus This way the pads are always passed to the has_route() op sink pad first. Makes sense. Signed-off-by: Sakari Ailus Signed-off-by: Niklas Söderlund --- drivers/media/media-entity.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/media-entity.c b

[PATCH v4 02/27] media: entity: Add has_route entity operation

2017-04-27 Thread Niklas Söderlund
From: Laurent Pinchart The optional operation can be used by entities to report whether two pads are internally connected. Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek Signed-off-by: Niklas Söderlund Acked-by: Sakari Ailus --- include/media/media-entity.h | 5 + 1 file

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

2017-04-27 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 v4 01/27] rcar-vin: add Gen3 devicetree bindings documentation

2017-04-27 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 | 122 +++-- 1 file changed, 112

[PATCH v4 07/27] rcar-vin: change name of video device

2017-04-27 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 --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

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

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

[PATCH v4 00/27] rcar-vin: Add Gen3 with media controller support

2017-04-27 Thread Niklas Söderlund
Laurent Pinchart (2): media: entity: Add has_route entity operation media: entity: Add media_entity_has_route() function Niklas Söderlund (24): rcar-vin: add Gen3 devicetree bindings documentation rcar-vin: move chip information to own struct rcar-vin: move max width and height information t

[PATCH v4 15/27] rcar-vin: enable Gen3 hardware configuration

2017-04-27 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 --- drivers/media/platform/rcar-vin/rcar-dma.c | 94

[PATCH v4 08/27] rcar-vin: move functions regarding scaling

2017-04-27 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 v4 05/27] rcar-vin: move chip information to own struct

2017-04-27 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 --- drivers/media/platform/rcar-vin/rcar-core.c | 49

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

2017-04-27 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 v4 03/27] media: entity: Add media_entity_has_route() function

2017-04-27 Thread Niklas Söderlund
From: Laurent Pinchart This is a wrapper around the media entity has_route operation. Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek Signed-off-by: Sakari Ailus Signed-off-by: Niklas Söderlund --- drivers/media/media-entity.c | 16 include/media/media-entity.h

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

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

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

2017-04-27 Thread Niklas Söderlund
Bus configuration will once the driver is extended to 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 --- drivers/

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

2017-04-27 Thread Niklas Söderlund
the field is preserved simplifies the logic quiet a bit. Signed-off-by: Niklas Söderlund --- 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 | 2 -- 3 files changed, 10

[PATCH v4 18/27] rcar-vin: add flag to switch to media controller mode

2017-04-27 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 | 3 +++ drivers/media/platform/rcar-vin/rcar-vin.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b

[PATCH v4 13/27] rcar-vin: do not cut height in two for top, bottom or alternate fields

2017-04-27 Thread Niklas Söderlund
not the VIN will do it's 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 --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/media/platform

[PATCH v4 17/27] rcar-vin: prepare digital notifier for group notifier

2017-04-27 Thread Niklas Söderlund
The media bus parsing functions used by the digital subdevice V4L2 notifier can be shared with the upcoming CSI-2 notifier. To prepare for this move and rename the function to reflect it's generic. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c

[PATCH v4 20/27] rcar-vin: register a media pad if running in media controller mode

2017-04-27 Thread Niklas Söderlund
When running in media controller mode a media pad is needed, register one. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 9 + drivers/media/platform/rcar-vin/rcar-vin.h | 4 2 files changed, 13 insertions(+) diff --git a/drivers/media/platform

[PATCH v4 21/27] rcar-vin: add group allocator functions

2017-04-27 Thread Niklas Söderlund
structure and creates a media device. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 112 +++- drivers/media/platform/rcar-vin/rcar-vin.h | 38 ++ 2 files changed, 147 insertions(+), 3 deletions(-) diff --git a/drivers/media

[PATCH v4 26/27] rcar-vin: enable support for r8a7795

2017-04-27 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 | 72 + 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/drivers

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

2017-04-27 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

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

2017-04-27 Thread Niklas Söderlund
running without directly interacting with the source subdevice. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 25 ++- drivers/media/platform/rcar-vin/rcar-dma.c | 3 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 239 drivers/media

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

2017-04-27 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 v4 22/27] rcar-vin: add chsel information to rvin_info

2017-04-27 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 v4 24/27] rcar-vin: add link notify for Gen3

2017-04-27 Thread Niklas Söderlund
o hardware constrains the link_notifier callback will return -EMLINK. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 204 1 file changed, 204 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platfor

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

2017-04-27 Thread Niklas Söderlund
instances which are part of the group. The rcar-vin instance that first sees a new CSI-2 subdevice adds it to its private v4l2 async notifier and once it's bound it will be available for the whole group. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c

<    1   2   3   4   5   6   7   8   9   10   >