[PATCH v3 1/2] media: tc358743: fix connected/active CSI-2 lane reporting

2018-12-05 Thread Philipp Zabel
, to be used only until a better solution is found. Signed-off-by: Philipp Zabel Tested-by: Dave Stevenson --- Changes since v2 [1]: - Rebased onto media/master [1] https://patchwork.kernel.org/patch/9964141/ --- drivers/media/i2c/tc358743.c | 30 -- include/media/v4l2

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

2018-12-05 Thread Philipp Zabel
Temporarily use g_mbus_config() to determine the number of active data lanes used by the transmitter. If g_mbus_config is not supported or does not return the number of active lines, default to using all connected data lines. Signed-off-by: Philipp Zabel Acked-by: Steve Longerbeam --- Changes

[PATCH v5] media: imx: add mem2mem device

2018-12-03 Thread Philipp Zabel
in a single pass, arbitrary sizes can be achieved by rendering multiple tiles per frame. Signed-off-by: Philipp Zabel [slongerb...@gmail.com: use ipu_image_convert_adjust(), fix device_run() error handling] Signed-off-by: Steve Longerbeam --- Changes since v4: - No functional changes

[PATCH 0/2] Clarify H.264 loop filter offset controls and fix them for coda

2018-11-28 Thread Philipp Zabel
setB. Do the s5p-mfc and venus drivers use the controls V4L2_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA and _BETA directly as slice header fields, and thus their values are to be interpreted as half of FilterOffsetA/B defined in the H.264 spec, respectively? regards Philipp Philipp Zabel (2): media: v4l2: clar

[PATCH 2/2] media: coda: fix H.264 deblocking filter controls

2018-11-28 Thread Philipp Zabel
into the slice header fields slice_alpha_c0_offset_div2 and slice_beta_offset_div2. The actual filter offsets FilterOffsetA/B are double their value, in range of -12 to 12. Rename variables to more closely match the nomenclature in the H.264 specification. Signed-off-by: Philipp Zabel

[PATCH 1/2] media: v4l2: clarify H.264 loop filter offset controls

2018-11-28 Thread Philipp Zabel
the actual filter offsets FilterOffsetA/B. Clarify that this control contains the halved offsets. Signed-off-by: Philipp Zabel --- I assume that the venus and s5p-mfc drivers use the loop filter control values directly as halved filter offsets, because of the ranges. If this is not the case

Re: [PATCH v3 6/6] media: mt9m111: allow to setup pixclk polarity

2018-11-27 Thread Philipp Zabel
Hi Sakari, On Tue, 2018-11-27 at 15:50 +0200, Sakari Ailus wrote: > Hi Philipp, > > On Tue, Nov 27, 2018 at 02:39:27PM +0100, Philipp Zabel wrote: > > Hi Sakari, > > > > On Tue, 2018-11-27 at 15:19 +0200, Sakari Ailus wrote: > > > Hi Marco, > > > &

Re: [PATCH v3 6/6] media: mt9m111: allow to setup pixclk polarity

2018-11-27 Thread Philipp Zabel
Hi Sakari, On Tue, 2018-11-27 at 15:19 +0200, Sakari Ailus wrote: > Hi Marco, > > On Tue, Nov 27, 2018 at 11:02:53AM +0100, Marco Felsch wrote: > > From: Enrico Scholz > > > > The chip can be configured to output data transitions on the > > rising or falling edge of PIXCLK (Datasheet

Re: 'bad remote port parent' warnings

2018-11-22 Thread Philipp Zabel
On Tue, 2018-11-20 at 10:10 -0200, Fabio Estevam wrote: > Hi, > > On a imx6q-wandboard running linux-next 20181120 there the following warnings: > > [4.327794] video-mux 20e.iomuxc-gpr:ipu1_csi0_mux: bad remote > port parent > [4.336118] video-mux 20e.iomuxc-gpr:ipu2_csi1_mux:

[PATCH v4] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-15 Thread Philipp Zabel
by: Tomasz Figa [p.za...@pengutronix.de: added V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS, updated documentation, and added back debug message] Signed-off-by: Philipp Zabel Acked-by: Sakari Ailus --- Changes since v3: - Rephrased documentation - Added debug message --- Documentation/media/uapi/

[PATCH v2] v4l2-compliance: test orphaned buffer support

2018-11-15 Thread Philipp Zabel
are not supported. Signed-off-by: Philipp Zabel --- Changes since v1: - Rename has_orphaned_bufs to supports_orphaned_bufs - Check that capabilities are independent of memory type - Check that orphaned buffer support is independent of queue for M2M - Check that reqbufs(0) returns -EBUSY without orphaned

Re: [PATCH v4l-utils] v4l2-compliance: test orphaned buffer support

2018-11-15 Thread Philipp Zabel
On Thu, 2018-11-15 at 11:21 +0100, Hans Verkuil wrote: > On 11/14/18 15:38, Philipp Zabel wrote: > > Test that V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS is reported equally for > > both MMAP and DMABUF memory types. If supported, try to orphan buffers > > by calling reqbuf

[PATCH v4l-utils] v4l2-compliance: limit acceptable width/height to 65536 in VIDIOC_SUBDEV_G/S_FMT test

2018-11-14 Thread Philipp Zabel
Fail if the driver returns unrealistically large frame sizes. Signed-off-by: Philipp Zabel --- utils/v4l2-compliance/v4l2-test-subdevs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-test-subdevs.cpp b/utils/v4l2-compliance/v4l2-test

[PATCH v3] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-14 Thread Philipp Zabel
by: Tomasz Figa [p.za...@pengutronix.de: moved __vb2_queue_cancel out of the mmap_lock and added V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS] Signed-off-by: Philipp Zabel Acked-by: Sakari Ailus --- Changes since v2: - Added documentation for V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS --- .../media/uapi/

Re: [PATCH 07/15] media: coda: don't disable IRQs across buffer meta handling

2018-11-14 Thread Philipp Zabel
On Mon, 2018-11-05 at 16:25 +0100, Philipp Zabel wrote: > From: Lucas Stach > > The CODA driver uses threaded IRQs only, so there is nothing happening > in hardirq context that could interfere with the buffer meta handling. > > Signed-off-by: Lucas Stach Signed-off-by: Phili

Re: [PATCH 04/15] media: coda: limit queueing into internal bitstream buffer

2018-11-14 Thread Philipp Zabel
Hi, I forgot to add the proper SoB tag: On Mon, 2018-11-05 at 16:25 +0100, Philipp Zabel wrote: > From: Lucas Stach > > The ringbuffer used to hold the bitstream is very conservatively sized, > as keyframes can get very large and still need to fit into this buffer. > This means

[PATCH v4l-utils] v4l2-compliance: test orphaned buffer support

2018-11-14 Thread Philipp Zabel
are not supported. Signed-off-by: Philipp Zabel --- contrib/freebsd/include/linux/videodev2.h | 1 + include/linux/videodev2.h | 1 + utils/common/v4l2-info.cpp | 1 + utils/v4l2-compliance/v4l2-compliance.h | 1 + utils/v4l2-compliance/v4l2-test-buffers.cpp | 35

Re: [PATCH] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-14 Thread Philipp Zabel
Hi Hans, On Tue, 2018-11-13 at 16:43 +0100, Hans Verkuil wrote: > Hi Philipp, > > On 11/13/18 16:06, Philipp Zabel wrote: > > From: John Sheu > > > > Videobuf2 presently does not allow VIDIOC_REQBUFS to destroy outstanding > > buffers if the

Re: [PATCH] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-14 Thread Philipp Zabel
Hi Sakari, On Wed, 2018-11-14 at 00:27 +0200, Sakari Ailus wrote: [...] > This lets the user to allocate lots of mmap'ed buffers that are pinned in > physical memory. This is already possible without this patch, by closing the fd instead of calling reqbufs(0). > Considering that we don't really

Re: [PATCH] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-13 Thread Philipp Zabel
Sorry, that should have said [PATCH v2]. regards Philipp

[PATCH] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-13 Thread Philipp Zabel
by: Tomasz Figa [p.za...@pengutronix.de: moved __vb2_queue_cancel out of the mmap_lock and added V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS] Signed-off-by: Philipp Zabel --- .../media/common/videobuf2/videobuf2-core.c | 26 +-- .../media/common/videobuf2/videobuf2-v4l2.c | 2 +- in

Re: [RFP] Which V4L2 ioctls could be replaced by better versions?

2018-11-12 Thread Philipp Zabel
Hi Tomasz, On Sun, 2018-11-11 at 12:43 +0900, Tomasz Figa wrote: > On Sat, Nov 10, 2018 at 6:06 AM Nicolas Dufresne wrote: > > > > Le jeudi 08 novembre 2018 à 16:45 +0900, Tomasz Figa a écrit : > > > > In this patch we should consider a way to tell userspace that this has > > > > been opt in,

Re: [PATCH v5 8/9] media: uvcvideo: Rename uvc_{un,}init_video()

2018-11-09 Thread Philipp Zabel
On Wed, 2018-11-07 at 22:25 +0200, Laurent Pinchart wrote: > Hi Kieran, > > On Wednesday, 7 November 2018 16:30:46 EET Kieran Bingham wrote: > > On 06/11/2018 23:13, Laurent Pinchart wrote: > > > On Tuesday, 6 November 2018 23:27:19 EET Kieran Bingham wrote: > > > > From: Kieran Bingham > > > >

Re: [PATCH 3/3] media: imx: lift CSI width alignment restriction

2018-11-09 Thread Philipp Zabel
On Thu, 2018-11-08 at 21:46 -0800, Steve Longerbeam wrote: > On 11/5/18 7:20 AM, Philipp Zabel wrote: > > The CSI subdevice shouldn't have to care about IDMAC line start > > address alignment. With compose rectangle support in the capture > > driver, it doesn't have to anymore

Re: [PATCH 3/3] media: imx: lift CSI width alignment restriction

2018-11-09 Thread Philipp Zabel
Hi Steve, On Thu, 2018-11-08 at 21:46 -0800, Steve Longerbeam wrote: > > diff --git a/drivers/staging/media/imx/imx-media-csi.c > > b/drivers/staging/media/imx/imx-media-csi.c > > index c4523afe7b48..d39682192a67 100644 > > --- a/drivers/staging/media/imx/imx-media-csi.c > > +++

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

2018-11-09 Thread Philipp Zabel
On Thu, 2018-11-08 at 21:33 -0800, Steve Longerbeam wrote: > Hi Philipp, > > On 11/5/18 7:20 AM, Philipp Zabel wrote: > > Prepare for mbus format being smaller than the written rectangle > > due to burst size. > > > > Signed-off-by: Philipp Zabel > >

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

2018-11-09 Thread Philipp Zabel
Hi Steve, thank you for the review. On Thu, 2018-11-08 at 21:33 -0800, Steve Longerbeam wrote: [...] > > --- a/drivers/staging/media/imx/imx-media-capture.c > > +++ b/drivers/staging/media/imx/imx-media-capture.c > > @@ -262,6 +262,10 @@ static int capture_s_fmt_vid_cap(struct file *file, > >

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

2018-11-06 Thread Philipp Zabel
Hi Sakari, On Tue, 2018-11-06 at 16:01 +0200, Sakari Ailus wrote: [...] > @@ -290,6 +294,35 @@ static int capture_s_std(struct file *file, void *fh, > v4l2_std_id std) > > return v4l2_subdev_call(priv->src_sd, video, s_std, std); > > } > > > > +static int capture_g_selection(struct file

[PATCH v2] media: coda: fix memory corruption in case more than 32 instances are opened

2018-11-06 Thread Philipp Zabel
-by: Philipp Zabel --- Changes since v1: - #include explicitly where struct ida or ida_* functions are used, reported by Ian Arkver --- drivers/media/platform/coda/coda-common.c | 26 +-- drivers/media/platform/coda/coda.h| 3 ++- 2 files changed, 12 insertions

Re: [PATCH 01/15] media: coda: fix memory corruption in case more than 32 instances are opened

2018-11-06 Thread Philipp Zabel
On Mon, 2018-11-05 at 16:32 +, Ian Arkver wrote: > Hi Philipp, > > On 05/11/2018 15:24, Philipp Zabel wrote: > > The ffz() return value is undefined if the instance mask does not > > contain any zeros. If it returned 32, the following set_bit would > > corru

Re: [PATCH v2 3/3] media: imx-pxp: Improve pxp_soft_reset() error message

2018-11-06 Thread Philipp Zabel
); > return ret; > + } > > spin_lock_init(>irqlock); This should be rebased onto the fixed 2/2 or squashed into it, but otherwise Reviewed-by: Philipp Zabel regards Philipp

Re: [PATCH v2 2/3] media: imx-pxp: Check for pxp_soft_reset() error

2018-11-06 Thread Philipp Zabel
ing out above. I have no preference either way. > } > > static int pxp_probe(struct platform_device *pdev) > @@ -1670,7 +1674,9 @@ static int pxp_probe(struct platform_device *pdev) > if (ret < 0) > return ret; > > - pxp_soft_reset(dev); >

Re: [PATCH v2 1/3] media: imx-pxp: Check the return value from clk_prepare_enable()

2018-11-06 Thread Philipp Zabel
if (ret < 0) > + return ret; > + > pxp_soft_reset(dev); > > spin_lock_init(>irqlock); Reviewed-by: Philipp Zabel regards Philipp

[PATCH 10/15] media: coda: never set infinite timeperframe

2018-11-05 Thread Philipp Zabel
v4l2-compliance complains if G_PARM returns 0 in the denominator. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda

[PATCH 05/15] media: coda: reduce minimum frame size to 48x16 pixels.

2018-11-05 Thread Philipp Zabel
Three macroblocks seem to be the minimum resolution that can be encoded and decoded by the CODA960 h.264 codec. Picture run commands fail for smaller resolutions. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 04/15] media: coda: limit queueing into internal bitstream buffer

2018-11-05 Thread Philipp Zabel
From: Lucas Stach The ringbuffer used to hold the bitstream is very conservatively sized, as keyframes can get very large and still need to fit into this buffer. This means that the buffer is way oversized for the average stream to the extend that it will hold a few hundred frames when the video

[PATCH 15/15] media: coda: debug output when setting visible size via crop selection

2018-11-05 Thread Philipp Zabel
In addition to the S_FMT debug output, S_SELECTION (SEL_TGT_CROP) is relevant to determine encoded size. Add debug output for it. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/coda/coda

[PATCH 07/15] media: coda: don't disable IRQs across buffer meta handling

2018-11-05 Thread Philipp Zabel
From: Lucas Stach The CODA driver uses threaded IRQs only, so there is nothing happening in hardirq context that could interfere with the buffer meta handling. Signed-off-by: Lucas Stach --- drivers/media/platform/coda/coda-bit.c| 19 +++

[PATCH 13/15] media: coda: improve queue busy error message

2018-11-05 Thread Philipp Zabel
Use v4l2_type_names to indicate which of the two queues is busy. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda

[PATCH 06/15] media: coda: remove unused instances list

2018-11-05 Thread Philipp Zabel
The per-device instance list is unused, remove it. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 9 - drivers/media/platform/coda/coda.h| 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers

[PATCH 08/15] media: coda: set V4L2_CAP_TIMEPERFRAME flag in coda_s_parm

2018-11-05 Thread Philipp Zabel
The flag is already set in coda_g_parm, but v4l2-compliance complains about it not being set during S_PARM. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media

[PATCH 02/15] media: coda: store unmasked fifo position in meta

2018-11-05 Thread Philipp Zabel
Storing the unmasked kfifo->in position as meta->start and ->end allows to more easily compare a point past meta->end with the current kfifo->in. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c| 9 +++-- drivers/media/platform/coda/coda-common.c

[PATCH 11/15] media: coda: fail S_SELECTION for read-only targets

2018-11-05 Thread Philipp Zabel
v4l2-compose complains if S_SELECTION returns 0 for read-only targets. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 51 +-- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers

[PATCH 12/15] media: coda: print SEQ_INIT error code as hex value

2018-11-05 Thread Philipp Zabel
From: Michael Tretter The error code looks much more like a bit field than an error value. Print it as hex rather than decimal. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 14/15] media: coda: normalise debug output

2018-11-05 Thread Philipp Zabel
-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c| 55 +++- drivers/media/platform/coda/coda-common.c | 79 ++- drivers/media/platform/coda/coda.h| 7 ++ 3 files changed, 65 insertions(+), 76 deletions(-) diff --git a/drivers/media/platform

[PATCH 03/15] media: coda: always hold back decoder jobs until we have enough bitstream payload

2018-11-05 Thread Philipp Zabel
never run into a buffer underrun condition if userspace does not supply new input buffers fast enough. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 13 - drivers/media/platform/coda/coda.h| 12 2 files changed, 20 insertions(+), 5

[PATCH 01/15] media: coda: fix memory corruption in case more than 32 instances are opened

2018-11-05 Thread Philipp Zabel
-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 25 --- drivers/media/platform/coda/coda.h| 2 +- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c

[PATCH 09/15] media: coda: implement ENUM_FRAMEINTERVALS

2018-11-05 Thread Philipp Zabel
v4l2-compliance complains about S_PARM being supported, but not ENUM_FRAMEINTERVALS. Report a continuous frame interval even though the hardware only supports 16-bit numerator and denominator, with min/max values that can be programmed into the mailbox registers. Signed-off-by: Philipp Zabel

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

2018-11-05 Thread Philipp Zabel
Allowing to compose captured images into larger memory buffers will let us lift alignment restrictions on CSI crop width. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 +- drivers/staging/media/imx/imx-media-capture.c | 38 +++ drivers

[PATCH 3/3] media: imx: lift CSI width alignment restriction

2018-11-05 Thread Philipp Zabel
The CSI subdevice shouldn't have to care about IDMAC line start address alignment. With compose rectangle support in the capture driver, it doesn't have to anymore. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-capture.c | 9 - drivers/staging/media/imx/imx-media

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

2018-11-05 Thread Philipp Zabel
Prepare for mbus format being smaller than the written rectangle due to burst size. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-capture.c | 55 +-- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/drivers/staging/media/imx/imx-media

[RFC] media: imx: queue subdevice events on the video device in the same pipeline

2018-11-05 Thread Philipp Zabel
While subdevice and video device are in the same pipeline, pass subdevice events on to userspace via the video device node. Signed-off-by: Philipp Zabel --- This would allow to see source change events from the source subdevice on the video device node, for example. --- drivers/staging/media

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

2018-11-05 Thread Philipp Zabel
Hi Steve, On Fri, 2018-02-09 at 17:43 -0800, Steve Longerbeam wrote: [...] > I *think* by implementing init_cfg in the CSI, it will prevent the > NULL deref in csi_enum_mbus_code(). However I think this patch > is a good idea in any case. Ack on both. Can we still get this patch applied?

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

2018-10-30 Thread Philipp Zabel
Hi Steve, On Fri, 2018-10-19 at 11:51 -0700, Steve Longerbeam wrote: > Awesome, thanks Philipp. > > For the whole series: > > Acked-by: Steve Longerbeam > Tested-by: Steve Longerbeam > on i.MX6q SabreSD. Thank you. I have added the tags where it made sense to me and applied the ipu-v3

Re: [RFP] Which V4L2 ioctls could be replaced by better versions?

2018-10-23 Thread Philipp Zabel
Hi Tomasz, On Mon, Oct 22, 2018 at 12:37:57PM +0900, Tomasz Figa wrote: [...] > On Mon, Oct 22, 2018 at 1:28 AM Philipp Zabel wrote: [...] > > REQBUFS 0 fails if the vb2 buffer is still in use, including from dmabuf > > attachments: vb2_buffer_in_use checks the num_users memo

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

2018-10-21 Thread Philipp Zabel
On Fri, Oct 19, 2018 at 01:19:10PM -0700, Steve Longerbeam wrote: > > On 10/19/18 2:53 AM, Philipp Zabel wrote: > > Hi Tim, > > > > On Thu, 2018-10-18 at 15:53 -0700, Tim Harvey wrote: > > [...] > > > Philipp, > > > > > > Thanks for subm

Re: [RFP] Which V4L2 ioctls could be replaced by better versions?

2018-10-21 Thread Philipp Zabel
On Wed, Oct 03, 2018 at 05:24:39PM +0900, Tomasz Figa wrote: [...] > > Yes, but that would fall in a complete redesign I guess. The buffer > > allocation scheme is very inflexible. You can't have buffers of two > > dimensions allocated at the same time for the same queue. Worst, you > > cannot

Re: [RFP] Which V4L2 ioctls could be replaced by better versions?

2018-10-21 Thread Philipp Zabel
On Thu, Sep 20, 2018 at 02:14:07PM -0400, Nicolas Dufresne wrote: > > Do we have more ioctls that could use a refresh? S/G/TRY_FMT perhaps, again > > in > > order to improve single vs multiplanar handling. > > Yes, but that would fall in a complete redesign I guess. The buffer > allocation

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

2018-10-19 Thread Philipp Zabel
Hi Steve, On Wed, 2018-10-17 at 16:46 -0700, Steve Longerbeam wrote: > Hi Philipp, > > On 10/12/18 5:29 PM, Steve Longerbeam wrote: > > > > > > But one last thing. Conversions to and from YV12 are producing images > > with wrong colors, it looks like the .uv_swapped boolean needs to be > >

[PATCH v4 02/22] gpu: ipu-cpmem: add WARN_ON_ONCE() for unaligned dma buffers

2018-10-19 Thread Philipp Zabel
From: Steve Longerbeam Add a WARN_ON_ONCE() if either the Y/packed buffer, or the U/V offsets, are not aligned on 8-byte boundaries. This will catch alignment bugs in DRM, V4L2. Signed-off-by: Steve Longerbeam --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-cpmem.c | 6 ++ 1 file

[PATCH v4 16/22] gpu: ipu-v3: image-convert: select optimal seam positions

2018-10-19 Thread Philipp Zabel
positions rounded to alignment requirements. Since now tiles can be sized differently, alignment restrictions of the complete image can be relaxed in the next step. Signed-off-by: Philipp Zabel --- Changes since v3: - Fix tile_left_align for 24-bit RGB formats and reduce alignment

[PATCH v4 14/22] gpu: ipu-v3: image-convert: calculate tile dimensions and offsets outside fill_image

2018-10-19 Thread Philipp Zabel
This will allow to calculate seam positions after initializing the ipu_image base structure but before calculating tile dimensions. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 18 +- 1 file changed, 13 insertions(+), 5

[PATCH v4 03/22] gpu: ipu-v3: Add chroma plane offset overrides to ipu_cpmem_set_image()

2018-10-19 Thread Philipp Zabel
From: Steve Longerbeam Allow the caller of ipu_cpmem_set_image() to override the latters calculation of the chroma plane offsets, by adding override U/V plane offsets to 'struct ipu_image'. Signed-off-by: Steve Longerbeam --- New since v3. --- drivers/gpu/ipu-v3/ipu-cpmem.c | 46

[PATCH v4 13/22] gpu: ipu-v3: image-convert: store tile top/left position

2018-10-19 Thread Philipp Zabel
Store tile top/left position in pixels in the tile structure. This will allow overlapping tiles with different sizes later. Signed-off-by: Philipp Zabel --- No functional changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 27 ++ 1 file changed, 15 insertions

[PATCH v4 19/22] gpu: ipu-v3: image-convert: fix bytesperline adjustment

2018-10-19 Thread Philipp Zabel
2 << w_align as the minimum instead. Signed-off-by: Philipp Zabel [slongerb...@gmail.com: clamp input bytesperline] Signed-off-by: Steve Longerbeam --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 16 1 file changed, 12 insertions(+), 4 deletions(-)

[PATCH v4 15/22] gpu: ipu-v3: image-convert: move tile alignment helpers

2018-10-19 Thread Philipp Zabel
Move tile_width_align and tile_height_align up so they can be used by the tile edge position calculation code. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 54 +- 1 file changed, 27 insertions(+), 27 deletions

[PATCH v4 00/22] i.MX media mem2mem scaler

2018-10-19 Thread Philipp Zabel
hiding with per-tile resizing coefficients and adds a scaling mem2mem device to the imx-media driver. regards Philipp Philipp Zabel (15): media: imx: add mem2mem device gpu: ipu-v3: ipu-ic: allow to manually set resize coefficients gpu: ipu-v3: image-convert: prepare for per-tile configuration

[PATCH v4 12/22] gpu: ipu-v3: image-convert: reconfigure IC per tile

2018-10-19 Thread Philipp Zabel
For differently sized tiles or if the resizing coefficients change, we have to stop, reconfigure, and restart the IC between tiles. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 65 +- 1 file changed, 44 insertions

[PATCH v4 18/22] gpu: ipu-v3: image-convert: relax alignment restrictions

2018-10-19 Thread Philipp Zabel
line start address. Since different tile sizes are allowed, the output tile with / height alignment doesn't need to be multiplied by number of columns / rows. Signed-off-by: Philipp Zabel [slongerb...@gmail.com: Bring in the fixes to format width and height alignment restrictions from imx-media

[PATCH v4 07/22] gpu: ipu-v3: image-convert: Allow reentrancy into abort

2018-10-19 Thread Philipp Zabel
From: Steve Longerbeam Allow reentrancy into ipu_image_convert_abort(), by moving re-init of ctx->aborted completion under the spin lock, and only if there is an active run, and complete all waiters do_bh(). Note: ipu_image_convert_unprepare() is still _not_ reentrant, and can't be made

[PATCH v4 04/22] gpu: ipu-v3: ipu-ic: allow to manually set resize coefficients

2018-10-19 Thread Philipp Zabel
For tiled scaling, we want to compute the scaling coefficients externally in such a way that the interpolation overshoots tile boundaries and samples up to the first pixel of the next tile. Prepare to override the resizing coefficients from the image conversion code. Signed-off-by: Philipp Zabel

[PATCH v4 11/22] gpu: ipu-v3: image-convert: calculate per-tile resize coefficients

2018-10-19 Thread Philipp Zabel
. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 236 - 1 file changed, 234 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index c2f82d681c48

[PATCH v4 09/22] gpu: ipu-v3: image-convert: Catch unaligned tile offsets

2018-10-19 Thread Philipp Zabel
From: Steve Longerbeam Catch calculated tile offsets that are not 8-byte aligned as required by the IDMAC engine and return error in calc_tile_offsets(). Signed-off-by: Steve Longerbeam --- New since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 61 -- 1 file

[PATCH v4 20/22] gpu: ipu-v3: image-convert: add some ASCII art to the exposition

2018-10-19 Thread Philipp Zabel
Visualize the scaling and rotation pipeline with some ASCII art diagrams. Remove the FIXME comment about missing seam prevention. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 39 +++--- 1 file changed, 29 insertions

[PATCH v4 05/22] gpu: ipu-v3: image-convert: Prevent race between run and unprepare

2018-10-19 Thread Philipp Zabel
From: Steve Longerbeam Prevent possible race by parallel threads between ipu_image_convert_run() and ipu_image_convert_unprepare(). This involves setting ctx->aborting to true unconditionally so that no new job runs can be queued during unprepare, and holding the ctx->aborting flag until the

[PATCH v4 17/22] gpu: ipu-v3: image-convert: fix debug output for varying tile sizes

2018-10-19 Thread Philipp Zabel
Since tile dimensions now vary between tiles, add debug output for each tile's position and dimensions. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v4 22/22] gpu: ipu-v3: image-convert: allow three rows or columns

2018-10-19 Thread Philipp Zabel
If width or height are in the [2049, 3072] range, allow to use just three tiles in this dimension, instead of four. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers

[PATCH v4 01/22] media: imx: add mem2mem device

2018-10-19 Thread Philipp Zabel
in a single pass, arbitrary sizes can be achieved by rendering multiple tiles per frame. Signed-off-by: Philipp Zabel [slongerb...@gmail.com: use ipu_image_convert_adjust(), fix device_run() error handling] Signed-off-by: Steve Longerbeam --- No changes since v3. --- drivers/staging/media/imx

[PATCH v4 10/22] gpu: ipu-v3: image-convert: prepare for per-tile configuration

2018-10-19 Thread Philipp Zabel
Let convert_start start from a given tile index, allocate intermediate tile with maximum tile size. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 60 +++--- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git

[PATCH v4 21/22] gpu: ipu-v3: image-convert: disable double buffering if necessary

2018-10-19 Thread Philipp Zabel
Double-buffering only works if tile sizes are the same and the resizing coefficient does not change between tiles, even for non-planar formats. Signed-off-by: Philipp Zabel --- No changes since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 27 -- 1 file changed, 25

[PATCH v4 06/22] gpu: ipu-v3: image-convert: Only wait for abort completion if active run

2018-10-19 Thread Philipp Zabel
From: Steve Longerbeam Only wait for the ctx->aborted completion if there is an active run in progress, otherwise the wait will just timeout after 10 seconds. If there is no active run in progress, the done queue just needs to be emptied. Signed-off-by: Steve Longerbeam --- New since v3. ---

[PATCH v4 08/22] gpu: ipu-v3: image-convert: Remove need_abort flag

2018-10-19 Thread Philipp Zabel
From: Steve Longerbeam The need_abort flag is not really needed anymore in __ipu_image_convert_abort(), remove it. No functional changes. Signed-off-by: Steve Longerbeam --- New since v3. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

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

2018-10-19 Thread Philipp Zabel
Hi Tim, On Thu, 2018-10-18 at 15:53 -0700, Tim Harvey wrote: [...] > Philipp, > > Thanks for submitting this! > > I'm hoping this lets us use non-IMX capture devices along with the IMX > media controller entities to so we can use hardware > CSC,scaling,pixel-format-conversions and ultimately

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

2018-10-19 Thread Philipp Zabel
On Wed, 2018-10-17 at 14:33 -0700, Steve Longerbeam wrote: [...] > > I'm also interested in looking at Philipps' 'i.MX media mem2mem > > scaler' series (https://patchwork.kernel.org/cover/10603881/) and am > > wondering if anyone has some example pipelines showing that in use. > > I'm hoping that

Re: [PATCH v3 10/16] gpu: ipu-v3: image-convert: select optimal seam positions

2018-10-17 Thread Philipp Zabel
On Fri, 2018-10-12 at 17:33 -0700, Steve Longerbeam wrote: > > On 09/18/2018 02:34 AM, Philipp Zabel wrote: > > > > +/* > > + * Tile left edges are required to be aligned to multiples of 8 bytes > > + * by the IDMAC. > > + */ > > +static inline u32 til

Re: [RFC] Informal meeting during ELCE to discuss userspace support for stateless codecs

2018-10-11 Thread Philipp Zabel
On Mon, 2018-10-08 at 13:53 +0200, Hans Verkuil wrote: > Hi all, > > I would like to meet up somewhere during the ELCE to discuss userspace support > for stateless (and perhaps stateful as well?) codecs. > > It is also planned as a topic during the summit, but I would prefer to prepare > for

Re: [PATCH -next] media: imx-pxp: remove duplicated include from imx-pxp.c

2018-10-08 Thread Philipp Zabel
which was a duplicate of already applied b4fbf423cef9: https://patchwork.linuxtv.org/patch/52243/ Acked-by: Philipp Zabel regards Philipp

[PATCH] media: imx: use well defined 32-bit RGB pixel format

2018-09-18 Thread Philipp Zabel
The documentation in Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst tells us that the V4L2_PIX_FMT_RGB32 format is deprecated and must not be used by new drivers. Replace it with V4L2_PIX_FMT_XRGB32. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-utils.c | 4 ++-- 1

[PATCH v3 11/16] gpu: ipu-v3: image-convert: fix debug output for varying tile sizes

2018-09-18 Thread Philipp Zabel
Since tile dimensions now vary between tiles, add debug output for each tile's position and dimensions. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v3 14/16] gpu: ipu-v3: image-convert: add some ASCII art to the exposition

2018-09-18 Thread Philipp Zabel
Visualize the scaling and rotation pipeline with some ASCII art diagrams. Remove the FIXME comment about missing seam prevention. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 39 +++--- 1 file changed, 29 insertions

[PATCH v3 15/16] gpu: ipu-v3: image-convert: disable double buffering if necessary

2018-09-18 Thread Philipp Zabel
Double-buffering only works if tile sizes are the same and the resizing coefficient does not change between tiles, even for non-planar formats. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 27 -- 1 file changed, 25

[PATCH v3 01/16] media: imx: add mem2mem device

2018-09-18 Thread Philipp Zabel
in a single pass, arbitrary sizes can be achieved by rendering multiple tiles per frame. Signed-off-by: Philipp Zabel [steve_longerb...@mentor.com: use ipu_image_convert_adjust(), fix device_run() error handling] Signed-off-by: Steve Longerbeam --- Changes since v2: - Rely

[PATCH v3 08/16] gpu: ipu-v3: image-convert: calculate tile dimensions and offsets outside fill_image

2018-09-18 Thread Philipp Zabel
This will allow to calculate seam positions after initializing the ipu_image base structure but before calculating tile dimensions. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 17 ++--- 1 file changed, 10 insertions(+), 7

[PATCH v3 04/16] gpu: ipu-v3: image-convert: prepare for per-tile configuration

2018-09-18 Thread Philipp Zabel
Let convert_start start from a given tile index, allocate intermediate tile with maximum tile size. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 60 +++--- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git

[PATCH v3 06/16] gpu: ipu-v3: image-convert: reconfigure IC per tile

2018-09-18 Thread Philipp Zabel
For differently sized tiles or if the resizing coefficients change, we have to stop, reconfigure, and restart the IC between tiles. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 65 +- 1 file changed, 44 insertions

[PATCH v3 10/16] gpu: ipu-v3: image-convert: select optimal seam positions

2018-09-18 Thread Philipp Zabel
positions rounded to alignment requirements. Since now tiles can be sized differently, alignment restrictions of the complete image can be relaxed in the next step. Signed-off-by: Philipp Zabel --- Changes since v2: - Switch width/height properly and align tile top left positions to 8x8 IRT

[PATCH v3 02/16] gpu: ipu-cpmem: add WARN_ON_ONCE() for unaligned dma buffers

2018-09-18 Thread Philipp Zabel
From: Steve Longerbeam Add a WARN_ON_ONCE() if either the Y/packed buffer, or the U/V offsets, are not aligned on 8-byte boundaries. This will catch alignment bugs in DRM, V4L2. Signed-off-by: Steve Longerbeam --- New since v2. --- drivers/gpu/ipu-v3/ipu-cpmem.c | 6 ++ 1 file changed, 6

[PATCH v3 03/16] gpu: ipu-v3: ipu-ic: allow to manually set resize coefficients

2018-09-18 Thread Philipp Zabel
For tiled scaling, we want to compute the scaling coefficients externally in such a way that the interpolation overshoots tile boundaries and samples up to the first pixel of the next tile. Prepare to override the resizing coefficients from the image conversion code. Signed-off-by: Philipp Zabel

[PATCH v3 05/16] gpu: ipu-v3: image-convert: calculate per-tile resize coefficients

2018-09-18 Thread Philipp Zabel
. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 236 - 1 file changed, 234 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index f4db1553d23a

[PATCH v3 07/16] gpu: ipu-v3: image-convert: store tile top/left position

2018-09-18 Thread Philipp Zabel
Store tile top/left position in pixels in the tile structure. This will allow overlapping tiles with different sizes later. Signed-off-by: Philipp Zabel --- No changes since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 27 ++ 1 file changed, 15 insertions(+), 12

  1   2   3   4   5   6   7   8   9   10   >