[PATCH v4 08/10] media: dt-bindings: Document i.MX8MQ and i.MX8MM VPU bindings

2019-06-11 Thread Philipp Zabel
Add devicetree binding documentation for the Hantro G1/G2 VPU on i.MX8MQ and for the Hantro G1/G2/H1 VPU on i.MX8MM. Signed-off-by: Philipp Zabel --- .../devicetree/bindings/media/imx8m-vpu.txt | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation

[PATCH v4 07/10] media: hantro: allow arbitrary number of clocks

2019-06-11 Thread Philipp Zabel
Dynamically allocate clocks and move clock names out of struct hantro_variant. This lifts the four clock limit and allows to use ARRAY_SIZE() to fill .num_clocks to reduce the risk of mismatches. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon --- Changed since v3: - Moved before

[PATCH v4 10/10] media: hantro: add initial i.MX8MM support (untested)

2019-06-11 Thread Philipp Zabel
This should enable MPEG-2 decoding on the Hantro G1 and JPEG encoding on the Hantro H1 on i.MX8MM. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro_drv.c | 1 + drivers/staging/media/hantro/hantro_hw.h| 1 + drivers/staging/media/hantro/imx8m_vpu_hw.c | 139

[PATCH v4 05/10] media: hantro: add support for named register ranges

2019-06-11 Thread Philipp Zabel
Add support for multiple register ranges with SoC specific names. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon --- Changes since v3 [1]: - Renamed bases to reg_bases [1] https://patchwork.linuxtv.org/patch/56467/ --- drivers/staging/media/hantro/hantro.h | 8

[PATCH v4 03/10] media: hantro: add PM runtime resume callback

2019-06-11 Thread Philipp Zabel
It seems that on i.MX8MQ the power domain controller does not propagate resets to the VPU cores on resume. Add a callback to allow implementing manual reset of the VPU cores after ungating the power domain. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon --- drivers/staging/media

[PATCH v4 04/10] media: hantro: make irq names configurable

2019-06-11 Thread Philipp Zabel
The i.MX8MQ bindings will use different IRQ names ("g1" instead of "vdpu", and "g2"), so make them configurable. This also allows to register more than two IRQs, which will be required for i.MX8MM support later (it will add "h1" instead of "vepu").

[PATCH v4 02/10] media: hantro: print video device name in addition to device node

2019-06-11 Thread Philipp Zabel
It can be helpful to know which video device was registered at which device node. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon --- drivers/staging/media/hantro/hantro_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/hantro

[PATCH v4 06/10] media: hantro: add support for separate control block

2019-06-11 Thread Philipp Zabel
On i.MX8MQ/MM a separate control block contains registers for per-core resets, clock gating, and fuse register control. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon --- drivers/staging/media/hantro/hantro.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging

Re: [PATCH v3 07/10] media: dt-bindings: Document i.MX8MQ and i.MX8MM VPU bindings

2019-06-11 Thread Philipp Zabel
On Sat, 2019-06-01 at 11:18 +0200, Boris Brezillon wrote: > On Fri, 31 May 2019 10:55:20 +0200 > Philipp Zabel wrote: > > > Add devicetree binding documentation for the Hantro G1/G2 VPU on i.MX8MQ > > and for the Hantro G1/G2/H1 VPU on i.MX8MM. > > >

Re: [PATCH v3 08/10] media: hantro: add initial i.MX8MQ support

2019-06-11 Thread Philipp Zabel
On Tue, 2019-06-04 at 12:42 +0200, Hans Verkuil wrote: > On 6/3/19 10:02 PM, Boris Brezillon wrote: > > On Mon, 3 Jun 2019 14:45:37 +0200 > > Hans Verkuil wrote: > > > > > On 5/31/19 10:55 AM, Philipp Zabel wrote: > > > > For now this just enables M

Re: [PATCH v3 09/10] media: hantro: add initial i.MX8MM support (untested)

2019-06-11 Thread Philipp Zabel
On Mon, 2019-06-03 at 14:54 +0200, Hans Verkuil wrote: > On 5/31/19 10:55 AM, Philipp Zabel wrote: > > This should enable MPEG-2 decoding on the Hantro G1 and JPEG encoding on > > the Hantro H1 on i.MX8MM. > > That's the i.MX8M Mini, right? I think that's t

Re: [PATCH v3 01/10] rockchip/vpu: rename from rockchip to hantro

2019-06-11 Thread Philipp Zabel
On Thu, 2019-06-06 at 17:06 +0200, Boris Brezillon wrote: > On Wed, 5 Jun 2019 13:22:42 +0200 > Boris Brezillon wrote: > > > On Fri, 31 May 2019 10:55:14 +0200 > > Philipp Zabel wrote: > > > > > Rename the driver and all relevant identifiers from Rockchip

[PATCH v3 00/10] Rename Rockchip VPU driver to Hantro, add initial i.MX8M support

2019-05-31 Thread Philipp Zabel
f reg_names out of struct hantro_variant - Use ARRAY_SIZE to set num_irqs and num_regs - Dynamically allocate base address array in struct hantro_dev and rename it to bases - More concise IORESOURCE_MEM setup in hantro_probe - Add a patch to allow arbitrary number of clocks regards Philipp Philipp Z

[PATCH v3 01/10] rockchip/vpu: rename from rockchip to hantro

2019-05-31 Thread Philipp Zabel
Rename the driver and all relevant identifiers from Rockchip to Hantro, as other Hantro IP based VPU implementations can be supported by the same driver. The RK3288 decoder is Hantro G1 based, the encoder is Hantro H1. This patch just renames, no functional changes. Signed-off-by: Philipp Zabel

[PATCH v3 05/10] media: hantro: add support for named register ranges

2019-05-31 Thread Philipp Zabel
Add support for multiple register ranges with SoC specific names. Signed-off-by: Philipp Zabel --- Changes since v2 [1]: - Move array of reg_names out of struct hantro_variant - Use ARRAY_SIZE to set num_regs - Dynamically allocate base address array in struct hantro_dev and rename it to

[PATCH v3 06/10] media: hantro: add support for separate control block

2019-05-31 Thread Philipp Zabel
On i.MX8MQ/MM a separate control block contains registers for per-core resets, clock gating, and fuse register control. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/hantro/hantro.h b/drivers

[PATCH v3 02/10] media: hantro: print video device name in addition to device node

2019-05-31 Thread Philipp Zabel
It can be helpful to know which video device was registered at which device node. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon --- drivers/staging/media/hantro/hantro_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/hantro

[PATCH v3 08/10] media: hantro: add initial i.MX8MQ support

2019-05-31 Thread Philipp Zabel
For now this just enables MPEG-2 decoding on the Hantro G1 on i.MX8MQ. Signed-off-by: Philipp Zabel --- Changes since v2 [1]: - Adapted to changes in patches 4 and 5 [1] https://patchwork.linuxtv.org/patch/56420/ --- drivers/staging/media/hantro/Kconfig| 8 +- drivers/staging/media

[PATCH v3 09/10] media: hantro: add initial i.MX8MM support (untested)

2019-05-31 Thread Philipp Zabel
This should enable MPEG-2 decoding on the Hantro G1 and JPEG encoding on the Hantro H1 on i.MX8MM. Signed-off-by: Philipp Zabel Changes since v2 [1]: - Adapted to changes in patches 4 and 5 [1] https://patchwork.linuxtv.org/patch/56425/ --- drivers/staging/media/hantro/hantro_drv.c | 1

[PATCH v3 04/10] media: hantro: make irq names configurable

2019-05-31 Thread Philipp Zabel
The i.MX8MQ bindings will use different IRQ names ("g1" instead of "vdpu", and "g2"), so make them configurable. This also allows to register more than two IRQs, which will be required for i.MX8MM support later (it will add "h1" instead of "vepu")

[PATCH v3 03/10] media: hantro: add PM runtime resume callback

2019-05-31 Thread Philipp Zabel
It seems that on i.MX8MQ the power domain controller does not propagate resets to the VPU cores on resume. Add a callback to allow implementing manual reset of the VPU cores after ungating the power domain. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon --- drivers/staging/media

[PATCH v3 10/10] media: hantro: allow arbitrary number of clocks

2019-05-31 Thread Philipp Zabel
Dynamically allocate clocks and move clock names out of struct hantro_variant. This lifts the four clock limit and allows to use ARRAY_SIZE() to fill .num_clocks to reduce the risk of mismatches. Signed-off-by: Philipp Zabel --- New in v3. --- drivers/staging/media/hantro/hantro.h| 6

[PATCH v3 07/10] media: dt-bindings: Document i.MX8MQ and i.MX8MM VPU bindings

2019-05-31 Thread Philipp Zabel
Add devicetree binding documentation for the Hantro G1/G2 VPU on i.MX8MQ and for the Hantro G1/G2/H1 VPU on i.MX8MM. Signed-off-by: Philipp Zabel --- .../devicetree/bindings/media/imx8m-vpu.txt | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation

Re: [PATCH v2 5/9] media: hantro: add support for named register ranges

2019-05-29 Thread Philipp Zabel
Hi Boris, thank you for the review. On Wed, 2019-05-29 at 13:46 +0200, Boris Brezillon wrote: > On Wed, 29 May 2019 11:54:20 +0200 > Philipp Zabel wrote: > > > Add support for multiple register ranges with SoC specific names. > > > > Signed-off-by: Philipp Zabel &

Re: [PATCH v2 4/9] media: hantro: make irq names configurable

2019-05-29 Thread Philipp Zabel
Hi Boris, On Wed, 2019-05-29 at 13:34 +0200, Boris Brezillon wrote: > On Wed, 29 May 2019 11:54:19 +0200 > Philipp Zabel wrote: > > > The i.MX8MQ bindings will use different IRQ names ("g1" instead of > > "vdpu", and "g2"), so make them confi

[PATCH v2 1/9] rockchip/vpu: rename from rockchip to hantro

2019-05-29 Thread Philipp Zabel
Rename the driver and all relevant identifiers from Rockchip to Hantro, as other Hantro IP based VPU implementations can be supported by the same driver. The RK3288 decoder is Hantro G1 based, the encoder is Hantro H1. This patch just renames, no functional changes. Signed-off-by: Philipp Zabel

[PATCH v2 6/9] media: hantro: add support for separate control block

2019-05-29 Thread Philipp Zabel
On i.MX8MQ/MM a separate control block contains registers for per-core resets, clock gating, and fuse register control. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/hantro/hantro.h b/drivers

[PATCH v2 3/9] media: hantro: add PM runtime resume callback

2019-05-29 Thread Philipp Zabel
It seems that on i.MX8MQ the power domain controller does not propagate resets to the VPU cores on resume. Add a callback to allow implementing manual reset of the VPU cores after ungating the power domain. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro.h | 2

[PATCH v2 7/9] media: dt-bindings: Document i.MX8MQ and i.MX8MM VPU bindings

2019-05-29 Thread Philipp Zabel
Add devicetree binding documentation for the Hantro G1/G2 VPU on i.MX8MQ and for the Hantro G1/G2/H1 VPU on i.MX8MM. Signed-off-by: Philipp Zabel --- .../devicetree/bindings/media/imx8m-vpu.txt | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation

[PATCH v2 2/9] media: hantro: print video device name in addition to device node

2019-05-29 Thread Philipp Zabel
It can be helpful to know which video device was registered at which device node. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media

[PATCH v2 5/9] media: hantro: add support for named register ranges

2019-05-29 Thread Philipp Zabel
Add support for multiple register ranges with SoC specific names. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro.h | 7 ++- drivers/staging/media/hantro/hantro_drv.c | 25 +-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a

[PATCH v2 0/9] Rename Rockchip VPU driver to Hantro, add initial i.MX8M support

2019-05-29 Thread Philipp Zabel
oding on i.MX8MM may or may not work, I don't have the hardware to test. Changes since v1: - Rebased onto "[PATCH v6] Add MPEG-2 decoding to Rockchip VPU" series, dropped deprecated patch [1]. [1] https://patchwork.linuxtv.org/patch/56278/ regards Philipp Philipp Zabel (9):

[PATCH v2 4/9] media: hantro: make irq names configurable

2019-05-29 Thread Philipp Zabel
The i.MX8MQ bindings will use different IRQ names ("g1" instead of "vdpu", and "g2"), so make them configurable. This also allows to register more than two IRQs, which will be required for i.MX8MM support later (it will add "h1" instead of "vepu")

[PATCH v2 9/9] media: hantro: add initial i.MX8MM support (untested)

2019-05-29 Thread Philipp Zabel
This should enable MPEG-2 decoding on the Hantro G1 and JPEG encoding on the Hantro H1 on i.MX8MM. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro_drv.c | 1 + drivers/staging/media/hantro/hantro_hw.h| 1 + drivers/staging/media/hantro/imx8m_vpu_hw.c | 134

[PATCH v2 8/9] media: hantro: add initial i.MX8MQ support

2019-05-29 Thread Philipp Zabel
For now this just enables MPEG-2 decoding on the Hantro G1 on i.MX8MQ. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/Kconfig| 8 +- drivers/staging/media/hantro/Makefile | 1 + drivers/staging/media/hantro/hantro_drv.c | 1 + drivers/staging/media/hantro

[PATCH v3] media: coda: add decoder MPEG-4 profile and level controls

2019-05-27 Thread Philipp Zabel
The MPEG-4 decoder firmware reports profile and level indication values that can be used to update V4L2 MPEG-4 profile and level controls. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil --- Changes since v2 [1]: - Include "coda.h" instead of , to fix build after 94

[PATCH v2] media: coda: add decoder MPEG-2 profile and level controls

2019-05-27 Thread Philipp Zabel
The MPEG-2 decoder firmware reports profile and level indication that can be used to set V4L2 MPEG-2 profile and level controls Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil --- Changes since v1: - Include "coda.h" instead of , to fix build after 94b7ddb91c16 (&q

[PATCH 00/10] Rename Rockchip VPU driver to Hantro, add initial i.MX8M support

2019-05-24 Thread Philipp Zabel
-v5.2i tag, commit 70e9b4cf6655 ("rockchip/vpu: Add support for MPEG-2 decoding on RK3288") and supports MPEG-2 decoding on i.MX8MQ. MPEG-2 decoding and JPEG encoding on i.MX8MM may or may not work, I don't have the hardware to test. regards Philipp Philipp Zabel (10): rockchip/vpu

[PATCH 04/10] media: hantro: add PM runtime resume callback

2019-05-24 Thread Philipp Zabel
It seems that on i.MX8MQ the power domain controller does not propagate resets to the VPU cores on resume. Add a callback to allow implementing manual reset of the VPU cores after ungating the power domain. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro.h | 2

[PATCH 07/10] media: hantro: add support for separate control block

2019-05-24 Thread Philipp Zabel
On i.MX8MQ/MM a separate control block contains registers for per-core resets, clock gating, and fuse register control. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/hantro/hantro.h b/drivers

[PATCH 03/10] media: hantro: print video device name in addition to device node

2019-05-24 Thread Philipp Zabel
Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index c1ed3a2eda3f..1d4d5ec8ab19 100644 --- a/drivers/staging

[PATCH 06/10] media: hantro: add support for named register ranges

2019-05-24 Thread Philipp Zabel
Add support for multiple register ranges with SoC specific names. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro.h | 7 ++- drivers/staging/media/hantro/hantro_drv.c | 25 +-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a

[PATCH 10/10] media: hantro: add initial i.MX8MM support (untested)

2019-05-24 Thread Philipp Zabel
This should enable MPEG-2 decoding on the Hantro G1 and JPEG encoding on the Hantro H1 on i.MX8MM. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/hantro_drv.c | 1 + drivers/staging/media/hantro/hantro_hw.h| 1 + drivers/staging/media/hantro/imx8m_vpu_hw.c | 134

[PATCH 05/10] media: hantro: make irq names configurable

2019-05-24 Thread Philipp Zabel
The i.MX8MQ bindings will use different IRQ names ("g1" instead of "vdpu", and "g2"), so make them configurable. This also allows to register more than two IRQs, which will be required for i.MX8MM support later (it will add "h1" instead of "vepu&q

[PATCH 02/10] rockchip/vpu: rename from rockchip to hantro

2019-05-24 Thread Philipp Zabel
Rename the driver and all relevant identifiers from Rockchip to Hantro, as other Hantro IP based VPU implementations can be supported by the same driver. The RK3288 decoder is Hantro G1 based, the encoder is Hantro H1. This patch just renames, no functional changes. Signed-off-by: Philipp Zabel

[PATCH 09/10] media: hantro: add initial i.MX8MQ support

2019-05-24 Thread Philipp Zabel
For now this just enables MPEG-2 decoding on the Hantro G1 on i.MX8MQ. Signed-off-by: Philipp Zabel --- drivers/staging/media/hantro/Kconfig| 8 +- drivers/staging/media/hantro/Makefile | 1 + drivers/staging/media/hantro/hantro_drv.c | 1 + drivers/staging/media/hantro

[PATCH 08/10] media: dt-bindings: Document i.MX8MQ and i.MX8MM VPU bindings

2019-05-24 Thread Philipp Zabel
Add devicetree binding documentation for the Hantro G1/G2 VPU on i.MX8MQ and for the Hantro G1/G2/H1 VPU on i.MX8MM. Signed-off-by: Philipp Zabel --- .../devicetree/bindings/media/imx8m-vpu.txt | 56 +++ 1 file changed, 56 insertions(+) create mode 100644 Documentation

[PATCH 01/10] rockchip/vpu: remove unused declarations

2019-05-24 Thread Philipp Zabel
Remove unused function and struct declarations from the rockchip_vpu_common.h header file. Signed-off-by: Philipp Zabel --- .../media/rockchip/vpu/rockchip_vpu_common.h | 25 --- 1 file changed, 25 deletions(-) diff --git a/drivers/staging/media/rockchip/vpu

[PATCH v2] media: coda: add decoder MPEG-4 profile and level controls

2019-05-22 Thread Philipp Zabel
The MPEG-4 decoder firmware reports profile and level indication values that can be used to update V4L2 MPEG-4 profile and level controls. Signed-off-by: Philipp Zabel --- Changes since v1 [1]: - Fix coda_decode_ctrls trying to set mpeg2_level_ctrl read-only, that should be mpeg4_level_ctrl

Re: [PATCH v5 4/5] [media] allegro: add Allegro DVT video IP core driver

2019-05-10 Thread Philipp Zabel
On Fri, 2019-05-10 at 10:28 +0200, Hans Verkuil wrote: [...] > > +static int allegro_g_selection(struct file *file, void *priv, > > + struct v4l2_selection *s) > > +{ > > + struct v4l2_fh *fh = file->private_data; > > + struct allegro_channel *channel = fh_to_channel(fh

Re: [PATCH v2 1/4] media: coda: Print a nicer device registered message

2019-05-03 Thread Philipp Zabel
t; With this change, the driver now prints > > coda 204.vpu: encoder registered as /dev/video4 > coda 204.vpu: decoder registered as /dev/video5 > > Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel regards Philipp

Re: [PATCH 4/5] media: coda: Remove pic_run_work worker

2019-04-29 Thread Philipp Zabel
On Fri, 2019-04-26 at 15:19 -0300, Ezequiel Garcia wrote: > On Fri, 2019-04-26 at 10:11 +0200, Philipp Zabel wrote: > > On Thu, 2019-04-25 at 15:35 -0300, Ezequiel Garcia wrote: > > > There isn't any reason to run the mem2mem job on a separate worker, > > > because

Re: [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt

2019-04-29 Thread Philipp Zabel
On Fri, 2019-04-26 at 14:56 -0300, Ezequiel Garcia wrote: > Hi Philipp, > > Thanks for the quick review of the series. > > On Fri, 2019-04-26 at 11:16 +0200, Philipp Zabel wrote: > > On Thu, 2019-04-25 at 15:35 -0300, Ezequiel Garcia wrote: > > > The current i

Re: [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt

2019-04-26 Thread Philipp Zabel
On Thu, 2019-04-25 at 15:35 -0300, Ezequiel Garcia wrote: > The current interrupt handler is doing very little, and not doing > any non-atomic operations. Pretty much all it does is accessing > a couple registers, taking a couple spinlocks and then signalling > a completion. > > There is no reason

Re: [PATCH 5/5] media: coda: Clear the interrupt reason

2019-04-26 Thread Philipp Zabel
nge, > so it seems a wise thing to do to avoid hitting some > rare race-condition in the hardware. > > Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel regards Philipp

Re: [PATCH 4/5] media: coda: Remove pic_run_work worker

2019-04-26 Thread Philipp Zabel
On Thu, 2019-04-25 at 15:35 -0300, Ezequiel Garcia wrote: > There isn't any reason to run the mem2mem job on a separate worker, > because the mem2mem framework guarantees that device_run will never > run in interrupt context. The purpose of the workqueue is to serialize BIT processor commands, cur

Re: [PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt

2019-04-26 Thread Philipp Zabel
pdev->dev, irq, coda_irq_handler, 0, > +dev_name(&pdev->dev), dev); > if (ret < 0) { > dev_err(&pdev->dev, "failed to request irq: %d\n", ret); > return ret; Reviewed-by: Philipp Zabel regards Philipp

Re: [PATCH 2/5] media: coda: Remove unbalanced and unneeded mutex unlock

2019-04-26 Thread Philipp Zabel
released, since we reset the hardware on timeouts in pic_run_work. Either way, the mutex is unlocked in pic_run_work after a timeout if the completion is not triggered, so this one has to go. Reviewed-by: Philipp Zabel regards Philipp

[PATCH v2] media: v4l2-ctrl: add MPEG-2 profile and level controls

2019-04-24 Thread Philipp Zabel
Add MPEG-2 CID definitions for profiles and levels defined in ITU-T Rec. H.262. Signed-off-by: Philipp Zabel --- Changes since v1: - Moved CIDs up to V4L2_CID_MPEG_BASE+270 --- .../media/uapi/v4l/ext-ctrls-codec.rst| 56 +++ drivers/media/v4l2-core/v4l2-ctrls.c

[PATCH v8] media: imx: add mem2mem device

2019-04-18 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, add missing media-device header, unregister and remove the mem2mem device in error paths

[PATCH 07/13] media: coda: update profile and level controls after sequence initialization

2019-04-12 Thread Philipp Zabel
: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c| 11 drivers/media/platform/coda/coda-common.c | 66 +-- drivers/media/platform/coda/coda.h| 3 ++ drivers/media/platform/coda/coda_regs.h | 2 +- 4 files changed, 54 insertions(+), 28 deletions

[PATCH 03/13] media: coda: add coda_frame_type_char helper

2019-04-12 Thread Philipp Zabel
Add a function to translate from V4L2 buffer flags to 'I'/'P'/'B' characters for debug output. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/med

[PATCH 09/13] media: v4l2-ctrl: add MPEG-2 profile and level controls

2019-04-12 Thread Philipp Zabel
Add MPEG-2 CID definitions for profiles and levels defined in ITU-T Rec. H.262. Signed-off-by: Philipp Zabel --- .../media/uapi/v4l/ext-ctrls-codec.rst| 56 +++ drivers/media/v4l2-core/v4l2-ctrls.c | 23 include/uapi/linux/v4l2-controls.h

[PATCH 12/13] media: coda: use v4l2_m2m_buf_copy_metadata

2019-04-12 Thread Philipp Zabel
Use v4l2_m2m2_buf_copy_metadata to let BIT encoder contexts copy buffer field, timestamp, timestamp flags, and optionally timecode. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/media

[PATCH 13/13] media: coda: fix unset field and fail on invalid field in buf_prepare

2019-04-12 Thread Philipp Zabel
v4l2-compliance likes to queue a buffer with field set to V4L2_FIELD_ANY and expects it to be returned corrected to a valid field. Follow vicodec in handling this in the buf_prepare callback. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 10 ++ 1 file

[PATCH 06/13] media: coda: add menu strings to s_ctrl debug output

2019-04-12 Thread Philipp Zabel
When a menu control is updated via s_ctrl, print the corresponding menu entry string in addition to the numerical value it is set to. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 10/13] media: coda: add decoder MPEG-2 profile and level controls

2019-04-12 Thread Philipp Zabel
The MPEG-2 decoder firmware reports profile and level indication that can be used to set V4L2 MPEG-2 profile and level controls Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/Makefile | 2 +- drivers/media/platform/coda/coda-common.c | 25 + drivers/media

[PATCH 01/13] media: coda: move register debugging to coda_debug level 3

2019-04-12 Thread Philipp Zabel
This allows to use coda_debug level 2 for verbose but not quite as verbose debug logging. Register access level logging is of limited use anyway, as this includes busy polling of status bits. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 4 ++-- 1 file changed, 2

[PATCH 02/13] media: coda: move job ready message to coda_debug level 2

2019-04-12 Thread Philipp Zabel
Use the newly freed verbose debug level 2 for job ready debug messages. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda

[PATCH 08/13] media: coda: add decoder MPEG-4 profile and level controls

2019-04-12 Thread Philipp Zabel
The MPEG-4 decoder firmware reports profile and level indication values that can be used to update V4L2 MPEG-4 profile and level controls. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/Makefile | 2 +- drivers/media/platform/coda/coda-common.c | 23 +++ drivers

[PATCH 11/13] media: coda: add lockdep asserts

2019-04-12 Thread Philipp Zabel
coda_command_sync, coda_hw_reset, and __coda_start_decoding all expect to be called under the coda_mutex device lock. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/platform/coda/coda-bit.c b

[PATCH 05/13] media: coda: demote s_ctrl debug messages to level 2

2019-04-12 Thread Philipp Zabel
Otherwise the default initialization would always swamp the debug log. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda

[PATCH 04/13] media: coda: improve decoder job finished debug message

2019-04-12 Thread Philipp Zabel
output queue sequence number, which is only useful in case each queued coded buffer corresponds to exactly one frame. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 34 ++ 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/drivers

Re: [PATCH 07/10] media: coda: limit frame interval enumeration to supported frame sizes

2019-04-11 Thread Philipp Zabel
On Thu, 2019-04-11 at 12:18 +0200, Hans Verkuil wrote: > On 4/11/19 10:22 AM, Philipp Zabel wrote: > > On Wed, 2019-04-10 at 18:24 +0200, Hans Verkuil wrote: > > > On 4/10/19 6:11 PM, Nicolas Dufresne wrote: > > > > Le mercredi 10 avril 2019 à 16:22 +0200, Philipp Za

Re: [PATCH 07/10] media: coda: limit frame interval enumeration to supported frame sizes

2019-04-11 Thread Philipp Zabel
On Wed, 2019-04-10 at 18:24 +0200, Hans Verkuil wrote: > On 4/10/19 6:11 PM, Nicolas Dufresne wrote: > > Le mercredi 10 avril 2019 à 16:22 +0200, Philipp Zabel a écrit : > > > On Wed, 2019-04-10 at 15:43 +0200, Hans Verkuil wrote: > > > [...] > > > &g

Re: [PATCH 08/10] media: coda: allow encoder to set colorimetry on the output queue

2019-04-10 Thread Philipp Zabel
On Wed, 2019-04-10 at 15:48 +0200, Hans Verkuil wrote: [...] > Isn't the colorimetry information encoded in the stream's metadata? That depends on the codec. Colorimetry information can be stored in optional headers (for example Sequence Display Extension for MPEG-2, Video Usability Information fo

Re: [PATCH 07/10] media: coda: limit frame interval enumeration to supported frame sizes

2019-04-10 Thread Philipp Zabel
On Wed, 2019-04-10 at 15:43 +0200, Hans Verkuil wrote: [...] > > @@ -1126,12 +1127,32 @@ static int coda_enum_frameintervals(struct file > > *file, void *fh, [...] > > Why support VIDIOC_ENUM_FRAMEINTERVALS at all? It makes no sense for a codec. > I'd remove it altogether. It returns the range s

Re: [PATCH 10/10] media: coda: require all decoder command flags to be cleared

2019-04-09 Thread Philipp Zabel
On Mon, 2019-04-08 at 14:32 +0200, Philipp Zabel wrote: > The memory-to-memory stateful video decoder interface documentation > requires the decoder stop command initiating the drain sequence to have > flags set to zero. > Stop to black makes no sense as stopped memory-to-memory dec

[PATCH v4l-utils v2 1/4] v4l2-compliance: use warn() in warn_once()

2019-04-09 Thread Philipp Zabel
Use the warn() macro in warn_once() instead of duplicating its contents. Signed-off-by: Philipp Zabel --- utils/v4l2-compliance/v4l2-compliance.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2

[PATCH v4l-utils v2 0/4] compliance colors

2019-04-09 Thread Philipp Zabel
Hi, take two, with an environment variable MEDIA_APPS_COLOR=always|never|auto, and an override option --color always|never|auto for both cec-compliance and v4l2-compliance. regards Philipp Philipp Zabel (4): v4l2-compliance: use warn() in warn_once() v4l2-compliance: add colors cec

[PATCH v4l-utils v2 4/4] cec-compliance: add colors

2019-04-09 Thread Philipp Zabel
Use color codes to mark OK, warn, and FAIL messages with green, bold, and bright red accents, respectively. Signed-off-by: Philipp Zabel --- utils/cec-compliance/cec-compliance.1.in | 5 +++ utils/cec-compliance/cec-compliance.cpp | 42 +--- utils/cec-compliance/cec

[PATCH v4l-utils v2 2/4] v4l2-compliance: add colors

2019-04-09 Thread Philipp Zabel
Use color codes to mark OK, warn, and FAIL messages with green, bold, and bright red accents, respectively. Signed-off-by: Philipp Zabel --- utils/v4l2-compliance/v4l2-compliance.1.in | 5 +++ utils/v4l2-compliance/v4l2-compliance.cpp | 37 -- utils/v4l2-compliance/v4l2

[PATCH v4l-utils v2 3/4] cec-compliance: use warn() in warn_once()

2019-04-09 Thread Philipp Zabel
Use the warn() macro in warn_once() instead of duplicating its contents. Signed-off-by: Philipp Zabel --- utils/cec-compliance/cec-compliance.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/utils/cec-compliance/cec-compliance.h b/utils/cec-compliance/cec

Re: [PATCH v4l-utils 0/2] v4l2-compliance colors

2019-04-08 Thread Philipp Zabel
On Mon, 2019-04-08 at 12:44 +0200, Hans Verkuil wrote (paraphrased): > On 4/8/19 12:28 PM, Mauro Carvalho Chehab wrote (paraphrased): [...] > > > [I hate colors] > > [I love colors] > I could live with [compromise] Sorry for opening that can of worms :-) How about doing something similar to 'ls':

[PATCH 02/10] media: coda: remove mask from decoder h.264 level control

2019-04-08 Thread Philipp Zabel
Since levels are specified in terms of maximum values, there is no reason to filter out lower levels than the supported maximum. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a

[PATCH 01/10] media: coda: set codec earlier

2019-04-08 Thread Philipp Zabel
The chosen codec depends on the coded format, which is known as soon as the S_FMT call on the coded queue. This allows to use the codec in callbacks that may be called before start_streaming, such as buf_queue. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 28

[PATCH 10/10] media: coda: require all decoder command flags to be cleared

2019-04-08 Thread Philipp Zabel
stopping the output video queue with VIDIOC_STREAMOFF. The mute audio start command flag serves no purpose as the coda driver does not handle any audio formats, and does not support playback at non-standard speeds. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 4

[PATCH 04/10] media: coda: add min number of buffers controls

2019-04-08 Thread Philipp Zabel
Add min number of buffers for capture (decoder) and output (encoder) controls, which are required by the stateful video decoder / encoder interface specification. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH 03/10] media: coda: clear error return value before picture run

2019-04-08 Thread Philipp Zabel
The error return value is not written by some firmware codecs, such as MPEG-2 decode on CodaHx4. Clear the error return value before starting the picture run to avoid misinterpreting unrelated values returned by sequence initialization as error return value. Signed-off-by: Philipp Zabel

[PATCH 09/10] media: coda: throw error on create_bufs with too small size

2019-04-08 Thread Philipp Zabel
If VIDIOC_CREATE_BUFS is called with a sizeimage smaller than the queue sizeimage, fail with -EINVAL instead of correcting the size and continuing without error. This is required by v4l2-compliance. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 3 +++ 1 file

[PATCH 08/10] media: coda: allow encoder to set colorimetry on the output queue

2019-04-08 Thread Philipp Zabel
v4l2-compliance sets colorimetry on the output queue and then verifies that querying colorimetry on the capture queue returns the same configuration. For this to work, the encoder must allow setting context colorimetry parameters on the output queue. Signed-off-by: Philipp Zabel --- drivers

[PATCH 07/10] media: coda: limit frame interval enumeration to supported frame sizes

2019-04-08 Thread Philipp Zabel
Let VIDIOC_ENUM_FRAMEINTERVALS return -EINVAL if userspace queries frame intervals for unsupported frame sizes. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 33 ++- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/drivers/media

[PATCH 06/10] media: coda: implement encoder frame size enumeration

2019-04-08 Thread Philipp Zabel
The stateful encoder API requires VIDIOC_ENUM_FRAMESIZES to be implemented. Allow enumeration of supported frame sizes for encoding. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/drivers

[PATCH 05/10] media: coda: disable encoder command on decoder and vice versa

2019-04-08 Thread Philipp Zabel
Return -ENOTTY when userspace tries to call VIDIOC_(TRY_)ENCODER_CMD on a decoder instance or VIDIOC_(TRY_)DECODER_CMD on an encoder instance. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions

[PATCH v4l-utils 0/2] v4l2-compliance colors

2019-04-08 Thread Philipp Zabel
right red if the output is a terminal. I would have preferred to mark warnings yellow, but that doesn't work well on black-on-white terminals. regards Philipp Philipp Zabel (2): v4l2-compliance: use warn() in warn_once() v4l2-compliance: add colors utils/v4l2-compliance/v4l2-complianc

[PATCH v4l-utils 2/2] v4l2-compliance: add colors

2019-04-08 Thread Philipp Zabel
If the output is a terminal, use color codes to mark OK, warn, and FAIL messages with green, bold, and bright red accents, respectively. Signed-off-by: Philipp Zabel --- utils/v4l2-compliance/v4l2-compliance.cpp | 11 --- utils/v4l2-compliance/v4l2-compliance.h | 15 --- 2

[PATCH v4l-utils 1/2] v4l2-compliance: use warn() in warn_once()

2019-04-08 Thread Philipp Zabel
Use the warn() macro in warn_once() instead of duplicating its contents. Signed-off-by: Philipp Zabel --- utils/v4l2-compliance/v4l2-compliance.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2

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

2019-03-08 Thread Philipp Zabel
ke in > account IPU") > > Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel regards Philipp

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

2019-03-08 Thread Philipp Zabel
On Thu, 2019-03-07 at 15:33 -0800, Steve Longerbeam wrote: > Add support for the following conversions: > > - YUV full-range to YUV limited-range > - YUV limited-range to YUV full-range > - YUV limited-range to RGB full-range > - RGB full-range to YUV limited-range > > The last two conversions re

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

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

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