[PATCH 6/6] media: staging/imx: interweave and odd-chroma-row skip are incompatible

2018-05-25 Thread Steve Longerbeam
If IDMAC interweaving is enabled in a write channel, the channel must write the odd chroma rows for 4:2:0 formats. Skipping writing the odd chroma rows produces corrupted captured 4:2:0 images when interweave is enabled. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- d

[PATCH 5/6] media: imx-csi: Allow skipping odd chroma rows for YVU420

2018-05-25 Thread Steve Longerbeam
Skip writing U/V components to odd rows for YVU420 in addition to YUV420 and NV12. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-csi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/d

[PATCH 2/6] gpu: ipu-csi: Check for field type alternate

2018-05-25 Thread Steve Longerbeam
When the CSI is receiving from a bt.656 bus, include a check for field type 'alternate' when determining whether to set CSI clock mode to CCIR656_INTERLACED or CCIR656_PROGRESSIVE. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/gpu/ipu-v3/ipu-csi.c | 3 ++-

[PATCH 0/6] imx-media: Fixes for bt.656 interlaced capture

2018-05-25 Thread Steve Longerbeam
A set of patches that fixes some bugs with capturing from a bt.656 interlaced source, and incompatibilites between IDMAC interlace interweaving and 4:2:0 data write reduction. Steve Longerbeam (6): media: imx-csi: Fix interlaced bt.656 gpu: ipu-csi: Check for field type alternate media

[PATCH 4/6] media: imx-csi: Enable interlaced scan for field type alternate

2018-05-25 Thread Steve Longerbeam
-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-csi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 9bc555c..eef3483 100644 --- a/d

[PATCH 1/6] media: imx-csi: Fix interlaced bt.656

2018-05-25 Thread Steve Longerbeam
field type is set to 'none' and the input bus type is BT.656. So remove that code and pass unmodified sink pad field type to ipu_csi_init_interface(). The latter function will have to explicity deal with field type 'alternate' when setting up the CSI interface for BT.656 busses. Signed-off-by: Steve

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-25 Thread Steve Longerbeam
Hi Krzysztof, Philipp, On 05/25/2018 12:18 AM, Krzysztof Hałasa wrote: Philipp Zabel writes: Maybe scanline interlave and double write reduction can't be used at the same time? Well, if it works in non-interlaced modes - it may be the case. Perhaps the data

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-25 Thread Steve Longerbeam
Hi Philipp, On 05/24/2018 11:32 PM, Philipp Zabel wrote: On Thu, 2018-05-24 at 11:12 -0700, Steve Longerbeam wrote: [...] The following is required as well. Now the question is why we can't skip writing those odd UV rows. Anyway, with these 2 changes, I get a stable NTSC (and probably PAL

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-24 Thread Steve Longerbeam
write reduction") b54a5c2dc8 ("media: imx: prpencvf: enable double write reduction") should be reverted for now, until the behavior of this bit is better understood. Steve On 05/24/2018 01:48 PM, Steve Longerbeam wrote: Hi Krzysztof, Sorry I did find a bug. Please try this patch: -

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-24 Thread Steve Longerbeam
so want to try adding a ~500 msec delay after adv7180 power on as I explained earlier: --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -503,6 +503,9 @@ static int adv7180_set_power(struct adv7180_state *state, bool on)     }     } +   if (on) + 

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-24 Thread Steve Longerbeam
Hi Krzysztof, On 05/24/2018 08:56 AM, Krzysztof Hałasa wrote: Hi, I've experimented with the ADV7180 a bit and this is what I found. First, I'm using (with a NTSC camera but I guess PAL won't be much different): media-ctl -V '"adv7180 2-0020":0[fmt:UYVY2X8 720x480 field:interlaced]'

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-21 Thread Steve Longerbeam
Hi Krzysztof, I've been on vacation, just returned today. I will find the time this week to attempt to reproduce your results on a SabreAuto quad with the adv7180. Btw, if you just need to capture an interlaced frame (lines 0,1,2,...) without motion compensation, there is no need to use the VDIC

Re: [PATCH v3 1/2] media: imx: capture: refactor enum_/try_fmt

2018-05-20 Thread Steve Longerbeam
Reviewed-by: Steve Longerbeam <steve_longerb...@mentor.com> On 05/18/2018 06:56 AM, Jan Luebbe wrote: By checking and handling the internal IPU formats (ARGB or AYUV) first, we don't need to check whether it's a bayer format, as we can default to passing the input format on in all other

Re: [PATCH 5/7] imx: fix compiler warning

2018-05-14 Thread Steve Longerbeam
Acked-by: Steve Longerbeam <steve_longerb...@mentor.com> On 05/14/2018 06:13 AM, Hans Verkuil wrote: From: Hans Verkuil <hans.verk...@cisco.com> drivers/staging/media/imx/imx-media-capture.c: In function 'vidioc_querycap': drivers/staging/media/imx/imx-media-capture.c:76:2: warni

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-11 Thread Steve Longerbeam
On 05/10/2018 10:37 PM, Krzysztof Hałasa wrote: Steve Longerbeam <slongerb...@gmail.com> writes: Second, the image format information I'm getting out of "ipu2_csi1 capture" device is: open("/dev/video6") ioctl(VIDIOC_S_FMT, {V4L2_BUF_TYPE_VIDEO_CAPTURE, fmt

Re: i.MX6 IPU CSI analog video input on Ventana

2018-05-10 Thread Steve Longerbeam
Hello Krzysztof, On 05/10/2018 01:19 AM, Krzysztof Hałasa wrote: Hi, I'm using analog PAL video in on GW53xx/54xx boards (through ADV7180 chip and 8-bit parallel CSI input, with (presumably) BT.656). I'm trying to upgrade from e.g. Linux 4.2 + Steve's older MX6 camera driver (which works

Re: [PATCH v3 03/13] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-05-09 Thread Steve Longerbeam
On 05/08/2018 03:12 AM, Sakari Ailus wrote: On Fri, Apr 20, 2018 at 10:12:33AM -0700, Steve Longerbeam wrote: Hi Sakari, On 04/20/2018 05:24 AM, Sakari Ailus wrote: Hi Steve, Thanks for the patchset. On Tue, Mar 20, 2018 at 05:37:19PM -0700, Steve Longerbeam wrote

[PATCH v4 13/14] media: staging/imx: Switch to v4l2_async_notifier_add_*_subdev

2018-05-09 Thread Steve Longerbeam
, or keeping an internal master asd_list, since this is moved to the notifier's asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 119 ++ drivers/staging/media/imx/imx-media-internal-sd.c | 5 +- d

[PATCH v4 14/14] media: staging/imx: TODO: Remove one assumption about OF graph parsing

2018-05-09 Thread Steve Longerbeam
The move to subdev notifiers fixes one assumption of OF graph parsing. If a subdevice has non-video related ports, the subdev driver knows not to follow those ports when adding remote devices to its subdev notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- d

[PATCH v4 05/14] media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev

2018-05-09 Thread Steve Longerbeam
s[] array, (in the notifier completion callback), so that driver has been modified to iterate through the notifier->asd_list instead. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +-- drivers/media/v4l2-core/v4l2-async.c

[PATCH v4 11/14] media: staging/imx: Loop through all registered subdevs for media links

2018-05-09 Thread Steve Longerbeam
because imx_media_create_of_links() checks if a fwnode link already exists before creating. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/s

[PATCH v4 00/14] media: imx: Switch to subdev notifiers

2018-05-09 Thread Steve Longerbeam
. The remaining patches update the subdev drivers to register a subdev notifier with endpoint parsing, and the changes to imx-media to support that. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Acked-by: Philipp Zabel <p.za...@pengutronix.de> History: v4: - small no

[PATCH v4 01/14] media: v4l2-fwnode: ignore endpoints that have no remote port parent

2018-05-09 Thread Steve Longerbeam
and return 0. __v4l2_async_notifier_parse_fwnode_endpoints() will then continue parsing the remaining port endpoints of the device. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> --- Changes since v3: - none Changes since v2: -

[PATCH v4 06/14] media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers

2018-05-09 Thread Steve Longerbeam
Adds v4l2_async_register_fwnode_subdev(), which is a convenience function for parsing a sub-device's fwnode port endpoints for connected remote sub-devices, registering a sub-device notifier, and then registering the sub-device itself. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.

[PATCH v4 03/14] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-05-09 Thread Steve Longerbeam
allocated. In v4l2_async_notifier_has_async_subdev(), __v4l2_async_notifier_register(), and v4l2_async_notifier_cleanup(), maintain backward compatibility with the subdevs array, by alternatively operate on the subdevs array or a non-empty notifier->asd_list. Signed-off-by: Steve Longerb

[PATCH v4 08/14] media: imx: csi: Register a subdev notifier

2018-05-09 Thread Steve Longerbeam
Parse neighbor remote devices on the CSI port, and add them to a subdev notifier, by calling v4l2_async_notifier_parse_fwnode_endpoints_by_port() using the CSI's port id. And register the subdev notifier for the CSI. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Changes

[PATCH v4 12/14] media: staging/imx: Rename root notifier

2018-05-09 Thread Steve Longerbeam
Rename the imx-media root async notifier from "subdev_notifier" to simply "notifier", so as not to confuse it with true subdev notifiers. No functional changes. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/medi

[PATCH v4 02/14] media: v4l2: async: Allow searching for asd of any type

2018-05-09 Thread Steve Longerbeam
Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching for any type of async subdev, not just fwnodes. Rename to v4l2_async_notifier_has_async_subdev() and pass it an asd pointer. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Changes since v3: - r

[PATCH v4 10/14] media: staging/imx: of: Remove recursive graph walk

2018-05-09 Thread Steve Longerbeam
to the imx-media root notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-of.c | 106 +++ 1 file changed, 8 insertions(+), 98 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/s

[PATCH v4 07/14] media: platform: video-mux: Register a subdev notifier

2018-05-09 Thread Steve Longerbeam
Parse neighbor remote devices on the video muxes input ports, add them to a subdev notifier, and register the subdev notifier for the video mux, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Changes since v3: - pass num_pa

[PATCH v4 09/14] media: imx: mipi csi-2: Register a subdev notifier

2018-05-09 Thread Steve Longerbeam
Parse neighbor remote devices on the MIPI CSI-2 input port, add them to a subdev notifier, and register the subdev notifier for the MIPI CSI-2 receiver, by calling v4l2_async_register_fwnode_subdev(). csi2_parse_endpoints() is modified to be the parse_endpoint callback. Signed-off-by: Steve

[PATCH v4 04/14] media: v4l2: async: Add convenience functions to allocate and add asd's

2018-05-09 Thread Steve Longerbeam
Add these convenience functions, which allocate an asd of match type fwnode, i2c, or device-name, of size asd_struct_size, and then adds them to the notifier asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/v4l2-core/v4l2-async.

Re: [PATCH v3 05/13] media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers

2018-05-08 Thread Steve Longerbeam
On 05/08/2018 03:28 AM, Sakari Ailus wrote: Hi Steve, Again, sorry about the delay. This thread got buried in my inbox. :-( Please see my reply below. On Mon, Apr 23, 2018 at 11:00:22AM -0700, Steve Longerbeam wrote: On 04/23/2018 12:14 AM, Sakari Ailus wrote: Hi Steve, On Tue, Mar 20

Re: [PATCH v2 0/2] media: imx: add capture support for RGB565_2X8 on parallel bus

2018-05-08 Thread Steve Longerbeam
having to explicitly pass on the format in the second patch. Changes since v1: - fixed problems reported the kbuild test robot - added helper functions as suggested by Steve Longerbeam (is_parallel_bus and requires_passthrough) - removed passthough format check in csi_link_validate

Re: [PATCH 0/2] media: imx: add capture support for RGB565_2X8 on parallel bus

2018-05-08 Thread Steve Longerbeam
Hi Jan, On 05/08/2018 07:13 AM, Jan Lübbe wrote: Hi, On Mon, 2018-05-07 at 11:21 -0700, Steve Longerbeam wrote: In other words, if the sensor bus is parallel, only 8-bit bus UYVY_2x8 and YUYV_2x8 can be routed to the IC pad or component packed/unpacked by the IDMAC pad. All other sensor

Re: [PATCH 0/2] media: imx: add capture support for RGB565_2X8 on parallel bus

2018-05-07 Thread Steve Longerbeam
On 05/07/2018 07:23 AM, Jan Lübbe wrote: Hi Steve, thanks for reviewing! On Sat, 2018-05-05 at 15:22 -0700, Steve Longerbeam wrote: I reviewed this patch series, and while I don't have any objections to the code-level changes, but my question is more specifically about how the IPU/CSI deals

Re: [PATCH v3 00/13] media: imx: Switch to subdev notifiers

2018-05-07 Thread Steve Longerbeam
On 05/07/2018 07:20 AM, Hans Verkuil wrote: Steve, Sakari, Any progress on this? The imx7 patch series depends on this so that can't move forward until this is merged. Hi Hans, I've been working on the updates and will submit v4 today. Steve On 21/03/18 01:37, Steve Longerbeam wrote

Re: [PATCH 0/2] media: imx: add capture support for RGB565_2X8 on parallel bus

2018-05-05 Thread Steve Longerbeam
Hi Jan, Philipp, I reviewed this patch series, and while I don't have any objections to the code-level changes, but my question is more specifically about how the IPU/CSI deals with receiving RGB565 over a parallel bus. My understanding was that if the CSI receives RGB565 over a parallel 8-bit

Re: [PATCH] media: imx-csi: fix burst size for 16 bit

2018-05-05 Thread Steve Longerbeam
Acked-by: Steve Longerbeam <steve_longerb...@mentor.com> On 05/03/2018 09:40 AM, Philipp Zabel wrote: On Thu, 2018-05-03 at 18:32 +0200, Jan Luebbe wrote: A burst_size of 4 does not work for the 16 bit passthrough formats, so we use 8 instead. Signed-off-by: Jan Luebbe <j...@pengu

Re: [PATCH] media: imx: add 16-bit grayscale support

2018-05-05 Thread Steve Longerbeam
Acked-by: Steve Longerbeam <steve_longerb...@mentor.com> On 05/03/2018 08:06 AM, Philipp Zabel wrote: Since commit 50b0f0aee839 ("gpu: ipu-csi: add 10/12-bit grayscale support to mbus_code_to_bus_cfg") the IPU CSI can be configured to capture 10-bit and 12-bit grayscale formats

Re: [PATCH v3 05/13] media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers

2018-04-23 Thread Steve Longerbeam
On 04/23/2018 12:14 AM, Sakari Ailus wrote: Hi Steve, On Tue, Mar 20, 2018 at 05:37:21PM -0700, Steve Longerbeam wrote: Adds v4l2_async_register_fwnode_subdev(), which is a convenience function for parsing a sub-device's fwnode port endpoints for connected remote sub-devices, registering

Re: [PATCH] media: imx: Skip every second frame in VDIC DIRECT mode

2018-04-21 Thread Steve Longerbeam
On 04/12/2018 03:04 AM, Philipp Zabel wrote: On Sat, 2018-04-07 at 15:04 +0200, Marek Vasut wrote: In VDIC direct mode, the VDIC applies combing filter during and doubles the framerate, that is, after the first two half-frames are received and the first frame is emitted by the VDIC, every

Re: [PATCH v3 03/13] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-04-20 Thread Steve Longerbeam
Hi Sakari, On 04/20/2018 05:24 AM, Sakari Ailus wrote: Hi Steve, Thanks for the patchset. On Tue, Mar 20, 2018 at 05:37:19PM -0700, Steve Longerbeam wrote: v4l2_async_notifier_add_subdev() adds an asd to the notifier. It checks that the asd's match_type is valid and that no other equivalent

Re: [PATCH v3 06/13] media: platform: video-mux: Register a subdev notifier

2018-04-20 Thread Steve Longerbeam
Hi Hans, On 04/20/2018 05:28 AM, Hans Verkuil wrote: On 03/21/18 01:37, Steve Longerbeam wrote: Parse neighbor remote devices on the video muxes input ports, add them to a subdev notifier, and register the subdev notifier for the video mux, by calling v4l2_async_register_fwnode_subdev

Re: [PATCH v3 02/13] media: v4l2: async: Allow searching for asd of any type

2018-04-20 Thread Steve Longerbeam
Hi Hans, On 04/20/2018 05:22 AM, Hans Verkuil wrote: On 03/21/18 01:37, Steve Longerbeam wrote: Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching for any type of async subdev, not just fwnodes. Rename to v4l2_async_notifier_has_async_subdev() and pass it an asd

Re: OV5640 with 12MHz xclk

2018-04-16 Thread Steve Longerbeam
Hi Sam, On 04/16/2018 05:26 AM, Hans Verkuil wrote: On 04/16/2018 03:39 AM, Samuel Bobrowicz wrote: Can anyone verify if the OV5640 driver works with input clocks other than the typical 24MHz? The driver suggests anything from 6MHz-24MHz is acceptable, but I am running into issues while

Re: [PATCH v3 00/13] media: imx: Switch to subdev notifiers

2018-04-02 Thread Steve Longerbeam
Hi Sakari, Hans, Mauro, What is the status on this patch-set? Thanks, Steve On 03/20/2018 05:37 PM, Steve Longerbeam wrote: This patchset converts the imx-media driver and its dependent subdevs to use subdev notifiers. There are a couple shortcomings in v4l2-core that prevented subdev

[PATCH v3 11/13] media: staging/imx: Rename root notifier

2018-03-20 Thread Steve Longerbeam
Rename the imx-media root async notifier from "subdev_notifier" to simply "notifier", so as not to confuse it with true subdev notifiers. No functional changes. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/medi

[PATCH v3 10/13] media: staging/imx: Loop through all registered subdevs for media links

2018-03-20 Thread Steve Longerbeam
because imx_media_create_of_links() checks if a fwnode link already exists before creating. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/s

[PATCH v3 12/13] media: staging/imx: Switch to v4l2_async_notifier_add_subdev

2018-03-20 Thread Steve Longerbeam
, or keeping an internal master asd_list, since this is moved to the notifier's asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 110 ++ drivers/staging/media/imx/imx-media-internal-sd.c | 5 +- d

[PATCH v3 13/13] media: staging/imx: TODO: Remove one assumption about OF graph parsing

2018-03-20 Thread Steve Longerbeam
The move to subdev notifiers fixes one assumption of OF graph parsing. If a subdevice has non-video related ports, the subdev driver knows not to follow those ports when adding remote devices to its subdev notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- d

[PATCH v3 09/13] media: staging/imx: of: Remove recursive graph walk

2018-03-20 Thread Steve Longerbeam
to the imx-media root notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-of.c | 106 +++ 1 file changed, 8 insertions(+), 98 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/s

[PATCH v3 02/13] media: v4l2: async: Allow searching for asd of any type

2018-03-20 Thread Steve Longerbeam
Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching for any type of async subdev, not just fwnodes. Rename to v4l2_async_notifier_has_async_subdev() and pass it an asd pointer. TODO: support asd compare with CUSTOM match type in asd_equal(). Signed-off-by: Steve

[PATCH v3 00/13] media: imx: Switch to subdev notifiers

2018-03-20 Thread Steve Longerbeam
. The remaining patches update the subdev drivers to register a subdev notifier with endpoint parsing, and the changes to imx-media to support that. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Acked-by: Philipp Zabel <p.za...@pengutronix.de> History: v3: - code

[PATCH v3 03/13] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-03-20 Thread Steve Longerbeam
with the subdevs array allocated. In v4l2_async_notifier_has_async_subdev(), __v4l2_async_notifier_register(), and v4l2_async_notifier_cleanup(), alternatively operate on the subdevs array or a non-empty notifier->asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --

[PATCH v3 04/13] media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev

2018-03-20 Thread Steve Longerbeam
s[] array, (in the notifier completion callback), so that driver has been modified to iterate through the notifier->asd_list instead. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +-- drivers/media/v4l2-core/v4l2-async.c

[PATCH v3 05/13] media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers

2018-03-20 Thread Steve Longerbeam
Adds v4l2_async_register_fwnode_subdev(), which is a convenience function for parsing a sub-device's fwnode port endpoints for connected remote sub-devices, registering a sub-device notifier, and then registering the sub-device itself. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.

[PATCH v3 07/13] media: imx: csi: Register a subdev notifier

2018-03-20 Thread Steve Longerbeam
Parse neighbor remote devices on the CSI port, add them to a subdev notifier, and register the subdev notifier for the CSI, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-csi.

[PATCH v3 01/13] media: v4l2-fwnode: ignore endpoints that have no remote port parent

2018-03-20 Thread Steve Longerbeam
and return 0. __v4l2_async_notifier_parse_fwnode_endpoints() will then continue parsing the remaining port endpoints of the device. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Changes since v2: - none Changes since v1: - don't pass an empty endpoint to the parse_endpoint ca

[PATCH v3 06/13] media: platform: video-mux: Register a subdev notifier

2018-03-20 Thread Steve Longerbeam
Parse neighbor remote devices on the video muxes input ports, add them to a subdev notifier, and register the subdev notifier for the video mux, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Changes since v2: - none Changes

[PATCH v3 08/13] media: imx: mipi csi-2: Register a subdev notifier

2018-03-20 Thread Steve Longerbeam
Parse neighbor remote devices on the MIPI CSI-2 input port, add them to a subdev notifier, and register the subdev notifier for the MIPI CSI-2 receiver, by calling v4l2_async_register_fwnode_subdev(). csi2_parse_endpoints() is modified to be the parse_endpoint callback. Signed-off-by: Steve

Re: [PATCH v2 02/13] media: v4l2: async: Allow searching for asd of any type

2018-03-16 Thread Steve Longerbeam
Hi Sakari, Thanks for the review... On 03/15/2018 02:30 AM, Sakari Ailus wrote: Hi Steve, Thanks for the patchset. Please see my comments below. On Sat, Mar 10, 2018 at 11:58:31AM -0800, Steve Longerbeam wrote: Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching

Re: [PATCH v4 2/2] media: staging/imx: fill vb2_v4l2_buffer sequence entry

2018-03-16 Thread Steve Longerbeam
Reviewed-by: Steve Longerbeam <steve_longerb...@mentor.com> On 03/15/2018 12:13 PM, Peter Seiderer wrote: - enables gstreamer v4l2src lost frame detection, e.g: 0:00:08.685185668 348 0x54f520 WARN v4l2src gstv4l2src.c:970:gst_v4l2src_create: lost frames detected: count = 141 -

Re: [PATCH v4 1/2] media: staging/imx: fill vb2_v4l2_buffer field entry

2018-03-16 Thread Steve Longerbeam
Reviewed-by: Steve Longerbeam <steve_longerb...@mentor.com> On 03/15/2018 12:13 PM, Peter Seiderer wrote: - fixes gstreamer v4l2src warning: 0:00:00.716640334 349 0x164f720 WARN v4l2bufferpool gstv4l2bufferpool.c:1195:gst_v4l2_buffer_pool_dqbuf: Driver should nev

Re: [PATCH v3] media: staging/imx: fill vb2_v4l2_buffer sequence entry

2018-03-14 Thread Steve Longerbeam
<ps.rep...@gmx.net> --- Changes in v2: - fill vb2_v4l2_buffer sequence entry in imx-ic-prpencvf too (suggested by Steve Longerbeam) Changes in v3: - add changelog (suggested by Greg Kroah-Hartman, Fabio Estevam and Dan Carpenter) and patch history - use u32 (instead of

Re: [PATCH] media: staging/imx: fill vb2_v4l2_buffer sequence entry

2018-03-13 Thread Steve Longerbeam
On 03/13/2018 03:24 PM, Peter Seiderer wrote: Hello Steve, On Tue, 13 Mar 2018 15:03:07 -0700, Steve Longerbeam <slongerb...@gmail.com> wrote: Hi Peter, Thanks for the patch. This needs to be done in imx-ic-prpencvf.c as well, see prp_vb2_buf_done(). Ahh, I see, would you

Re: [PATCH] media: staging/imx: fill vb2_v4l2_buffer sequence entry

2018-03-13 Thread Steve Longerbeam
Hi Peter, Thanks for the patch. This needs to be done in imx-ic-prpencvf.c as well, see prp_vb2_buf_done(). Steve On 03/13/2018 01:00 PM, Peter Seiderer wrote: Signed-off-by: Peter Seiderer --- drivers/staging/media/imx/imx-media-csi.c | 5 + 1 file changed, 5

Re: [PATCH] imx.rst: fix typo

2018-03-13 Thread Steve Longerbeam
Acked-by: Steve Longerbeam <steve_longerb...@mentor.com> On 03/13/2018 11:29 AM, Hans Verkuil wrote: Multpiple -> Multiple Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> --- diff --git a/Documentation/media/v4l-drivers/imx.rst b/Documentation/media/v4l-driver

[PATCH v2 11/13] media: staging/imx: Rename root notifier

2018-03-10 Thread Steve Longerbeam
Rename the imx-media root async notifier from "subdev_notifier" to simply "notifier", so as not to confuse it with true subdev notifiers. No functional changes. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/medi

[PATCH v2 12/13] media: staging/imx: Switch to v4l2_async_notifier_add_subdev

2018-03-10 Thread Steve Longerbeam
, or keeping an internal master asd_list, since this is moved to the notifier's asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 110 ++ drivers/staging/media/imx/imx-media-internal-sd.c | 5 +- d

[PATCH v2 13/13] media: staging/imx: TODO: Remove one assumption about OF graph parsing

2018-03-10 Thread Steve Longerbeam
The move to subdev notifiers fixes one assumption of OF graph parsing. If a subdevice has non-video related ports, the subdev driver knows not to follow those ports when adding remote devices to its subdev notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- d

[PATCH v2 10/13] media: staging/imx: Loop through all registered subdevs for media links

2018-03-10 Thread Steve Longerbeam
because imx_media_create_of_links() checks if a fwnode link already exists before creating. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/s

[PATCH v2 09/13] media: staging/imx: of: Remove recursive graph walk

2018-03-10 Thread Steve Longerbeam
to the imx-media root notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-of.c | 106 +++ 1 file changed, 8 insertions(+), 98 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/s

[PATCH v2 08/13] media: imx: mipi csi-2: Register a subdev notifier

2018-03-10 Thread Steve Longerbeam
Parse neighbor remote devices on the MIPI CSI-2 input port, add them to a subdev notifier, and register the subdev notifier for the MIPI CSI-2 receiver, by calling v4l2_async_register_fwnode_subdev(). csi2_parse_endpoints() is modified to be the parse_endpoint callback. Signed-off-by: Steve

[PATCH v2 07/13] media: imx: csi: Register a subdev notifier

2018-03-10 Thread Steve Longerbeam
Parse neighbor remote devices on the CSI port, add them to a subdev notifier, and register the subdev notifier for the CSI, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-csi.

[PATCH v2 06/13] media: platform: video-mux: Register a subdev notifier

2018-03-10 Thread Steve Longerbeam
Parse neighbor remote devices on the video muxes input ports, add them to a subdev notifier, and register the subdev notifier for the video mux, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Changes since v1: - add #i

[PATCH v2 05/13] media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers

2018-03-10 Thread Steve Longerbeam
Adds v4l2_async_register_fwnode_subdev(), which is a convenience function for parsing a sub-device's fwnode port endpoints for connected remote sub-devices, registering a sub-device notifier, and then registering the sub-device itself. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.

[PATCH v2 04/13] media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev

2018-03-10 Thread Steve Longerbeam
s[] array, (in the notifier completion callback), so that driver has been modified to iterate through the notifier->asd_list instead. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +-- drivers/media/v4l2-core/v4l2-async.c

[PATCH v2 03/13] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-03-10 Thread Steve Longerbeam
with the subdevs array allocated. In v4l2_async_notifier_has_async_subdev(), __v4l2_async_notifier_register(), and v4l2_async_notifier_cleanup(), alternatively operate on the subdevs array or a non-empty notifier->asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> ---

[PATCH v2 00/13] media: imx: Switch to subdev notifiers

2018-03-10 Thread Steve Longerbeam
. The remaining patches update the subdev drivers to register a subdev notifier with endpoint parsing, and the changes to imx-media to support that. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Acked-by: Philipp Zabel <p.za...@pengutronix.de> History: v2: - don't p

[PATCH v2 02/13] media: v4l2: async: Allow searching for asd of any type

2018-03-10 Thread Steve Longerbeam
Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching for any type of async subdev, not just fwnodes. Rename to v4l2_async_notifier_has_async_subdev() and pass it an asd pointer. TODO: support asd compare with CUSTOM match type in asd_equal(). Signed-off-by: Steve

[PATCH v2 01/13] media: v4l2-fwnode: ignore endpoints that have no remote port parent

2018-03-10 Thread Steve Longerbeam
and return 0. __v4l2_async_notifier_parse_fwnode_endpoints() will then continue parsing the remaining port endpoints of the device. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/v4l2-core/v4l2-fwnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH 00/13] media: imx: Switch to subdev notifiers

2018-03-09 Thread Steve Longerbeam
Requested' in patchwork. Yep, that's fine. Steve On 22/02/18 02:39, Steve Longerbeam wrote: This patchset converts the imx-media driver and its dependent subdevs to use subdev notifiers. There are a couple shortcomings in v4l2-core that prevented subdev notifiers from working correctly in imx

Re: [PATCH 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found

2018-03-02 Thread Steve Longerbeam
_default() error. devm_pinctrl_get_select_default() may return -ENODEV when the CSI pinctrl entry is not found, so better not to propagate the error in the -ENODEV case to avoid a regression. Suggested-by: Philipp Zabel <p.za...@pengutronix.de> Signed-off-by: Fabio Estevam <fabio.este...@nxp.com> R

Re: [PATCH 01/13] media: v4l2-fwnode: Let parse_endpoint callback decide if no remote is error

2018-02-23 Thread Steve Longerbeam
:39:37 EET Steve Longerbeam wrote: For some subdevices, a fwnode endpoint that has no connection to a remote endpoint may not be an error. Let the parse_endpoint callback make that decision in v4l2_async_notifier_fwnode_parse_endpoint(). If the callback indicates that is not an error, skip adding

[PATCH 02/13] media: v4l2: async: Allow searching for asd of any type

2018-02-21 Thread Steve Longerbeam
Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching for any type of async subdev, not just fwnodes. Rename to v4l2_async_notifier_has_async_subdev() and pass it an asd pointer. TODO: support asd compare with CUSTOM match type in asd_equal(). Signed-off-by: Steve

[PATCH 03/13] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-02-21 Thread Steve Longerbeam
with the subdevs array allocated. In v4l2_async_notifier_has_async_subdev(), __v4l2_async_notifier_register(), and v4l2_async_notifier_cleanup(), alternatively operate on the subdevs array or a non-empty notifier->asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> ---

[PATCH 00/13] media: imx: Switch to subdev notifiers

2018-02-21 Thread Steve Longerbeam
notifier, and then registering the sub-device itself. The remaining patches update the subdev drivers to register a subdev notifier with endpoint parsing, and the changes to imx-media to support that. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> Acked-by: Philipp Zabel

[PATCH 01/13] media: v4l2-fwnode: Let parse_endpoint callback decide if no remote is error

2018-02-21 Thread Steve Longerbeam
0. For the current users of v4l2_async_notifier_parse_fwnode_endpoints() (omap3isp, rcar-vin, intel-ipu3), return -EINVAL in the callback for unavailable remote fwnodes to maintain the previous behavior. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/pci

[PATCH 06/13] media: platform: video-mux: Register a subdev notifier

2018-02-21 Thread Steve Longerbeam
Parse neighbor remote devices on the video muxes input ports, add them to a subdev notifier, and register the subdev notifier for the video mux, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/platform/video

[PATCH 09/13] media: staging/imx: of: Remove recursive graph walk

2018-02-21 Thread Steve Longerbeam
to the imx-media root notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-of.c | 106 +++ 1 file changed, 8 insertions(+), 98 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/s

[PATCH 12/13] media: staging/imx: Switch to v4l2_async_notifier_add_subdev

2018-02-21 Thread Steve Longerbeam
, or keeping an internal master asd_list, since this is moved to the notifier's asd_list. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 110 ++ drivers/staging/media/imx/imx-media-internal-sd.c | 5 +- d

[PATCH 13/13] media: staging/imx: TODO: Remove one assumption about OF graph parsing

2018-02-21 Thread Steve Longerbeam
The move to subdev notifiers fixes one assumption of OF graph parsing. If a subdevice has non-video related ports, the subdev driver knows not to follow those ports when adding remote devices to its subdev notifier. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- d

[PATCH 05/13] media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers

2018-02-21 Thread Steve Longerbeam
Adds v4l2_async_register_fwnode_subdev(), which is a convenience function for parsing a sub-device's fwnode port endpoints for connected remote sub-devices, registering a sub-device notifier, and then registering the sub-device itself. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.

[PATCH 11/13] media: staging/imx: Rename root notifier

2018-02-21 Thread Steve Longerbeam
Rename the imx-media root async notifier from "subdev_notifier" to simply "notifier", so as not to confuse it with true subdev notifiers. No functional changes. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/medi

[PATCH 07/13] media: imx: csi: Register a subdev notifier

2018-02-21 Thread Steve Longerbeam
Parse neighbor remote devices on the CSI port, add them to a subdev notifier, and register the subdev notifier for the CSI, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-csi.

[PATCH 08/13] media: imx: mipi csi-2: Register a subdev notifier

2018-02-21 Thread Steve Longerbeam
Parse neighbor remote devices on the MIPI CSI-2 input port, add them to a subdev notifier, and register the subdev notifier for the MIPI CSI-2 receiver, by calling v4l2_async_register_fwnode_subdev(). csi2_parse_endpoints() is modified to be the parse_endpoint callback. Signed-off-by: Steve

[PATCH 10/13] media: staging/imx: Loop through all registered subdevs for media links

2018-02-21 Thread Steve Longerbeam
because imx_media_create_of_links() checks if a fwnode link already exists before creating. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/staging/media/imx/imx-media-dev.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/s

[PATCH 04/13] media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev

2018-02-21 Thread Steve Longerbeam
s[] array, (in the notifier completion callback), so that driver has been modified to iterate through the notifier->asd_list instead. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +-- drivers/media/v4l2-core/v4l2-async.c

[PATCH] media: imx.rst: Fix formatting errors

2018-02-16 Thread Steve Longerbeam
Fix a few formatting errors. Signed-off-by: Steve Longerbeam <steve_longerb...@mentor.com> --- Documentation/media/v4l-drivers/imx.rst | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Documentation/media/v4l-drivers/imx.rst b/Documentation/med

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