diff mbox series

[6/7] media: hantro: imx8m: Enable 10bit decoding

Message ID 20220617115802.396442-7-benjamin.gaignard@collabora.com (mailing list archive)
State New, archived
Headers show
Series Enable 10bits bitstream for Hantro/G2 HEVC codec | expand

Commit Message

Benjamin Gaignard June 17, 2022, 11:58 a.m. UTC
Expose 10bit pixel formats to enable 10bit decoding in IMX8M SoCs.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
 drivers/staging/media/hantro/imx8m_vpu_hw.c | 27 +++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Ezequiel Garcia June 30, 2022, 5:40 p.m. UTC | #1
Hi Benjamin,

On Fri, Jun 17, 2022 at 01:58:01PM +0200, Benjamin Gaignard wrote:
> Expose 10bit pixel formats to enable 10bit decoding in IMX8M SoCs.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>

Looks good to me.

Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

Have you checked Fluster tests passess using both P010 and P010_4L4?
It would be good to double-check.

Thanks a lot,
Ezequiel

> ---
>  drivers/staging/media/hantro/imx8m_vpu_hw.c | 27 +++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c
> index 77f574fdfa77..b390228fd3b4 100644
> --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c
> +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c
> @@ -162,12 +162,39 @@ static const struct hantro_fmt imx8m_vpu_g2_postproc_fmts[] = {
>  			.step_height = MB_DIM,
>  		},
>  	},
> +	{
> +		.fourcc = V4L2_PIX_FMT_P010,
> +		.codec_mode = HANTRO_MODE_NONE,
> +		.postprocessed = true,
> +		.frmsize = {
> +			.min_width = FMT_MIN_WIDTH,
> +			.max_width = FMT_UHD_WIDTH,
> +			.step_width = MB_DIM,
> +			.min_height = FMT_MIN_HEIGHT,
> +			.max_height = FMT_UHD_HEIGHT,
> +			.step_height = MB_DIM,
> +		},
> +	},
>  };
>  
>  static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
>  	{
>  		.fourcc = V4L2_PIX_FMT_NV12_4L4,
>  		.codec_mode = HANTRO_MODE_NONE,
> +		.match_depth = true,
> +		.frmsize = {
> +			.min_width = FMT_MIN_WIDTH,
> +			.max_width = FMT_UHD_WIDTH,
> +			.step_width = TILE_MB_DIM,
> +			.min_height = FMT_MIN_HEIGHT,
> +			.max_height = FMT_UHD_HEIGHT,
> +			.step_height = TILE_MB_DIM,
> +		},
> +	},
> +	{
> +		.fourcc = V4L2_PIX_FMT_P010_4L4,
> +		.codec_mode = HANTRO_MODE_NONE,
> +		.match_depth = true,
>  		.frmsize = {
>  			.min_width = FMT_MIN_WIDTH,
>  			.max_width = FMT_UHD_WIDTH,
> -- 
> 2.32.0
>
Benjamin Gaignard July 1, 2022, 7:01 a.m. UTC | #2
Le 30/06/2022 à 19:40, Ezequiel Garcia a écrit :
> Hi Benjamin,
>
> On Fri, Jun 17, 2022 at 01:58:01PM +0200, Benjamin Gaignard wrote:
>> Expose 10bit pixel formats to enable 10bit decoding in IMX8M SoCs.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> Looks good to me.
>
> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
>
> Have you checked Fluster tests passess using both P010 and P010_4L4?
> It would be good to double-check.

It isn't possible to check P010_4L4 with fluster because GStreamer
videoconvert element doesn't support this format.

Regards,
Benjamin

>
> Thanks a lot,
> Ezequiel
>
>> ---
>>   drivers/staging/media/hantro/imx8m_vpu_hw.c | 27 +++++++++++++++++++++
>>   1 file changed, 27 insertions(+)
>>
>> diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c
>> index 77f574fdfa77..b390228fd3b4 100644
>> --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c
>> +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c
>> @@ -162,12 +162,39 @@ static const struct hantro_fmt imx8m_vpu_g2_postproc_fmts[] = {
>>   			.step_height = MB_DIM,
>>   		},
>>   	},
>> +	{
>> +		.fourcc = V4L2_PIX_FMT_P010,
>> +		.codec_mode = HANTRO_MODE_NONE,
>> +		.postprocessed = true,
>> +		.frmsize = {
>> +			.min_width = FMT_MIN_WIDTH,
>> +			.max_width = FMT_UHD_WIDTH,
>> +			.step_width = MB_DIM,
>> +			.min_height = FMT_MIN_HEIGHT,
>> +			.max_height = FMT_UHD_HEIGHT,
>> +			.step_height = MB_DIM,
>> +		},
>> +	},
>>   };
>>   
>>   static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
>>   	{
>>   		.fourcc = V4L2_PIX_FMT_NV12_4L4,
>>   		.codec_mode = HANTRO_MODE_NONE,
>> +		.match_depth = true,
>> +		.frmsize = {
>> +			.min_width = FMT_MIN_WIDTH,
>> +			.max_width = FMT_UHD_WIDTH,
>> +			.step_width = TILE_MB_DIM,
>> +			.min_height = FMT_MIN_HEIGHT,
>> +			.max_height = FMT_UHD_HEIGHT,
>> +			.step_height = TILE_MB_DIM,
>> +		},
>> +	},
>> +	{
>> +		.fourcc = V4L2_PIX_FMT_P010_4L4,
>> +		.codec_mode = HANTRO_MODE_NONE,
>> +		.match_depth = true,
>>   		.frmsize = {
>>   			.min_width = FMT_MIN_WIDTH,
>>   			.max_width = FMT_UHD_WIDTH,
>> -- 
>> 2.32.0
>>
Nicolas Dufresne July 4, 2022, 3:43 p.m. UTC | #3
Le vendredi 01 juillet 2022 à 09:01 +0200, Benjamin Gaignard a écrit :
> Le 30/06/2022 à 19:40, Ezequiel Garcia a écrit :
> > Hi Benjamin,
> > 
> > On Fri, Jun 17, 2022 at 01:58:01PM +0200, Benjamin Gaignard wrote:
> > > Expose 10bit pixel formats to enable 10bit decoding in IMX8M SoCs.
> > > 
> > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> > Looks good to me.
> > 
> > Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> > 
> > Have you checked Fluster tests passess using both P010 and P010_4L4?
> > It would be good to double-check.
> 
> It isn't possible to check P010_4L4 with fluster because GStreamer
> videoconvert element doesn't support this format.

I can offert to work on this. If you can send me offline some picture dump, so I
can validate, that would help.

> 
> Regards,
> Benjamin
> 
> > 
> > Thanks a lot,
> > Ezequiel
> > 
> > > ---
> > >   drivers/staging/media/hantro/imx8m_vpu_hw.c | 27 +++++++++++++++++++++
> > >   1 file changed, 27 insertions(+)
> > > 
> > > diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c
> > > index 77f574fdfa77..b390228fd3b4 100644
> > > --- a/drivers/staging/media/hantro/imx8m_vpu_hw.c
> > > +++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c
> > > @@ -162,12 +162,39 @@ static const struct hantro_fmt imx8m_vpu_g2_postproc_fmts[] = {
> > >   			.step_height = MB_DIM,
> > >   		},
> > >   	},
> > > +	{
> > > +		.fourcc = V4L2_PIX_FMT_P010,
> > > +		.codec_mode = HANTRO_MODE_NONE,
> > > +		.postprocessed = true,
> > > +		.frmsize = {
> > > +			.min_width = FMT_MIN_WIDTH,
> > > +			.max_width = FMT_UHD_WIDTH,
> > > +			.step_width = MB_DIM,
> > > +			.min_height = FMT_MIN_HEIGHT,
> > > +			.max_height = FMT_UHD_HEIGHT,
> > > +			.step_height = MB_DIM,
> > > +		},
> > > +	},
> > >   };
> > >   
> > >   static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
> > >   	{
> > >   		.fourcc = V4L2_PIX_FMT_NV12_4L4,
> > >   		.codec_mode = HANTRO_MODE_NONE,
> > > +		.match_depth = true,
> > > +		.frmsize = {
> > > +			.min_width = FMT_MIN_WIDTH,
> > > +			.max_width = FMT_UHD_WIDTH,
> > > +			.step_width = TILE_MB_DIM,
> > > +			.min_height = FMT_MIN_HEIGHT,
> > > +			.max_height = FMT_UHD_HEIGHT,
> > > +			.step_height = TILE_MB_DIM,
> > > +		},
> > > +	},
> > > +	{
> > > +		.fourcc = V4L2_PIX_FMT_P010_4L4,
> > > +		.codec_mode = HANTRO_MODE_NONE,
> > > +		.match_depth = true,
> > >   		.frmsize = {
> > >   			.min_width = FMT_MIN_WIDTH,
> > >   			.max_width = FMT_UHD_WIDTH,
> > > -- 
> > > 2.32.0
> > >
diff mbox series

Patch

diff --git a/drivers/staging/media/hantro/imx8m_vpu_hw.c b/drivers/staging/media/hantro/imx8m_vpu_hw.c
index 77f574fdfa77..b390228fd3b4 100644
--- a/drivers/staging/media/hantro/imx8m_vpu_hw.c
+++ b/drivers/staging/media/hantro/imx8m_vpu_hw.c
@@ -162,12 +162,39 @@  static const struct hantro_fmt imx8m_vpu_g2_postproc_fmts[] = {
 			.step_height = MB_DIM,
 		},
 	},
+	{
+		.fourcc = V4L2_PIX_FMT_P010,
+		.codec_mode = HANTRO_MODE_NONE,
+		.postprocessed = true,
+		.frmsize = {
+			.min_width = FMT_MIN_WIDTH,
+			.max_width = FMT_UHD_WIDTH,
+			.step_width = MB_DIM,
+			.min_height = FMT_MIN_HEIGHT,
+			.max_height = FMT_UHD_HEIGHT,
+			.step_height = MB_DIM,
+		},
+	},
 };
 
 static const struct hantro_fmt imx8m_vpu_g2_dec_fmts[] = {
 	{
 		.fourcc = V4L2_PIX_FMT_NV12_4L4,
 		.codec_mode = HANTRO_MODE_NONE,
+		.match_depth = true,
+		.frmsize = {
+			.min_width = FMT_MIN_WIDTH,
+			.max_width = FMT_UHD_WIDTH,
+			.step_width = TILE_MB_DIM,
+			.min_height = FMT_MIN_HEIGHT,
+			.max_height = FMT_UHD_HEIGHT,
+			.step_height = TILE_MB_DIM,
+		},
+	},
+	{
+		.fourcc = V4L2_PIX_FMT_P010_4L4,
+		.codec_mode = HANTRO_MODE_NONE,
+		.match_depth = true,
 		.frmsize = {
 			.min_width = FMT_MIN_WIDTH,
 			.max_width = FMT_UHD_WIDTH,