Re: IMX6 ADV7180 no /dev/media

2017-09-15 Thread Steve Longerbeam
On 09/15/2017 04:46 PM, Fabio Estevam wrote: Hi Steve, On Fri, Sep 15, 2017 at 8:39 PM, Steve Longerbeam wrote: Agreed, but I notice now that CONFIG_MEDIA_CONTROLLER and CONFIG_VIDEO_V4L2_SUBDEV_API are not enabled there anymore. I do see them enabled in mainline with imx_v6_v7_defconfig

Re: [PATCH] media: imx: Fix VDIC CSI1 selection

2017-09-18 Thread Steve Longerbeam
Thanks Tim for catching this error. Acked-by: Steve Longerbeam On 09/18/2017 04:08 PM, Tim Harvey wrote: When using VDIC with CSI1, make sure to select the correct CSI in IPU_CONF. Fixes: f0d9c8924e2c3376 ("[media] media: imx: Add IC subdev drivers") Suggested-by: Marek Vasut Sig

Re: [PATCH v2 2/2] [media] imx: ask source subdevice for number of active data lanes

2017-09-22 Thread Steve Longerbeam
Zabel Acked-by: Steve Longerbeam --- New in v2: - Use the active lanes reported via g_mbus_config(), if available, to configure the CSI2_N_LANES register correctly. --- drivers/staging/media/imx/imx6-mipi-csi2.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff

Re: [PATCH RFC] media: staging/imx: fix complete handler

2017-10-01 Thread Steve Longerbeam
Hi Russell, On 09/29/2017 02:38 PM, Russell King wrote: The complete handler walks all entities, expecting to find an imx subdevice for each and every entity. However, camera drivers such as smiapp can themselves contain multiple entities, for which there will not be an imx subdevice. This ca

Re: [PATCH RFC] media: staging/imx: fix complete handler

2017-10-02 Thread Steve Longerbeam
On 10/01/2017 04:36 PM, Russell King - ARM Linux wrote: On Sun, Oct 01, 2017 at 01:16:53PM -0700, Steve Longerbeam wrote: Right, imx_media_add_vdev_to_pa() has followed a link to an entity that imx is not aware of. The only effect of this patch (besides allowing the driver to load with

Re: [PATCH RFC] media: staging/imx: fix complete handler

2017-10-03 Thread Steve Longerbeam
On 10/03/2017 02:06 AM, Russell King - ARM Linux wrote: On Mon, Oct 02, 2017 at 05:59:30PM -0700, Steve Longerbeam wrote: On 10/01/2017 04:36 PM, Russell King - ARM Linux wrote: On Sun, Oct 01, 2017 at 01:16:53PM -0700, Steve Longerbeam wrote: Right, imx_media_add_vdev_to_pa() has followed

[PATCH] media: staging/imx: do not return error in link_notify for unknown sources

2017-10-03 Thread Steve Longerbeam
imx_media_link_notify() should not return error if the source subdevice is not recognized by imx-media, that isn't an error. If the subdev has controls they will be inherited starting from a known subdev. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-dev.c

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

2018-05-05 Thread Steve Longerbeam
Acked-by: Steve Longerbeam 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, expanded to 16-bit grayscale

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

2018-05-05 Thread Steve Longerbeam
Acked-by: Steve Longerbeam 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 --- drivers/staging/media/imx/imx-media-csi.c

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 s

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 Longer

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

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

[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 --- Changes since v3: - removed TODO to support asd compare

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

2018-05-09 Thread Steve Longerbeam
es to the imx-media root notifier. Signed-off-by: Steve Longerbeam --- 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/staging/media/imx/imx-media-of.c

[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 --- Changes since v3: - pass num_pads - 1 (num_input_pads) to

[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 --- drivers/media/v4l2-core/v4l2-async.c | 76 include

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

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

2018-05-09 Thread Steve Longerbeam
rray, (in the notifier completion callback), so that driver has been modified to iterate through the notifier->asd_list instead. Signed-off-by: Steve Longerbeam --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 10 +-- drivers/media/v4l2-core/v4l2-async.c | 4 - drivers/media/v4l2-core/v

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

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

[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 --- drivers/staging/media/imx/imx-media-dev.c | 14 +++--- drivers/s

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

2018-05-09 Thread Steve Longerbeam
he 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 Acked-by: Philipp Zabel History: v4: - small non-functional code cleanup in video-mux.c. - stri

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

2018-05-09 Thread Steve Longerbeam
tifier 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 Acked-by: Hans Verkuil --- Changes since v3: - none Changes since v2: - none Changes since v1: - don't pass an empty

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

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

2018-05-09 Thread Steve Longerbeam
e subdevs array 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

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

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

[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 --- drivers/staging/media/imx/TODO | 29

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

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 fine)

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 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.pix={

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

2018-05-14 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 05/14/2018 06:13 AM, Hans Verkuil wrote: From: Hans Verkuil drivers/staging/media/imx/imx-media-capture.c: In function 'vidioc_querycap': drivers/staging/media/imx/imx-media-capture.c:76:2: warning: 'strncpy' output truncated copying 15 by

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

2018-05-20 Thread Steve Longerbeam
Reviewed-by: Steve Longerbeam 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 cases. This simplifie

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: 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]' media-ctl

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

2018-05-24 Thread Steve Longerbeam
field:none]' With the above patch, capture from ipu1_csi0:2 is fixed for me on SabreAuto. You may also 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 adv71

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

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 reduction is done before the fie

[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 --- drivers/staging/media/imx/imx-ic

[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 --- 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/drivers/staging/media/imx/imx-media

[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 --- drivers/gpu/ipu-v3/ipu-csi.c | 3 ++- 1 file changed, 2 insert

[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
;interlaced' data, so can't test. Signed-off-by: Steve Longerbeam --- 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..e

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

2018-05-25 Thread Steve Longerbeam
I interface setup if the output pad 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

[PATCH 3/6] media: videodev2.h: Add macro V4L2_FIELD_IS_SEQUENTIAL

2018-05-25 Thread Steve Longerbeam
Add a macro that returns true if the given field type is 'sequential', that is, the data is transmitted, or exists in memory, as all top field lines followed by all bottom field lines, or vice-versa. Signed-off-by: Steve Longerbeam --- include/uapi/linux/videodev2.h | 4 1 file

Re: [PATCH 3/6] media: videodev2.h: Add macro V4L2_FIELD_IS_SEQUENTIAL

2018-05-25 Thread Steve Longerbeam
On 05/25/2018 05:10 PM, Nicolas Dufresne wrote: (in text this time, sorry) Le vendredi 25 mai 2018 à 16:53 -0700, Steve Longerbeam a écrit : Add a macro that returns true if the given field type is 'sequential', that is, the data is transmitted, or exists in memory, as all top f

Re: [PATCH 3/6] media: videodev2.h: Add macro V4L2_FIELD_IS_SEQUENTIAL

2018-05-26 Thread Steve Longerbeam
Hi Nicolas, On 05/25/2018 06:21 PM, Nicolas Dufresne wrote: Le vendredi 25 mai 2018 à 21:14 -0400, Nicolas Dufresne a écrit : Le vendredi 25 mai 2018 à 17:19 -0700, Steve Longerbeam a écrit : On 05/25/2018 05:10 PM, Nicolas Dufresne wrote: (in text this time, sorry) Le vendredi 25 mai 2018

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

2018-05-28 Thread Steve Longerbeam
On 05/28/2018 12:59 AM, Ian Arkver wrote: On 28/05/18 08:00, Philipp Zabel wrote: On Fri, 2018-05-25 at 16:53 -0700, Steve Longerbeam wrote: Interlaced scan, a.k.a. interweave, should be enabled at the CSI IDMAC output pad if the input field type is 'alternate' (in addition to f

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

2018-05-29 Thread Steve Longerbeam
Hi Krzysztof, On 05/29/2018 12:26 AM, Krzysztof Hałasa wrote: Hi Steve, Steve Longerbeam writes: Krzysztof, in the meantime the patches are available in my media-tree fork, for testing on the Ventana GW5300: g...@github.com:slongerbeam/mediatree.git, branch 'fix-csi-interlaced'

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

2018-05-30 Thread Steve Longerbeam
Hi Krzysztof, On 05/30/2018 01:53 AM, Krzysztof Hałasa wrote: Steve Longerbeam writes: Yes, you'll need to patch adv7180.c to select either 'seq-bt/tb' or 'alternate'. The current version will override any attempt to set field to anything other than 'interlace

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

2018-05-30 Thread Steve Longerbeam
On 05/30/2018 11:46 AM, Krzysztof Hałasa wrote: Steve Longerbeam writes: but it should be possible for the user to explicitly request the field order on CSI output (I can make a patch I guess). If you think that is the correct behavior, I will remove the override code. I suppose it makes

[PATCH v2 01/10] media: imx-csi: Pass sink pad field to ipu_csi_init_interface

2018-05-31 Thread Steve Longerbeam
on will have to explicity deal with field type 'alternate' when setting up the CSI interface for BT.656 busses. Reported-by: Krzysztof Hałasa Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions

[PATCH v2 00/10] imx-media: Fixes for interlaced capture

2018-05-31 Thread Steve Longerbeam
y: Nicolas Dufresne . - add macro V4L2_FIELD_IS_INTERLACED(). Steve Longerbeam (10): media: imx-csi: Pass sink pad field to ipu_csi_init_interface gpu: ipu-csi: Check for field type alternate media: videodev2.h: Add macros V4L2_FIELD_IS_{INTERLACED|SEQUENTIAL} media: imx: interweave only for

[PATCH v2 04/10] media: imx: interweave only for sequential input/interlaced output fields

2018-05-31 Thread Steve Longerbeam
es alternate field mode. So the CSI also enables interweave at the IDMAC output pad for alternate input field type. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 22 ++ drivers/staging/media/imx/imx-media-csi.c | 22 ++ 2 file

[PATCH v2 03/10] media: videodev2.h: Add macros V4L2_FIELD_IS_{INTERLACED|SEQUENTIAL}

2018-05-31 Thread Steve Longerbeam
#x27;interlaced', that is a full frame is transmitted, or exists in memory, as top field lines interlaced with bottom field lines. Signed-off-by: Steve Longerbeam --- Changes since v1: - add the complement macro V4L2_FIELD_IS_INTERLACED - remove V4L2_FIELD_ALTERNATE from V4L2_FIELD_IS_SEQUE

[PATCH v2 05/10] media: imx: interweave and odd-chroma-row skip are incompatible

2018-05-31 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. Reported-by: Krzysztof Hałasa Signed-off-by: Steve Longerbeam --- drivers

[PATCH v2 07/10] media: imx-csi: Allow skipping odd chroma rows for YVU420

2018-05-31 Thread Steve Longerbeam
Skip writing U/V components to odd rows for YVU420 in addition to YUV420 and NV12. Signed-off-by: Steve Longerbeam --- 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/drivers/staging/media/imx/imx-media

[PATCH v2 08/10] media: imx: vdic: rely on VDIC for correct field order

2018-05-31 Thread Steve Longerbeam
o fix prepare_vdi_in_buffers() to give the VDIC the fields in whatever order they were received by the video source, and rely on the VDIC to sort out which is top and which is bottom. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-vdic.c | 12 ++-- 1 file changed, 2 inser

[PATCH v2 10/10] media: imx.rst: Update doc to reflect fixes to interlaced capture

2018-05-31 Thread Steve Longerbeam
Also add an example pipeline for unconverted capture with interweave on SabreAuto. Signed-off-by: Steve Longerbeam --- Documentation/media/v4l-drivers/imx.rst | 51 - 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/Documentation/media/v4l-drivers

[PATCH v2 09/10] media: imx-csi: Move crop/compose reset after filling default mbus fields

2018-05-31 Thread Steve Longerbeam
(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index c878a00..471130a 100644 --- a

[PATCH v2 06/10] media: imx: Fix field setting logic in try_fmt

2018-05-31 Thread Steve Longerbeam
order translation was backwards, SD NTSC is BT order, SD PAL is TB. Move this logic to new functions csi_try_field() and prp_try_field(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 22 +++-- drivers/staging/media/imx/imx-media-csi.c

[PATCH v2 02/10] gpu: ipu-csi: Check for field type alternate

2018-05-31 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 --- drivers/gpu/ipu-v3/ipu-csi.c | 3 ++- 1 file changed, 2 insert

Re: [PATCH v2 01/10] media: imx-csi: Pass sink pad field to ipu_csi_init_interface

2018-06-02 Thread Steve Longerbeam
On 06/01/2018 06:22 AM, Philipp Zabel wrote: On Thu, 2018-05-31 at 17:30 -0700, Steve Longerbeam wrote: The output pad's field type was being passed to ipu_csi_init_interface(), in order to deal with field type 'alternate' at the sink pad, which is not understood by ipu_csi

Re: [PATCH v2 04/10] media: imx: interweave only for sequential input/interlaced output fields

2018-06-02 Thread Steve Longerbeam
On 06/01/2018 06:33 AM, Philipp Zabel wrote: Hi Steve, On Thu, 2018-05-31 at 17:30 -0700, Steve Longerbeam wrote: IDMAC interlaced scan, a.k.a. interweave, should be enabled at the IDMAC output pads only if the input field type is 'seq-bt' or 'seq-tb', and the IDMAC outp

Re: [PATCH v2 06/10] media: imx: Fix field setting logic in try_fmt

2018-06-02 Thread Steve Longerbeam
On 06/01/2018 06:34 AM, Philipp Zabel wrote: On Thu, 2018-05-31 at 17:30 -0700, Steve Longerbeam wrote: The logic for setting field type in try_fmt at CSI and PRPENCVF entities wasn't quite right. The behavior should be: - No restrictions on field type at sink pads (except ANY, whi

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

2018-06-02 Thread Steve Longerbeam
On 05/30/2018 11:29 PM, Philipp Zabel wrote: On Wed, May 30, 2018 at 01:56:34PM -0700, Steve Longerbeam wrote: On 05/30/2018 11:46 AM, Krzysztof Hałasa wrote: Steve Longerbeam writes: but it should be possible for the user to explicitly request the field order on CSI output (I can make

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

2018-06-02 Thread Steve Longerbeam
On 06/01/2018 06:13 AM, Philipp Zabel wrote: Hi Krzysztof, On Fri, 2018-06-01 at 12:02 +0200, Krzysztof Hałasa wrote: Steve Longerbeam writes: I tend to agree, I've found conflicting info out there regarding PAL vs. NTSC field order. And I've never liked having to guess at in

Re: [PATCH v2 10/10] media: imx.rst: Update doc to reflect fixes to interlaced capture

2018-06-02 Thread Steve Longerbeam
On 06/01/2018 06:44 AM, Philipp Zabel wrote: On Thu, 2018-05-31 at 17:30 -0700, Steve Longerbeam wrote: Also add an example pipeline for unconverted capture with interweave on SabreAuto. Signed-off-by: Steve Longerbeam --- Documentation/media/v4l-drivers/imx.rst | 51

Re: [PATCH v2 10/10] media: imx.rst: Update doc to reflect fixes to interlaced capture

2018-06-02 Thread Steve Longerbeam
On 06/01/2018 06:44 AM, Philipp Zabel wrote: On Thu, 2018-05-31 at 17:30 -0700, Steve Longerbeam wrote: + +.. code-block:: none + + # Setup links + media-ctl -l "'adv7180 3-0021':0 -> 'ipu1_csi0_mux':1[1]" + media-ctl -l "'ipu1_csi0_m

Re: [PATCH v2 01/10] media: imx-csi: Pass sink pad field to ipu_csi_init_interface

2018-06-04 Thread Steve Longerbeam
On 06/03/2018 10:25 PM, Krzysztof Hałasa wrote: Steve Longerbeam writes: I think we should return to enforcing field order to userspace that matches field order from the source, which is what I had implemented previously. I agree with you that we should put off allowing inverting field

Re: [PATCH v2 04/10] media: imx: interweave only for sequential input/interlaced output fields

2018-06-04 Thread Steve Longerbeam
On 06/04/2018 01:27 AM, Philipp Zabel wrote: On Mon, 2018-06-04 at 07:35 +0200, Krzysztof Hałasa wrote: Philipp Zabel writes: This is ok in this patch, but we can't use this check in the following TRY_FMT patch as there is no way to interweave SEQ_TB -> INTERLACED_BT (because in SEQ_TB the

Re: [PATCH v2 04/10] media: imx: interweave only for sequential input/interlaced output fields

2018-06-05 Thread Steve Longerbeam
Hi Philipp, On 06/05/2018 01:07 AM, Philipp Zabel wrote: Hi Steve, On Mon, 2018-06-04 at 17:56 -0700, Steve Longerbeam wrote: On 06/04/2018 01:27 AM, Philipp Zabel wrote: On Mon, 2018-06-04 at 07:35 +0200, Krzysztof Hałasa wrote: Philipp Zabel writes: This is ok in this patch, but we

Re: [PATCH v2 04/10] media: imx: interweave only for sequential input/interlaced output fields

2018-06-06 Thread Steve Longerbeam
. On 06/06/2018 02:05 AM, Philipp Zabel wrote: Hi Steve, On Tue, 2018-06-05 at 12:00 -0700, Steve Longerbeam wrote: I'm probably misunderstanding you, so at the risk of overexplaining: There is no way we can ever produce a correct interlaced-tb frame in memory from a seq-bt frame output

[PATCH] media: i2c: adv748x: csi2: set entity function to video interface bridge

2018-06-08 Thread Steve Longerbeam
The ADV748x CSI-2 subdevices are HMDI/AFE to MIPI CSI-2 bridges. Signed-off-by: Steve Longerbeam --- drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c

Re: [PATCH] media: i2c: adv748x: csi2: set entity function to video interface bridge

2018-06-08 Thread Steve Longerbeam
Hi Kieran, On 06/08/2018 02:29 PM, Kieran Bingham wrote: Hi Steve, Thankyou for the patch. On 08/06/18 18:43, Steve Longerbeam wrote: The ADV748x CSI-2 subdevices are HMDI/AFE to MIPI CSI-2 bridges. Reading the documentation for MEDIA_ENT_F_VID_IF_BRIDGE, this seems reasonable. Out of

Re: [PATCH] media: i2c: adv748x: csi2: set entity function to video interface bridge

2018-06-08 Thread Steve Longerbeam
On 06/08/2018 02:37 PM, Kieran Bingham wrote: Hi Steve, On 08/06/18 22:34, Steve Longerbeam wrote: Hi Kieran, On 06/08/2018 02:29 PM, Kieran Bingham wrote: Hi Steve, Thankyou for the patch. On 08/06/18 18:43, Steve Longerbeam wrote: The ADV748x CSI-2 subdevices are HMDI/AFE to MIPI

Re: [PATCH] media: i2c: adv748x: csi2: set entity function to video interface bridge

2018-06-08 Thread Steve Longerbeam
On 06/08/2018 02:39 PM, Kieran Bingham wrote: Hi Steve, On 08/06/18 18:43, Steve Longerbeam wrote: The ADV748x CSI-2 subdevices are HMDI/AFE to MIPI CSI-2 bridges. Just spotted this :D s/HMDI/HDMI/ Sigh, sending v2. Steve Signed-off-by: Steve Longerbeam --- drivers/media/i2c

[PATCH v2] media: i2c: adv748x: csi2: set entity function to video interface bridge

2018-06-08 Thread Steve Longerbeam
The ADV748x CSI-2 subdevices are HDMI/AFE to MIPI CSI-2 bridges. Signed-off-by: Steve Longerbeam Acked-by: Kieran Bingham --- Changes since v1: - fix typo in commit message. --- drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH] gpu: ipu-v3: Allow negative offsets for interlaced scanning

2018-06-10 Thread Steve Longerbeam
Hi Philipp, On 06/01/2018 06:13 AM, Philipp Zabel wrote: The IPU also supports interlaced buffers that start with the bottom field. To achieve this, the the base address EBA has to be increased by a stride length and the interlace offset ILO has to be set to the negative stride. Signed-off-by:

Re: [PATCH] gpu: ipu-v3: Allow negative offsets for interlaced scanning

2018-06-11 Thread Steve Longerbeam
On 06/11/2018 02:19 AM, Philipp Zabel wrote: Hi Steve, On Sun, 2018-06-10 at 17:08 -0700, Steve Longerbeam wrote: Hi Philipp, On 06/01/2018 06:13 AM, Philipp Zabel wrote: The IPU also supports interlaced buffers that start with the bottom field. To achieve this, the the base address EBA

Re: [PATCH] gpu: ipu-v3: Allow negative offsets for interlaced scanning

2018-06-12 Thread Steve Longerbeam
Hi Javier, thanks for the confirmations. I'm working on a fix for imx-media. Steve On 06/12/2018 10:27 AM, Javier Martinez Canillas wrote: Hi Steve, On 06/11/2018 11:06 PM, Steve Longerbeam wrote: [snip] I've been made aware [1] that recently V4L2_FIELD_ALTERNATE has been clarif

Re: [PATCH] gpu: ipu-v3: Allow negative offsets for interlaced scanning

2018-06-14 Thread Steve Longerbeam
Hi Krzysztof, On 06/14/2018 02:39 AM, Krzysztof Hałasa wrote: Reporting from the field :-) The fix-csi-interlaced.3 branch is still a bit off the track I guess: Yes, it's still a WIP. A couple things are remaining: - fix interweave with negative offsets for planar pixel formats. - update th

Re: [PATCH] gpu: ipu-v3: Allow negative offsets for interlaced scanning

2018-06-19 Thread Steve Longerbeam
Hi Philipp, Krzysztof, On 06/15/2018 01:33 AM, Krzysztof Hałasa wrote: Steve Longerbeam writes: Right, the selection of interweave is moved to the capture devices, so the following will enable interweave: v4l2-ctl -dN --set-fmt-video=field=interlaced_tb and So the patch to adv7180 needs

Re: [PATCH] gpu: ipu-v3: Allow negative offsets for interlaced scanning

2018-06-20 Thread Steve Longerbeam
On 06/20/2018 01:54 AM, Philipp Zabel wrote: Hi Steve, On Tue, 2018-06-19 at 18:30 -0700, Steve Longerbeam wrote: I've found some time to diagnose the behavior of interweave with B/T line swapping (to support interlaced-bt) with planar formats. There are a couple problems (one know

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

2018-06-26 Thread Steve Longerbeam
On 06/26/2018 12:12 AM, Sakari Ailus wrote: On Wed, May 09, 2018 at 04:06:32PM -0700, Steve Longerbeam wrote: 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

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

2018-06-26 Thread Steve Longerbeam
On 06/26/2018 12:45 AM, Sakari Ailus wrote: On Tue, May 08, 2018 at 08:55:04PM -0700, Steve Longerbeam wrote: 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

Re: V4L2_CID_USER_MAX217X_BASE == V4L2_CID_USER_IMX_BASE

2018-06-26 Thread Steve Longerbeam
Hello Helmut, On 06/22/2018 12:51 AM, Helmut Grohne wrote: Hi, I found it strange that the macros V4L2_CID_USER_MAX217X_BASE and V4L2_CID_USER_IMX_BASE have equal value even though each of them state that they reserved a range. Those reservations look conflicting to me. Yes, they conflict.

[PATCH] media: v4l2-ctrls: Fix CID base conflict between MAX217X and IMX

2018-06-27 Thread Steve Longerbeam
D base the next available range at 0x10b0. Signed-off-by: Steve Longerbeam --- include/uapi/linux/v4l2-controls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 8d473c9..8a75ad7 100644 --- a/include/

Re: [PATCH 00/16] i.MX media mem2mem scaler

2018-07-05 Thread Steve Longerbeam
Hi Philipp, Thanks for this great patchset! Finally we have improved seams with tiled conversions, and relaxed width alignment requirements. Unfortunately this patchset isn't working correctly yet. It breaks tiled conversions with rotation. Trying the following conversion: input: 720x480, UYVY

Re: [PATCH 16/16] media: imx: add mem2mem device

2018-07-05 Thread Steve Longerbeam
Hi Philipp, On 06/22/2018 08:52 AM, Philipp Zabel wrote: Add a single imx-media mem2mem video device that uses the IPU IC PP (image converter post processing) task for scaling and colorspace conversion. On i.MX6Q/DL SoCs with two IPUs currently only the first IPU is used. The hardware only sup

Re: [PATCH] media: i2c: ov5640: Re-work MIPI startup sequence

2018-07-09 Thread Steve Longerbeam
Hi Jacopo, I tested this patch on the i.MX6Q SabreSD with the OV5640 module. It fixes the LP-11 timeout at stream on, but the captured images are completely blank/black. Steve On 07/06/2018 04:00 AM, Jacopo Mondi wrote: From: Jacopo Mondi Rework the MIPI interface startup sequence with the

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

2018-07-09 Thread Steve Longerbeam
er->subdevs[] array is stripped from v4l2-async and v4l2-subdev docs are updated to reflect the new method of adding asd's to notifiers. Signed-off-by: Steve Longerbeam Patches 07-14 (video-mux and the imx patches) are Reviewed-by: Philipp Zabel Patches 01-14 are Tested-by: Philip

Re: [PATCH] media: i2c: ov5640: Re-work MIPI startup sequence

2018-07-10 Thread Steve Longerbeam
ue, Jul 10, 2018 at 09:33:31AM +0200, jacopo mondi wrote: Hi Steve, thanks for testing! On Mon, Jul 09, 2018 at 02:52:09PM -0700, Steve Longerbeam wrote: Hi Jacopo, I tested this patch on the i.MX6Q SabreSD with the OV5640 module. It fixes the LP-11 timeout at stream on, but the captured ima

Re: [PATCH v2 0/2] media: i2c: ov5640: Re-work MIPI startup sequence

2018-07-10 Thread Steve Longerbeam
Hi Jacopo, Sorry to report my testing on SabreSD has same result as last time. This series fixes the LP-11 timeout at stream on but captured images are still blank. I tried the 640x480 mode with UYVY2X8. Here is the pad config: # media-ctl --get-v4l2 "'ov5640 1-003c':0"         [fmt:UYVY8_2X8/64

Re: [PATCH v2 2/4] media: ov5640: check chip id

2017-12-03 Thread Steve Longerbeam
On 11/29/2017 09:11 AM, Hugues Fruchet wrote: Verify that chip identifier is correct before starting streaming Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/o

Re: [PATCH v2 3/4] media: ov5640: add support of DVP parallel interface

2017-12-03 Thread Steve Longerbeam
On 11/29/2017 09:11 AM, Hugues Fruchet wrote: Add support of DVP parallel mode in addition of existing MIPI CSI mode. The choice between two modes and configuration is made through device tree. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/ov5640.c | 101 ++

Re: [PATCH 0/9] media: imx: Add better OF graph support

2017-12-07 Thread Steve Longerbeam
Hi Hans, On 12/04/2017 05:44 AM, Hans Verkuil wrote: Hi Steve, On 10/28/2017 10:36 PM, Steve Longerbeam wrote: This is a set of patches that improve support for more complex OF graphs. Currently the imx-media driver only supports a single device with a single port connected directly to

<    5   6   7   8   9   10   11   12   >