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

2017-11-10 Thread Laurent Pinchart
Hi Niklas, On Saturday, 11 November 2017 02:11:13 EET Niklas Söderlund wrote: > On 2017-11-11 00:32:27 +0200, Sakari Ailus wrote: > > On Fri, Nov 10, 2017 at 02:31:37PM +0100, Niklas Söderlund wrote: > >> A V4L2 driver for Renesas R-Car MIPI CSI-2 receiver. The driver > >> supports the rcar-vin

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

2017-11-10 Thread Laurent Pinchart
Hi Sakari, On Saturday, 11 November 2017 00:32:27 EET Sakari Ailus wrote: > On Fri, Nov 10, 2017 at 02:31:37PM +0100, 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 SoCs where separate CSI-2 > > hardware

cron job: media_tree daily build: ERRORS

2017-11-10 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Sat Nov 11 05:00:16 CET 2017 media-tree git hash:eb0c19942288569e0ae492476534d5a485fb8ab4 media_build

RE: [PATCH v4 04/12] intel-ipu3: Add user space ABI definitions

2017-11-10 Thread Mani, Rajmohan
Hi Sakari, > -Original Message- > From: Sakari Ailus [mailto:sakari.ai...@iki.fi] > Sent: Friday, October 20, 2017 2:30 AM > To: Zhi, Yong > Cc: linux-media@vger.kernel.org; sakari.ai...@linux.intel.com; Zheng, Jian Xu > ; Mani, Rajmohan

[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

[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

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

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

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

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

[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:

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

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

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

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

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

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

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

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

[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

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

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

[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

[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

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

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

[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 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

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

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

[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 ---

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

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

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

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

[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 |

[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

[PATCH v7 00/25] rcar-vin: Add Gen3 with media controller

2017-11-10 Thread Niklas Söderlund
Hi, This series adds Gen3 VIN support to rcar-vin driver for Renesas r8a7795 and r8a7796. It is based on the media-tree. The driver is tested on both Renesas H3 (r8a7795, ES2.0) and M3-W (r8a7796) together with the rcar-csi2 driver (posted separately and not yet upstream) and the Salvator-X

[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

[PATCH v7 22/25] rcar-vin: add link notify for Gen3

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

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

2017-11-10 Thread Niklas Söderlund
The driver registers the video device from the async complete callback and unregistered in the async unbind callback. This creates problems if if the subdevice is bound, unbound and later rebound. The second time video_register_device() is called it fails: kobject (eb3be918): tried to init an

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

2017-11-10 Thread Niklas Söderlund
Hi, This is the latest incarnation of R-Car MIPI CSI-2 receiver driver. It's based on top of the media-tree and are tested on Renesas Salvator-X together with the out-of-tree patches for rcar-vin to add support for Gen3 VIN. If anyone is interested to test video grabbing using these out of tree

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

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

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

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

Re: [PATCH v6 6/9] i2c: smbus: use DMA safe buffers for emulated SMBus transactions

2017-11-10 Thread Jonathan Cameron
On Sat, 4 Nov 2017 21:20:06 +0100 Wolfram Sang wrote: > For all block commands, try to allocate a DMA safe buffer and mark it > accordingly. Only use the stack, if the buffers cannot be allocated. > > Signed-off-by: Wolfram Sang

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 V4L2 driver for Renesas

Re: [PATCH v6 5/9] i2c: add i2c_master_{send|recv}_dmasafe

2017-11-10 Thread Jonathan Cameron
On Sat, 4 Nov 2017 21:20:05 +0100 Wolfram Sang wrote: > Use the new helper to create variants of i2c_master_{send|recv} which > mark their buffers as DMA safe. > > Signed-off-by: Wolfram Sang Can't really argue with such a

Re: [PATCH v6 4/9] i2c: refactor i2c_master_{send_recv}

2017-11-10 Thread Jonathan Cameron
On Sat, 4 Nov 2017 21:20:04 +0100 Wolfram Sang wrote: > Those two functions are very similar, the only differences are that one > needs the I2C_M_RD flag for its message while the other one needs the > buffer casted to drop the const. Introduce a generic helper

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 video sources (CSI-2

RE: [PATCH v4 10/12] intel-ipu3: css pipeline

2017-11-10 Thread Zhi, Yong
Hi, Sakari, Thanks for the review. > -Original Message- > From: linux-media-ow...@vger.kernel.org [mailto:linux-media- > ow...@vger.kernel.org] On Behalf Of Sakari Ailus > Sent: Wednesday, November 1, 2017 11:57 AM > To: Zhi, Yong > Cc: linux-media@vger.kernel.org;

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

2017-11-10 Thread Sakari Ailus
Hej Niklas, Tack för uppdaterade lappar! Jag har några kommentar nedan... det ser bra ut överallt. On Fri, Nov 10, 2017 at 02:31:37PM +0100, 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 SoCs where separate

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

2017-11-10 Thread Sakari Ailus
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 video sources (CSI-2 transmitters) and the video > grabbers (VIN) on Gen3 of Renesas R-Car SoC. > > Each CSI-2 device is

Re: 'LITE-ON USB2.0 DVB-T Tune' driver crash with kernel 4.13 / ubuntu 17.10

2017-11-10 Thread Laurent Caumont
Hi Mauro, I could send you a patch but my git doesn't see the modification I made, so it's unable to generate a patch. I don't know if it's a git issue on ubunu 17.10 or if it's the way the repository was created. Laurent 2017-11-07 11:42 GMT+01:00 Mauro Carvalho Chehab

Re: [PATCH v8 3/4] intel-ipu3: cio2: add new MIPI-CSI2 driver

2017-11-10 Thread Sakari Ailus
Hi Yong, On Thu, Nov 09, 2017 at 02:25:26PM -0800, Yong Zhi wrote: > Hi, Sakari, > > Fixed warnings about memset of pointer array and unsigned int used for 0 > comparison > reported by static code analysis tool, please squash this to the driver, > thanks!! Done, thanks! I've pushed the

Re: [PATCH] au0828: fix use-after-free at USB probing

2017-11-10 Thread Gustavo A. R. Silva
Quoting Andrey Konovalov : On Fri, Nov 10, 2017 at 1:21 AM, Gustavo A. R. Silva wrote: Hi Andrey, Could you please try this patch? Thank you Hi Gustavo, With your patch I get a different crash. Not sure if it's another bug or the same one

[PATCH] [media] vivid: print time in y2038-safe way

2017-11-10 Thread Arnd Bergmann
time_to_tm() takes a time_t value that overflows in 2038 on 32-bit systems. time64_to_tm() doesn't have this problem, so let's use that in combination with ktime_get_real_seconds() to read a 64-bit time value. Signed-off-by: Arnd Bergmann ---

[PATCH] [media] pulse8-cec: print time using time64_t.

2017-11-10 Thread Arnd Bergmann
The firmware timestamp is an unsigned 32-bit value, but we copy it into a signed 32-bit variable, so we can theoretically get an overflow in the calculation when the timestamp is between 2038 and 2106. This changes the temporary variable to time64_t and changes the deprecated time_to_tm() over to

[PATCH 1/2] sdlcam: fix linking

2017-11-10 Thread Rafaël Carré
--- contrib/test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am index 6a4303d7..0188fe21 100644 --- a/contrib/test/Makefile.am +++ b/contrib/test/Makefile.am @@ -37,7 +37,7 @@ v4l2gl_LDADD =

[PATCH 2/2] sdlcam: ignore binary

2017-11-10 Thread Rafaël Carré
--- contrib/test/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/test/.gitignore b/contrib/test/.gitignore index ad64325b..5bd81d01 100644 --- a/contrib/test/.gitignore +++ b/contrib/test/.gitignore @@ -8,3 +8,4 @@ stress-buffer v4l2gl v4l2grab mc_nextgen_test +sdlcam --

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

2017-11-10 Thread Niklas Söderlund
Hi, This is the latest incarnation of R-Car MIPI CSI-2 receiver driver. It's based on top of the media-tree and are tested on Renesas Salvator-X together with the out-of-tree patches for rcar-vin to add support for Gen3 VIN. If anyone is interested to test video grabbing using these out of tree

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

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

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

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

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

Re: [RFC v4 13/17] [media] vb2: add in-fence support to QBUF

2017-11-10 Thread Gustavo Padovan
2017-10-25 Brian Starkey : > Hi Gustavo, > > On Fri, Oct 20, 2017 at 07:50:08PM -0200, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Receive in-fence from userspace and add support for waiting on them > > before queueing the

Re: [PATCH] au0828: fix use-after-free at USB probing

2017-11-10 Thread Andrey Konovalov
On Fri, Nov 10, 2017 at 1:21 AM, Gustavo A. R. Silva wrote: > Hi Andrey, > > Could you please try this patch? > > Thank you Hi Gustavo, With your patch I get a different crash. Not sure if it's another bug or the same one manifesting differently. au0828:

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

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

2017-11-10 Thread Geert Uytterhoeven
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 SoCs where separate CSI-2 > hardware blocks are connected between the video

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

2017-11-10 Thread Geert Uytterhoeven
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 the video sources (CSI-2 transmitters) and the video > grabbers (VIN) on Gen3 of Renesas