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

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 > > +++ b/drivers/staging

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

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

[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
uot;, ret); > return ret; > + } > > spin_lock_init(&dev->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
d of breaking 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

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(&dev->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 +++ drivers/media/platform/coda/coda-co

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

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

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 patches

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 leav

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 scheme

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

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

[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
. Use 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 deletio

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

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

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

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

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

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

[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(-) diff

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

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

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 cod

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 i

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 that

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

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

2018-10-05 Thread Philipp Zabel
Hi Steve, On Thu, 2018-10-04 at 11:54 -0700, Steve Longerbeam wrote: > Also add an example pipeline for unconverted capture with interweave > on SabreAuto. > > Signed-off-by: Steve Longerbeam > --- > Changes since v3: > - none. > Changes since v2: > - expand on idmac interweave behavior in CSI s

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

2018-10-05 Thread Philipp Zabel
t its source pads, > e.g. the following transformations are allowed in CSI from sink to > source: > > seq-tb -> seq-bt > seq-bt -> seq-bt > alternate -> seq-bt > > Suggested-by: Philipp Zabel > Signed-off-by: Steve Longerbeam > --- > drivers/staging/media

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

2018-10-05 Thread Philipp Zabel
and compose windows to after the call to > imx_media_fill_default_mbus_fields(). > > Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel regards Philipp

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

2018-10-05 Thread Philipp Zabel
On Thu, 2018-10-04 at 11:53 -0700, Steve Longerbeam wrote: > 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 +

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

2018-10-05 Thread Philipp Zabel
; is enabled. > > Reported-by: Krzysztof Hałasa > Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel regards Philipp

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

2018-10-05 Thread Philipp Zabel
eld, and the CSI captures the whole frame. > > Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel regards Philipp

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

2018-10-05 Thread Philipp Zabel
he 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 regards Philipp

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

2018-10-05 Thread Philipp Zabel
LO, ilo); > ipu_ch_param_write_field(ch, IPU_FIELD_SLY, sly); > + if (sluv) > + ipu_ch_param_write_field(ch, IPU_FIELD_SLUV, sluv); > }; > EXPORT_SYMBOL_GPL(ipu_cpmem_interlaced_scan); [...] Reviewed-by: Philipp Zabel and Acked-by: Philipp Zabel to be merged with the rest of the series via the media tree. I'll take care not to introduce nontrivial conflicts in imx-drm. regards Philipp

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

2018-10-05 Thread Philipp Zabel
Hi Steve, On Thu, 2018-10-04 at 11:53 -0700, Steve Longerbeam wrote: [...] > int ipu_csi_init_interface(struct ipu_csi *csi, > struct v4l2_mbus_config *mbus_cfg, > -struct v4l2_mbus_framefmt *mbus_fmt) > +struct v4l2_mbus_fr

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

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

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

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

[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

[PATCH v3 09/16] gpu: ipu-v3: image-convert: move tile alignment helpers

2018-09-18 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 v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 54 +- 1 file changed, 27 insertions(+), 27 deletions

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

2018-09-18 Thread Philipp Zabel
ition selection and seam 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

[PATCH v3 12/16] gpu: ipu-v3: image-convert: relax alignment restrictions

2018-09-18 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 [steve_longerb...@mentor.com: Bring in the fixes to format width and height alignment restrictions fro

[PATCH v3 13/16] gpu: ipu-v3: image-convert: fix bytesperline adjustment

2018-09-18 Thread Philipp Zabel
. Use 2 << w_align as the minimum instead. Signed-off-by: Philipp Zabel [steve_longerb...@mentor.com: clamp input bytesperline] Signed-off-by: Steve Longerbeam --- Changes since v2: - clamp uninitialized input bytesperline --- drivers/gpu/ipu-v3/ipu-image-convert.c | 16 -

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

2018-09-18 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 --- New since v2. --- drivers/gpu/ipu-v3/ipu-image-convert.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/ipu

[PATCH] media: imx-pxp: fix compilation on i386 or x86_64

2018-09-14 Thread Philipp Zabel
ULL, pxp_irq_handler, ^ ../drivers/media/platform/imx-pxp.c:1661:4: error: 'IRQF_ONESHOT' undeclared (first use in this function) IRQF_ONESHOT, dev_name(&pdev->dev), dev); Fixes: 51abcf7fdb70 ("media: imx-pxp: add i.MX Pixel Pipeline driver") Reported-by: Randy

Re: [PATCH v2] [RFC v2] v4l2: add support for colorspace conversion for video capture

2018-09-06 Thread Philipp Zabel
On Thu, 2018-09-06 at 12:54 +0200, Hans Verkuil wrote: [...] > > The application usually doesn't need to know whether the driver changed > > the requested ycbcr_enc because it doesn't have CSC matrix support at > > all, or because it doesn't implement a specific conversion. And if the > > applicati

Re: [PATCH v3 1/4] dt-bindings: media: Add i.MX Pixel Pipeline binding

2018-09-06 Thread Philipp Zabel
Hi Philippe, On Thu, 2018-09-06 at 12:36 +0200, Philippe De Muyter wrote: [...] > > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/fsl-pxp.txt > > @@ -0,0 +1,26 @@ > > +Freescale Pixel Pipeline > > + > > + > > +The Pixel Pipeline (PXP) is a memory-to-memory g

Re: [PATCH v2] [RFC v2] v4l2: add support for colorspace conversion for video capture

2018-09-06 Thread Philipp Zabel
p again. I always wanted to get this in, but I never had a > driver where it would make sense to do so. I'll test this with i.MX PXP and IPU mem2mem drivers and follow up with per-driver patches to enable this feature once we know where this should be going. > On 09/05/2018 07:09 PM, Philip

[PATCH v3 4/4] MAINTAINERS: add entry for i.MX PXP media mem2mem driver

2018-09-06 Thread Philipp Zabel
Signed-off-by: Philipp Zabel --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index a5b256b25905..2e23c644f5d3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8994,6 +8994,13 @@ F: drivers/staging/media/imx/ F: include/linux/imx

[PATCH v3 2/4] ARM: dts: imx6ull: add pxp support

2018-09-06 Thread Philipp Zabel
Add the device node for the i.MX6ULL Pixel Pipeline (PXP). Signed-off-by: Philipp Zabel --- No changes since v2. --- arch/arm/boot/dts/imx6ul.dtsi | 8 arch/arm/boot/dts/imx6ull.dtsi | 6 ++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm

[PATCH v3 3/4] media: imx-pxp: add i.MX Pixel Pipeline driver

2018-09-06 Thread Philipp Zabel
, i.MX6SL, i.MX28, and i.MX23. The driver supports scaling and colorspace conversion. There is currently no support for rotation, alpha-blending, and the LUTs. Signed-off-by: Philipp Zabel --- Changes since v2: - fix Kconfig whitespace - remove unused defines - fix video_unregister_device

[PATCH v3 1/4] dt-bindings: media: Add i.MX Pixel Pipeline binding

2018-09-06 Thread Philipp Zabel
Add DT binding documentation for the Pixel Pipeline (PXP) found on various NXP i.MX SoCs. Signed-off-by: Philipp Zabel Reviewed-by: Rob Herring --- No changes since v2. --- .../devicetree/bindings/media/fsl-pxp.txt | 26 +++ 1 file changed, 26 insertions(+) create mode

[PATCH v3 0/4] i.MX PXP scaler/CSC driver

2018-09-06 Thread Philipp Zabel
pxp_fixup_colorimetry_cap regards Philipp Philipp Zabel (4): dt-bindings: media: Add i.MX Pixel Pipeline binding ARM: dts: imx6ull: add pxp support media: imx-pxp: add i.MX Pixel Pipeline driver MAINTAINERS: add entry for i.MX PXP media mem2mem driver .../devicetree/bindings/media/fsl

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