Re: [PATCH 0/2] of: overlay: Crash fix and improvement

2017-12-08 Thread Frank Rowand
On 12/08/17 05:13, Geert Uytterhoeven wrote: > Hi Pantelis, Rob, Frank, > > This patch series fixes memory corruption when applying overlays. > > I first noticed this when using OF configfs. After lots of failed > debugging attempts, I bisected it to "of: overlay: add per overlay sysfs >

Re: [PATCH/RFC 5/5] ARM: shmobile: defconfig: Disable CONFIG_EMBEDDED

2017-12-08 Thread Rob Landley
On 12/05/2017 02:28 AM, Simon Horman wrote: > On Mon, Dec 04, 2017 at 10:46:22AM +0100, Geert Uytterhoeven wrote: >> Hi Simon, >> >> On Fri, Dec 1, 2017 at 9:33 AM, Simon Horman wrote: >>> On Thu, Nov 30, 2017 at 02:12:02PM +0100, Geert Uytterhoeven wrote: CONFIG_EXPERT

[renesas-drivers:topic/renesas-overlays 8/91] drivers//of/configfs.c:48:2: error: implicit declaration of function 'of_fdt_unflatten_tree'; did you mean 'of_pdt_build_devicetree'?

2017-12-08 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git topic/renesas-overlays head: 775b0f62546cf5d5791c43d3ee5239f5394014fb commit: cd57c0972233bd19244b37aeb075adb26ff6d4df [8/91] OF: DT-Overlay configfs interface (v7) config: sparc64-allmodconfig (attached as

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:39 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:36 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:35 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Hans, On Friday, 8 December 2017 12:24:26 EET Hans Verkuil wrote: > Hi Laurent, > > >> +static const struct v4l2_ioctl_ops rvin_mc_ioctl_ops = { > >> + .vidioc_querycap= rvin_querycap, > >> + .vidioc_try_fmt_vid_cap = rvin_mc_try_fmt_vid_cap, > >> +

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, On Friday, 8 December 2017 16:06:58 EET Niklas Söderlund wrote: > On 2017-12-08 11:35:18 +0200, Laurent Pinchart wrote: > > On Friday, 8 December 2017 03:08:27 EET Niklas Söderlund wrote: > >> There was never proper support in the VIN driver to deliver ALTERNATING > >> field format to

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, On Friday, 8 December 2017 16:14:23 EET Niklas Söderlund wrote: > On 2017-12-08 11:04:26 +0200, Laurent Pinchart wrote: > > On Friday, 8 December 2017 03:08:25 EET Niklas Söderlund wrote: > >> It is possible on Gen2 to change the registers controlling composing and > >> scaling while

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, On Friday, 8 December 2017 15:09:21 EET Niklas Söderlund wrote: > On 2017-12-08 09:54:31 +0200, Laurent Pinchart wrote: > > On Friday, 8 December 2017 03:08:17 EET Niklas Söderlund wrote: > >> If the video device was registered by the complete() callback it should > >> be unregistered

Re: [PATCH v4.1] phylib: Add device reset GPIO support

2017-12-08 Thread Sergei Shtylyov
Hello! On 12/08/2017 12:53 PM, Geert Uytterhoeven wrote: On 12/04/2017 03:35 PM, Geert Uytterhoeven wrote: From: Sergei Shtylyov The PHY devices sometimes do have their reset signal (maybe even power supply?) tied to some GPIO and sometimes it also does

Re: [PATCH 1/2] net: sh_eth: add support for SH7786

2017-12-08 Thread Thomas Petazzoni
Hello, On Tue, 5 Dec 2017 22:49:10 +0300, Sergei Shtylyov wrote: > This commit adds the sh_eth_cpu_data structure that describes the > SH7786 variant of the IP. > >>> > >>> The manual seems to be unavailable, so I have to trust you. :-) > >> > >> Yes, sadly. However, if you

Re: [PATCH v2] net: sh_eth: do not advertise Gigabit capabilities when not available

2017-12-08 Thread Thomas Petazzoni
Hello, On Tue, 5 Dec 2017 22:02:20 +0300, Sergei Shtylyov wrote: > > + /* mask with MAC supported features */ > > + if (mdp->cd->register_type != SH_ETH_REG_GIGABIT) { > > + err = phy_set_max_speed(phydev, SPEED_100); > > + if (err) { > > +

[PATCH v3] net: sh_eth: do not advertise Gigabit capabilities when not available

2017-12-08 Thread Thomas Petazzoni
Not all variants of the sh_eth hardware have Gigabit support. Unfortunately, the current driver doesn't tell the PHY about the limited MAC capabilities. Due to this, if you have a Gigabit capable PHY, the PHY will advertise its Gigabit capability and establish a link at 1Gbit/s, even though the

Re: [PATCH 0/2] of: overlay: Crash fix and improvement

2017-12-08 Thread Geert Uytterhoeven
Hi Rob, On Fri, Dec 8, 2017 at 4:11 PM, Rob Herring wrote: > On Fri, Dec 08, 2017 at 02:13:01PM +0100, Geert Uytterhoeven wrote: >> This patch series fixes memory corruption when applying overlays. >> >> I first noticed this when using OF configfs. After lots of failed >>

Re: [PATCH 0/2] of: overlay: Crash fix and improvement

2017-12-08 Thread Rob Herring
On Fri, Dec 08, 2017 at 02:13:01PM +0100, Geert Uytterhoeven wrote: > Hi Pantelis, Rob, Frank, > > This patch series fixes memory corruption when applying overlays. > > I first noticed this when using OF configfs. After lots of failed > debugging attempts, I bisected it to "of: overlay:

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

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

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

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

Re: NFS crash, hashed pointers in backtrace

2017-12-08 Thread Geert Uytterhoeven
On Wed, Dec 6, 2017 at 5:19 PM, Geert Uytterhoeven wrote: > On Wed, Dec 6, 2017 at 5:10 PM, Trond Myklebust > wrote: >> On Wed, 2017-12-06 at 15:31 +0100, Geert Uytterhoeven wrote: >>> On Tue, Dec 5, 2017 at 5:02 PM, Geert Uytterhoeven

[PATCH 1/2] of: overlay: Fix out-of-bounds write in init_overlay_changeset()

2017-12-08 Thread Geert Uytterhoeven
If an overlay has no "__symbols__" node, but it has nodes without "__overlay__" subnodes at the end (e.g. a "__fixups__" node), after filling in all fragments for nodes with "__overlay__" subnodes, "fragment = [cnt]" will point beyond the end of the allocated array. Hence writing to

[PATCH 0/2] of: overlay: Crash fix and improvement

2017-12-08 Thread Geert Uytterhoeven
Hi Pantelis, Rob, Frank, This patch series fixes memory corruption when applying overlays. I first noticed this when using OF configfs. After lots of failed debugging attempts, I bisected it to "of: overlay: add per overlay sysfs attributes", which is not upstream. But that was a red

[PATCH 2/2] of: overlay: Make node skipping in init_overlay_changeset() clearer

2017-12-08 Thread Geert Uytterhoeven
Make it more clear that nodes without "__overlay__" subnodes are skipped, by reverting the logic and using continue. This also reduces indentation level. Signed-off-by: Geert Uytterhoeven --- This applies to Rob's for-next branch only. --- drivers/of/overlay.c | 21

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

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

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

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

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

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

Re: [PATCH 2/2] PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures

2017-12-08 Thread Lorenzo Pieralisi
On Thu, Dec 07, 2017 at 11:15:20AM +0100, Geert Uytterhoeven wrote: > rcar_pcie_parse_request_of_pci_ranges() can fail and return an error > code, but this is not checked nor handled. > > Fix this by adding the missing error handling. > > Fixes: 5d2917d469faab72 ("PCI: rcar: Convert to DT

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

2017-12-08 Thread Hans Verkuil
Hi Laurent, >> +static const struct v4l2_ioctl_ops rvin_mc_ioctl_ops = { >> +.vidioc_querycap= rvin_querycap, >> +.vidioc_try_fmt_vid_cap = rvin_mc_try_fmt_vid_cap, >> +.vidioc_g_fmt_vid_cap = rvin_g_fmt_vid_cap, >> +.vidioc_s_fmt_vid_cap

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:41 EET Niklas Söderlund wrote: > Add the SoC specific information for Renesas r8a7796. > > Signed-off-by: Niklas Söderlund > Reviewed-by: Hans Verkuil >

Re: [PATCH 1/2] PCI: rcar: Fix use-after-free in probe error path

2017-12-08 Thread Lorenzo Pieralisi
On Thu, Dec 07, 2017 at 11:15:19AM +0100, Geert Uytterhoeven wrote: > If CONFIG_DEBUG_SLAB=y, and no PCIe card is inserted, the kernel crashes > during probe on r8a7791/koelsch: > > rcar-pcie fe00.pcie: PCIe link down > Unable to handle kernel paging request at virtual address

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:40 EET Niklas Söderlund wrote: > Add the SoC specific information for Renesas r8a7795 ES1.x and ES2.0. > > Signed-off-by: Niklas Söderlund > Reviewed-by: Hans Verkuil

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:34 EET Niklas Söderlund wrote: > When running in media controller mode a media pad is needed, register > one. Also set the media bus format to CSI-2. This sounds a bit unclear to me. We don't need a pad for the sake of it,

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:33 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:32 EET Niklas Söderlund wrote: > 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.

Re: [PATCH v4.1] phylib: Add device reset GPIO support

2017-12-08 Thread Geert Uytterhoeven
Hi Sergei, On Thu, Dec 7, 2017 at 6:20 PM, Sergei Shtylyov wrote: > On 12/04/2017 03:35 PM, Geert Uytterhoeven wrote: >> From: Sergei Shtylyov >> The PHY devices sometimes do have their reset signal (maybe even power >>

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:31 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:30 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:29 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:28 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:27 EET Niklas Söderlund wrote: > There was never proper support in the VIN driver to deliver ALTERNATING > field format to user-space, remove this field option. For sources using > this field format instead use the VIN hardware

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:26 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:25 EET Niklas Söderlund wrote: > It is possible on Gen2 to change the registers controlling 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

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

2017-12-08 Thread Laurent Pinchart
Hi Hans, On Friday, 8 December 2017 10:46:34 EET Hans Verkuil wrote: > On 12/08/2017 08:54 AM, Laurent Pinchart wrote: > > On Friday, 8 December 2017 03:08:17 EET Niklas Söderlund wrote: > >> If the video device was registered by the complete() callback it should > >> be unregistered when the

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

2017-12-08 Thread Hans Verkuil
On 12/08/2017 08:54 AM, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Friday, 8 December 2017 03:08:17 EET Niklas Söderlund wrote: >> If the video device was registered by the complete() callback it should >> be unregistered when the driver is removed. > > The

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:23 EET Niklas Söderlund wrote: > The logic to preserve the requested format width and height are too > complex and come from a premature optimization for Gen3. All Gen2 SoC > can scale and the Gen3 implementation will not use

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:22 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, (CC'ing Sakari) Thank you for the patch. On Friday, 8 December 2017 03:08:21 EET Niklas Söderlund wrote: > The rcar-vin driver needs to be part of a media controller to support > Gen3. Give each VIN instance a unique name so it can be referenced from > userspace. > > Signed-off-by:

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:20 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:19 EET Niklas Söderlund wrote: > 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

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

2017-12-08 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Friday, 8 December 2017 03:08:18 EET Niklas Söderlund wrote: > 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