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

2018-03-10 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 | 110 ++ drivers/staging/media/imx/imx-media-internal-sd.c | 5 +- drivers/staging/media/imx/imx-me

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

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

2018-03-10 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 v2 09/13] media: staging/imx: of: Remove recursive graph walk

2018-03-10 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 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 --- drivers/staging/media/imx/imx-media-csi.c | 11 ++- 1 file changed, 10

[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 --- Changes since v1: - add #include for kcalloc() declaration

[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 --- Changes since v1:

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

2018-03-10 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 v2 03/13] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-03-10 Thread Steve Longerbeam
if it is ever called 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 --- drivers/media

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

2018-03-10 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: v2: - don't pass an empty endpoint to th

[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
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 --- drivers/media/v4l2-core/v4l2-fwnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2

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

2018-03-09 Thread Steve Longerbeam
x27;Changes 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

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() 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 Signed-off-by: Fabio Estevam Reviewed-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 5 -

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 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 --- drivers/media/pci/intel/ipu3/ipu3-cio2.c| 3

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

2018-02-21 Thread Steve Longerbeam
if it is ever called 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 --- drivers/media

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

2018-02-21 Thread Steve Longerbeam
tering a subdev 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 Acked-by: Philipp Zabel Steve Longerbeam (13)

[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 --- drivers/media/platform/video-mux.c | 35

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

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

[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 --- drivers/staging/media/imx/imx-media-csi.c | 11 ++- 1 file changed, 10

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

2018-02-21 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 12/13] media: staging/imx: Switch to v4l2_async_notifier_add_subdev

2018-02-21 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 | 110 ++ drivers/staging/media/imx/imx-media-internal-sd.c | 5 +- drivers/staging/media/imx/imx-me

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

[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
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 04/13] media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev

2018-02-21 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] media: imx.rst: Fix formatting errors

2018-02-16 Thread Steve Longerbeam
Fix a few formatting errors. Signed-off-by: Steve Longerbeam --- 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/media/v4l-drivers/imx.rst index

Re: i.MX53 using imx-media to capture analog video through ADV7180

2018-02-16 Thread Steve Longerbeam
Hi Mathew, On 02/14/2018 07:44 AM, Fabio Estevam wrote: [Adding Steve and Philipp in case they could provide some suggestions] On Wed, Feb 14, 2018 at 1:21 PM, Matthew Starr wrote: I have successfully modified device tree files in the mainline 4.15.1 kernel to get a display product using th

Re: [PATCH v2] media: imx: capture: reformat line to 80 chars or less

2018-02-15 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 02/15/2018 01:25 AM, Parthiban Nallathambi wrote: This is a cleanup patch to fix line length issue found by checkpatch.pl script. In this patch, line 144 have been wrapped. Signed-off-by: Parthiban Nallathambi --- Changes in v2: - Changed commit message

Re: [PATCH] imx/Kconfig: add depends on HAS_DMA

2018-02-15 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 02/15/2018 07:54 AM, Hans Verkuil wrote: Add missing dependency. Signed-off-by: Hans Verkuil --- diff --git a/drivers/staging/media/imx/Kconfig b/drivers/staging/media/imx/Kconfig index 59b380cc6d22..bfc17de56b17 100644 --- a/drivers/staging/media/imx/Kconfig

Re: [PATCH] staging: media: reformat line to 80 chars or less

2018-02-14 Thread Steve Longerbeam
Hi Parthiban, please rename the commit title to "media: imx: capture: reformat line to 80 chars or less" Otherwise it is fine with me. Steve On 02/12/2018 04:05 AM, Parthiban Nallathambi wrote: This is a cleanup patch to fix line length issue found by checkpatch.pl script. In this patch, li

[PATCH] media: imx: mipi csi-2: Fix set_fmt try

2018-02-11 Thread Steve Longerbeam
csi2_set_fmt() was setting the try_fmt only on the first pad, and pad index was ignored. Fix by introducing __csi2_get_fmt(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx6-mipi-csi2.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff

[PATCH v2] media: staging/imx: Implement init_cfg subdev pad op

2018-02-11 Thread Steve Longerbeam
Implement the init_cfg pad op in all imx-media subdevices. The try formats are initialized to the current active formats on all pads. Signed-off-by: Steve Longerbeam --- Changes since v1: - It isn't necessary to acquire the subdev locks in the init_cfg pad op, the op only writes the try_f

[PATCH] media: staging/imx: Implement init_cfg subdev pad op

2018-02-10 Thread Steve Longerbeam
Implement the init_cfg pad op in all imx-media subdevices. The TRY formats are initialized to the same default active formats as when the subdevs are registered. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prp.c | 40 +++ drivers/staging/media/imx

Re: [PATCH v2] media: imx-media-internal-sd: Use empty initializer

2018-02-10 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 02/09/2018 03:11 PM, Fabio Estevam wrote: From: Fabio Estevam When building with W=1 the following warning shows up: drivers/staging/media/imx/imx-media-internal-sd.c:274:49: warning: Using plain integer as NULL pointer Fix this problem by using an empty

Re: [PATCH] media: imx: csi: fix enum_mbus_code for unknown mbus format codes

2018-02-09 Thread Steve Longerbeam
Hi Philipp, On 02/08/2018 12:01 PM, Hans Verkuil wrote: On 02/08/2018 08:27 PM, Steve Longerbeam wrote: On 02/08/2018 06:47 AM, Philipp Zabel wrote: If no imx_media_pixfmt is found for a given mbus format code, we shouldn't crash. Return -EINVAL for any index. Hi Philipp

Re: [PATCH] media: imx: csi: fix enum_mbus_code for unknown mbus format codes

2018-02-09 Thread Steve Longerbeam
Hi Hans, On 02/08/2018 12:01 PM, Hans Verkuil wrote: On 02/08/2018 08:27 PM, Steve Longerbeam wrote: On 02/08/2018 06:47 AM, Philipp Zabel wrote: If no imx_media_pixfmt is found for a given mbus format code, we shouldn't crash. Return -EINVAL for any index. Hi Philipp

Re: [PATCH v2] media: imx-media-internal-sd: Use empty initializer

2018-02-09 Thread Steve Longerbeam
Hi Fabio, On 02/09/2018 03:11 PM, Fabio Estevam wrote: From: Fabio Estevam When building with W=1 the following warning shows up: drivers/staging/media/imx/imx-media-internal-sd.c:274:49: warning: Using plain integer as NULL pointer Fix this problem by using an empty initializer, which gua

Re: [PATCH] media: imx: csi: fix enum_mbus_code for unknown mbus format codes

2018-02-08 Thread Steve Longerbeam
On 02/08/2018 06:47 AM, Philipp Zabel wrote: If no imx_media_pixfmt is found for a given mbus format code, we shouldn't crash. Return -EINVAL for any index. Hi Philipp, If imx_media_find_mbus_format() returns NULL at that location, it means the current format has an invalid pixel code. It's

Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

2018-01-24 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 01/23/2018 04:43 PM, Gustavo A. R. Silva wrote: Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch. This issue was detected with the help of Coccinelle. Fixes: 0b2e9e7947e7 ("media: stagin

Re: [PATCH] media: staging/imx: Checking the right variable in vdic_get_ipu_resources()

2018-01-15 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 01/15/2018 12:11 AM, Dan Carpenter wrote: We recently changed this error handling around but missed this error pointer check. We're testing "priv->vdi_in_ch_n" instead of "ch" so the error handling can't be triggered. Fixes:

Re: IMX6 interlaced capture

2018-01-04 Thread Steve Longerbeam
On 01/04/2018 01:11 PM, Tim Harvey wrote: On Thu, Jan 4, 2018 at 10:51 AM, Steve Longerbeam wrote: On 01/04/2018 09:57 AM, Tim Harvey wrote: On Tue, Jan 2, 2018 at 6:00 PM, Steve Longerbeam wrote: Hi Tim, Happy New Year! And pardon the delay. On 12/28/2017 01:56 PM, Tim Harvey wrote

Re: IMX6 interlaced capture

2018-01-04 Thread Steve Longerbeam
On 01/04/2018 10:51 AM, Steve Longerbeam wrote: On 01/04/2018 09:57 AM, Tim Harvey wrote: Try this hack as an experiment: modify is_parallel_16bit_bus() in imx-media-csi.c to simply return false, and see if the above pipeline works. I'm currently on 4.15-rc1 which doesn

Re: IMX6 interlaced capture

2018-01-04 Thread Steve Longerbeam
On 01/04/2018 09:57 AM, Tim Harvey wrote: On Tue, Jan 2, 2018 at 6:00 PM, Steve Longerbeam wrote: Hi Tim, Happy New Year! And pardon the delay. On 12/28/2017 01:56 PM, Tim Harvey wrote: Steve/Hans, I'm trying to get interlaced capture working with the TDA1997x driver I've be

Re: IMX6 interlaced capture

2018-01-02 Thread Steve Longerbeam
Hi Tim, Happy New Year! And pardon the delay. On 12/28/2017 01:56 PM, Tim Harvey wrote: Steve/Hans, I'm trying to get interlaced capture working with the TDA1997x driver I've been working on which is connected to an IMX6 CSI. The particular board I'm currently testing on is an IMX6Q which has

Re: [PATCH] media: imx: allow to build with COMPILE_TEST

2017-12-19 Thread Steve Longerbeam
On 12/19/2017 03:42 AM, Philipp Zabel wrote: Allow building this driver for other platforms under COMPILE_TEST. Suggested-by: Mauro Carvalho Chehab Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam --- drivers/staging/media/imx/Kconfig | 3 ++- 1 file changed, 2 insertions

[PATCH v2 5/9] media: staging/imx: pass fwnode handle to find/add async subdev

2017-12-14 Thread Steve Longerbeam
Pass the subdev's fwnode_handle to imx_media_find_async_subdev() and imx_media_add_async_subdev(), instead of a device_node. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-dev.c | 20 ++-- drivers/staging/media/imx/imx-media-of.c | 7 +++ dr

[PATCH v2 6/9] media: staging/imx: remove static subdev arrays

2017-12-14 Thread Steve Longerbeam
At async completion, allocate the asd pointer list and pull the asd's off asd_list for v4l2_async_notifier_register(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prp.c| 4 +- drivers/staging/media/imx/imx-media-csi.c | 9 +- drivers/stag

[PATCH v2 1/9] media: staging/imx: get CSI bus type from nearest upstream entity

2017-12-14 Thread Steve Longerbeam
p_frames op to determine if a delay was needed before enabling the CSI at stream on. If necessary this will have to be re-addressed at a later time. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 188 drivers/staging/media/imx/imx-medi

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

2017-12-14 Thread Steve Longerbeam
notify for unknown sources" Tested by: Steve Longerbeam on SabreLite with the OV5640 Tested-by: Philipp Zabel on Nitrogen6X with the TC358743. Tested-by: Russell King with the IMX219 History: v2: - this version is to resolve merge conflicts only, no functional changes since v1. Stev

[PATCH v2 4/9] media: staging/imx: remove devname string from imx_media_subdev

2017-12-14 Thread Steve Longerbeam
A separate string for the device name, for DEVNAME async match, was never needed. Just assign the asd device name to the passed platform device name pointer in imx_media_add_async_subdev(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-dev.c | 3 +-- drivers/staging

[PATCH v2 2/9] media: staging/imx: remove static media link arrays

2017-12-14 Thread Steve Longerbeam
list: imx_media_add_of_subdevs() imx_media_add_internal_subdevs() and these functions, called at async completion, which create the media links: imx_media_create_of_links() imx_media_create_csi_of_links() imx_media_create_internal_links() Signed-off-by: Steve Longerbeam --- drivers/staging/media/im

[PATCH v2 9/9] media: staging/imx: update TODO

2017-12-14 Thread Steve Longerbeam
tions. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/TODO | 63 ++ 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/imx/TODO b/drivers/staging/media/imx/TODO index 0bee313..9eb7326 100644 --- a/drivers/staging/

[PATCH v2 7/9] media: staging/imx: convert static vdev lists to list_head

2017-12-14 Thread Steve Longerbeam
video device from the master list. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-capture.c | 2 + drivers/staging/media/imx/imx-media-dev.c | 77 +++ drivers/staging/media/imx/imx-media-utils.c | 16 +- drivers/staging/media/imx/imx-media

[PATCH v2 8/9] media: staging/imx: reorder function prototypes

2017-12-14 Thread Steve Longerbeam
Re-order some of the function prototypes in imx-media.h to group them correctly by source file. No functional changes. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media.h | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers

[PATCH v2 3/9] media: staging/imx: of: allow for recursing downstream

2017-12-14 Thread Steve Longerbeam
e, so 'num_{sink|src}_pads' is no longer used and is removed. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-internal-sd.c | 17 - drivers/staging/media/imx/imx-media-of.c | 78 ++- drivers/staging/media/imx/imx-media.h

Re: [GIT PULL FOR v4.16] media: imx: Add better OF graph support

2017-12-14 Thread Steve Longerbeam
On 12/14/2017 04:13 AM, Hans Verkuil wrote: On 08/12/17 23:48, Steve Longerbeam wrote: On 12/08/2017 08:38 AM, Mauro Carvalho Chehab wrote: Em Fri, 8 Dec 2017 11:56:58 +0100 Hans Verkuil escreveu: Note: the new v4l2-async work makes it possible to simplify this. That will be done in

Re: [GIT PULL FOR v4.16] media: imx: Add better OF graph support

2017-12-08 Thread Steve Longerbeam
up to 82737cbb02f269b8eb608c7bd906a79072f6adad: media: staging/imx: update TODO (2017-12-04 14:05:19 +0100) Steve Longerbeam (9): media: staging/imx: get CSI bus type from nearest upstream entity There are some non-trivial conflicts on

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

2017-12-07 Thread Steve Longerbeam
On 12/07/2017 03:23 PM, Steve Longerbeam wrote: Hi Hans, On 12/04/2017 05:44 AM, Hans Verkuil wrote: Of course, any such simplification can also be done after this series has been applied, but I don't know what your thoughts are on this. I do prefer the sub-notifier approa

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

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 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 8/8] [media] staging: imx: use ktime_t for timestamps

2017-12-01 Thread Steve Longerbeam
Hi Arnd, This looks fine to me, except for a couple things... On 11/27/2017 05:20 AM, Arnd Bergmann wrote: The imx media driver passes around monotonic timestamps in the deprecated 'timespec' format. This is not a problem for the driver, as they won't overflow, but moving to either timespec64 o

Re: [PATCH v2] media: imx: Remove incorrect check for queue state in start/stop_streaming

2017-12-01 Thread Steve Longerbeam
called but vb2_is_streaming will already return true. Also removed the queue state check in stop_streaming since it's not valid there either. Reviewed-by: Steve Longerbeam Signed-off-by: Ian Jamison --- Since v1: Remove check in capture_stop_streaming as recommended by Hans. dr

[PATCH 5/9] media: staging/imx: pass fwnode handle to find/add async subdev

2017-10-28 Thread Steve Longerbeam
Pass the subdev's fwnode_handle to imx_media_find_async_subdev() and imx_media_add_async_subdev(), instead of a device_node. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-dev.c | 20 ++-- drivers/staging/media/imx/imx-media-of.c | 7 +++ dr

[PATCH 4/9] media: staging/imx: remove devname string from imx_media_subdev

2017-10-28 Thread Steve Longerbeam
A separate string for the device name, for DEVNAME async match, was never needed. Just assign the asd device name to the passed platform device name pointer in imx_media_add_async_subdev(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-dev.c | 3 +-- drivers/staging

[PATCH 6/9] media: staging/imx: remove static subdev arrays

2017-10-28 Thread Steve Longerbeam
At async completion, allocate the asd pointer list and pull the asd's off asd_list for v4l2_async_notifier_register(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prp.c| 4 +- drivers/staging/media/imx/imx-media-csi.c | 9 +- drivers/stag

[PATCH 1/9] media: staging/imx: get CSI bus type from nearest upstream entity

2017-10-28 Thread Steve Longerbeam
p_frames op to determine if a delay was needed before enabling the CSI at stream on. If necessary this will have to be re-addressed at a later time. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 188 drivers/staging/media/imx/imx-medi

[PATCH 3/9] media: staging/imx: of: allow for recursing downstream

2017-10-28 Thread Steve Longerbeam
e, so 'num_{sink|src}_pads' is no longer used and is removed. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-internal-sd.c | 17 - drivers/staging/media/imx/imx-media-of.c | 78 ++- drivers/staging/media/imx/imx-media.h

[PATCH 2/9] media: staging/imx: remove static media link arrays

2017-10-28 Thread Steve Longerbeam
list: imx_media_add_of_subdevs() imx_media_add_internal_subdevs() and these functions, called at async completion, which create the media links: imx_media_create_of_links() imx_media_create_csi_of_links() imx_media_create_internal_links() Signed-off-by: Steve Longerbeam --- drivers/staging/media/im

[PATCH 7/9] media: staging/imx: convert static vdev lists to list_head

2017-10-28 Thread Steve Longerbeam
video device from the master list. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-capture.c | 2 + drivers/staging/media/imx/imx-media-dev.c | 77 +++ drivers/staging/media/imx/imx-media-utils.c | 16 +- drivers/staging/media/imx/imx-media

[PATCH 9/9] media: staging/imx: update TODO

2017-10-28 Thread Steve Longerbeam
tions. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/TODO | 63 ++ 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/imx/TODO b/drivers/staging/media/imx/TODO index 0bee313..9eb7326 100644 --- a/drivers/staging/

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

2017-10-28 Thread Steve Longerbeam
notify for unknown sources" "[PATCH RFC] media: staging/imx: fix complete handler" Tested by: Steve Longerbeam on SabreLite with the OV5640 Tested-by: Philipp Zabel on Nitrogen6X with the TC358743. Tested-by: Russell King with the IMX219 Steve Longerbeam (9): media: stag

[PATCH 8/9] media: staging/imx: reorder function prototypes

2017-10-28 Thread Steve Longerbeam
Re-order some of the function prototypes in imx-media.h to group them correctly by source file. No functional changes. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media.h | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers

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

2017-10-17 Thread Steve Longerbeam
imx_media_link_notify() should not return error if the source subdevice of the link is not found in the list of subdevices that registered via async. If the subdev has controls they will be inherited via a link_notify that starts from a known source async subdev. Signed-off-by: Steve Longerbeam

Re: [PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR

2017-10-17 Thread Steve Longerbeam
t;no sensor attached\n"); - return PTR_ERR(priv->sensor); + return PTR_ERR(sensor); } mutex_lock(&priv->lock); Reviewed-by: Steve Longerbeam

Re: [PATCH][MEDIA] i.MX6: Fix MIPI CSI-2 LP-11 check

2017-10-17 Thread Steve Longerbeam
bus.num_data_lanes) - 1) << + PHY_STOPSTATEDATA_BIT); ret = readl_poll_timeout(csi2->base + CSI2_PHY_STATE, reg, (reg & mask) == mask, 0, 50); Thanks for catching. Reviewed-by: Steve Longerbeam

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

2017-10-11 Thread Steve Longerbeam
On 10/11/2017 04:06 PM, Russell King - ARM Linux wrote: On Wed, Oct 11, 2017 at 03:14:26PM -0700, Steve Longerbeam wrote: On 10/11/2017 02:49 PM, Russell King - ARM Linux wrote: On Tue, Oct 03, 2017 at 12:09:13PM -0700, Steve Longerbeam wrote: imx_media_link_notify() should not return

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

2017-10-11 Thread Steve Longerbeam
On 10/11/2017 02:49 PM, Russell King - ARM Linux wrote: On Tue, Oct 03, 2017 at 12:09:13PM -0700, Steve Longerbeam wrote: 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 wi

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

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-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 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] 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: 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: IMX6 ADV7180 no /dev/media

2017-09-15 Thread Steve Longerbeam
On 09/15/2017 04:28 PM, Tim Harvey wrote: On Fri, Sep 15, 2017 at 3:26 PM, Steve Longerbeam wrote: Hi Tim, On 09/15/2017 02:26 PM, Tim Harvey wrote: Greetings, I'm testing Linux master built with imx_v6_v7_defconfig on a GW51xx which has an ADV7180 analog video decoder and am not s

Re: IMX6 ADV7180 no /dev/media

2017-09-15 Thread Steve Longerbeam
Hi Tim, On 09/15/2017 02:26 PM, Tim Harvey wrote: Greetings, I'm testing Linux master built with imx_v6_v7_defconfig on a GW51xx which has an ADV7180 analog video decoder and am not seeing the imx6 /dev/media node get created: [    0.00] OF: fdt: Machine model: Gateworks Ventana i.MX6

Re: [PATCH] [media] staging/imx: always select VIDEOBUF2_DMA_CONTIG

2017-08-14 Thread Steve Longerbeam
Thanks, Reviewed-by: Steve Longerbeam Steve On 08/07/2017 03:49 AM, Arnd Bergmann wrote: I ran into a rare build error during randconfig testing: drivers/staging/media/imx/imx-media-capture.o: In function `capture_stop_streaming': imx-media-capture.c:(.text+0x224): undefined referen

Re: [PATCH 6/6] [media] media: imx: capture: constify vb2_ops structures

2017-08-14 Thread Steve Longerbeam
Thanks, Reviewed-by: Steve Longerbeam Steve On 08/05/2017 03:47 AM, Julia Lawall wrote: These vb2_ops structures are only stored in the ops field of a vb2_queue structure, which is declared as const. Thus the vb2_ops structures themselves can be const. Done with the help of Coccinelle

Re: [PATCH] [media] media: imx: use setup_timer

2017-08-14 Thread Steve Longerbeam
Thanks, Reviewed-by: Steve Longerbeam Tested-by: Steve Longerbeam Steve On 08/13/2017 11:39 AM, Cihangir Akturk wrote: Use setup_timer function instead of initializing timer with the function and data fields. Generated by: scripts/coccinelle/api/setup_timer.cocci. Signed-off-by: Cihangir

Re: [PATCH] [media] media: imx: depends on V4L2 sub-device userspace API

2017-08-14 Thread Steve Longerbeam
Hi Akturk, this has already been fixed, see 4560cb4a0c ("media: imx: add VIDEO_V4L2_SUBDEV_API dependency"). Steve On 08/14/2017 04:00 AM, Cihangir Akturk wrote: This driver uses various v4l2_subdev_get_try_*() functions provided by V4L2 sub-device userspace API. Current configuration of Kconf

Re: [PATCH] media: imx: prpencvf: enable double write reduction

2017-07-22 Thread Steve Longerbeam
place duplicate U/V samples on the bus in the first place? Anyway, thanks for the heads-up on this. Steve On 07/22/2017 02:21 PM, Steve Longerbeam wrote: For the write channels with 4:2:0 subsampled YUV formats, avoid chroma overdraw by only writing chroma for even lines. Reduces necessary

[PATCH] media: imx: prpencvf: enable double write reduction

2017-07-22 Thread Steve Longerbeam
For the write channels with 4:2:0 subsampled YUV formats, avoid chroma overdraw by only writing chroma for even lines. Reduces necessary write memory bandwidth by at least 25% (more with rotation enabled). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 11

Re: [PATCH] [media] imx: add VIDEO_V4L2_SUBDEV_API dependency

2017-07-22 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 07/21/2017 09:21 AM, Arnd Bergmann wrote: Without this, I get a build error: drivers/staging/media/imx/imx-media-vdic.c: In function '__vdic_get_fmt': drivers/staging/media/imx/imx-media-vdic.c:554:10: error: implicit declaration o

Re: [PATCH] [media] ov5640: Remove unneeded gpiod NULL check

2017-07-22 Thread Steve Longerbeam
Acked-by: Steve Longerbeam On 07/19/2017 07:41 PM, Fabio Estevam wrote: From: Fabio Estevam The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: Fabio Estevam --- drivers/media/i2c/ov5640.c | 3 +-- 1 file changed, 1

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