Re: [PATCH 1/3] v4l2-subdev: Add subdev ioctl support for ENUM/GET/SET INPUT

2020-06-25 Thread Steve Longerbeam
Hi Laurent, all, On 6/24/20 7:01 PM, Laurent Pinchart wrote: Hi Jacopo, On Wed, Jun 24, 2020 at 09:53:07AM +0200, Jacopo Mondi wrote: On Tue, Jun 16, 2020 at 12:00:15PM +0200, Ramzi BEN MEFTAH wrote: From: Steve Longerbeam +Niklas, +Laurent Niklas, Laurent, how does this play

Re: [PATCH] media: rcar-vin: Move media_device_register to async completion

2020-06-17 Thread Steve Longerbeam
: From: Steve Longerbeam The media_device is registered during driver probe, before async completion, so it is possible for .link_notify to be called before all devices are bound. Fix this by moving media_device_register() to rvin_group_notify_complete(). This ensures that all devices are now bound

Re: [PATCH v8 5/5] media: imx: Try colorimetry at both sink and source pads

2019-10-22 Thread Steve Longerbeam
AM, Rui Miguel Silva wrote: Hi Laurent, On Tue 22 Oct 2019 at 02:44, Laurent Pinchart wrote: Hi Steve, On Tue, May 21, 2019 at 06:03:17PM -0700, Steve Longerbeam wrote: Retask imx_media_fill_default_mbus_fields() to try colorimetry parameters, renaming it to to imx_media_try_colorimetry

Re: [PATCH v8 5/5] media: imx: Try colorimetry at both sink and source pads

2019-10-21 Thread Steve Longerbeam
On 10/21/19 8:26 PM, Steve Longerbeam wrote: Hi Laurent, On 10/21/19 6:44 PM, Laurent Pinchart wrote: Hi Steve, On Tue, May 21, 2019 at 06:03:17PM -0700, Steve Longerbeam wrote: Retask imx_media_fill_default_mbus_fields() to try colorimetry parameters, renaming

Re: [PATCH v8 5/5] media: imx: Try colorimetry at both sink and source pads

2019-10-21 Thread Steve Longerbeam
Hi Laurent, On 10/21/19 6:44 PM, Laurent Pinchart wrote: Hi Steve, On Tue, May 21, 2019 at 06:03:17PM -0700, Steve Longerbeam wrote: Retask imx_media_fill_default_mbus_fields() to try colorimetry parameters, renaming it to to imx_media_try_colorimetry(), and call it at both sink and source

[PATCH 1/2] clocksource/drivers/imx: add input capture support

2019-10-15 Thread Steve Longerbeam
on both rising and falling edges of the input capture signal. - dev_id: a context pointer given back to the handler. void mxc_free_input_capture(unsigned int chan, void *dev_id); This disables the given input capture channel in the GPT. Signed-off-by: Steve Longerbeam

[PATCH 2/2] dt-bindings: timer: imx: gpt: Add pin group bindings for input capture

2019-10-15 Thread Steve Longerbeam
Add pin group bindings to support input capture function of the i.MX GPT. Signed-off-by: Steve Longerbeam --- .../devicetree/bindings/timer/fsl,imxgpt.txt | 28 +++ 1 file changed, 28 insertions(+) diff --git a/Documentation/devicetree/bindings/timer/fsl,imxgpt.txt b

Re: [PATCH] media: i2c: adv7180: fix adv7280 BT.656-4 compatibility

2019-10-07 Thread Steve Longerbeam
that may be misconfigured already (or even completely unused). I'm cc'ing Steve Longerbeam as well as at one point he was suggesting adding a 'newavmode' property to the adv7180 bindings and likely recalls the discussions there. I've never understood why the adv7180 driver configures a non

Re: [PATCH 15/22] media: imx7-media-csi: Create media links in bound notifier

2019-09-02 Thread Steve Longerbeam
Hi Rui, On 9/2/19 2:38 AM, Rui Miguel Silva wrote: Hi Steve, On Tue 06 Aug 2019 at 00:34, Steve Longerbeam wrote: Implement a notifier bound op to register media links from the remote sub-device's source pad(s) to the CSI sink pad. Signed-off-by: Steve Longerbeam --- drivers/staging/media

[PATCH v2 2/2] media: imx: Move pads init to probe

2019-08-24 Thread Steve Longerbeam
ack. But calling media_entity_pads_init() in the .registered callbacks was done for legacy reasons and is no longer necessary, so move the call to media_entity_pads_init() into the subdevice's probe functions. This fixes the duplicate pad obejcts in the media device pad list. Signed-off-by: St

[PATCH v2 1/2] media: imx: Move capture device init to registered

2019-08-24 Thread Steve Longerbeam
registered() and csi_unregistered(). This will create a new un-initialized video device when the CSI is re-registered. Do this for all the subdevices that register a capture device. Reported-by: Russell King Signed-off-by: Steve Longerbeam --- Changes in v2: Add missing local var ic_priv in prp_registered()

[PATCH 1/2] media: imx: Move capture device init to registered

2019-08-23 Thread Steve Longerbeam
registered() and csi_unregistered(). This will create a new un-initialized video device when the CSI is re-registered. Do this for all the subdevices that register a capture device. Reported-by: Russell King Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpen

[PATCH 2/2] media: imx: Move pads init to probe

2019-08-23 Thread Steve Longerbeam
ack. But calling media_entity_pads_init() in the .registered callbacks was done for legacy reasons and is no longer necessary, so move the call to media_entity_pads_init() into the subdevice's probe functions. This fixes the duplicate pad obejcts in the media device pad list. Signed-off-by: St

Re: [BUG] removing and reinserting imx-media causes kernel to explode

2019-08-18 Thread Steve Longerbeam
On 8/14/19 2:25 AM, Russell King - ARM Linux admin wrote: I just did this: rmmod imx-media modprobe imx-media and was greeted by the below kernel messages. Yes this needs fixing, the CSI needs to check first that it is already registered before going through the ->registered() steps.

Re: [PATCH 04/22] media: Move v4l2_fwnode_parse_link from v4l2 to driver base

2019-08-15 Thread Steve Longerbeam
On 8/14/19 4:15 PM, Russell King - ARM Linux admin wrote: On Wed, Aug 14, 2019 at 04:00:30PM -0700, Steve Longerbeam wrote: On 8/14/19 3:04 PM, Russell King - ARM Linux admin wrote: On Wed, Aug 14, 2019 at 12:04:41PM -0700, Steve Longerbeam wrote: On 8/14/19 3:30 AM, Russell King - ARM

Re: [PATCH 04/22] media: Move v4l2_fwnode_parse_link from v4l2 to driver base

2019-08-14 Thread Steve Longerbeam
On 8/14/19 3:04 PM, Russell King - ARM Linux admin wrote: On Wed, Aug 14, 2019 at 12:04:41PM -0700, Steve Longerbeam wrote: On 8/14/19 3:30 AM, Russell King - ARM Linux admin wrote: On Tue, Aug 06, 2019 at 09:53:41AM -0700, Steve Longerbeam wrote: The full patchset doesn't seem to be up

Re: [PATCH 04/22] media: Move v4l2_fwnode_parse_link from v4l2 to driver base

2019-08-14 Thread Steve Longerbeam
On 8/14/19 3:30 AM, Russell King - ARM Linux admin wrote: On Tue, Aug 06, 2019 at 09:53:41AM -0700, Steve Longerbeam wrote: The full patchset doesn't seem to be up yet, but see [1] for the cover letter. Was the entire series copied to the mailing lists, or just selected patches? I only saw

[PATCH v2] media: docs-rst: Clarify duration of LP-11 mode

2019-08-13 Thread Steve Longerbeam
From: Steve Longerbeam Add a sentence that makes it more clear when the CSI-2 transmitter must, if possible, exit LP-11 mode. That is, maintain LP-11 mode until stream on, at which point the transmitter activates the clock lane and transition to HS mode. Signed-off-by: Steve Longerbeam

Re: [PATCH] media: docs-rst: Clarify duration of LP-11 mode

2019-08-12 Thread Steve Longerbeam
Hi Ian, On 8/12/19 1:53 AM, Ian Arkver wrote: Hi Steve, On 11/08/2019 18:36, Steve Longerbeam wrote: Add a sentence that makes it more clear when the CSI-2 transmitter must, if possible, exit LP-11 mode. That is, maintain LP-11 mode until stream on, at which point the transmitter activates

[PATCH] media: docs-rst: Clarify duration of LP-11 mode

2019-08-11 Thread Steve Longerbeam
Add a sentence that makes it more clear when the CSI-2 transmitter must, if possible, exit LP-11 mode. That is, maintain LP-11 mode until stream on, at which point the transmitter activates the clock lane and transition to HS mode. Signed-off-by: Steve Longerbeam --- Documentation/media/kapi

[PATCH] media: imx: mipi csi-2: Release DPHY reset in s_power

2019-08-10 Thread Steve Longerbeam
until stream on, then this should still work fine. The receiver will detect the HS transition at step 6, when streaming is enabled at the transmitter. Tested on imx6q SabreSD with OV5640. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx6-mipi-csi2.c | 93 +- 1

Re: [PATCH 04/22] media: Move v4l2_fwnode_parse_link from v4l2 to driver base

2019-08-06 Thread Steve Longerbeam
Hi Andy, On 8/5/19 11:41 PM, Andy Shevchenko wrote: On Tue, Aug 6, 2019 at 2:37 AM Steve Longerbeam wrote: There is nothing v4l2-specific about v4l2_fwnode_{parse|put}_link(). Make these functions more generally available by moving them to driver base, with the appropriate name changes

[PATCH 03/22] media: entity: Convert media_entity_get_fwnode_pad() args to const

2019-08-05 Thread Steve Longerbeam
The function media_entity_get_fwnode_pad() can be passed the const local_fwnode member from a struct fwnode_endpoint, so the fwnode argument should be a const pointer. Change the direction_flags argument to const in the process. Signed-off-by: Steve Longerbeam --- drivers/media/mc/mc-entity.c

[PATCH 15/22] media: imx7-media-csi: Create media links in bound notifier

2019-08-05 Thread Steve Longerbeam
Implement a notifier bound op to register media links from the remote sub-device's source pad(s) to the CSI sink pad. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx7-media-csi.c | 24 ++ 1 file changed, 24 insertions(+) diff --git a/drivers/staging/media

[PATCH 05/22] media: entity: Add functions to convert fwnode endpoints to media links

2019-08-05 Thread Steve Longerbeam
into media links. Signed-off-by: Steve Longerbeam --- drivers/media/mc/mc-entity.c | 178 +++ include/media/media-entity.h | 71 ++ 2 files changed, 249 insertions(+) diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c index

[PATCH 13/22] media: imx: mipi csi-2: Create media links in bound notifier

2019-08-05 Thread Steve Longerbeam
Implement a notifier bound op to register media links from the remote sub-device's source pad(s) to the mipi csi-2 receiver sink pad. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx6-mipi-csi2.c | 24 ++ 1 file changed, 24 insertions(+) diff --git

[PATCH 14/22] media: imx7-mipi-csis: Create media links in bound notifier

2019-08-05 Thread Steve Longerbeam
Implement a notifier bound op to register media links from the remote sub-device's source pad(s) to the mipi csi-2 receiver sink pad. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx7-mipi-csis.c | 25 ++ 1 file changed, 25 insertions(+) diff --git

[PATCH 10/22] media: st-mipid02: Fix fwnode media link creation

2019-08-05 Thread Steve Longerbeam
all to media_create_fwnode_pad_links(). Fixes: 642bb5e88fed8 ("media: st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver") Signed-off-by: Steve Longerbeam --- drivers/media/i2c/st-mipid02.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/driv

[PATCH 09/22] media: sun6i: Fix fwnode media link creation

2019-08-05 Thread Steve Longerbeam
ink() with a call to media_create_fwnode_pad_links(). Fixes: 5cc7522d89655 ("media: sun6i: Add support for Allwinner CSI V3s") Signed-off-by: Steve Longerbeam --- .../platform/sunxi/sun6i-csi/sun6i_csi.c | 36 +++ 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/

[PATCH 19/22] media: imx: csi: Lookup endpoint fwnode with media_entity_get_fwnode_pad

2019-08-05 Thread Steve Longerbeam
imx_media_get_pad_fwnode(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 22 -- drivers/staging/media/imx/imx-media-utils.c | 33 + drivers/staging/media/imx/imx-media.h | 1 + drivers/staging/media/imx/imx7-media-csi.c

[PATCH 02/22] media: entity: Modify default behavior of media_entity_get_fwnode_pad

2019-08-05 Thread Steve Longerbeam
or source pads. With this change the function will choose the correct pad index if the entity implements a 1:1 port to pad mapping at that port. Add some comments to the @get_fwnode_pad operation to make it more clear under what conditions entities must implement the operation. Signed-off-by: Steve

[PATCH 18/22] media: imx: csi: Create media links in bound notifier

2019-08-05 Thread Steve Longerbeam
Implement a notifier bound op to register media links from the remote sub-device's source pad(s) to the CSI sink pad. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 24 +++ 1 file changed, 24 insertions(+) diff --git a/drivers/staging/media

[PATCH 21/22] media: imx: Use media_create_fwnode_links for external links

2019-08-05 Thread Steve Longerbeam
. But media_create_fwnode_links() can now be used to do that work, so imx_media_create_of_links() and imx_media_create_csi_of_links() are removed. Signed-off-by: Steve Longerbeam --- .../staging/media/imx/imx-media-dev-common.c | 49 drivers/staging/media/imx/imx-media-of.c | 113 -- drivers

[PATCH 01/22] media: entity: Pass entity to get_fwnode_pad operation

2019-08-05 Thread Steve Longerbeam
Add a missing pointer to the entity in the media_entity operation get_fwnode_pad. Fixes: ae45cd5efc120 ("[media] media: entity: Add get_fwnode_pad entity operation") Signed-off-by: Steve Longerbeam --- drivers/media/mc/mc-entity.c | 2 +- include/media/media-entity.h | 3 ++- 2 fil

[PATCH 12/22] media: video-mux: Create media links in bound notifier

2019-08-05 Thread Steve Longerbeam
Implement a notifier bound op to register media links from the remote sub-device's source pads to all of the video-mux sink pads. Signed-off-by: Steve Longerbeam --- drivers/media/platform/video-mux.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/media

[PATCH 16/22] media: imx: csi: Implement get_fwnode_pad

2019-08-05 Thread Steve Longerbeam
endpoint, and if so return the CSI sink pad index. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index

[PATCH 07/22] media: rcar-csi2: Fix fwnode media link creation

2019-08-05 Thread Steve Longerbeam
to media_entity_get_fwnode_pad() and media_create_pad_link() with a call to media_create_fwnode_pad_links(). Fixes: 769afd212b160 ("media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver") Signed-off-by: Steve Longerbeam --- drivers/media/platform/rcar-vin/rcar-c

[PATCH 20/22] media: imx: Add is_ipu_internal_subdev()

2019-08-05 Thread Steve Longerbeam
Add a convenience inline function that returns true if the given subdevice is one of the i.MX5/6 IPU-internal subdevices. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/staging/media/imx/imx-media.h

[PATCH 04/22] media: Move v4l2_fwnode_parse_link from v4l2 to driver base

2019-08-05 Thread Steve Longerbeam
of the link, and make use of fwnode_graph_parse_endpoint() to fully parse both endpoints. Rename members local_node and remote_node to more descriptive local_port_parent and remote_port_parent. Signed-off-by: Steve Longerbeam --- drivers/base/property.c | 63

[PATCH 06/22] media: adv748x: csi2: Implement get_fwnode_pad

2019-08-05 Thread Steve Longerbeam
If the given endpoint fwnode passed to the .get_fwnode_pad() op is the adv748x-csi2 TXA/TXB source endpoint, return the associated media pad index ADV748X_CSI2_SOURCE. The adv748x-csi2 has no other media pads that are associated with fwnode endpoints. Signed-off-by: Steve Longerbeam --- drivers

[PATCH 08/22] media: cadence: csi2rx: Fix fwnode media link creation

2019-08-05 Thread Steve Longerbeam
all to media_create_fwnode_pad_links(). Fixes: 1fc3b37f34f69 ("media: v4l: cadence: Add Cadence MIPI-CSI2 RX driver") Signed-off-by: Steve Longerbeam --- drivers/media/platform/cadence/cdns-csi2rx.c | 27 1 file changed, 10 insertions(+), 17 deletions(-) diff --

[PATCH 11/22] media: v4l2-fwnode: Pass notifier to v4l2_async_register_fwnode_subdev()

2019-08-05 Thread Steve Longerbeam
Instead of allocating a notifier in v4l2_async_register_fwnode_subdev(), have the caller provide one. This allows the caller to implement notifier ops (bind, unbind). The caller is now responsible for first initializing its notifier with a call to v4l2_async_notifier_init(). Signed-off-by: Steve

[PATCH 22/22] media: imx: TODO: Remove issues regarding media link creation

2019-08-05 Thread Steve Longerbeam
Remove the TODO items regarding media link creation, these issues are resolved after exporting media link creation to individual entity bound callbacks and the use of media_create_fwnode_links(), media_create_fwnode_pad_links(), and media_entity_get_fwnode_pad(). Signed-off-by: Steve Longerbeam

[PATCH 17/22] media: imx: csi: Embed notifier in struct csi_priv

2019-08-05 Thread Steve Longerbeam
Embed the notifier in 'struct csi_priv', instead of dynamically allocating it, to make it possible to retrieve csi_priv in a notifier callback op. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 25 +-- 1 file changed, 10 insertions(+), 15

[PATCH] media: staging/imx: Fix NULL deref in find_pipeline_entity()

2019-06-26 Thread Steve Longerbeam
staging/imx: Improve pipeline searching") Reported-by: Colin Ian King Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/

Re: media: staging/imx: Improve pipeline searching (bug report)

2019-06-26 Thread Steve Longerbeam
Thanks for catching, On 6/26/19 11:27 AM, Colin Ian King wrote: Hi, Static analysis with Coverity on Linux next has found a potential issue with the following commit: commit 3ef46bc97ca2c918b7657a08220c7340a9bb07a2 Author: Steve Longerbeam Date: Fri May 10 17:50:11 2019 -0400 media

[PATCH v8 5/5] media: imx: Try colorimetry at both sink and source pads

2019-05-21 Thread Steve Longerbeam
supports Rec.709 and BT.601 Y'CbCr encoding, and both limited and full range quantization for both YUV and RGB space, so allow those for pipelines that route through the IC. Signed-off-by: Steve Longerbeam --- Changes in v7: - squashed with "media: imx: Allow Rec.709 encoding for IC routes"

[PATCH v5 1/9] Revert "media: staging/imx: add media device to capture register"

2019-05-10 Thread Steve Longerbeam
The imx6-specific subdevs that register a capture device will no longer hold a reference to the media device, so this commit must be reverted. This reverts commit 16204b8a1c1af77725533b77936e6c73953486ae. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 2

[PATCH v5 5/9] Revert "media: imx: Set capture compose rectangle in capture_device_set_format"

2019-05-10 Thread Steve Longerbeam
Rvert this commit, as imx_media_capture_device_set_format() will be removed. The arguments to mx_media_mbus_fmt_to_pix_fmt() and imx_media_capture_device_set_format() in imx7_csi_set_fmt() are also reverted. This reverts commit 5964cbd8692252615370b77eb96764dd70c2f837. Signed-off-by: Steve

[PATCH v5 4/9] media: staging/imx: Move add_video_device into capture_device_register

2019-05-10 Thread Steve Longerbeam
Move imx_media_add_video_device() into imx_media_capture_device_register(). Also the former has no error conditions to convert to void. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 5 - drivers/staging/media/imx/imx-media-capture.c | 3 +++ drivers

[PATCH v5 9/9] media: staging/imx: Don't set driver data for v4l2_dev

2019-05-10 Thread Steve Longerbeam
ed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-capture.c| 5 +++-- drivers/staging/media/imx/imx-media-dev-common.c | 7 ++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx

[PATCH v5 2/9] media: staging/imx: Switch to sync registration for IPU subdevs

2019-05-10 Thread Steve Longerbeam
PU module. Since the VDIC and IC task drivers are no longer platform drivers, they are now statically linked to imx-media module. Signed-off-by: Steve Longerbeam --- Changes in v3: - statically link VDIC and IC task objects to imx-media module in Makefile. --- drivers/staging/media/imx

[PATCH v5 8/9] media: staging/imx: Improve pipeline searching

2019-05-10 Thread Steve Longerbeam
() but searches for video devices. - Remove imxmd pointer arg from all of the functions above, it was never used in those functions. With that change the i.MX5/6 CSI, VDIC, and IC sub-devices no longer require the media_device. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic

[PATCH v5 3/9] media: staging/imx: Pass device to alloc/free_dma_buf

2019-05-10 Thread Steve Longerbeam
Allocate and free a DMA coherent buffer in imx_media_alloc/free_dma_buf() from the given device. This allows DMA alloc and free using a device that is backed by real hardware, which for the imx5/6/7 CSI is the CSI unit, and for the internal IPU sub-devices, is the parent IPU. Signed-off-by: Steve

[PATCH v5 6/9] media: staging/imx: Remove capture_device_set_format

2019-05-10 Thread Steve Longerbeam
with the source before streaming starts. Signed-off-by: Steve Longerbeam --- Changes in v4: - add **cc arg to __capture_try_fmt_vid_cap() to validate colorspace, instead of calling ipu_pixelformat_to_colorspace(). - add error message if capture format validation failed. --- drivers/staging/media/imx

[PATCH v5 7/9] media: staging/imx: Re-organize modules

2019-05-10 Thread Steve Longerbeam
that, some functions common to imx5/6 and imx7 have been moved out of imx-media-dev.c and into imx-media-dev-common.c. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/Makefile| 14 +- .../staging/media/imx/imx-media-dev-common.c | 345 +- drivers

[PATCH v3 8/8] media: staging/imx: Don't set driver data for v4l2_dev

2019-04-30 Thread Steve Longerbeam
ed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-capture.c| 5 +++-- drivers/staging/media/imx/imx-media-dev-common.c | 7 ++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx

Re: [PATCH v6 5/7] gpu: ipu-v3: ipu-ic: Add support for limited range encoding

2019-03-08 Thread Steve Longerbeam
On 3/8/19 3:57 AM, Philipp Zabel wrote: On Thu, 2019-03-07 at 15:33 -0800, Steve Longerbeam wrote: Add support for the following conversions: - YUV full-range to YUV limited-range - YUV limited-range to YUV full-range - YUV limited-range to RGB full-range - RGB full-range to YUV limited

Re: [PATCH v6 3/7] gpu: ipu-v3: ipu-ic: Fully describe colorspace conversions

2019-03-08 Thread Steve Longerbeam
On 3/8/19 3:46 AM, Philipp Zabel wrote: On Thu, 2019-03-07 at 15:33 -0800, Steve Longerbeam wrote: Only providing the input and output RGB/YUV space to the IC task init functions is not sufficient. To fully characterize a colorspace conversion, the colorspace (chromaticities), Y'CbCr

Re: [PATCH v6 2/7] gpu: ipu-v3: ipu-ic: Fix BT.601 coefficients

2019-03-08 Thread Steve Longerbeam
On 3/8/19 2:23 AM, Philipp Zabel wrote: Hi Steve, On Thu, 2019-03-07 at 15:33 -0800, Steve Longerbeam wrote: The ycbcr2rgb and inverse rgb2ycbcr tables define the BT.601 Y'CbCr encoding coefficients. The rgb2ycbcr table specifically describes the BT.601 encoding from full range RGB to full

[PATCH v6 6/7] media: imx: Try colorimetry at both sink and source pads

2019-03-07 Thread Steve Longerbeam
sink and source pad try_fmt's. The unrelated check for uninitialized field value is moved out to appropriate places in each subdev try_fmt. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prp.c | 6 +- drivers/staging/media/imx/imx-ic-prpencvf.c | 8 +-- drivers/staging

[PATCH v6 5/7] gpu: ipu-v3: ipu-ic: Add support for limited range encoding

2019-03-07 Thread Steve Longerbeam
RGB limited-range coefficients. [M_b, O_b] = YUV limited-range to YUV full-range coefficients. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-ic.c | 281 +--- 1 file changed, 263 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b

[PATCH v6 4/7] gpu: ipu-v3: ipu-ic: Add support for Rec.709 encoding

2019-03-07 Thread Steve Longerbeam
Add support for Rec.709 encoding and inverse encoding. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v5: - moved API changes to a previous patch. - moved CSC coeff calc to new function calc_csc_coeffs(). Changes in v4: - fix compile error. Chnges in v3: - none. Changes

[PATCH v6 1/7] gpu: ipu-v3: ipu-ic: Fix saturation bit offset in TPMEM

2019-03-07 Thread Steve Longerbeam
The saturation bit was being set at bit 9 in the second 32-bit word of the TPMEM CSC. This isn't correct, the saturation bit is bit 42, which is bit 10 of the second word. Fixes: 1aa8ea0d2bd5d ("gpu: ipu-v3: Add Image Converter unit") Signed-off-by: Steve Longerbeam Cc: sta...@vger.

[PATCH v6 7/7] media: imx: Allow BT.709 encoding for IC routes

2019-03-07 Thread Steve Longerbeam
The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v5: - rebased this patch on top of repurposing the function

[PATCH v6 3/7] gpu: ipu-v3: ipu-ic: Fully describe colorspace conversions

2019-03-07 Thread Steve Longerbeam
to a new function calc_csc_coeffs(), called by init_csc(). Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-ic.c | 136 +--- drivers/gpu/ipu-v3/ipu-image-convert.c | 27 ++-- drivers/staging/media/imx/imx-ic-prpencvf.c | 22 +++- include/video/imx

[PATCH v6 2/7] gpu: ipu-v3: ipu-ic: Fix BT.601 coefficients

2019-03-07 Thread Steve Longerbeam
erter unit") Suggested-by: Philipp Zabel Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- drivers/gpu/ipu-v3/ipu-ic.c | 61 ++--- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b/drivers/gpu/ipu-v3/ipu-

[PATCH] media: imx: vdic: Fix wrong CSI group ID

2019-03-01 Thread Steve Longerbeam
The i.MX7 capture support forgot to change the group ID for the CSI to the IPU CSI in VDIC sub-device, it was left at the i.MX7 CSI group ID. Fixes: 67673ed55084 ("media: staging/imx: rearrange group id to take in account IPU") Signed-off-by: Steve Longerbeam --- drivers/staging/med

[PATCH v2 4/4] media: imx: Don't register IPU subdevs/links if CSI port missing

2019-02-20 Thread Steve Longerbeam
The second IPU internal sub-devices were being registered and links to them created even when the second IPU is not present. This is wrong for i.MX6 S/DL and i.MX53 which have only a single IPU. Fixes: e130291212df5 ("[media] media: Add i.MX media core driver") Signed-off-by: Steve

[PATCH v2 3/4] media: imx: Rename functions that add IPU-internal subdevs

2019-02-20 Thread Steve Longerbeam
For the functions that add and remove the internal IPU subdevice descriptors, rename them to make clear they are the subdevs internal to the IPU. Also rename the platform data structure for the internal IPU subdevices. No functional changes. Signed-off-by: Steve Longerbeam Acked-by: Philipp

[PATCH v2 2/4] media: imx: Clear fwnode link struct for each endpoint iteration

2019-02-20 Thread Steve Longerbeam
s directly to ipu1_csi0 and has a single source port with no "reg" property. Fixes: 621b08eabcddb ("media: staging/imx: remove static media link arrays") Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- drivers/staging/media/imx/imx-media-of.c | 15 +-- 1 fi

[PATCH v2 1/4] media: imx: csi: Allow unknown nearest upstream entities

2019-02-20 Thread Steve Longerbeam
("media: staging/imx: get CSI bus type from nearest upstream entity") Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- drivers/staging/media/imx/imx-media-csi.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/med

[PATCH] media: imx: vdic: Restore default case to prepare_vdi_in_buffers()

2019-02-19 Thread Steve Longerbeam
symbol 'curr_phys'. drivers/staging/media/imx/imx-media-vdic.c:238 prepare_vdi_in_buffers() error: uninitialized symbol 'next_phys'. Fixes: 6e537b58de772 ("media: imx: vdic: rely on VDIC for correct field order") Reported-by: Hans Verkuil Signed-off-by: Steve Longerbeam --- drivers/sta

[PATCH v5 6/7] media: imx: Try colorimetry at both sink and source pads

2019-02-19 Thread Steve Longerbeam
sink and source pad try_fmt's. The unrelated check for uninitialized field value is moved out to appropriate places in each subdev try_fmt. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prp.c | 6 +- drivers/staging/media/imx/imx-ic-prpencvf.c | 8 +-- drivers/staging

[PATCH v5 7/7] media: imx: Allow BT.709 encoding for IC routes

2019-02-19 Thread Steve Longerbeam
The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v5: - rebased this patch on top of repurposing the function

[PATCH v5 1/7] gpu: ipu-v3: ipu-ic: Fix saturation bit offset in TPMEM

2019-02-19 Thread Steve Longerbeam
The saturation bit was being set at bit 9 in the second 32-bit word of the TPMEM CSC. This isn't correct, the saturation bit is bit 42, which is bit 10 of the second word. Fixes: 1aa8ea0d2bd5d ("gpu: ipu-v3: Add Image Converter unit") Signed-off-by: Steve Longerbeam Cc: sta...@vger.

[PATCH v5 5/7] gpu: ipu-v3: ipu-ic: Add support for limited range encoding

2019-02-19 Thread Steve Longerbeam
RGB limited-range coefficients. [M_b, O_b] = YUV limited-range to YUV full-range coefficients. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-ic.c | 281 +--- 1 file changed, 263 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b

[PATCH v5 3/7] gpu: ipu-v3: ipu-ic: Fully describe colorspace conversions

2019-02-19 Thread Steve Longerbeam
encode using BT.601 standard (follow-up patch will add Rec.709 encoding support). - cannot convert colorspaces from input to output, the input and output colorspace chromaticities must be the same. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-ic.c | 101

[PATCH v5 2/7] gpu: ipu-v3: ipu-ic: Fix BT.601 coefficients

2019-02-19 Thread Steve Longerbeam
erter unit") Suggested-by: Philipp Zabel Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- drivers/gpu/ipu-v3/ipu-ic.c | 63 ++--- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b/drivers/gpu/ipu-v3/ipu-

[PATCH v5 4/7] gpu: ipu-v3: ipu-ic: Add support for Rec.709 encoding

2019-02-19 Thread Steve Longerbeam
Add support for Rec.709 encoding and inverse encoding. The determination of the CSC coefficients based on the input/output colorspace parameters are moved to a new function calc_csc_coeffs(). Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v5: - moved API changes

Re: [PATCH v4 1/4] gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices

2019-02-14 Thread Steve Longerbeam
On 2/13/19 2:35 AM, Philipp Zabel wrote: On Tue, 2019-02-12 at 09:42 -0800, Steve Longerbeam wrote: [...] But what about this "SAT_MODE" field in the IC task parameter memory? That just controls the saturation. The result after the matrix multiplication is either saturated

Re: [PATCH v4 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-12 Thread Steve Longerbeam
On 2/12/19 3:34 AM, Philipp Zabel wrote: Hi Steve, On Mon, 2019-02-11 at 17:20 -0800, Steve Longerbeam wrote: [...] Should we support YUV BT.601 <-> YUV REC.709 conversions? That would require separate encodings for input and output. How about if we pass the input and output enc

Re: [PATCH v4 1/4] gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices

2019-02-12 Thread Steve Longerbeam
On 2/12/19 2:17 AM, Philipp Zabel wrote: Hi Steve, On Mon, 2019-02-11 at 10:24 -0800, Steve Longerbeam wrote: [...] Looking more closely at these coefficients now, I see you are right, they are the BT.601 YUV full-range coefficients (Y range 0 to 1, U and V range -0.5 to 0.5). Well

Re: [PATCH v4 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-11 Thread Steve Longerbeam
On 2/11/19 2:12 AM, Philipp Zabel wrote: On Fri, 2019-02-08 at 17:47 -0800, Steve Longerbeam wrote: Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam

Re: [PATCH v4 1/4] gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices

2019-02-11 Thread Steve Longerbeam
On 2/11/19 1:58 AM, Philipp Zabel wrote: On Fri, 2019-02-08 at 17:47 -0800, Steve Longerbeam wrote: The ycbcr2rgb and inverse rgb2ycbcr matrices define the BT.601 encoding coefficients, so rename them to indicate that. And add some comments to make clear these are BT.601 coefficients

Re: [PATCH v4 1/4] gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices

2019-02-11 Thread Steve Longerbeam
Hi Philipp, On 2/11/19 1:58 AM, Philipp Zabel wrote: On Fri, 2019-02-08 at 17:47 -0800, Steve Longerbeam wrote: The ycbcr2rgb and inverse rgb2ycbcr matrices define the BT.601 encoding coefficients, so rename them to indicate that. And add some comments to make clear these are BT.601

[PATCH v4 2/4] gpu: ipu-v3: ipu-ic: Simplify selection of encoding matrix

2019-02-08 Thread Steve Longerbeam
Simplify the selection of the Y'CbCr encoding matrices in init_csc(). A side-effect of this change is that init_csc() now allows YUV->YUV using the identity matrix, intead of returning error. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-ic.c | 12 1 file changed

[PATCH v4 4/4] media: imx: Allow BT.709 encoding for IC routes

2019-02-08 Thread Steve Longerbeam
The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - move ic_route check above default colorimetry checks, and fill default

[PATCH v4 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v4: - fix compile error. Chnges in v3: - none. Changes in v2: - only return "Unsupported

[PATCH v4 1/4] gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices

2019-02-08 Thread Steve Longerbeam
rename to ic_csc_identity. No functional changes. Signed-off-by: Steve Longerbeam --- Changes in v2: - rename ic_csc_rgb2rgb matrix to ic_csc_identity. --- drivers/gpu/ipu-v3/ipu-ic.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu

Re: [PATCH v3 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
On 2/8/19 4:20 PM, Tim Harvey wrote: On Fri, Feb 8, 2019 at 11:28 AM Steve Longerbeam wrote: if (inf == outf) params = _csc_identity; else if (inf == IPUV3_COLORSPACE_YUV) - params = _csc_ycbcr2rgb_bt601; + params

[PATCH v3 1/4] gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices

2019-02-08 Thread Steve Longerbeam
rename to ic_csc_identity. No functional changes. Signed-off-by: Steve Longerbeam --- Changes in v2: - rename ic_csc_rgb2rgb matrix to ic_csc_identity. --- drivers/gpu/ipu-v3/ipu-ic.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu

[PATCH v3 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - only return "Unsupported YCbCr encoding" error if inf != outf, since if i

[PATCH v3 4/4] media: imx: Allow BT.709 encoding for IC routes

2019-02-08 Thread Steve Longerbeam
The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - move ic_route check above default colorimetry checks, and fill default

[PATCH v3 2/4] gpu: ipu-v3: ipu-ic: Simplify selection of encoding matrix

2019-02-08 Thread Steve Longerbeam
Simplify the selection of the Y'CbCr encoding matrices in init_csc(). A side-effect of this change is that init_csc() now allows YUV->YUV using the identity matrix, intead of returning error. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-ic.c | 12 1 file changed

[PATCH v2 4/4] media: imx: Allow BT.709 encoding for IC routes

2019-02-08 Thread Steve Longerbeam
From: Steve Longerbeam The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route through the IC. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - move ic_route check above default colorimetry checks

[PATCH v2 1/4] gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices

2019-02-08 Thread Steve Longerbeam
From: Steve Longerbeam The ycbcr2rgb and inverse rgb2ycbcr matrices define the BT.601 encoding coefficients, so rename them to indicate that. And add some comments to make clear these are BT.601 coefficients encoding between YUV limited range and RGB full range. The ic_csc_rgb2rgb matrix is just

[PATCH v2 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
From: Steve Longerbeam Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam --- Changes in v2: - only return "Unsupported YCbCr encoding" error if i

[PATCH v2 2/4] gpu: ipu-v3: ipu-ic: Simplify selection of encoding matrix

2019-02-08 Thread Steve Longerbeam
Simplify the selection of the Y'CbCr encoding matrices in init_csc(). A side-effect of this change is that init_csc() now allows YUV->YUV using the identity matrix, intead of returning error. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-ic.c | 12 1 file changed

Re: [PATCH 2/3] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-08 Thread Steve Longerbeam
On 2/8/19 8:24 AM, Tim Harvey wrote: On Sun, Feb 3, 2019 at 11:48 AM Steve Longerbeam wrote: Pass v4l2 encoding enum to the ipu_ic task init functions, and add support for the BT.709 encoding and inverse encoding matrices. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam

  1   2   3   4   5   6   7   8   9   10   >