[PATCH 1/4] dt-bindings: reset: IMX8MQ VPU reset

2021-02-11 Thread Benjamin Gaignard
Document bindings for IMX8MQ VPU reset hardware block Signed-off-by: Benjamin Gaignard --- .../bindings/reset/fsl,imx8mq-vpu-reset.yaml | 54 +++ include/dt-bindings/reset/imx8mq-vpu-reset.h | 16 ++ 2 files changed, 70 insertions(+) create mode 100644 Documentation

[PATCH 0/4] Reset driver for IMX8MQ VPU hardware block

2021-02-11 Thread Benjamin Gaignard
as an independ reset driver and to change the VPU driver to use it. Benjamin Gaignard (4): dt-bindings: reset: IMX8MQ VPU reset reset: Add reset driver for IMX8MQ VPU block media: hantro: Use reset driver arm64: dts: imx8mq: Use reset driver for VPU hardware block .../bindings/reset/fsl,i

[PATCH 3/4] media: hantro: Use reset driver

2021-02-11 Thread Benjamin Gaignard
Rather use a reset like feature inside the driver use the reset controller API to get the same result. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/Kconfig| 1 + drivers/staging/media/hantro/imx8m_vpu_hw.c | 61 - 2 files changed, 12 insertions

[PATCH 4/4] arm64: dts: imx8mq: Use reset driver for VPU hardware block

2021-02-11 Thread Benjamin Gaignard
Add a vpu reset hardware block node. Signed-off-by: Benjamin Gaignard --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 31 ++- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi

[PATCH 2/4] reset: Add reset driver for IMX8MQ VPU block

2021-02-11 Thread Benjamin Gaignard
IMX8MQ SoC got a dedicated hardware block to reset the video processor units (G1 and G2). Signed-off-by: Benjamin Gaignard --- drivers/reset/Kconfig| 8 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-imx8mq-vpu.c | 169 +++ 3 files

[PATCH v1 03/18] arm64: dts: imx8mq-evk: add reserve memory node for CMA region

2021-02-17 Thread Benjamin Gaignard
Define allocation range for the default CMA region. Signed-off-by: Benjamin Gaignard Signed-off-by: Ezequiel Garcia Signed-off-by: Adrian Ratiu --- arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/freescale

[PATCH v1 13/18] media: hantro: Introduce G2/HEVC decoder

2021-02-17 Thread Benjamin Gaignard
re so can't go into uapi structures. Compute the needed value is complex and require information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard Signed-off-by: Ezequiel Garcia Signed-off-by: Adrian Ratiu --- drive

[PATCH v1 16/18] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-02-17 Thread Benjamin Gaignard
Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. Retrieve the hardware version at init to distinguish G1 from G2. Signed-off-by: Benjamin Gaignard Signed-off-by: Ezequiel Garcia Signed-off-by: Adrian Ratiu --- drivers/staging/media/hantro

Re: [PATCH v1 11/18] media: hantro: Add helper function for auxiliary buffers allocation

2021-02-18 Thread Benjamin Gaignard
Le 17/02/2021 à 21:42, Ezequiel Garcia a écrit : Hi Benjamin, On Wed, 2021-02-17 at 09:02 +0100, Benjamin Gaignard wrote: Add helper functions to allocate and free auxiliary buffers. These buffers aren't for frames but are needed by the hardware to store scaling matrix, tiles size, b

[PATCH v2 1/5] dt-bindings: reset: IMX8MQ VPU reset

2021-02-26 Thread Benjamin Gaignard
Document bindings for IMX8MQ VPU reset hardware block Signed-off-by: Benjamin Gaignard --- .../bindings/reset/fsl,imx8mq-vpu-reset.yaml | 54 +++ include/dt-bindings/reset/imx8mq-vpu-reset.h | 16 ++ 2 files changed, 70 insertions(+) create mode 100644 Documentation

[PATCH v2 2/5] dt-bindings: media: IMX8MQ VPU: document reset usage

2021-02-26 Thread Benjamin Gaignard
breaks the compatibility between DTB and kernel but the driver is still in staging directory and limited to IMX8MQ SoC. Signed-off-by: Benjamin Gaignard --- .../devicetree/bindings/media/nxp,imx8mq-vpu.yaml | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/

[PATCH v2 3/5] reset: Add reset driver for IMX8MQ VPU block

2021-02-26 Thread Benjamin Gaignard
IMX8MQ SoC got a dedicated hardware block to reset the video processor units (G1 and G2). Signed-off-by: Benjamin Gaignard --- drivers/reset/Kconfig| 8 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-imx8mq-vpu.c | 169 +++ 3 files

[PATCH v2 4/5] media: hantro: Use reset driver

2021-02-26 Thread Benjamin Gaignard
Rather use a reset like feature inside the driver use the reset controller API to get the same result. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/Kconfig| 1 + drivers/staging/media/hantro/imx8m_vpu_hw.c | 61 - 2 files changed, 12 insertions

[PATCH v2 0/5] Reset driver for IMX8MQ VPU hardware block

2021-02-26 Thread Benjamin Gaignard
as an independ reset driver and to change the VPU driver to use it. Please note that this series break the compatibility between the DTB and kernel. This break is limited to IMX8MQ SoC and is done when the driver is still in staging directory. version 2: - Document the change in VPU bindings Ben

[PATCH v2 5/5] arm64: dts: imx8mq: Use reset driver for VPU hardware block

2021-02-26 Thread Benjamin Gaignard
Add a vpu reset hardware block node. Signed-off-by: Benjamin Gaignard --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 31 ++- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi

[PATCH v3 2/5] dt-bindings: media: IMX8MQ VPU: document reset usage

2021-03-01 Thread Benjamin Gaignard
breaks the compatibility between DTB and kernel but the driver is still in staging directory and limited to IMX8MQ SoC. Signed-off-by: Benjamin Gaignard --- version 3: - Fix error in VPU example node .../devicetree/bindings/media/nxp,imx8mq-vpu.yaml | 14 +- 1 file changed, 9 insert

[PATCH v3 3/5] reset: Add reset driver for IMX8MQ VPU block

2021-03-01 Thread Benjamin Gaignard
IMX8MQ SoC got a dedicated hardware block to reset the video processor units (G1 and G2). Signed-off-by: Benjamin Gaignard --- drivers/reset/Kconfig| 8 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-imx8mq-vpu.c | 169 +++ 3 files

[PATCH v3 0/5] Reset driver for IMX8MQ VPU hardware block

2021-03-01 Thread Benjamin Gaignard
ion 2: - Document the change in VPU bindings Benjamin Gaignard (5): dt-bindings: reset: IMX8MQ VPU reset dt-bindings: media: IMX8MQ VPU: document reset usage reset: Add reset driver for IMX8MQ VPU block media: hantro: Use reset driver arm64: dts: imx8mq: Use reset driver for VPU hardware

[PATCH v3 1/5] dt-bindings: reset: IMX8MQ VPU reset

2021-03-01 Thread Benjamin Gaignard
Document bindings for IMX8MQ VPU reset hardware block Signed-off-by: Benjamin Gaignard --- .../bindings/reset/fsl,imx8mq-vpu-reset.yaml | 54 +++ include/dt-bindings/reset/imx8mq-vpu-reset.h | 16 ++ 2 files changed, 70 insertions(+) create mode 100644 Documentation

[PATCH v3 4/5] media: hantro: Use reset driver

2021-03-01 Thread Benjamin Gaignard
Rather use a reset like feature inside the driver use the reset controller API to get the same result. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/Kconfig| 1 + drivers/staging/media/hantro/imx8m_vpu_hw.c | 61 - 2 files changed, 12 insertions

[PATCH v3 5/5] arm64: dts: imx8mq: Use reset driver for VPU hardware block

2021-03-01 Thread Benjamin Gaignard
Add a vpu reset hardware block node. Signed-off-by: Benjamin Gaignard --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 31 ++- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi

Re: [PATCH v3 4/5] media: hantro: Use reset driver

2021-03-03 Thread Benjamin Gaignard
Le 03/03/2021 à 15:39, Philipp Zabel a écrit : On Mon, 2021-03-01 at 16:17 +0100, Benjamin Gaignard wrote: Rather use a reset like feature inside the driver use the reset controller API to get the same result. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/Kconfig

Re: [PATCH v3 0/5] Reset driver for IMX8MQ VPU hardware block

2021-03-03 Thread Benjamin Gaignard
Le 03/03/2021 à 15:17, Philipp Zabel a écrit : Hi Benjamin, On Mon, 2021-03-01 at 16:17 +0100, Benjamin Gaignard wrote: The two VPUs inside IMX8MQ share the same control block which can be see as a reset hardware block. This isn't a reset controller though. The control block also con

Re: [PATCH v3 0/5] Reset driver for IMX8MQ VPU hardware block

2021-03-05 Thread Benjamin Gaignard
Le 03/03/2021 à 17:25, Philipp Zabel a écrit : On Wed, 2021-03-03 at 16:20 +0100, Benjamin Gaignard wrote: Le 03/03/2021 à 15:17, Philipp Zabel a écrit : Hi Benjamin, On Mon, 2021-03-01 at 16:17 +0100, Benjamin Gaignard wrote: The two VPUs inside IMX8MQ share the same control block which

[PATCH v5 00/13] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-03-17 Thread Benjamin Gaignard
C_EXPBUF: OK test Requests: OK Total for hantro-vpu device /dev/video1: 46, Succeeded: 46, Failed: 0, Warnings: 0 Grand Total for hantro-vpu device /dev/media1: 54, Succeeded: 54, Failed: 0, Warnings: 0 Benjamin Benjamin Gaignard (13): dt-bindings: mfd: Add 'nxp,imx8mq-vpu-ctrl

[PATCH v5 01/13] dt-bindings: mfd: Add 'nxp, imx8mq-vpu-ctrl' to syscon list

2021-03-17 Thread Benjamin Gaignard
Add 'nxp,imx8mq-vpu-ctrl' in the list of possible syscon. It will used to access to the VPU control registers. Signed-off-by: Benjamin Gaignard --- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bi

[PATCH v5 02/13] dt-bindings: media: nxp, imx8mq-vpu: Update the bindings for G2 support

2021-03-17 Thread Benjamin Gaignard
compatible with older DT the driver is still capable to use 'ctrl' reg-name even if it is deprecated now. Signed-off-by: Benjamin Gaignard --- version 5: - This version doesn't break the backward compatibilty between kernel and DT. .../bindings/media/nxp,imx8mq-vpu.y

[PATCH v5 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-03-17 Thread Benjamin Gaignard
e a list of register names so remove it. Signed-off-by: Benjamin Gaignard --- version 5: - use syscon instead of VPU reset driver. - if DT doesn't provide syscon keep backward compatibilty by using 'ctrl' reg-name. drivers/staging/media/hantro/hantro.h | 5 +- drivers/stagi

[PATCH v5 04/13] media: hevc: Add fields and flags for hevc PPS

2021-03-17 Thread Benjamin Gaignard
Add fields and flags as they are defined in 7.4.3.3.1 "General picture parameter set RBSP semantics of the H.265 ITU specification. Signed-off-by: Benjamin Gaignard --- .../userspace-api/media/v4l/ext-ctrls-codec.rst| 14 ++ include/media/hevc-ct

[PATCH v5 05/13] media: hevc: Add decode params control

2021-03-17 Thread Benjamin Gaignard
Add decode params control and it associated structure to regroup all the information that are needed to decode a reference frame as it is describe in ITU-T Rec. H.265 section "8.3.2 Decoding process for reference picture set". Adapt Cedrus driver to these changes. Signed-off-by

[PATCH v5 06/13] media: hantro: change hantro_codec_ops run prototype to return errors

2021-03-17 Thread Benjamin Gaignard
Change hantro_codec_ops run prototype from 'void' to 'int'. This allow to cancel the job if an error occur while configuring the hardware. Signed-off-by: Benjamin Gaignard --- version 5: - forward hantro_h264_dec_prepare_run() return value in case of error drivers/

[PATCH v5 07/13] media: hantro: Define HEVC codec profiles and supported features

2021-03-17 Thread Benjamin Gaignard
Define which HEVC profiles (up to level 5.1) and features (no scaling, no 10 bits) are supported by the driver. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro.h | 3 ++ drivers/staging/media/hantro/hantro_drv.c | 58 +++ 2 files changed, 61

[PATCH v5 08/13] media: hantro: Only use postproc when post processed formats are defined

2021-03-17 Thread Benjamin Gaignard
If the variant doesn't offert postprocessed formats make sure it will be ok. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro.h | 8 ++-- drivers/staging/media/hantro/hantro_postproc.c | 14 ++ drivers/staging/media/hantro/hantro_v4l2.c

[PATCH v5 09/13] media: uapi: Add a control for HANTRO driver

2021-03-17 Thread Benjamin Gaignard
The HEVC HANTRO driver needs to know the number of bits to skip at the beginning of the slice header. That is a hardware specific requirement so create a dedicated control that this purpose. Signed-off-by: Benjamin Gaignard --- version 5: - Be even more verbose in control documentation. - Do

[PATCH v5 10/13] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-03-17 Thread Benjamin Gaignard
Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handle by v4l2 of the driver. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro_v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro

[PATCH v5 11/13] media: hantro: Introduce G2/HEVC decoder

2021-03-17 Thread Benjamin Gaignard
re so can't go into uapi structures. Compute the needed value is complex and require information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard Co-developed-by: Adrian Ratiu Signed-off-by: Adrian Ratiu Co-de

[PATCH v5 12/13] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-03-17 Thread Benjamin Gaignard
Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. G2 doesn't have postprocessor, use the same clocks and got it own interruption. Signed-off-by: Benjamin Gaignard --- version 5: - remove useless postproc fields for G2 version 2: - r

[PATCH v5 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-03-17 Thread Benjamin Gaignard
Split VPU node in two: one for G1 and one for G2 since they are different hardware blocks. Add syscon for hardware control block. Remove reg-names property that is useless. Each VPU node only need one interrupt. Signed-off-by: Benjamin Gaignard --- version 5: - use syscon instead of VPU reset

[PATCH v6 01/13] dt-bindings: mfd: Add 'nxp, imx8mq-vpu-ctrl' to syscon list

2021-03-18 Thread Benjamin Gaignard
Add 'nxp,imx8mq-vpu-ctrl' in the list of possible syscon. It will used to access to the VPU control registers. Signed-off-by: Benjamin Gaignard --- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bi

[PATCH v6 02/13] dt-bindings: media: nxp, imx8mq-vpu: Update the bindings for G2 support

2021-03-18 Thread Benjamin Gaignard
compatible with older DT the driver is still capable to use 'ctrl' reg-name even if it is deprecated now. Signed-off-by: Benjamin Gaignard --- version 5: - This version doesn't break the backward compatibilty between kernel and DT. .../bindings/media/nxp,imx8mq-vpu.y

[PATCH v6 00/13] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-03-18 Thread Benjamin Gaignard
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK test Requests: OK Total for hantro-vpu device /dev/video1: 46, Succeeded: 46, Failed: 0, Warnings: 0 Grand Total for hantro-vpu device /dev/media1: 54, Succeeded: 54, Failed: 0, Warnings: 0 Benjamin Benjamin Gai

[PATCH v6 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-03-18 Thread Benjamin Gaignard
e a list of register names so remove it. Signed-off-by: Benjamin Gaignard --- version 5: - use syscon instead of VPU reset driver. - if DT doesn't provide syscon keep backward compatibilty by using 'ctrl' reg-name. drivers/staging/media/hantro/hantro.h | 5 +- drivers/stagi

[PATCH v6 04/13] media: hevc: Add fields and flags for hevc PPS

2021-03-18 Thread Benjamin Gaignard
Add fields and flags as they are defined in 7.4.3.3.1 "General picture parameter set RBSP semantics of the H.265 ITU specification. Signed-off-by: Benjamin Gaignard --- .../userspace-api/media/v4l/ext-ctrls-codec.rst| 14 ++ include/media/hevc-ct

[PATCH v6 05/13] media: hevc: Add decode params control

2021-03-18 Thread Benjamin Gaignard
Add decode params control and it associated structure to regroup all the information that are needed to decode a reference frame as it is describe in ITU-T Rec. H.265 section "8.3.2 Decoding process for reference picture set". Adapt Cedrus driver to these changes. Signed-off-by

[PATCH v6 06/13] media: hantro: change hantro_codec_ops run prototype to return errors

2021-03-18 Thread Benjamin Gaignard
Change hantro_codec_ops run prototype from 'void' to 'int'. This allow to cancel the job if an error occur while configuring the hardware. Signed-off-by: Benjamin Gaignard --- version 5: - forward hantro_h264_dec_prepare_run() return value in case of error drivers/

[PATCH v6 07/13] media: hantro: Define HEVC codec profiles and supported features

2021-03-18 Thread Benjamin Gaignard
Define which HEVC profiles (up to level 5.1) and features (no scaling, no 10 bits) are supported by the driver. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro.h | 3 ++ drivers/staging/media/hantro/hantro_drv.c | 58 +++ 2 files changed, 61

[PATCH v6 08/13] media: hantro: Only use postproc when post processed formats are defined

2021-03-18 Thread Benjamin Gaignard
If the variant doesn't offert postprocessed formats make sure it will be ok. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro.h | 8 ++-- drivers/staging/media/hantro/hantro_postproc.c | 14 ++ drivers/staging/media/hantro/hantro_v4l2.c

[PATCH v6 09/13] media: uapi: Add a control for HANTRO driver

2021-03-18 Thread Benjamin Gaignard
The HEVC HANTRO driver needs to know the number of bits to skip at the beginning of the slice header. That is a hardware specific requirement so create a dedicated control that this purpose. Signed-off-by: Benjamin Gaignard --- version 5: - Be even more verbose in control documentation. - Do

[PATCH v6 10/13] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-03-18 Thread Benjamin Gaignard
Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handle by v4l2 of the driver. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro_v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro

[PATCH v6 12/13] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-03-18 Thread Benjamin Gaignard
Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. G2 doesn't have postprocessor, use the same clocks and got it own interruption. Signed-off-by: Benjamin Gaignard --- version 5: - remove useless postproc fields for G2 version 2: - r

[PATCH v6 11/13] media: hantro: Introduce G2/HEVC decoder

2021-03-18 Thread Benjamin Gaignard
re so can't go into uapi structures. Compute the needed value is complex and require information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard Co-developed-by: Adrian Ratiu Signed-off-by: Adrian Ratiu Co-de

[PATCH v6 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-03-18 Thread Benjamin Gaignard
Split VPU node in two: one for G1 and one for G2 since they are different hardware blocks. Add syscon for hardware control block. Remove reg-names property that is useless. Each VPU node only need one interrupt. Signed-off-by: Benjamin Gaignard --- version 5: - use syscon instead of VPU reset

Re: [PATCH v6 02/13] dt-bindings: media: nxp,imx8mq-vpu: Update the bindings for G2 support

2021-03-26 Thread Benjamin Gaignard
Le 26/03/2021 à 15:11, Philipp Zabel a écrit : On Thu, Mar 18, 2021 at 09:20:35AM +0100, Benjamin Gaignard wrote: Introducing G2 hevc video decoder lead to modify the bindings to allow to get one node per VPUs. VPUs share one hardware control block which is provided as a phandle on an syscon

Re: [PATCH v6 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-03-26 Thread Benjamin Gaignard
Le 26/03/2021 à 15:24, Philipp Zabel a écrit : On Thu, Mar 18, 2021 at 09:20:46AM +0100, Benjamin Gaignard wrote: Split VPU node in two: one for G1 and one for G2 since they are different hardware blocks. Add syscon for hardware control block. Remove reg-names property that is useless. Each

[PATCH v7 01/13] dt-bindings: mfd: Add 'nxp, imx8mq-vpu-ctrl' to syscon list

2021-03-28 Thread Benjamin Gaignard
Add 'nxp,imx8mq-vpu-ctrl' in the list of possible syscon. It will used to access to the VPU control registers. Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring --- version 7: - Add Rob ack Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertio

[PATCH v7 00/13] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-03-28 Thread Benjamin Gaignard
OK test Requests: OK Total for hantro-vpu device /dev/video1: 46, Succeeded: 46, Failed: 0, Warnings: 0 Grand Total for hantro-vpu device /dev/media1: 54, Succeeded: 54, Failed: 0, Warnings: 0 Benjamin Benjamin Gaignard (13): dt-bindings: mfd: Add 'nxp,imx8mq-vpu-ctrl' to sys

[PATCH v7 02/13] dt-bindings: media: nxp, imx8mq-vpu: Update the bindings for G2 support

2021-03-28 Thread Benjamin Gaignard
compatible with older DT the driver is still capable to use 'ctrl' reg-name even if it is deprecated now. Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Reviewed-by: Philipp Zabel --- version 7: - Add Rob and Philipp reviewed-by tag - Change syscon phandle name to nxp,imx8m-vpu-ct

[PATCH v7 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-03-28 Thread Benjamin Gaignard
e a list of register names so remove it. Signed-off-by: Benjamin Gaignard Reviewed-by: Philipp Zabel --- version 7: - Add Philipp reviewed-by tag. - Change syscon phandle name. version 5: - use syscon instead of VPU reset driver. - if DT doesn't provide syscon keep backward compatibilty by

[PATCH v7 04/13] media: hevc: Add fields and flags for hevc PPS

2021-03-28 Thread Benjamin Gaignard
Add fields and flags as they are defined in 7.4.3.3.1 "General picture parameter set RBSP semantics of the H.265 ITU specification. Signed-off-by: Benjamin Gaignard --- .../userspace-api/media/v4l/ext-ctrls-codec.rst| 14 ++ include/media/hevc-ct

[PATCH v7 05/13] media: hevc: Add decode params control

2021-03-28 Thread Benjamin Gaignard
Add decode params control and it associated structure to regroup all the information that are needed to decode a reference frame as it is describe in ITU-T Rec. H.265 section "8.3.2 Decoding process for reference picture set". Adapt Cedrus driver to these changes. Signed-off-by

[PATCH v7 06/13] media: hantro: change hantro_codec_ops run prototype to return errors

2021-03-28 Thread Benjamin Gaignard
Change hantro_codec_ops run prototype from 'void' to 'int'. This allow to cancel the job if an error occur while configuring the hardware. Signed-off-by: Benjamin Gaignard --- version 5: - forward hantro_h264_dec_prepare_run() return value in case of error drivers/

[PATCH v7 07/13] media: hantro: Define HEVC codec profiles and supported features

2021-03-28 Thread Benjamin Gaignard
Define which HEVC profiles (up to level 5.1) and features (no scaling, no 10 bits) are supported by the driver. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro.h | 3 ++ drivers/staging/media/hantro/hantro_drv.c | 58 +++ 2 files changed, 61

[PATCH v7 08/13] media: hantro: Only use postproc when post processed formats are defined

2021-03-28 Thread Benjamin Gaignard
If the variant doesn't offert postprocessed formats make sure it will be ok. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro.h | 8 ++-- drivers/staging/media/hantro/hantro_postproc.c | 14 ++ drivers/staging/media/hantro/hantro_v4l2.c

[PATCH v7 09/13] media: uapi: Add a control for HANTRO driver

2021-03-28 Thread Benjamin Gaignard
The HEVC HANTRO driver needs to know the number of bits to skip at the beginning of the slice header. That is a hardware specific requirement so create a dedicated control that this purpose. Signed-off-by: Benjamin Gaignard --- version 5: - Be even more verbose in control documentation. - Do

[PATCH v7 10/13] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-03-29 Thread Benjamin Gaignard
Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handle by v4l2 of the driver. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro_v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro

[PATCH v7 12/13] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-03-29 Thread Benjamin Gaignard
Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. G2 doesn't have postprocessor, use the same clocks and got it own interruption. Signed-off-by: Benjamin Gaignard Reviewed-by: Philipp Zabel --- version 7: - Add Philipp Reviewed-b

[PATCH v7 11/13] media: hantro: Introduce G2/HEVC decoder

2021-03-29 Thread Benjamin Gaignard
re so can't go into uapi structures. Compute the needed value is complex and require information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard Co-developed-by: Adrian Ratiu Signed-off-by: Adrian Ratiu Co-de

[PATCH v7 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-03-29 Thread Benjamin Gaignard
clocks need to assigned to make sure that control block will be correctly clocked even if only one device node is enabled. Signed-off-by: Benjamin Gaignard --- version 7: - use nxp,imx8m-vpu-ctrl as phandle syscon property name version 5: - use syscon instead of VPU reset arch/arm64/boot/dts

[PATCH v8 00/13] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-04-01 Thread Benjamin Gaignard
ideo1: 46, Succeeded: 46, Failed: 0, Warnings: 0 Grand Total for hantro-vpu device /dev/media1: 54, Succeeded: 54, Failed: 0, Warnings: 0 Benjamin Benjamin Gaignard (13): dt-bindings: mfd: Add 'nxp,imx8mq-vpu-ctrl' to syscon list dt-bindings: media: nxp,imx8mq-vpu: Update the bindin

[PATCH v8 01/13] dt-bindings: mfd: Add 'nxp, imx8mq-vpu-ctrl' to syscon list

2021-04-01 Thread Benjamin Gaignard
Add 'nxp,imx8mq-vpu-ctrl' in the list of possible syscon. It will used to access to the VPU control registers. Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Acked-by: Lee Jones --- version 8: - Add Lee ack version 7: - Add Rob ack Documentation/devicetree/bindings/mfd/s

[PATCH v8 02/13] dt-bindings: media: nxp, imx8mq-vpu: Update the bindings for G2 support

2021-04-01 Thread Benjamin Gaignard
compatible with older DT the driver is still capable to use 'ctrl' reg-name even if it is deprecated now. Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Reviewed-by: Philipp Zabel --- version 7: - Add Rob and Philipp reviewed-by tag - Change syscon phandle name to nxp,imx8m-vpu-ct

[PATCH v8 04/13] media: hevc: Add fields and flags for hevc PPS

2021-04-01 Thread Benjamin Gaignard
Add fields and flags as they are defined in 7.4.3.3.1 "General picture parameter set RBSP semantics of the H.265 ITU specification. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 8: - add Ezequiel review tag .../userspace-api/media/v4l/ext-ctrls-codec.rst

[PATCH v8 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-01 Thread Benjamin Gaignard
e a list of register names so remove it. Signed-off-by: Benjamin Gaignard Reviewed-by: Philipp Zabel --- version 7: - Add Philipp reviewed-by tag. - Change syscon phandle name. version 5: - use syscon instead of VPU reset driver. - if DT doesn't provide syscon keep backward compatibilty by

[PATCH v8 05/13] media: hevc: Add decode params control

2021-04-01 Thread Benjamin Gaignard
Add decode params control and it associated structure to regroup all the information that are needed to decode a reference frame as it is describe in ITU-T Rec. H.265 section "8.3.2 Decoding process for reference picture set". Adapt Cedrus driver to these changes. Signed-off-by

[PATCH v8 06/13] media: hantro: change hantro_codec_ops run prototype to return errors

2021-04-01 Thread Benjamin Gaignard
Change hantro_codec_ops run prototype from 'void' to 'int'. This allow to cancel the job if an error occur while configuring the hardware. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 8: - add Ezequiel review tag version 5: - forward hantro_

[PATCH v8 07/13] media: hantro: Define HEVC codec profiles and supported features

2021-04-01 Thread Benjamin Gaignard
Define which HEVC profiles (up to level 5.1) and features (no scaling, no 10 bits) are supported by the driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 8: - add Ezequiel review tag drivers/staging/media/hantro/hantro.h | 3 ++ drivers/staging/media

[PATCH v8 08/13] media: hantro: Only use postproc when post processed formats are defined

2021-04-01 Thread Benjamin Gaignard
If the variant doesn't offert postprocessed formats make sure it will be ok. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 8: - add Ezequiel review tag drivers/staging/media/hantro/hantro.h | 8 ++-- drivers/staging/media/hantro/hantro_postp

[PATCH v8 09/13] media: uapi: Add a control for HANTRO driver

2021-04-01 Thread Benjamin Gaignard
The HEVC HANTRO driver needs to know the number of bits to skip at the beginning of the slice header. That is a hardware specific requirement so create a dedicated control that this purpose. Signed-off-by: Benjamin Gaignard --- version 5: - Be even more verbose in control documentation. - Do

[PATCH v8 10/13] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-04-01 Thread Benjamin Gaignard
Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handle by v4l2 of the driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 8: - Add Ezequiel review tag drivers/staging/media/hantro/hantro_v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

[PATCH v8 12/13] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-04-01 Thread Benjamin Gaignard
Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. G2 doesn't have postprocessor, use the same clocks and got it own interruption. Signed-off-by: Benjamin Gaignard Reviewed-by: Philipp Zabel Reviewed-by: Ezequiel Garcia --- version 8:

[PATCH v8 11/13] media: hantro: Introduce G2/HEVC decoder

2021-04-01 Thread Benjamin Gaignard
re so can't go into uapi structures. Compute the needed value is complex and require information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard Co-developed-by: Adrian Ratiu Signed-off-by: Adrian Ratiu Co-de

[PATCH v8 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-04-01 Thread Benjamin Gaignard
clocks need to assigned to make sure that control block will be correctly clocked even if only one device node is enabled. Signed-off-by: Benjamin Gaignard --- version 7: - use nxp,imx8m-vpu-ctrl as phandle syscon property name version 5: - use syscon instead of VPU reset arch/arm64/boot/dts

[PATCH v9 01/13] dt-bindings: mfd: Add 'nxp, imx8mq-vpu-ctrl' to syscon list

2021-04-07 Thread Benjamin Gaignard
Add 'nxp,imx8mq-vpu-ctrl' to the list of possible syscon. It will used to access the VPU control registers. Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Acked-by: Lee Jones --- version 9: - corrections in commit message version 8: - Add Lee ack version 7: - A

[PATCH v9 02/13] dt-bindings: media: nxp, imx8mq-vpu: Update the bindings for G2 support

2021-04-07 Thread Benjamin Gaignard
compatible with older DT the driver is still capable to use the 'ctrl' reg-name even if it is deprecated now. Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Reviewed-by: Philipp Zabel --- version 9: - Corrections in commit message version 7: - Add Rob and Philipp revie

[PATCH v9 00/13] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-04-07 Thread Benjamin Gaignard
edia1: 54, Succeeded: 54, Failed: 0, Warnings: 0 Benjamin Benjamin Gaignard (13): dt-bindings: mfd: Add 'nxp,imx8mq-vpu-ctrl' to syscon list dt-bindings: media: nxp,imx8mq-vpu: Update the bindings for G2 support media: hantro: Use syscon instead of 'ctrl' register

[PATCH v9 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-07 Thread Benjamin Gaignard
e a list of register names so remove it. Signed-off-by: Benjamin Gaignard Reviewed-by: Philipp Zabel --- version 9: - Corrections in commit message version 7: - Add Philipp reviewed-by tag. - Change syscon phandle name. version 5: - use syscon instead of VPU reset driver. - if DT doesn&#

[PATCH v9 04/13] media: hevc: Add fields and flags for hevc PPS

2021-04-07 Thread Benjamin Gaignard
Add fields and flags as they are defined in 7.4.3.3.1 "General picture parameter set RBSP semantics of the H.265 ITU specification. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 8: - add Ezequiel review tag .../userspace-api/media/v4l/ext-ctrls-codec.rst

[PATCH v9 06/13] media: hantro: change hantro_codec_ops run prototype to return errors

2021-04-07 Thread Benjamin Gaignard
Change hantro_codec_ops run prototype from 'void' to 'int'. This allows the driver to cancel the job if an error occurs while configuring the hardware. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 9: - Corrections in commit message versio

[PATCH v9 05/13] media: hevc: Add decode params control

2021-04-07 Thread Benjamin Gaignard
Add decode params control and the associated structure to group all the information that are needed to decode a reference frame as is described in ITU-T Rec. H.265 section "8.3.2 Decoding process for reference picture set". Adapt Cedrus driver to these changes. Signed-off-by: Benjami

[PATCH v9 07/13] media: hantro: Define HEVC codec profiles and supported features

2021-04-07 Thread Benjamin Gaignard
Define which HEVC profiles (up to level 5.1) and features (no scaling, no 10 bits) are supported by the driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 8: - add Ezequiel review tag drivers/staging/media/hantro/hantro.h | 3 ++ drivers/staging/media

[PATCH v9 08/13] media: hantro: Only use postproc when post processed formats are defined

2021-04-07 Thread Benjamin Gaignard
If the variant doesn't support postprocessed formats make sure it will be ok. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 9: - Corrections in commit message version 8: - add Ezequiel review tag drivers/staging/media/hantro/hantro.h

[PATCH v9 10/13] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-04-07 Thread Benjamin Gaignard
Make sure that V4L2_PIX_FMT_HEVC_SLICE is correctly handled by the driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia --- version 9: - Corrections in commit message version 8: - Add Ezequiel review tag drivers/staging/media/hantro/hantro_v4l2.c | 1 + 1 file changed, 1

[PATCH v9 09/13] media: uapi: Add a control for HANTRO driver

2021-04-07 Thread Benjamin Gaignard
The HEVC HANTRO driver needs to know the number of bits to skip at the beginning of the slice header. That is a hardware specific requirement so create a dedicated control for this purpose. Signed-off-by: Benjamin Gaignard --- version 9: - Corrections in commit message. - Move control

[PATCH v9 11/13] media: hantro: Introduce G2/HEVC decoder

2021-04-07 Thread Benjamin Gaignard
re so can't go into uapi structures. Computing the needed value is complex and requires information from the stream that only the userland knows so let it provide the correct value to the driver. Signed-off-by: Benjamin Gaignard Co-developed-by: Adrian Ratiu Signed-off-by: Adrian Ratiu Co

[PATCH v9 12/13] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-04-07 Thread Benjamin Gaignard
Add variant to IMX8M to enable G2/HEVC codec. Define the capabilities for the hardware up to 3840x2160. G2 doesn't have a postprocessor, uses the same clocks and has it own interrupt. Signed-off-by: Benjamin Gaignard Reviewed-by: Philipp Zabel Reviewed-by: Ezequiel Garcia --- vers

[PATCH v9 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-04-07 Thread Benjamin Gaignard
the clocks need to be assigned to make sure that the control block will be correctly clocked even if only one device node is enabled. Signed-off-by: Benjamin Gaignard --- version 9: - Corrections in commit message version 7: - use nxp,imx8m-vpu-ctrl as phandle syscon property name version 5

Re: [PATCH v9 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-16 Thread Benjamin Gaignard
Le 16/04/2021 à 12:54, Lucas Stach a écrit : Am Mittwoch, dem 07.04.2021 um 09:35 +0200 schrieb Benjamin Gaignard: In order to be able to share the control hardware block between VPUs use a syscon instead a ioremap it in the driver. To keep the compatibility with older DT if 'nxp,imx8m

Re: [PATCH v9 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-20 Thread Benjamin Gaignard
Le 16/04/2021 à 17:14, Lucas Stach a écrit : Am Freitag, dem 16.04.2021 um 15:08 +0200 schrieb Benjamin Gaignard: Le 16/04/2021 à 12:54, Lucas Stach a écrit : Am Mittwoch, dem 07.04.2021 um 09:35 +0200 schrieb Benjamin Gaignard: In order to be able to share the control hardware block between

Re: [PATCH v9 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-20 Thread Benjamin Gaignard
Le 20/04/2021 à 11:16, Hans Verkuil a écrit : On 20/04/2021 11:10, Benjamin Gaignard wrote: Le 16/04/2021 à 17:14, Lucas Stach a écrit : Am Freitag, dem 16.04.2021 um 15:08 +0200 schrieb Benjamin Gaignard: Le 16/04/2021 à 12:54, Lucas Stach a écrit : Am Mittwoch, dem 07.04.2021 um 09:35

[PATCH v10 0/9] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-04-20 Thread Benjamin Gaignard
pect mime since it is confusing - remove useless clocks in VPUs nodes Benjamin Gaignard (9): media: hevc: Add fields and flags for hevc PPS media: hevc: Add decode params control media: hantro: change hantro_codec_ops run prototype to return errors media: hantro: Define HEVC codec profile

  1   2   >