[PATCH 1 2/4] PCI: iproc: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
The only way to call iproc_pcie_pltfm_probe() is to match an entry in iproc_pcie_of_match_table[], so match cannot be NULL. Use of_device_get_match_data() to retrieve the pcie->type. No functional change intended. Based-on-suggestion-from: Geert Uytterhoeven

[PATCH 1 0/4] PCI: Use of_device_get_match_data() to simplify probe

2017-01-31 Thread Bjorn Helgaas
This turned into much ado about nothing, but Shailendra's hisi patch prompted similar cleanups in other drivers. It's a minor simplification, but I think worth doing consistently across drivers. Basically this is Geert's observation that when the driver probe function is called only as a result

Re: [PATCH] PCI: rcar: Check for OF device match early

2017-01-31 Thread Bjorn Helgaas
On Tue, Jan 31, 2017 at 04:33:15PM +0100, Geert Uytterhoeven wrote: > Hi Bjorn, > > On Tue, Jan 31, 2017 at 4:10 PM, Bjorn Helgaas wrote: > > A match in the rcar_pcie_of_match[] table is required, so check that first, > > before we start setting up things that need to be

[PATCH 06/11] media: rcar-vin: move subdev source and sink pad index to rvin_graph_entity

2017-01-31 Thread Niklas Söderlund
It makes more sens to store the sink and source pad index in struct rvin_graph_entity since that contains other subdevice related information. Add complete documentation for struct rvin_graph_entity while we are at it. Signed-off-by: Niklas Söderlund ---

[PATCH 05/11] media: rcar-vin: add wrapper to get rvin_graph_entity

2017-01-31 Thread Niklas Söderlund
Update the driver to retrieve the code and mbus_cfg values from a rvin_graph_entity retrieved from a wrapper function instead of directly accessing the entity for the digital port. This is done to prepare for Gen3 support where the subdeivce might change during runtime, so to directly accesses a

[PATCH 09/11] media: rcar-vin: use pad information when verifying media bus format

2017-01-31 Thread Niklas Söderlund
Use information about pad index when enumerating mbus codes. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c

[PATCH 08/11] media: rcar-vin: refactor pad lookup code

2017-01-31 Thread Niklas Söderlund
If the subdeivce did not supply pad information the driver will return -EINVAL, this is not what we want so remove that check. The code can then be broken out to a helper function reducing duplication. Signed-off-by: Niklas Söderlund ---

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

2017-01-31 Thread Niklas Söderlund
These two fields where forgotten when refactoring the format reset code path. If they are not also reset at the same time as width and hight the format read using G_FMT will not match reality. Signed-off-by: Niklas Söderlund ---

[PATCH 03/11] media: rcar-vin: fix how pads are handled for v4l2 subdeivce operations

2017-01-31 Thread Niklas Söderlund
The rcar-vin driver only uses one pad, pad number 0. All v4l2 operations which did not check that the requested operation was for pad 0 have been updated with a check to enforce this. All v4l2 operations that stored (and later restore) the requested pad before substituting it for the

[PATCH 04/11] media: rcar-vin: fix standard in input enumeration

2017-01-31 Thread Niklas Söderlund
If the subdevice supports dv_timings_cap the driver should not fill in the standard. Also don't use the standard from probe time ask the subdevice each time. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 10 -- 1

[PATCH 00/11] media: rcar-vin: fix OPS and format/pad index issues

2017-01-31 Thread Niklas Söderlund
Hi, This series address issues with the R-Car Gen2 VIN driver. The most serious issue is the OPS when unbind and rebinding the i2c driver for the video source subdevice which have popped up as a blocker for other work. This series is broken out of my much larger R-Car Gen3 enablement series

[PATCH 02/11] media: rcar-vin: use rvin_reset_format() in S_DV_TIMINGS

2017-01-31 Thread Niklas Söderlund
Use rvin_reset_format() in rvin_s_dv_timings() instead if just resetting a few fields. This fixes an issue where the field format was not properly set after S_DV_TIMINGS. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 8

[PATCH 10/11] media: rcar-vin: split rvin_s_fmt_vid_cap()

2017-01-31 Thread Niklas Söderlund
To support unbind and rebinding of subdevices rvin_s_fmt_vid_cap() needs to be called from with in the driver itself. Rename the function __rvin_s_fmt_vid_cap() and create a wrapper which can be used by vidioc_s_fmt_vid_cap. Signed-off-by: Niklas Söderlund

[PATCH 11/11] media: rcar-vin: register the video device early

2017-01-31 Thread Niklas Söderlund
To support unbind and rebinding of video source subdevices while keeping a constant video device the subdevice needs to be attached when the first user opens the video device and detached when the last user closes it. This changes the rcar-vin behavior in such way that the video device is

Re: [PATCH v4 00/14] ARM: dts: r8a779x: use demuxer for I2C

2017-01-31 Thread Niklas Söderlund
Hi Wolfram, On 2017-01-09 10:34:20 +0100, Niklas Söderlund wrote: > On 2017-01-04 11:25:50 +0100, Wolfram Sang wrote: > > Bump... > > > > > Yes, this is a bug in the rcar-vin driver which is addressed in the Gen3 > > > patches. However I'm not sure those patches will make it to v4.10, not > >

Re: [PATCH v3 2/3] drm: Connect live source to framebuffers

2017-01-31 Thread Brian Starkey
On Thu, Jan 26, 2017 at 12:36:55AM +0300, Sergei Shtylyov wrote: From: Laurent Pinchart Introduce a new live source flag for framebuffers. When a framebuffer is created with that flag set, a live source is associated with the framebuffer instead of

[PATCH] PCI: rcar: Check for OF device match early

2017-01-31 Thread Bjorn Helgaas
A match in the rcar_pcie_of_match[] table is required, so check that first, before we start setting up things that need to be undone if it fails. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-rcar.c | 10 +- 1 file changed,

RE: [RFC 2/5] pinctrl: rz-pfc: Add Renesas RZ/A1 pinctrl driver

2017-01-31 Thread Chris Brandt
Hi Laurent, On Tuesday, January 31, 2017, Laurent Pinchart wrote: > On Monday 30 Jan 2017 19:19:18 Chris Brandt wrote: > > On Wednesday, January 25, 2017, Jacopo Mondi wrote: > > > + /* Port 5 */ > > > + RZ_PIN_NAME(5, 0), RZ_PIN_NAME(5, 1), RZ_PIN_NAME(5, 2), > > > + RZ_PIN_NAME(5, 3),

RE: [RFC 4/5] arm: dts: r7s1000: Add pincontroller node

2017-01-31 Thread Chris Brandt
Hi Laurent (and Jacopo) On Tuesday, January 31, 2017, Laurent Pinchart wrote: > On Monday 30 Jan 2017 19:39:33 Chris Brandt wrote: > > On Monday, January 30, 2017, Laurent Pinchart wrote: > > >> +pinctrl: pinctrl@fcfe3000 { > > >> +compatible = "renesas,rza1-pinctrl"; > >

RE: [RFC 3/5] arm: dts: dt-bindings: Add Renesas RZ pinctrl header

2017-01-31 Thread Chris Brandt
On Tuesday, January 31, 2017, Geert Uytterhoeven wrote: > > This may become something like: > > > > #define ALT_FUNC_1 0 > > #define ALT_FUNC_2 1 > > #define ALT_FUNC_3 2 > > #define ALT_FUNC_4 3 > > #define ALT_FUNC_5 4 > > #define ALT_FUNC_6 5 > > #define

RE: [RFC 1/5] pinctrl: rz-pfc: Add Renesas RZ pinctrl core module

2017-01-31 Thread Chris Brandt
Hi Jacopo, On Tuesday, January 31, 2017, Jacopo Mondi wrote: > > Since one of the benefits of using devm_kzalloc is that if the probe > > fails and returns an error, all the memory associated with that device > > will automatically get freed, you 'might' not need this code to free > > memory. >

Re: [PATCHv2] v4l: of: check for unique lanes in data-lanes and clock-lanes

2017-01-31 Thread Sakari Ailus
On Tue, Jan 31, 2017 at 01:08:31PM +0100, Niklas Söderlund wrote: > All lanes in data-lanes and clock-lanes properties should be unique. Add > a check for this in v4l2_of_parse_csi_bus() and print a warning if > duplicated lanes are found. > > Signed-off-by: Niklas Söderlund

[PATCHv2] v4l: of: check for unique lanes in data-lanes and clock-lanes

2017-01-31 Thread Niklas Söderlund
All lanes in data-lanes and clock-lanes properties should be unique. Add a check for this in v4l2_of_parse_csi_bus() and print a warning if duplicated lanes are found. Signed-off-by: Niklas Söderlund --- Changes since v1: - Do not return -EINVAL if a

[PATCH v2] iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space

2017-01-31 Thread Geert Uytterhoeven
Currently, the IPMMU/VMSA driver supports 32-bit I/O Virtual Addresses only, and thus sets io_pgtable_cfg.ias = 32. However, it doesn't force a 32-bit IOVA space through the IOMMU Domain Geometry. Hence if a device (e.g. SYS-DMAC) rightfully configures a 40-bit DMA mask, it will still be handed

[PATCH v3] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-01-31 Thread Geert Uytterhoeven
Add support for allocating physically contiguous DMA buffers on arm64 systems with an IOMMU. This can be useful when two or more devices with different memory requirements are involved in buffer sharing. Note that as this uses the CMA allocator, setting the DMA_ATTR_FORCE_CONTIGUOUS attribute

Re: [RFC 2/5] pinctrl: rz-pfc: Add Renesas RZ/A1 pinctrl driver

2017-01-31 Thread Laurent Pinchart
Hi Chris, On Monday 30 Jan 2017 19:19:18 Chris Brandt wrote: > On Wednesday, January 25, 2017, Jacopo Mondi wrote: > > + /* Port 5 */ > > + RZ_PIN_NAME(5, 0), RZ_PIN_NAME(5, 1), RZ_PIN_NAME(5, 2), > > + RZ_PIN_NAME(5, 3), RZ_PIN_NAME(5, 4), RZ_PIN_NAME(5, 5), > > + RZ_PIN_NAME(5, 6),

Re: [RFC 4/5] arm: dts: r7s1000: Add pincontroller node

2017-01-31 Thread Geert Uytterhoeven
Hi Jacopo, On Tue, Jan 31, 2017 at 11:24 AM, jacopo mondi wrote: > On 26/01/2017 20:54, Geert Uytterhoeven wrote: >> On Wed, Jan 25, 2017 at 7:09 PM, Jacopo Mondi >> wrote: >>> >>> Add pincontroller node compatible with the new Renesas RZ/A1 >>>

Re: [RFC 4/5] arm: dts: r7s1000: Add pincontroller node

2017-01-31 Thread Laurent Pinchart
Hi Chris, On Monday 30 Jan 2017 19:39:33 Chris Brandt wrote: > On Monday, January 30, 2017, Laurent Pinchart wrote: > >> + pinctrl: pinctrl@fcfe3000 { > >> + compatible = "renesas,rza1-pinctrl"; > >> + #address-cells = <1>; > >> + #size-cells = <0>; > >> + > >> +

Re: [RFC 4/5] arm: dts: r7s1000: Add pincontroller node

2017-01-31 Thread jacopo mondi
Hi Geert, On 26/01/2017 20:54, Geert Uytterhoeven wrote: Hi Jacopo, On Wed, Jan 25, 2017 at 7:09 PM, Jacopo Mondi wrote: Add pincontroller node compatible with the new Renesas RZ/A1 pincontroller driver. Signed-off-by: Jacopo Mondi ---

Re: [PATCH v2 1/2] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-31 Thread Geert Uytterhoeven
Hi Robin, On Fri, Jan 27, 2017 at 6:50 PM, Robin Murphy wrote: > On 27/01/17 15:34, Geert Uytterhoeven wrote: >> Add helpers for allocating physically contiguous DMA buffers to the >> generic IOMMU DMA code. This can be useful when two or more devices >> with different

Re: [RFC 3/5] arm: dts: dt-bindings: Add Renesas RZ pinctrl header

2017-01-31 Thread Geert Uytterhoeven
Hi Jacopo, On Tue, Jan 31, 2017 at 10:12 AM, jacopo mondi wrote: > On 30/01/2017 19:30, Laurent Pinchart wrote: >> On Thursday 26 Jan 2017 20:52:33 Geert Uytterhoeven wrote: >>> On Wed, Jan 25, 2017 at 7:09 PM, Jacopo Mondi wrote: Add dt-bindings header for Renesas RZ

Re: [RFC 3/5] arm: dts: dt-bindings: Add Renesas RZ pinctrl header

2017-01-31 Thread jacopo mondi
Hi Geert, Laurent, On 30/01/2017 19:30, Laurent Pinchart wrote: On Thursday 26 Jan 2017 20:52:33 Geert Uytterhoeven wrote: On Wed, Jan 25, 2017 at 7:09 PM, Jacopo Mondi wrote: Add dt-bindings header for Renesas RZ pincontroller. The header defines macros for pin description and alternate

Re: [RFC 1/5] pinctrl: rz-pfc: Add Renesas RZ pinctrl core module

2017-01-31 Thread jacopo mondi
Hi Chris, On 30/01/2017 20:19, Chris Brandt wrote: Hi Jacopo, On Wednesday, January 25, 2017, Jacopo Mondi wrote: + + return 0; + +free_map: + devm_kfree(rz_pinctrl->dev, *map); +free_fngrps: + devm_kfree(rz_pinctrl->dev, fngrps); +free_pins: +