[PATCH v10 9/9] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-04-20 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 --- drivers/staging

[PATCH v10 8/9] media: hantro: Introduce G2/HEVC decoder

2021-04-20 Thread Benjamin Gaignard
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-developed

[PATCH v10 6/9] media: uapi: Add a control for HANTRO driver

2021-04-20 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 --- .../userspace-api/media/drivers/hantro.rst| 19

[PATCH v10 7/9] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-04-20 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 --- 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

[PATCH v10 5/9] media: hantro: Only use postproc when post processed formats are defined

2021-04-20 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 --- drivers/staging/media/hantro/hantro.h | 8 ++-- drivers/staging/media/hantro/hantro_postproc.c | 14 ++ drivers/staging

[PATCH v10 4/9] media: hantro: Define HEVC codec profiles and supported features

2021-04-20 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 --- drivers/staging/media/hantro/hantro.h | 3 ++ drivers/staging/media/hantro/hantro_drv.c | 58

[PATCH v10 3/9] media: hantro: change hantro_codec_ops run prototype to return errors

2021-04-20 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 --- drivers/staging/media/hantro/hantro_drv.c | 4 +++- .../staging/media

[PATCH v10 2/9] media: hevc: Add decode params control

2021-04-20 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 v10 1/9] media: hevc: Add fields and flags for hevc PPS

2021-04-20 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 --- .../userspace-api/media/v4l/ext-ctrls-codec.rst| 14 ++ include/media

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

2021-04-20 Thread Benjamin Gaignard
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 profiles and supported

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

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

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,imx8mq-vpu

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

2021-04-07 Thread Benjamin Gaignard
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-developed

[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

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

[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 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 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 version 8: - add Ezequiel

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

[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 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 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-07 Thread Benjamin Gaignard
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't provide syscon keep

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

2021-04-07 Thread Benjamin Gaignard
. To be 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 reviewed-by tag

[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: - Add Rob ack

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

2021-04-07 Thread Benjamin Gaignard
, 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 media: hevc: Add fields and flags for hevc PPS media

[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 02/13] dt-bindings: media: nxp,imx8mq-vpu: Update the bindings for G2 support

2021-04-01 Thread Benjamin Gaignard
. To be 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-ctrl (remove

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

[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 00/13] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-04-01 Thread Benjamin Gaignard
, 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 bindings for G2 support media: hantro: Use syscon

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

2021-04-01 Thread Benjamin Gaignard
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-developed

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

[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 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 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/syscon.yaml

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

2021-04-01 Thread Benjamin Gaignard
the 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 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_postproc.c

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

2021-04-01 Thread Benjamin Gaignard
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 using 'ctrl' reg-name

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

2021-03-29 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 11/13] media: hantro: Introduce G2/HEVC decoder

2021-03-29 Thread Benjamin Gaignard
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-developed

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

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

2021-03-29 Thread Benjamin Gaignard
the 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 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 07/13] media: hantro: Define HEVC codec profiles and supported features

2021-03-29 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-29 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 | 4

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

2021-03-29 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 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-03-29 Thread Benjamin Gaignard
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 using 'ctrl' reg-name

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

2021-03-29 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 06/13] media: hantro: change hantro_codec_ops run prototype to return errors

2021-03-29 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/staging/media/hantro

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

2021-03-29 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 insertion(+) diff

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

2021-03-29 Thread Benjamin Gaignard
. To be 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-ctrl (remove

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

2021-03-29 Thread Benjamin Gaignard
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 syscon list dt-bindings: media: nxp,imx8mq-vpu

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

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

[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

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

2021-03-18 Thread Benjamin Gaignard
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-developed

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

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

[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/staging/media/hantro

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

2021-03-18 Thread Benjamin Gaignard
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/staging/media/hantro/imx8m_vpu_hw.c | 52

[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 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 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/bindings/mfd

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

2021-03-18 Thread Benjamin Gaignard
/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 Gaignard (13): dt-bindings

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

2021-03-18 Thread Benjamin Gaignard
. To be 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.yaml| 53

[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 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-03-17 Thread Benjamin Gaignard
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/staging/media/hantro/imx8m_vpu_hw.c | 52

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

2021-03-17 Thread Benjamin Gaignard
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-developed

[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 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/staging/media/hantro

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

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

[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 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 02/13] dt-bindings: media: nxp,imx8mq-vpu: Update the bindings for G2 support

2021-03-17 Thread Benjamin Gaignard
. To be 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.yaml| 53

[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/bindings/mfd

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

2021-03-17 Thread Benjamin Gaignard
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 syscon list dt-bindings

Re: [PATCH v4 07/11] media: hantro: Introduce G2/HEVC decoder

2021-03-16 Thread Benjamin Gaignard
Le 16/03/2021 à 19:46, Ezequiel Garcia a écrit : Hi Benjamin, The series is looking really good. Some comments below. On Wed, 2021-03-03 at 12:39 +0100, Benjamin Gaignard wrote: Implement all the logic to get G2 hardware decoding HEVC frames. It support up level 5.1 HEVC stream. It doesn't

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

Re: [PATCH v4 09/11] media: hantro: IMX8M: add variant for G2/HEVC codec

2021-03-05 Thread Benjamin Gaignard
Le 03/03/2021 à 23:08, Ezequiel Garcia a écrit : On Wed, 2021-03-03 at 12:39 +0100, Benjamin Gaignard wrote: 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

Re: [PATCH v4 05/11] media: hantro: Add a field to distinguish the hardware versions

2021-03-05 Thread Benjamin Gaignard
Le 03/03/2021 à 23:05, Ezequiel Garcia a écrit : On Wed, 2021-03-03 at 12:39 +0100, Benjamin Gaignard wrote: Decoders hardware blocks could exist in multiple versions: add a field to distinguish them at runtime. G2 hardware block doesn't have postprocessor hantro_needs_postproc function

Re: [PATCH v4 03/11] media: hantro: change hantro_codec_ops run prototype to return errors

2021-03-05 Thread Benjamin Gaignard
Le 03/03/2021 à 22:56, Ezequiel Garcia a écrit : On Wed, 2021-03-03 at 12:39 +0100, Benjamin Gaignard wrote: 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

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 contains

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

[PATCH v4 01/11] media: hevc: Add fields and flags for hevc PPS

2021-03-03 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 v4 00/11] Add HANTRO G2/HEVC decoder support for IMX8MQ

2021-03-03 Thread Benjamin Gaignard
about control copy, reverse the test logic in tile_buffer_reallocate, rework some goto and return cases. - be more verbose about why I change the bindings - remove all sign-off expect mime since it is confusing - remove useless clocks in VPUs nodes Benjamin Benjamin Gaignard (11): media: hevc: Add

[PATCH v4 08/11] media: hantro: handle V4L2_PIX_FMT_HEVC_SLICE control

2021-03-03 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 v4 11/11] arm64: dts: imx8mq: Add node to G2 hardware

2021-03-03 Thread Benjamin Gaignard
Split VPU node in two: one for G1 and one for G2 since they are different hardware blocks. Signed-off-by: Benjamin Gaignard --- version 4: - rebase the change on top of VPU reset patches: https://www.spinics.net/lists/arm-kernel/msg878440.html version 2: - remove useless clocks in VPUs nodes

[PATCH v4 07/11] media: hantro: Introduce G2/HEVC decoder

2021-03-03 Thread Benjamin Gaignard
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 --- version 4: - fix Ezequiel comments - use dedicated control as an integer

[PATCH v4 10/11] dt-bindings: media: nxp,imx8mq-vpu: Update bindings

2021-03-03 Thread Benjamin Gaignard
. Remove from the bindings the need to set all blocks register but keep reg-names property because removing it from the driver may affect other variants. Signed-off-by: Benjamin Gaignard --- version 4: - rebase the change on top of VPU reset patches: https://www.spinics.net/lists/arm-kernel/msg878440

[PATCH v4 03/11] media: hantro: change hantro_codec_ops run prototype to return errors

2021-03-03 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 --- drivers/staging/media/hantro/hantro_drv.c | 4 +++- .../staging/media/hantro/hantro_g1_h264_dec.c | 6

[PATCH v4 05/11] media: hantro: Add a field to distinguish the hardware versions

2021-03-03 Thread Benjamin Gaignard
inline in .h file move it to .c file. Keep the default behavoir to be G1 hardware. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro.h | 13 +++-- drivers/staging/media/hantro/hantro_drv.c | 2 ++ drivers/staging/media/hantro/hantro_postproc.c | 17

  1   2   3   4   5   6   7   8   9   10   >