Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-02-07 Thread Steve Longerbeam
On 2/7/19 5:15 PM, Tim Harvey wrote: On Wed, Feb 6, 2019 at 8:31 AM Tim Harvey wrote: On Tue, Feb 5, 2019 at 3:54 PM Steve Longerbeam wrote: On 2/5/19 11:16 AM, Tim Harvey wrote: On Sat, Feb 2, 2019 at 11:10 AM Steve Longerbeam wrote: The *real* way to fix this would be to allow

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-02-07 Thread Steve Longerbeam
Hi Tim, On 2/6/19 8:31 AM, Tim Harvey wrote: On Tue, Feb 5, 2019 at 3:54 PM Steve Longerbeam wrote: On 2/5/19 11:16 AM, Tim Harvey wrote: On Sat, Feb 2, 2019 at 11:10 AM Steve Longerbeam wrote: The *real* way to fix this would be to allow programmable encodings in ipu-ic.c. But

[PATCH] media: imx: Set capture compose rectangle in capture_device_set_format

2019-02-07 Thread Steve Longerbeam
From: Steve Longerbeam The capture compose rectangle was not getting updated when setting the source subdevice's source pad format. This causes the compose window to be zero (or not updated) at stream start unless the capture device format was set explicitly at the capture device node. F

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-02-05 Thread Steve Longerbeam
On 2/5/19 11:16 AM, Tim Harvey wrote: On Sat, Feb 2, 2019 at 11:10 AM Steve Longerbeam wrote: The *real* way to fix this would be to allow programmable encodings in ipu-ic.c. But unfortunately the encodings are hardcoded (grep for ic_csc_rgb2ycbcr in ipu-ic.c). Ok, I saw that you went

Re: [PATCH 3/3] media: imx: Allow BT.709 encoding for IC routes

2019-02-04 Thread Steve Longerbeam
Sorry this patch isn't working, it's not possible to set BT.709 encoding, working on a fix for v2. Steve On 2/3/19 11:47 AM, Steve Longerbeam wrote: The IC now supports BT.709 Y'CbCr encoding, in addition to existing BT.601 encoding, so allow both, for pipelines that route

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

2019-02-03 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 --- drivers/gpu/ipu-v3/ipu-ic.c | 67 ++--- drivers/gpu/ipu-v3/ipu-image

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

2019-02-03 Thread 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. No functional changes. Signed-off-by: Steve Longerbeam

[PATCH 0/3] media: imx: Add support for BT.709 encoding

2019-02-03 Thread Steve Longerbeam
This patchset adds support for the BT.709 encoding and inverse encoding matrices to the ipu_ic task init functions. The imx-media driver can now support both BT.601 and BT.709 encoding. Steve Longerbeam (3): gpu: ipu-v3: ipu-ic: Rename yuv2rgb encoding matrices gpu: ipu-v3: ipu-ic: Add

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

2019-02-03 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 --- drivers/staging/media/imx/imx-media-utils.c | 4 +++- 1 file changed, 3 insertions(

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-02-03 Thread Steve Longerbeam
Hi Tim, cc: Philipp, On 2/2/19 11:10 AM, Steve Longerbeam wrote: On 1/30/19 5:18 PM, Tim Harvey wrote: # stream upscale via mem2mem then JPEG/RTP/UDP gst-launch-1.0 v4l2src device=/dev/video4 ! \    v4l2video8convert ! video/x-raw,width=1280,height=720 ! \    jpegenc ! rtpjpegpay ! udpsink

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-02-02 Thread Steve Longerbeam
On 1/30/19 5:18 PM, Tim Harvey wrote: On Mon, Jan 28, 2019 at 3:04 PM Steve Longerbeam wrote: On 1/28/19 11:03 AM, Tim Harvey wrote: On Fri, Jan 25, 2019 at 3:57 PM Steve Longerbeam wrote: Hi Tim, cc: Philipp, On 1/23/19 3:21 PM, Tim Harvey wrote: Steve, I'm testing IMX6 ca

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-01-28 Thread Steve Longerbeam
On 1/28/19 11:14 AM, Tim Harvey wrote: On Sun, Jan 27, 2019 at 2:36 PM Steve Longerbeam wrote: Hi Tim, On 1/25/19 3:57 PM, Steve Longerbeam wrote: Now lets go back to a 480p60 source but this time include the vdic (which isn't necessary but should still work right?) No. First, th

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-01-28 Thread Steve Longerbeam
On 1/28/19 11:03 AM, Tim Harvey wrote: On Fri, Jan 25, 2019 at 3:57 PM Steve Longerbeam wrote: Hi Tim, cc: Philipp, On 1/23/19 3:21 PM, Tim Harvey wrote: Steve, I'm testing IMX6 capture again with the tda1997x HDMI receiver found on Gateworks GW54xx and GW551x boards. This is hook

Re: [PATCH v4 0/3] media: imx: Stop stream before disabling IDMA channels

2019-01-27 Thread Steve Longerbeam
Hi Hans, On 1/21/19 11:34 PM, Hans Verkuil wrote: Hi Steve, On 01/22/2019 12:35 AM, Steve Longerbeam wrote: Repeatedly sending a stream off immediately followed by stream on can eventually cause a complete system hard lockup on the SabreAuto when streaming from the ADV7180: while true; do

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-01-27 Thread Steve Longerbeam
Hi Tim, On 1/25/19 3:57 PM, Steve Longerbeam wrote: Now lets go back to a 480p60 source but this time include the vdic (which isn't necessary but should still work right?) No. First, the CSI will only capture in bt.656 mode if it sees interlaced fields (bt.656 interlaced sync codes).

Re: IMX CSI capture issues with tda1997x HDMI receiver

2019-01-25 Thread Steve Longerbeam
Hi Tim, cc: Philipp, On 1/23/19 3:21 PM, Tim Harvey wrote: Steve, I'm testing IMX6 capture again with the tda1997x HDMI receiver found on Gateworks GW54xx and GW551x boards. This is hooked up to the IMX6 CSI in a way where it can be configured for 8bit BT656 mode (UYVY8_2X8) or 16bit YUV

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

2019-01-22 Thread Steve Longerbeam
On 1/22/19 11:51 AM, Tim Harvey wrote: On Mon, Jan 21, 2019 at 12:24 PM Tim Harvey wrote: On Tue, Jan 15, 2019 at 3:54 PM Steve Longerbeam wrote: Hi Tim, On 1/15/19 1:58 PM, Tim Harvey wrote: On Wed, Jan 9, 2019 at 10:30 AM Steve Longerbeam wrote: Also add an example pipeline for

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

2019-01-22 Thread Steve Longerbeam
On 1/21/19 12:24 PM, Tim Harvey wrote: On Tue, Jan 15, 2019 at 3:54 PM Steve Longerbeam wrote: Hi Tim, On 1/15/19 1:58 PM, Tim Harvey wrote: On Wed, Jan 9, 2019 at 10:30 AM Steve Longerbeam wrote: Also add an example pipeline for unconverted capture with interweave on SabreAuto

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

2019-01-21 Thread Steve Longerbeam
On 1/21/19 8:50 AM, Philipp Zabel wrote: On Sat, 2019-01-19 at 13:45 -0800, Steve Longerbeam wrote: On i.MX6, the nearest upstream entity to the CSI can only be the CSI video muxes or the Synopsys DW MIPI CSI-2 receiver. However the i.MX53 has no CSI video muxes or a MIPI CSI-2 receiver. So

[PATCH v4 3/3] media: imx: prpencvf: Stop upstream before disabling IDMA channel

2019-01-21 Thread Steve Longerbeam
dd IC subdev drivers") Reported-by: Gaël PORTAY Tested-by: Gaël PORTAY Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- Changes in v4: - none. Changes in v3: - Reword the commit subject and message. No functional changes. Changes in v2: - Add Fixes: and Cc: stable --- drivers/sta

[PATCH v4 1/3] media: imx: csi: Disable CSI immediately after last EOF

2019-01-21 Thread Steve Longerbeam
IDMA channel at stream off. Disabling the CSI before disabling the IDMA channel appears to be a reliable fix for the hard lockup. Fixes: 4a34ec8e470cb ("[media] media: imx: Add CSI subdev driver") Reported-by: Gaël PORTAY Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org ---

[PATCH v4 2/3] media: imx: csi: Stop upstream before disabling IDMA channel

2019-01-21 Thread Steve Longerbeam
() which will require the same change to fix a hard lockup. Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- drivers/staging/media/imx/imx-media-csi.c | 25 --- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b

[PATCH v4 0/3] media: imx: Stop stream before disabling IDMA channels

2019-01-21 Thread Steve Longerbeam
- No functional changes. Steve Longerbeam (3): media: imx: csi: Disable CSI immediately after last EOF media: imx: csi: Stop upstream before disabling IDMA channel media: imx: prpencvf: Stop upstream before disabling IDMA channel drivers/staging/media/imx/imx-ic-prpencvf.c | 26 - dr

Re: [PATCH v3 1/2] media: imx: csi: Disable SMFC before disabling IDMA channel

2019-01-21 Thread Steve Longerbeam
On 1/21/19 10:43 AM, Steve Longerbeam wrote: On 1/21/19 3:49 AM, Philipp Zabel wrote: Also ipu_smfc_disable is refcounted, so if the other CSI is capturing simultaneously, this change has no effect. Sigh, you're right. Let me go back to disabling the CSI before the channel, th

Re: [PATCH v3 1/2] media: imx: csi: Disable SMFC before disabling IDMA channel

2019-01-21 Thread Steve Longerbeam
On 1/21/19 3:49 AM, Philipp Zabel wrote: Hi, On Fri, 2019-01-18 at 17:04 -0800, Steve Longerbeam wrote: Disable the SMFC before disabling the IDMA channel, instead of after, in csi_idmac_unsetup(). This fixes a complete system hard lockup on the SabreAuto when streaming from the ADV7180

[PATCH] media: imx: Validate frame intervals before setting

2019-01-20 Thread Steve Longerbeam
Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prp.c | 9 +++-- drivers/staging/media/imx/imx-ic-prpencvf.c | 9 +++-- drivers/staging/media/imx/imx-media-csi.c | 5 - drivers/staging/media/imx/imx-media-vdic.c | 5 - 4 files changed, 22 insertions(+),

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

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

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

2019-01-19 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 0/4] media: imx: Various fixes for i.MX5 support

2019-01-19 Thread Steve Longerbeam
Some fixes and improvements to support video capture on i.MX5. Steve Longerbeam (4): media: imx: csi: Allow unknown nearest upstream entities media: imx: Clear fwnode link struct for each endpoint iteration media: imx: Rename functions that add IPU-internal subdevs/links media: imx: Don&#

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

2019-01-19 Thread Steve Longerbeam
connects 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 +--

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

2019-01-19 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 v3 0/2] media: imx: Stop stream before disabling IDMA channels

2019-01-18 Thread Steve Longerbeam
. v2: - Whitespace fixes - Add Fixes: and Cc: sta...@vger.kernel.org - No functional changes. Steve Longerbeam (2): media: imx: csi: Disable SMFC before disabling IDMA channel media: imx: prpencvf: Stop upstream before disabling IDMA channel drivers/staging/media/imx/imx-ic-prpencvf.c | 26

[PATCH v3 2/2] media: imx: prpencvf: Stop upstream before disabling IDMA channel

2019-01-18 Thread Steve Longerbeam
dd IC subdev drivers") Reported-by: Gaël PORTAY Tested-by: Gaël PORTAY Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- Changes in v3: - Reword the commit subject and message. No functional changes. Changes in v2: - Add Fixes: and Cc: stable --- drivers/staging/media/imx/imx-ic-

[PATCH v3 1/2] media: imx: csi: Disable SMFC before disabling IDMA channel

2019-01-18 Thread Steve Longerbeam
-by: Peter Seiderer Reported-by: Gaël PORTAY Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- Changes in v3: - switch from disabling the CSI before the channel to disabling the SMFC before the channel. Changes in v2: - restore an empty line - Add Fixes: and Cc: stable --- drive

Re: [PATCH v2 1/2] media: imx: csi: Disable CSI immediately after last EOF

2019-01-18 Thread Steve Longerbeam
On 1/18/19 11:01 AM, Steve Longerbeam wrote: On 1/18/19 2:24 AM, Philipp Zabel wrote: On Thu, 2019-01-17 at 12:49 -0800, Steve Longerbeam wrote: Disable the CSI immediately after receiving the last EOF before stream off (and thus before disabling the IDMA channel). This fixes a complete

Re: [v2,1/2] media: imx: csi: Disable CSI immediately after last EOF

2019-01-18 Thread Steve Longerbeam
disabling the SMFC or the CSI. I'm testing your patch on the SabreAuto reference board. If it looks good, I can either make you the author or the Suggested-by:, whichever you prefer, let me know. Steve On 1/18/19 9:03 AM, Peter Seiderer wrote: Hello Steve, On Thu, Jan 17, 2019 at 6:15 PM

Re: [PATCH v2 1/2] media: imx: csi: Disable CSI immediately after last EOF

2019-01-18 Thread Steve Longerbeam
On 1/18/19 2:24 AM, Philipp Zabel wrote: On Thu, 2019-01-17 at 12:49 -0800, Steve Longerbeam wrote: Disable the CSI immediately after receiving the last EOF before stream off (and thus before disabling the IDMA channel). This fixes a complete system hard lockup on the SabreAuto when

[PATCH v2] media: imx-csi: Input connections to CSI should be optional

2019-01-17 Thread Steve Longerbeam
an unconnected CSI input port as an error. Fixes: c893500a16baf ("media: imx: csi: Register a subdev notifier") Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Acked-by: Tim Harvey Cc: sta...@vger.kernel.org --- Changes in v2: - Added some acks and Cc: stable. No function

Re: [PATCH] media: imx-csi: Input connections to CSI should be optional

2019-01-17 Thread Steve Longerbeam
Hi Tim, On 1/15/19 8:42 AM, Tim Harvey wrote: On Wed, Jan 9, 2019 at 10:34 AM Steve Longerbeam wrote: Some imx platforms do not have fwnode connections to all CSI input ports, and should not be treated as an error. This includes the imx6q SabreAuto, which has no connections to ipu1_csi1 and

[PATCH v2 2/2] media: imx: prpencvf: Disable CSI immediately after last EOF

2019-01-17 Thread Steve Longerbeam
ivers") Reported-by: Gaël PORTAY Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- Changes in v2: - Add Fixes: and Cc: stable --- drivers/staging/media/imx/imx-ic-prpencvf.c | 26 ++--- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/staging/med

[PATCH v2 1/2] media: imx: csi: Disable CSI immediately after last EOF

2019-01-17 Thread Steve Longerbeam
a reliable fix for the hard lockup. Fixes: 4a34ec8e470cb ("[media] media: imx: Add CSI subdev driver") Reported-by: Gaël PORTAY Signed-off-by: Steve Longerbeam Cc: sta...@vger.kernel.org --- Changes in v2: - restore an empty line - Add Fixes: and Cc: stable --- drivers/staging/med

[PATCH v2 0/2] media: imx: Disable CSI immediately after last EOF

2019-01-17 Thread Steve Longerbeam
a reliable fix for the hard lockup. History: v2: - Whitespace fixes - Add Fixes: and Cc: sta...@vger.kernel.org - No functional changes. Steve Longerbeam (2): media: imx: csi: Disable CSI immediately after last EOF media: imx: prpencvf: Disable CSI immediately after last EOF drivers/staging

Re: [PATCH 1/2] media: imx: csi: Disable CSI immediately after last EOF

2019-01-17 Thread Steve Longerbeam
Hi Fabio, thanks for the review. On 1/17/19 12:20 PM, Fabio Estevam wrote: Hi Steve, On Thu, Jan 17, 2019 at 6:15 PM Steve Longerbeam wrote: Disable the CSI immediately after receiving the last EOF before stream off (and thus before disabling the IDMA channel). This fixes a complete system

[PATCH 1/2] media: imx: csi: Disable CSI immediately after last EOF

2019-01-17 Thread Steve Longerbeam
a reliable fix for the hard lockup. Reported-by: Gaël PORTAY Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media

[PATCH 0/2] media: imx: Disable CSI immediately after last EOF

2019-01-17 Thread Steve Longerbeam
a reliable fix for the hard lockup. Steve Longerbeam (2): media: imx: csi: Disable CSI immediately after last EOF media: imx: prpencvf: Disable CSI immediately after last EOF drivers/staging/media/imx/imx-ic-prpencvf.c | 26 ++--- drivers/staging/media/imx/imx-media-csi.c

[PATCH 2/2] media: imx: prpencvf: Disable CSI immediately after last EOF

2019-01-17 Thread Steve Longerbeam
timeouts at all subsequent stream on, until a system reset. The lockup occurs when disabling the IDMA channel at stream off. Disabling the CSI before disabling the IDMA channel appears to be a reliable fix for the hard lockup. Reported-by: Gaël PORTAY Signed-off-by: Steve Longerbeam --- drivers

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

2019-01-15 Thread Steve Longerbeam
On 1/15/19 3:54 PM, Steve Longerbeam wrote: media-ctl -V "'ipu1_csi0':0 [fmt:AYUV32/720x480]" This is the reason. The adv7180 is only allowing to configure alternate field mode, and thus it reports the field height on the mbus, not the full frame height. Imx deals

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

2019-01-15 Thread Steve Longerbeam
Hi Tim, On 1/15/19 1:58 PM, Tim Harvey wrote: On Wed, Jan 9, 2019 at 10:30 AM Steve Longerbeam wrote: Also add an example pipeline for unconverted capture with interweave on SabreAuto. Cleanup some language in various places in the process. Signed-off-by: Steve Longerbeam Reviewed-by

[PATCH] media: imx: capture: Allow event subscribe/unsubscribe

2019-01-15 Thread Steve Longerbeam
Implement the vidioc_(un)subscribe_event operations. Imx will allow subscribing to the imx-specific frame interval error events, events from subdevices (V4L2_EVENT_SOURCE_CHANGE), and control events. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-capture.c | 18

[PATCH v2] media: imx: queue subdev events to reachable video devices

2019-01-15 Thread Steve Longerbeam
o the video device. So a future improvement is to skip the video device if there is no enabled path to it from the sub-device. The entity->pipe pointer can't be used for this check because in imx-media a sub-device can be a member to more than one streaming pipeline at a time. Signed-

[PATCH v3] media: rcar-vin: Allow independent VIN link enablement

2019-01-14 Thread Steve Longerbeam
From: Steve Longerbeam There is a block of code in rvin_group_link_notify() that prevents enabling a link to a VIN node if any entity in the media graph is in use. This prevents enabling a VIN link even if there is an in-use entity somewhere in the graph that is independent of the link&#

Re: [RFC PATCH v2] media: rcar-vin: Allow independent VIN link enablement

2019-01-14 Thread Steve Longerbeam
On 1/9/19 5:19 PM, Steve Longerbeam wrote: On 1/9/19 2:40 PM, Niklas Söderlund wrote: Hi Steve, Thanks for your patch, I think it looks good. Thanks for the Ack! I'm not real familiar with the RFC patch process. Should this be submitted again with RFC stripped from the subject

Re: i.MX6 RAW8 format

2019-01-14 Thread Steve Longerbeam
IDMA channel burst writes 16 bytes to memory (so that the channel's read pointer advances by 16 bytes), but somehow the channel's write pointer has only advanced by 8 bytes. I don't know how that could happen, but you might try reverting 37ea9830139b3 ("media: imx-csi: fix burst size") which will restore IDMA channel burst size to 8 pixels (bytes) for SGBRG8, and see if that makes any difference. Steve

Re: [PATCH 2/2] media: i2c: adv748x: Use devm to allocate the device struct

2019-01-11 Thread Steve Longerbeam
On 1/11/19 8:08 AM, Kieran Bingham wrote: Hi Steve, On 11/01/2019 15:43, Kieran Bingham wrote: From: Steve Longerbeam Thank you for the patch, (which was forwarded to me from the BSP team) Switch to devm_kzalloc() when allocating the adv748x device struct. Signed-off-by: Steve

Re: [PATCH v3 3/3] media: imx: lift CSI and PRP ENC/VF width alignment restriction

2019-01-11 Thread Steve Longerbeam
Reviewed-by: Steve Longerbeam On 1/11/19 3:10 AM, Philipp Zabel wrote: The CSI, PRP ENC, and PRP VF subdevices shouldn't have to care about IDMAC line start address alignment. With compose rectangle support in the capture driver, they don't have to anymore. If the direct CSI -&g

Re: [PATCH v2 3/3] media: imx: lift CSI and PRP ENC/VF width alignment restriction

2019-01-10 Thread Steve Longerbeam
On 1/10/19 2:54 AM, Philipp Zabel wrote: On Wed, 2019-01-09 at 11:21 -0800, Steve Longerbeam wrote: why not just use "if (priv->active_output_pad == CSI_SRC_PAD_DIRECT) ..." ? While both source pad links are disabled, whether or not IC burst alignment is applied would dep

Re: [RFC PATCH v2] media: rcar-vin: Allow independent VIN link enablement

2019-01-09 Thread Steve Longerbeam
On 1/9/19 2:40 PM, Niklas Söderlund wrote: Hi Steve, Thanks for your patch, I think it looks good. Thanks for the Ack! I'm not real familiar with the RFC patch process. Should this be submitted again with RFC stripped from the subject line? Steve On 2019-01-06 13:20:18 -0800,

Re: [PATCH v2 2/3] media: imx: set compose rectangle to mbus format

2019-01-09 Thread Steve Longerbeam
Reviewed-by: Steve Longerbeam On 1/9/19 3:08 AM, Philipp Zabel wrote: Prepare for mbus format being smaller than the written rectangle due to burst size. Signed-off-by: Philipp Zabel --- Changes since v1: - Typo fixups, this time applied to the correct patch. --- drivers/staging/media

Re: [PATCH v2 1/3] media: imx: add capture compose rectangle

2019-01-09 Thread Steve Longerbeam
Reviewed-by: Steve Longerbeam On 1/9/19 3:08 AM, Philipp Zabel wrote: Allowing to compose captured images into larger memory buffers will let us lift alignment restrictions on CSI crop width. Signed-off-by: Philipp Zabel Acked-by: Sakari Ailus --- Changes since v1: - remove NATIVE_SIZE

Re: [PATCH v2 3/3] media: imx: lift CSI and PRP ENC/VF width alignment restriction

2019-01-09 Thread Steve Longerbeam
p->left &= ~0x3; - crop->width &= ~0x7; + if (csi_src_pad_enabled(&priv->pad[CSI_SRC_PAD_DIRECT])) why not just use "if (priv->active_output_pad == CSI_SRC_PAD_DIRECT) ..." ? Steve + crop->width &= ~0x7; /* multiple of 8 pixels (IC burst) */

[PATCH] media: imx-csi: Input connections to CSI should be optional

2019-01-09 Thread Steve Longerbeam
an unconnected CSI input port as an error. Fixes: c893500a16baf ("media: imx: csi: Register a subdev notifier") Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx

[PATCH v8 05/11] media: imx-csi: Double crop height for alternate fields at sink

2019-01-09 Thread Steve Longerbeam
If the incoming sink field type is alternate, the reset crop height and crop height bounds must be set to twice the incoming height, because in alternate field mode, upstream will report only the lines for a single field, and the CSI captures the whole frame. Signed-off-by: Steve Longerbeam

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

2019-01-09 Thread Steve Longerbeam
Skip writing U/V components to odd rows for YVU420 in addition to YUV420 and NV12. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- 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

[PATCH v8 03/11] gpu: ipu-v3: Add planar support to interlaced scan

2019-01-09 Thread Steve Longerbeam
doubled, since a single chroma line is shared by two luma lines. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Acked-by: Philipp Zabel --- drivers/gpu/ipu-v3/ipu-cpmem.c | 26 +++-- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 ++- drivers/staging/media

[PATCH v8 02/11] gpu: ipu-csi: Swap fields according to input/output field types

2019-01-09 Thread Steve Longerbeam
lines for one field. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Acked-by: Philipp Zabel --- Changes since v5: - Convert to const the infmt, outfmt, and mbus_cfg pointer args to ipu_csi_init_interface(), suggested by Philipp Zabel. - Bring back if_fmt local var and don't

[PATCH v8 06/11] media: imx: interweave and odd-chroma-row skip are incompatible

2019-01-09 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 Reviewed-by

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

2019-01-09 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 v8 10/11] media: imx: Allow interweave with top/bottom lines swapped

2019-01-09 Thread Steve Longerbeam
-> seq-bt alternate -> seq-bt Suggested-by: Philipp Zabel Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- Changes since v4: - Removed interweave_offset and replace with boolean interweave_swap, suggested by Philipp Zabel. --- drivers/staging/media/imx/imx-ic-

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

2019-01-09 Thread Steve Longerbeam
Also add an example pipeline for unconverted capture with interweave on SabreAuto. Cleanup some language in various places in the process. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- Changes since v4: - Make clear that it is IDMAC channel that does pixel reordering and

[PATCH v8 00/11] imx-media: Fixes for interlaced capture

2019-01-09 Thread Steve Longerbeam
rder bug in VDIC indirect mode. - remove alternate field type from V4L2_FIELD_IS_SEQUENTIAL() macro Suggested-by: Nicolas Dufresne . - add macro V4L2_FIELD_IS_INTERLACED(). Steve Longerbeam (11): media: videodev2.h: Add more field helper macros gpu: ipu-csi: Swap fields according to input/output

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

2019-01-09 Thread Steve Longerbeam
(). Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-csi.c | 27 --- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index

[PATCH v8 01/11] media: videodev2.h: Add more field helper macros

2019-01-09 Thread Steve Longerbeam
iven field type is '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 v3: - none Changes since v2: - none Changes since v1: - add the complement macro V4L2_FIELD_IS

[PATCH v8 04/11] media: imx: Fix field negotiation

2019-01-09 Thread Steve Longerbeam
top lines. The capture interface device allows selecting IDMAC interweave by choosing INTERLACED_TB if the CSI/PRPENCVF source pad is seq-tb and INTERLACED_BT if the source pad is seq-bt (for future support of seq-bt). Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- drivers/staging/medi

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

2019-01-09 Thread Steve Longerbeam
Also add an example pipeline for unconverted capture with interweave on SabreAuto. Cleanup some language in various places in the process. Signed-off-by: Steve Longerbeam --- Changes since v4: - Make clear that it is IDMAC channel that does pixel reordering and interweave, not the CSI. Caught

[PATCH v7 01/11] media: videodev2.h: Add more field helper macros

2019-01-09 Thread Steve Longerbeam
iven field type is '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 v3: - none Changes since v2: - none Changes since v1: - add the complement macro V4L2_FIELD_IS

[PATCH v7 02/11] gpu: ipu-csi: Swap fields according to input/output field types

2019-01-09 Thread Steve Longerbeam
lines for one field. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- Changes since v5: - Convert to const the infmt, outfmt, and mbus_cfg pointer args to ipu_csi_init_interface(), suggested by Philipp Zabel. - Bring back if_fmt local var and don't copy outfmt to local sta

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

2019-01-09 Thread Steve Longerbeam
(). Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-csi.c | 27 --- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index

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

2019-01-09 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 v7 03/11] gpu: ipu-v3: Add planar support to interlaced scan

2019-01-09 Thread Steve Longerbeam
doubled, since a single chroma line is shared by two luma lines. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Acked-by: Philipp Zabel --- drivers/gpu/ipu-v3/ipu-cpmem.c | 26 +++-- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 ++- drivers/staging/media

[PATCH v7 06/11] media: imx: interweave and odd-chroma-row skip are incompatible

2019-01-09 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 Reviewed-by

[PATCH v7 05/11] media: imx-csi: Double crop height for alternate fields at sink

2019-01-09 Thread Steve Longerbeam
If the incoming sink field type is alternate, the reset crop height and crop height bounds must be set to twice the incoming height, because in alternate field mode, upstream will report only the lines for a single field, and the CSI captures the whole frame. Signed-off-by: Steve Longerbeam

[PATCH v7 04/11] media: imx: Fix field negotiation

2019-01-09 Thread Steve Longerbeam
top lines. The capture interface device allows selecting IDMAC interweave by choosing INTERLACED_TB if the CSI/PRPENCVF source pad is seq-tb and INTERLACED_BT if the source pad is seq-bt (for future support of seq-bt). Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- drivers/staging/medi

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

2019-01-09 Thread Steve Longerbeam
Skip writing U/V components to odd rows for YVU420 in addition to YUV420 and NV12. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- 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

[PATCH v7 10/11] media: imx: Allow interweave with top/bottom lines swapped

2019-01-09 Thread Steve Longerbeam
-> seq-bt alternate -> seq-bt Suggested-by: Philipp Zabel Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- Changes since v4: - Removed interweave_offset and replace with boolean interweave_swap, suggested by Philipp Zabel. --- drivers/staging/media/imx/imx-ic-

[PATCH v7 00/11] imx-media: Fixes for interlaced capture

2019-01-09 Thread Steve Longerbeam
from V4L2_FIELD_IS_SEQUENTIAL() macro Suggested-by: Nicolas Dufresne . - add macro V4L2_FIELD_IS_INTERLACED(). Steve Longerbeam (11): media: videodev2.h: Add more field helper macros gpu: ipu-csi: Swap fields according to input/output field types gpu: ipu-v3: Add planar support to interlace

Re: [PATCH v6 05/12] media: imx-csi: Input connections to CSI should be optional

2019-01-09 Thread Steve Longerbeam
On 1/9/19 3:13 AM, Philipp Zabel wrote: On Tue, 2019-01-08 at 16:15 -0800, Steve Longerbeam wrote: Some imx platforms do not have fwnode connections to all CSI input ports, and should not be treated as an error. This includes the imx6q SabreAuto, which has no connections to ipu1_csi1 and

[PATCH v6 06/12] media: imx-csi: Double crop height for alternate fields at sink

2019-01-08 Thread Steve Longerbeam
If the incoming sink field type is alternate, the reset crop height and crop height bounds must be set to twice the incoming height, because in alternate field mode, upstream will report only the lines for a single field, and the CSI captures the whole frame. Signed-off-by: Steve Longerbeam

[PATCH v6 03/12] gpu: ipu-v3: Add planar support to interlaced scan

2019-01-08 Thread Steve Longerbeam
doubled, since a single chroma line is shared by two luma lines. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Acked-by: Philipp Zabel --- drivers/gpu/ipu-v3/ipu-cpmem.c | 26 +++-- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 ++- drivers/staging/media

[PATCH v6 02/12] gpu: ipu-csi: Swap fields according to input/output field types

2019-01-08 Thread Steve Longerbeam
lines for one field. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- Changes since v5: - Convert to const the infmt, outfmt, and mbus_cfg pointer args to ipu_csi_init_interface(), suggested by Philipp Zabel. - Bring back if_fmt local var and don't copy outfmt to local sta

[PATCH v6 05/12] media: imx-csi: Input connections to CSI should be optional

2019-01-08 Thread Steve Longerbeam
an unconnected endpoint as an error. Fixes: c893500a16baf ("media: imx: csi: Register a subdev notifier") Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-medi

[PATCH v6 01/12] media: videodev2.h: Add more field helper macros

2019-01-08 Thread Steve Longerbeam
iven field type is '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 v3: - none Changes since v2: - none Changes since v1: - add the complement macro V4L2_FIELD_IS

[PATCH v6 07/12] media: imx: interweave and odd-chroma-row skip are incompatible

2019-01-08 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 Reviewed-by

[PATCH v6 11/12] media: imx: Allow interweave with top/bottom lines swapped

2019-01-08 Thread Steve Longerbeam
-> seq-bt alternate -> seq-bt Suggested-by: Philipp Zabel Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- Changes since v4: - Removed interweave_offset and replace with boolean interweave_swap, suggested by Philipp Zabel. --- drivers/staging/media/imx/imx-ic-

[PATCH v6 00/12] imx-media: Fixes for interlaced capture

2019-01-08 Thread Steve Longerbeam
From: Steve Longerbeam A set of patches that fixes some bugs with capturing from an interlaced source, and incompatibilites between IDMAC interlace interweaving and 4:2:0 data write reduction. History: v6: - Changes to patch "gpu: ipu-csi: Swap fields according to input/output field

[PATCH v6 08/12] media: imx-csi: Allow skipping odd chroma rows for YVU420

2019-01-08 Thread Steve Longerbeam
Skip writing U/V components to odd rows for YVU420 in addition to YUV420 and NV12. Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- 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

[PATCH v6 09/12] media: imx: vdic: rely on VDIC for correct field order

2019-01-08 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 v6 12/12] media: imx.rst: Update doc to reflect fixes to interlaced capture

2019-01-08 Thread Steve Longerbeam
Also add an example pipeline for unconverted capture with interweave on SabreAuto. Cleanup some language in various places in the process. Signed-off-by: Steve Longerbeam --- Changes since v4: - Make clear that it is IDMAC channel that does pixel reordering and interweave, not the CSI. Caught

[PATCH v6 04/12] media: imx: Fix field negotiation

2019-01-08 Thread Steve Longerbeam
top lines. The capture interface device allows selecting IDMAC interweave by choosing INTERLACED_TB if the CSI/PRPENCVF source pad is seq-tb and INTERLACED_BT if the source pad is seq-bt (for future support of seq-bt). Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- drivers/staging/medi

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

2019-01-08 Thread Steve Longerbeam
(). Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-csi.c | 27 --- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index

Re: [PATCH v6] gpu: ipu-csi: Swap fields according to input/output field types

2019-01-08 Thread Steve Longerbeam
Please disregard. This patch can't be submitted stand-alone, I will re-submit as part of a v6 of "imx-media: Fixes for interlaced capture" patchset. Steve On 12/14/18 3:46 PM, Steve Longerbeam wrote: The function ipu_csi_init_interface() was inverting the F-bit for NT

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