Re: [PATCH 4.19 regression fix 2/2] staging: vboxvideo: Change address of scanout buffer on page-flip

2018-09-10 Thread Steve Longerbeam
t scanning out of the old (now unpinned!) buffer. This commit fixes this by adding code to vbox_crtc_page_flip() to tell the hardware to scanout from the new fb_offset. Fixes: 2408898e3b6c ("staging: vboxvideo: Add page-flip support") Cc: Steve Longerbeam Signed-off-by: Hans de Goede

[RESEND PATCH v7 10/17] media: staging/imx: of: Remove recursive graph walk

2018-09-29 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

[RESEND PATCH v7 09/17] media: imx: mipi csi-2: Register a subdev notifier

2018-09-29 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

[RESEND PATCH v7 11/17] media: staging/imx: Loop through all registered subdevs for media links

2018-09-29 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

[RESEND PATCH v7 08/17] media: imx: csi: Register a subdev notifier

2018-09-29 Thread Steve Longerbeam
Parse neighbor remote devices on the CSI port, and add them to a subdev notifier, by calling v4l2_async_notifier_parse_fwnode_endpoints_by_port() using the CSI's port id. And register the subdev notifier for the CSI. Signed-off-by: Steve Longerbeam --- Changes since v6: - none Changes sin

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

2018-09-29 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

[RESEND PATCH v7 12/17] media: staging/imx: Rename root notifier

2018-09-29 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

[RESEND PATCH v7 13/17] media: staging/imx: Switch to v4l2_async_notifier_add_*_subdev

2018-09-29 Thread Steve Longerbeam
keeping an internal master asd_list, since this is moved to the notifier's asd_list. Signed-off-by: Steve Longerbeam --- Changes since v6: - none Changes since v5: - remove reference to notifier.num_subdevs and call v4l2_async_notifier_init(). Suggested by Sakari Ailus. --- drivers/st

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

2018-10-04 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 --- drivers/staging/media/imx/imx-ic-prpencvf.c

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

2018-10-04 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 v4 06/11] media: imx: interweave and odd-chroma-row skip are incompatible

2018-10-04 Thread Steve Longerbeam
If IDMAC interweaving is enabled in a write channel, the channel must write the odd chroma rows for 4:2:0 formats. Skipping writing the odd chroma rows produces corrupted captured 4:2:0 images when interweave is enabled. Reported-by: Krzysztof Hałasa Signed-off-by: Steve Longerbeam --- drivers

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

2018-10-04 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 v4 09/11] media: imx-csi: Move crop/compose reset after filling default mbus fields

2018-10-04 Thread Steve Longerbeam
(). Signed-off-by: Steve Longerbeam --- 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 6dd53a8e35d2..679295da5dde 100644

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

2018-10-04 Thread Steve Longerbeam
doubled, since a single chroma line is shared by two luma lines. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-cpmem.c | 26 +++-- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 ++- drivers/staging/media/imx/imx-media-csi.c | 3 ++- include/video/imx-ipu

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

2018-10-04 Thread Steve Longerbeam
-> seq-bt alternate -> seq-bt Suggested-by: Philipp Zabel Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 17 +++- drivers/staging/media/imx/imx-media-csi.c | 46 + 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/driver

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

2018-10-04 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 v4 02/11] gpu: ipu-csi: Swap fields according to input/output field types

2018-10-04 Thread Steve Longerbeam
lines for one field. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-csi.c | 132 +++--- drivers/staging/media/imx/imx-media-csi.c | 13 +-- include/video/imx-ipu-v3.h| 3 +- 3 files changed, 97 insertions(+), 51 deletions(-) diff --git a

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

2018-10-08 Thread Steve Longerbeam
Hi Philipp, On 10/05/2018 02:44 AM, Philipp Zabel wrote: Hi Steve, On Thu, 2018-10-04 at 11:53 -0700, Steve Longerbeam wrote: + + /* framelines for NTSC / PAL */ + height = (std & V4L2_STD_525_60) ? 525 : 625; I think this is a bit convoluted. Instea

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

2018-10-08 Thread Steve Longerbeam
On 10/05/2018 02:48 AM, Philipp Zabel wrote: On Thu, 2018-10-04 at 11:53 -0700, Steve Longerbeam wrote: To support interlaced scan with planar formats, cpmem SLUV must be programmed with the correct chroma line stride. For full and partial planar 4:2:2 (YUV422P, NV16), chroma line stride

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

2018-10-08 Thread Steve Longerbeam
Hi Philipp, On 10/05/2018 03:43 AM, Philipp Zabel wrote: Hi Steve, On Thu, 2018-10-04 at 11:54 -0700, Steve Longerbeam wrote: Allow sequential->interlaced interweaving but with top/bottom lines swapped to the output buffer. This can be accomplished by adding one line length to IDMAC out

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

2018-10-16 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 v5 07/12] media: imx: interweave and odd-chroma-row skip are incompatible

2018-10-16 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 v5 05/12] media: imx-csi: Input connections to CSI should be optional

2018-10-16 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 v5 11/12] media: imx: Allow interweave with top/bottom lines swapped

2018-10-16 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 v5 08/12] media: imx-csi: Allow skipping odd chroma rows for YVU420

2018-10-16 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 v5 09/12] media: imx: vdic: rely on VDIC for correct field order

2018-10-16 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 v5 06/12] media: imx-csi: Double crop height for alternate fields at sink

2018-10-16 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 v5 10/12] media: imx-csi: Move crop/compose reset after filling default mbus fields

2018-10-16 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 v5 04/12] media: imx: Fix field negotiation

2018-10-16 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 v5 02/12] gpu: ipu-csi: Swap fields according to input/output field types

2018-10-16 Thread Steve Longerbeam
lines for one field. Signed-off-by: Steve Longerbeam --- Changes since v4: - Cleaned up some convoluted code in ipu_csi_init_interface(), suggested by Philipp Zabel. - Fixed a regression in csi_setup(), caught by Philipp. --- drivers/gpu/ipu-v3/ipu-csi.c | 119

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

2018-12-07 Thread Steve Longerbeam
Hi Philipp, can you review this patch and give it your ack? Thanks, Steve On 10/16/18 5:00 PM, Steve Longerbeam wrote: The function ipu_csi_init_interface() was inverting the F-bit for NTSC case, in the CCIR_CODE_1/2 registers. The result being that for NTSC bottom-top field order, the CSI

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

2018-12-09 Thread Steve Longerbeam
From: Steve Longerbeam Forward events from a sub-device to its list of reachable video devices. Note this will queue the event to a video device even if there is no actual _enabled_ media path from the sub-device to the video device. So a future improvement is to skip the video device if there

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

2018-12-14 Thread Steve Longerbeam
On 12/13/18 4:59 AM, Philipp Zabel wrote: Hi Steve, On Tue, 2018-10-16 at 17:00 -0700, Steve Longerbeam wrote: The function ipu_csi_init_interface() was inverting the F-bit for NTSC case, in the CCIR_CODE_1/2 registers. The result being that for NTSC bottom-top field order, the CSI would

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

2018-12-14 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

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

2019-01-08 Thread Steve Longerbeam
Hi Hans, On 1/8/19 5:26 AM, Hans Verkuil wrote: On 12/09/18 20:57, Steve Longerbeam wrote: From: Steve Longerbeam Forward events from a sub-device to its list of reachable video devices. Note this will queue the event to a video device even if there is no actual _enabled_ media path from

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

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

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

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

[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

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

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

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

[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

[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 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 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 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] 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(+),

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

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

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

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

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

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

[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

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 = &ic_csc_identity; else if (inf == IPUV3_COLORSPACE_YUV) - params = &ic_csc_ycbcr2rgb_bt601; +

  1   2   3   4   5   6   7   8   >