[PATCH v5 34/39] media: imx: csi: add __csi_get_fmt

2017-03-09 Thread Steve Longerbeam
Add __csi_get_fmt() and use it to return the correct mbus format (active or try) in get_fmt. Use it in other places as well. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Suggested-by: Russell King <li...@armlinux.org.uk> --- drivers/staging/media/imx/imx-medi

[PATCH v5 39/39] media: imx: propagate sink pad formats to source pads

2017-03-09 Thread Steve Longerbeam
propagation in this case was easy, just have only a single format shared by both pads. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-ic-prp.c| 31 +++--- drivers/staging/media/imx/imx-ic-prpencvf.c | 86 ++- drivers/staging/med

[PATCH v5 36/39] media: imx: redo pixel format enumeration and negotiation

2017-03-09 Thread Steve Longerbeam
(u32 *code, u32 index, enum codespace_sel cs_sel); The tables have been split into separate tables for YUV and RGB formats to support the implementation of the above. The subdev's .enum_mbus_code() and .set_fmt() operations have been rewritten using the above APIs. Signed-off-by: Steve Longerbeam

[PATCH v5 38/39] media: imx: csi: fix crop rectangle reset in sink set_fmt

2017-03-09 Thread Steve Longerbeam
From: Philipp Zabel <p.za...@pengutronix.de> The csi_try_crop call in set_fmt should compare the cropping rectangle to the currently set input format, not to the previous input format. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Steve Longerbeam &l

[PATCH v5 37/39] media: imx: csi: add frame skipping support

2017-03-09 Thread Steve Longerbeam
From: Philipp Zabel <p.za...@pengutronix.de> The CSI can skip any out of up to 6 input frames, allowing to reduce the frame rate at the output pads by small fractions. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.co

[PATCH v5 27/39] media: imx: Add IC subdev drivers

2017-03-09 Thread Steve Longerbeam
directly from the CSI or from the VDIC. Scaled output is limited to 1024x1024 resolution. Output frames are routed to the capture device. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/Makefile |2 + drivers/staging/media/imx/

[PATCH v5 10/39] ARM: dts: imx6-sabreauto: create i2cmux for i2c3

2017-03-09 Thread Steve Longerbeam
) are thus moved into i2cmux. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 65 +--- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/ar

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-09 Thread Steve Longerbeam
On 03/05/2017 02:41 PM, Russell King - ARM Linux wrote: On Sat, Mar 04, 2017 at 04:37:43PM -0800, Steve Longerbeam wrote: On 03/04/2017 02:56 AM, Sakari Ailus wrote: That's a bit of a special situation --- still there are alike conditions on existing hardware. You should return the buffers

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-04 Thread Steve Longerbeam
On 03/04/2017 02:56 AM, Sakari Ailus wrote: Hi Steve, On Fri, Mar 03, 2017 at 02:43:51PM -0800, Steve Longerbeam wrote: On 03/03/2017 03:45 AM, Sakari Ailus wrote: On Thu, Mar 02, 2017 at 03:07:21PM -0800, Steve Longerbeam wrote: On 03/02/2017 07:53 AM, Sakari Ailus wrote: Hi Steve

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-03 Thread Steve Longerbeam
On 03/03/2017 03:06 PM, Russell King - ARM Linux wrote: On Thu, Mar 02, 2017 at 06:02:57PM +0200, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-03 Thread Steve Longerbeam
On 03/03/2017 03:45 AM, Sakari Ailus wrote: On Thu, Mar 02, 2017 at 03:07:21PM -0800, Steve Longerbeam wrote: On 03/02/2017 07:53 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:15PM -0800, Steve Longerbeam wrote: Add a new FRAME_TIMEOUT event to signal that a video

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-03 Thread Steve Longerbeam
On 03/03/2017 11:17 AM, Sakari Ailus wrote: Hi Steve, On Thu, Mar 02, 2017 at 06:12:43PM -0800, Steve Longerbeam wrote: On 03/02/2017 03:48 PM, Steve Longerbeam wrote: On 03/02/2017 08:02 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 08:02 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities in a pipeline to a given video device. Signed-off-by: Steve Longerbeam <steve_long

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 03:48 PM, Steve Longerbeam wrote: On 03/02/2017 08:02 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities in a pipeline to a given video

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 03:48 PM, Steve Longerbeam wrote: On 03/02/2017 08:02 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities in a pipeline to a given video

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 07:53 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:15PM -0800, Steve Longerbeam wrote: Add a new FRAME_TIMEOUT event to signal that a video capture or output device has timed out waiting for reception or transmit completion of a video frame. Signed-off

Re: [PATCH v4 15/36] platform: add video-multiplexer subdevice driver

2017-02-28 Thread Steve Longerbeam
On 02/27/2017 06:41 AM, Rob Herring wrote: On Wed, Feb 15, 2017 at 06:19:17PM -0800, Steve Longerbeam wrote: From: Philipp Zabel <p.za...@pengutronix.de> This driver can handle SoC internal and external video bus multiplexers, controlled either by register bit fields or by

Re: [PATCH v4 24/36] [media] add Omnivision OV5640 sensor driver

2017-02-28 Thread Steve Longerbeam
On 02/27/2017 06:45 AM, Rob Herring wrote: On Wed, Feb 15, 2017 at 06:19:26PM -0800, Steve Longerbeam wrote: This driver is based on ov5640_mipi.c from Freescale imx_3.10.17_1.0.0_beta branch, modified heavily to bring forward to latest interfaces and code cleanup. Signed-off-by: Steve

Re: [PATCH v4 01/36] [media] dt-bindings: Add bindings for i.MX media driver

2017-02-28 Thread Steve Longerbeam
Hi Rob, On 02/27/2017 06:38 AM, Rob Herring wrote: On Wed, Feb 15, 2017 at 06:19:03PM -0800, Steve Longerbeam wrote: Add bindings documentation for the i.MX media driver. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Documentation/devicetree/bindings/media/imx.tx

Re: [PATCH v4 33/36] media: imx: redo pixel format enumeration and negotiation

2017-02-23 Thread Steve Longerbeam
On 02/23/2017 01:10 AM, Philipp Zabel wrote: Hi Steve, On Wed, 2017-02-22 at 15:52 -0800, Steve Longerbeam wrote: Hi Philipp, On 02/16/2017 03:32 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: The previous API and negotiation of mbus codes and pixel

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-22 Thread Steve Longerbeam
On 02/22/2017 04:06 PM, Steve Longerbeam wrote: On 02/17/2017 03:06 AM, Russell King - ARM Linux wrote: On Fri, Feb 17, 2017 at 11:47:59AM +0100, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: +static void csi2_dphy_init(struct csi2_dev *csi2

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-22 Thread Steve Longerbeam
On 02/17/2017 03:06 AM, Russell King - ARM Linux wrote: On Fri, Feb 17, 2017 at 11:47:59AM +0100, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: +static void csi2_dphy_init(struct csi2_dev *csi2) +{ + /* +* FIXME: 0x14 is derived from a fixed D

Re: [PATCH v4 17/36] media: Add userspace header file for i.MX

2017-02-22 Thread Steve Longerbeam
On 02/16/2017 03:33 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: +/* + * events from the subdevs + */ +#define V4L2_EVENT_IMX_CLASS V4L2_EVENT_PRIVATE_START +#define V4L2_EVENT_IMX_NFB4EOF(V4L2_EVENT_IMX_CLASS + 1) +#define

Re: [PATCH v4 33/36] media: imx: redo pixel format enumeration and negotiation

2017-02-22 Thread Steve Longerbeam
Hi Philipp, On 02/16/2017 03:32 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: The previous API and negotiation of mbus codes and pixel formats was broken, and has been completely redone. The negotiation of media bus codes should be as follows: CSI

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-22 Thread Steve Longerbeam
On 02/22/2017 03:38 PM, Steve Longerbeam wrote: On 02/17/2017 03:38 AM, Philipp Zabel wrote: On Fri, 2017-02-17 at 11:06 +, Russell King - ARM Linux wrote: On Fri, Feb 17, 2017 at 11:47:59AM +0100, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-22 Thread Steve Longerbeam
On 02/17/2017 03:38 AM, Philipp Zabel wrote: On Fri, 2017-02-17 at 11:06 +, Russell King - ARM Linux wrote: On Fri, Feb 17, 2017 at 11:47:59AM +0100, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: +static void csi2_dphy_init(struct csi2_dev *csi2

Re: [PATCH v4 12/36] add mux and video interface bridge entity functions

2017-02-22 Thread Steve Longerbeam
On 02/19/2017 01:28 PM, Pavel Machek wrote: On Wed 2017-02-15 18:19:14, Steve Longerbeam wrote: From: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> - renamed MEDIA_ENT_F_MUX to MEDIA_ENT_F_VID_MUX Signed-off-by: Steve Longerbeam &l

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-21 Thread Steve Longerbeam
On 02/21/2017 02:21 PM, Steve Longerbeam wrote: On 02/21/2017 04:15 AM, Sakari Ailus wrote: Hi Steve, On Mon, Feb 20, 2017 at 02:56:15PM -0800, Steve Longerbeam wrote: On 02/20/2017 02:04 PM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:31PM -0800, Steve Longerbeam

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-21 Thread Steve Longerbeam
On 02/21/2017 04:15 AM, Sakari Ailus wrote: Hi Steve, On Mon, Feb 20, 2017 at 02:56:15PM -0800, Steve Longerbeam wrote: On 02/20/2017 02:04 PM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:31PM -0800, Steve Longerbeam wrote: From: Russell King <rmk+ker...@armlinux.org

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-20 Thread Steve Longerbeam
On 02/20/2017 04:13 PM, Russell King - ARM Linux wrote: On Tue, Feb 21, 2017 at 12:04:10AM +0200, Sakari Ailus wrote: On Wed, Feb 15, 2017 at 06:19:31PM -0800, Steve Longerbeam wrote: From: Russell King <rmk+ker...@armlinux.org.uk> Setting and getting frame rates is part of the negot

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-20 Thread Steve Longerbeam
On 02/20/2017 02:56 PM, Steve Longerbeam wrote: On 02/20/2017 02:04 PM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:31PM -0800, Steve Longerbeam wrote: From: Russell King <rmk+ker...@armlinux.org.uk> Setting and getting frame rates is part of the negotiation mec

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-20 Thread Steve Longerbeam
On 02/20/2017 02:04 PM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:31PM -0800, Steve Longerbeam wrote: From: Russell King <rmk+ker...@armlinux.org.uk> Setting and getting frame rates is part of the negotiation mechanism between subdevs. The lack of support

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-18 Thread Steve Longerbeam
On 02/16/2017 02:57 PM, Russell King - ARM Linux wrote: On Thu, Feb 16, 2017 at 02:27:41PM -0800, Steve Longerbeam wrote: On 02/16/2017 02:20 PM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: In version 4: With this version, I get

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-17 Thread Steve Longerbeam
On 02/15/2017 06:19 PM, Steve Longerbeam wrote: From: Russell King <rmk+ker...@armlinux.org.uk> Setting and getting frame rates is part of the negotiation mechanism between subdevs. The lack of support means that a frame rate at the sensor can't be negotiated through the subdev path

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-17 Thread Steve Longerbeam
On 02/15/2017 06:19 PM, Steve Longerbeam wrote: From: Russell King <rmk+ker...@armlinux.org.uk> Setting and getting frame rates is part of the negotiation mechanism between subdevs. The lack of support means that a frame rate at the sensor can't be negotiated through the subdev path

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-17 Thread Steve Longerbeam
On 02/17/2017 06:16 AM, Philipp Zabel wrote: On Fri, 2017-02-17 at 11:47 +0100, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: +static void csi2_dphy_init(struct csi2_dev *csi2) +{ + /* +* FIXME: 0x14 is derived from a fixed D-PHY reference

Re: [PATCH v4 18/36] media: Add i.MX media core driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 05:02 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: + +- Clean up and move the ov5642 subdev driver to drivers/media/i2c, and + create the binding docs for it. This is done already, right? I cleaned up ov5640 and moved it to drivers

Re: [PATCH v4 07/36] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 04:51 PM, Fabio Estevam wrote: Hi Steve, On Thu, Feb 16, 2017 at 12:19 AM, Steve Longerbeam <slongerb...@gmail.com> wrote: Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. The OV5642 connects to the parallel-bus mux input port on ipu1_cs

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 02:20 PM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: In version 4: With this version, I get: [28762.892053] imx6-mipi-csi2: LP-11 timeout, phy_state = 0x [28762.899409] ipu1_csi0: pipeline_set_stream failed

Re: [PATCH v4 01/36] [media] dt-bindings: Add bindings for i.MX media driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:54 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: Add bindings documentation for the i.MX media driver. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Documentation/devicetree/bindings/media/imx.tx

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 06:20 AM, Russell King - ARM Linux wrote: On Thu, Feb 16, 2017 at 01:09:35PM +, Russell King - ARM Linux wrote: More crap. If the "complete" method fails (or, in fact, anything in v4l2_async_test_notify() fails) then all hell breaks loose, because of the total lack of

Re: [PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 04:40 AM, Russell King - ARM Linux wrote: On Thu, Feb 16, 2017 at 11:52:06AM +, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:22PM -0800, Steve Longerbeam wrote: +static const struct platform_device_id imx_csi_ids[] = { + { .name = "imx-ipuv

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:37 AM, Russell King - ARM Linux wrote: Two problems. On Wed, Feb 15, 2017 at 06:19:02PM -0800, Steve Longerbeam wrote: media: imx: propagate sink pad formats to source pads 1) It looks like all cases aren't being caught: - entity 74: ipu1_csi0 (3 pads, 4 links

Re: [PATCH v4 36/36] media: imx: propagate sink pad formats to source pads

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:29 AM, Philipp Zabel wrote: On Wed, 2017-02-15 at 18:19 -0800, Steve Longerbeam wrote: [...] diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index dd9d499..c43f85f 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c

Re: [PATCH v4 28/36] media: imx: csi: fix crop rectangle changes in set_fmt

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 03:05 AM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:30PM -0800, Steve Longerbeam wrote: diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index ae24b42..3cb97e2 100644 --- a/drivers/staging/media/imx/imx-media

Re: [PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 02:28 AM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:25PM -0800, Steve Longerbeam wrote: Adds MIPI CSI-2 Receiver subdev driver. This subdev is required for sensors with a MIPI CSI2 interface. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.

Re: [PATCH v4 18/36] media: Add i.MX media core driver

2017-02-16 Thread Steve Longerbeam
On 02/16/2017 02:27 AM, Russell King - ARM Linux wrote: On Wed, Feb 15, 2017 at 06:19:20PM -0800, Steve Longerbeam wrote: Add the core media driver for i.MX SOC. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Just as I reported on the 30th January: Applying: media: Ad

Re: [PATCH v4 32/36] media: imx: csi/fim: add support for frame intervals

2017-02-15 Thread Steve Longerbeam
Sorry, I forgot to change authorship on this patch. It should be authored by Russell King <rmk+ker...@armlinux.org.uk>. Steve On 02/15/2017 06:19 PM, Steve Longerbeam wrote: Add support to CSI for negotiation of frame intervals, and use this information to configure the frame interval m

[PATCH v4 01/36] [media] dt-bindings: Add bindings for i.MX media driver

2017-02-15 Thread Steve Longerbeam
Add bindings documentation for the i.MX media driver. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Documentation/devicetree/bindings/media/imx.txt | 66 + 1 file changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH v4 04/36] ARM: dts: imx6qdl: add capture-subsystem device

2017-02-15 Thread Steve Longerbeam
Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6dl.dtsi | 5 + arch/arm/boot/dts/imx6q.dtsi | 5 + 2 files changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi index 371288a..f1743fc

[PATCH v4 00/36] i.MX Media Driver

2017-02-15 Thread Steve Longerbeam
ngle changes in set_fmt media: imx: csi: add frame skipping support media: imx: csi: fix crop rectangle reset in sink set_fmt Russell King (3): media: imx: add support for bayer formats media: imx: csi: add support for bayer formats media: imx: mipi-csi2: enable setting and getting of fram

[PATCH v4 02/36] ARM: dts: imx6qdl: Add compatible, clocks, irqs to MIPI CSI-2 node

2017-02-15 Thread Steve Longerbeam
Add to the MIPI CSI2 receiver node: compatible strings, interrupt sources, and clocks. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6qdl.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/bo

[PATCH v4 06/36] ARM: dts: imx6-sabrelite: add OV5642 and OV5640 camera sensors

2017-02-15 Thread Steve Longerbeam
-2 receiver on mipi_csi. The OV5642 node is disabled temporarily while the subdev driver is cleaned up and submitted later. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6dl-sabrelite.dts | 5 ++ arch/arm/boot/dts/imx6q-sabrelite.dts| 5 ++

[PATCH v4 03/36] ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their connections

2017-02-15 Thread Steve Longerbeam
muxes for the connections from parallel sensors. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6dl.dtsi | 180 + arch/arm/boot/dts/imx6q.dtsi | 116 ++ arch/arm/boot/dts/imx6qd

[PATCH v4 05/36] ARM: dts: imx6qdl-sabrelite: remove erratum ERR006687 workaround

2017-02-15 Thread Steve Longerbeam
oards that have the HW workaround for ERR006687") Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b

[PATCH v4 07/36] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors

2017-02-15 Thread Steve Longerbeam
Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux. The OV5640 connects to the input port on the MIPI CSI-2 receiver on mipi_csi. Until the OV5652 sensor module compatible with the SabreSD becomes

[PATCH v4 12/36] add mux and video interface bridge entity functions

2017-02-15 Thread Steve Longerbeam
From: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> - renamed MEDIA_ENT_F_MUX to MEDIA_ENT_F_VID_MUX Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Documentation/media/uapi/mediactl/me

[PATCH v4 08/36] ARM: dts: imx6-sabreauto: create i2cmux for i2c3

2017-02-15 Thread Steve Longerbeam
) are thus moved into i2cmux. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 65 +--- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/ar

[PATCH v4 10/36] ARM: dts: imx6-sabreauto: add pinctrl for gpt input capture

2017-02-15 Thread Steve Longerbeam
Add pinctrl groups for both GPT input capture channels. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/bo

[PATCH v4 09/36] ARM: dts: imx6-sabreauto: add reset-gpios property for max7310_b

2017-02-15 Thread Steve Longerbeam
, that chip is needed by more functions (usb and adv7180). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/i

[PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-02-15 Thread Steve Longerbeam
v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities in a pipeline to a given video device. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/v4l2-core/v4l2-mc.c | 48 +++ include/media/v4l

[PATCH v4 17/36] media: Add userspace header file for i.MX

2017-02-15 Thread Steve Longerbeam
This adds a header file for use by userspace programs wanting to interact with the i.MX media driver. It defines custom v4l2 controls and events generated by the i.MX v4l2 subdevices. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- include/uapi/media/Kbuild | 1 + includ

[PATCH v4 15/36] platform: add video-multiplexer subdevice driver

2017-02-15 Thread Steve Longerbeam
for the vidmux driver's registered callback. This doesn't affect the functionality of this driver, but allows for it to be merged now, before adding the chaining support. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- .../bindings/media/video-multiplexer.txt |

[PATCH v4 11/36] ARM: dts: imx6-sabreauto: add the ADV7180 video decoder

2017-02-15 Thread Steve Longerbeam
Enables the ADV7180 decoder sensor. The ADV7180 connects to the parallel-bus mux input on ipu1_csi0_mux. The ADV7180 power pin is via max7310_b port expander. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/boot/dts/imx6qdl-sabreauto.dts

[PATCH v4 16/36] UAPI: Add media UAPI Kbuild file

2017-02-15 Thread Steve Longerbeam
Add an empty UAPI Kbuild file for media UAPI headers. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- include/uapi/Kbuild | 1 + include/uapi/media/Kbuild | 1 + 2 files changed, 2 insertions(+) create mode 100644 include/uapi/media/Kbuild diff --git a/includ

[PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-02-15 Thread Steve Longerbeam
Add a new FRAME_TIMEOUT event to signal that a video capture or output device has timed out waiting for reception or transmit completion of a video frame. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 5 + Documen

[PATCH v4 18/36] media: Add i.MX media core driver

2017-02-15 Thread Steve Longerbeam
Add the core media driver for i.MX SOC. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Documentation/media/v4l-drivers/imx.rst | 542 + drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile

[PATCH v4 19/36] media: imx: Add Capture Device Interface

2017-02-15 Thread Steve Longerbeam
. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/Makefile| 2 +- drivers/staging/media/imx/imx-media-capture.c | 654 ++ 2 files changed, 655 insertions(+), 1 deletion(-) create mode 100644 drivers/staging/med

[PATCH v4 21/36] media: imx: Add VDIC subdev driver

2017-02-15 Thread Steve Longerbeam
y.ops = _entity_ops; + priv->sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER; + priv->sd.dev = >dev; + priv->sd.owner = THIS_MODULE; + priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; + /* get our group id */ + priv->sd.grp_id = pdata->

[PATCH v4 26/36] media: imx: add support for bayer formats

2017-02-15 Thread Steve Longerbeam
From: Russell King <rmk+ker...@armlinux.org.uk> Add the bayer formats to imx-media's list of supported pixel and bus formats. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> - added a bayer boolean to struct imx_media_pixfmt. Signed-off-by: Steve Longerbeam &l

[PATCH v4 20/36] media: imx: Add CSI subdev driver

2017-02-15 Thread Steve Longerbeam
This is a media entity subdevice for the i.MX Camera Sensor Interface module. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/Kconfig | 13 + drivers/staging/media/imx/Makefile|2 + drivers/staging/media/imx/imx-media-csi.c

[PATCH v4 24/36] [media] add Omnivision OV5640 sensor driver

2017-02-15 Thread Steve Longerbeam
This driver is based on ov5640_mipi.c from Freescale imx_3.10.17_1.0.0_beta branch, modified heavily to bring forward to latest interfaces and code cleanup. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- .../devicetree/bindings/media/i2c/ov5640.txt | 43 + d

[PATCH v4 23/36] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-15 Thread Steve Longerbeam
Adds MIPI CSI-2 Receiver subdev driver. This subdev is required for sensors with a MIPI CSI2 interface. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/Makefile | 1 + drivers/staging/media/imx/imx6-mipi-csi2.c

[PATCH v4 27/36] media: imx: csi: add support for bayer formats

2017-02-15 Thread Steve Longerbeam
destination is IDMAC output pad when passthrough conditions exist: bayer formats and 16-bit parallel buses. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-csi.c | 50 ++- 1 file changed, 42 insertions(+), 8

[PATCH v4 25/36] ARM: imx_v6_v7_defconfig: Enable staging video4linux drivers

2017-02-15 Thread Steve Longerbeam
max zoneorder to allow larger video buffer allocations. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- arch/arm/configs/imx_v6_v7_defconfig | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/ar

[PATCH v4 32/36] media: imx: csi/fim: add support for frame intervals

2017-02-15 Thread Steve Longerbeam
Add support to CSI for negotiation of frame intervals, and use this information to configure the frame interval monitor. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-medi

[PATCH v4 28/36] media: imx: csi: fix crop rectangle changes in set_fmt

2017-02-15 Thread Steve Longerbeam
ed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-csi.c | 35 --- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/imx/imx-medi

[PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-15 Thread Steve Longerbeam
s part of the negotiation. Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk> Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx6-mipi-csi2.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/staging/m

[PATCH v4 31/36] media: imx: csi: add __csi_get_fmt

2017-02-15 Thread Steve Longerbeam
Add __csi_get_fmt() and use it to return the correct mbus format (active or try) in get_fmt. Use it in other places as well. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Suggested-by: Russell King <li...@armlinux.org.uk> --- drivers/staging/media/imx/imx-medi

[PATCH v4 35/36] media: imx: csi: fix crop rectangle reset in sink set_fmt

2017-02-15 Thread Steve Longerbeam
From: Philipp Zabel <p.za...@pengutronix.de> The csi_try_crop call in set_fmt should compare the cropping rectangle to the currently set input format, not to the previous input format. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Steve Longerbeam &l

[PATCH v4 34/36] media: imx: csi: add frame skipping support

2017-02-15 Thread Steve Longerbeam
From: Philipp Zabel <p.za...@pengutronix.de> The CSI can skip any out of up to 6 input frames, allowing to reduce the frame rate at the output pads by small fractions. Signed-off-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.co

[PATCH v4 33/36] media: imx: redo pixel format enumeration and negotiation

2017-02-15 Thread Steve Longerbeam
(u32 *code, u32 index, enum codespace_sel cs_sel); The tables have been split into separate tables for YUV and RGB formats to support the implementation of the above. The subdev's .enum_mbus_code() and .set_fmt() operations have been rewritten using the above APIs. Signed-off-by: Steve Longerbeam

[PATCH v4 30/36] media: imx: update capture dev format on IDMAC output pad set_fmt

2017-02-15 Thread Steve Longerbeam
When configuring the IDMAC output pad formats (in ipu_csi, ipu_ic_prpenc, and ipu_ic_prpvf subdevs), the attached capture device format must also be updated. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Suggested-by: Philipp Zabel <p.za...@pengutronix.de> --- dri

[PATCH v4 36/36] media: imx: propagate sink pad formats to source pads

2017-02-15 Thread Steve Longerbeam
Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-ic-prp.c | 11 ++- drivers/staging/media/imx/imx-ic-prpencvf.c | 22 ++ drivers/staging/media/imx/imx-media-csi.c | 26 +- drivers/s

[PATCH v4 22/36] media: imx: Add IC subdev drivers

2017-02-15 Thread Steve Longerbeam
directly from the CSI or from the VDIC. Scaled output is limited to 1024x1024 resolution. Output frames are routed to the capture device. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/Makefile |2 + drivers/staging/media/imx/

Re: [PATCH v3 00/24] i.MX Media Driver

2017-02-14 Thread Steve Longerbeam
Hi Philipp, I've created a test branch off my imx-media-staging-md-wip called tc358743, which cherry-picks a couple of your commits from your imx-media-staging-md-wip branch: [media] tc358743: set entity function to video interface bridge [media] tc358743: put lanes in STOP state before

Re: [PATCH v3 21/24] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-13 Thread Steve Longerbeam
(#!##* Thunderbird! resending text only) Hi Philipp, On 02/13/2017 01:20 AM, Philipp Zabel wrote: Hi Steve, On Thu, 2017-02-09 at 15:51 -0800, Steve Longerbeam wrote: On 02/09/2017 03:49 PM, Steve Longerbeam wrote: On 02/08/2017 03:42 PM, Russell King - ARM Linux wrote: On Wed, Feb 08

Re: [PATCH v3 22/24] media: imx: Add MIPI CSI-2 OV5640 sensor subdev driver

2017-02-12 Thread Steve Longerbeam
(resending text only) On 02/02/2017 02:36 AM, Laurent Pinchart wrote: Hi Steve, Thank you for the patch. Many of the comments below apply to the ov5642 driver too, please take them into account when reworking patch 23/24. On Friday 06 Jan 2017 18:11:40 Steve Longerbeam wrote: This driver

Re: [PATCH v3 21/24] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-09 Thread Steve Longerbeam
On 02/09/2017 03:49 PM, Steve Longerbeam wrote: On 02/08/2017 03:42 PM, Russell King - ARM Linux wrote: On Wed, Feb 08, 2017 at 03:23:53PM -0800, Steve Longerbeam wrote: Actually, this exact function already exists as dw_mipi_dsi_phy_write in drivers/gpu/drm/rockchip/dw-mipi-dsi.c

Re: [PATCH v3 21/24] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-09 Thread Steve Longerbeam
On 02/08/2017 03:42 PM, Russell King - ARM Linux wrote: On Wed, Feb 08, 2017 at 03:23:53PM -0800, Steve Longerbeam wrote: Actually, this exact function already exists as dw_mipi_dsi_phy_write in drivers/gpu/drm/rockchip/dw-mipi-dsi.c, and it looks like the D-PHY register 0x44 might contain

Re: [PATCH v3 21/24] media: imx: Add MIPI CSI-2 Receiver subdev driver

2017-02-08 Thread Steve Longerbeam
On 02/02/2017 03:50 AM, Philipp Zabel wrote: + struct v4l2_subdev *src_sd; + struct v4l2_subdev *sink_sd[CSI2_NUM_SRC_PADS]; I see no reason to store pointers to the remote v4l2_subdevs. + intinput_pad; + struct clk

Re: [PATCH v3 16/24] media: Add i.MX media core driver

2017-02-06 Thread Steve Longerbeam
On 02/02/2017 02:50 PM, Russell King - ARM Linux wrote: On Fri, Jan 06, 2017 at 06:11:34PM -0800, Steve Longerbeam wrote: +/* register an internal subdev as a platform device */ +static struct imx_media_subdev * +add_internal_subdev(struct imx_media_dev *imxmd, + const

Re: [PATCH v3 20/24] media: imx: Add Camera Interface subdev driver

2017-02-06 Thread Steve Longerbeam
On 02/02/2017 02:35 PM, Russell King - ARM Linux wrote: However, "*vfd" contains a struct device, and you _correctly_ set the release function for "*vfd" to video_device_release via camif_videodev. However, if you try to rmmod imx-media, then you end up with a kernel warning that you're

Re: [PATCH v3 13/24] platform: add video-multiplexer subdevice driver

2017-02-06 Thread Steve Longerbeam
On 02/06/2017 02:33 PM, Laurent Pinchart wrote: Hi Hans, (CC'ing Sakari) On Monday 06 Feb 2017 10:50:22 Hans Verkuil wrote: On 02/05/2017 04:48 PM, Laurent Pinchart wrote: On Tuesday 24 Jan 2017 18:07:55 Steve Longerbeam wrote: On 01/24/2017 04:02 AM, Philipp Zabel wrote: On Fri, 2017-01

Re: [PATCH v3 00/24] i.MX Media Driver

2017-02-03 Thread Steve Longerbeam
On 02/02/2017 02:29 PM, Russell King - ARM Linux wrote: On Thu, Feb 02, 2017 at 11:12:41AM -0800, Steve Longerbeam wrote: Here is the current .queue_setup() op in imx-media-capture.c: static int capture_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers

Re: [PATCH v3 00/24] i.MX Media Driver

2017-02-03 Thread Steve Longerbeam
On 02/03/2017 06:41 AM, Laurent Pinchart wrote: Hello, On Wednesday 01 Feb 2017 16:19:27 Steve Longerbeam wrote: On 02/01/2017 01:30 AM, Philipp Zabel wrote: media-ctl propagates the output pad format to all remote subdevices' input pads for all enabled links: https://git.linuxtv.org/v4l

Re: [PATCH v3 00/24] i.MX Media Driver

2017-02-02 Thread Steve Longerbeam
On 02/02/2017 10:58 AM, Russell King - ARM Linux wrote: On Thu, Feb 02, 2017 at 10:26:55AM -0800, Steve Longerbeam wrote: On 02/02/2017 09:56 AM, Russell King - ARM Linux wrote: and for whatever reason we end up falling out through free_ring. This is VERY bad news, because it means

Re: [PATCH v3 00/24] i.MX Media Driver

2017-02-02 Thread Steve Longerbeam
On 02/02/2017 09:56 AM, Russell King - ARM Linux wrote: On Thu, Feb 02, 2017 at 05:22:46PM +, Russell King - ARM Linux wrote: I thought, maybe, it's the IPU overwriting past the end of the buffer, but I've added checks and that doesn't seem to have fired. I also wondered if it was some

Re: [PATCH v3 00/24] i.MX Media Driver

2017-02-02 Thread Steve Longerbeam
Hi Russell, I don't recommend spending too much time debugging this OOPS. The dma buffer ring has been removed completely in version 4 (which I'm trying to get ready to post hopefully by end of this week). Steve On 02/02/2017 09:22 AM, Russell King - ARM Linux wrote: I seem to be getting

Re: [PATCH v3 00/24] i.MX Media Driver

2017-02-01 Thread Steve Longerbeam
On 02/01/2017 01:30 AM, Philipp Zabel wrote: On Tue, 2017-01-31 at 17:26 -0800, Steve Longerbeam wrote: [...] # Set pad formats media-ctl --set-v4l2 "'tc358743 1-000f':0[fmt:UYVY/1920x1080]" media-ctl --set-v4l2 "'imx6-mipi-csi2':1[fmt:UYVY2X8/1920x1080]" media-ctl --set-

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