[PATCH 09/18] media: coda: Fix max h.264 level for CODA_DX6

Sergey Khimich posted 18 patches 9 months, 1 week ago
[PATCH 09/18] media: coda: Fix max h.264 level for CODA_DX6
Posted by Sergey Khimich 9 months, 1 week ago
From: Vladimir Yakovlev <vovchkir@gmail.com>

CODA_DX6 has h.264 decoder but v4l2_ctrls of level wasn't setting
for this device.

Co-developed-by: Sergey Khimich <serghox@gmail.com>
Signed-off-by: Sergey Khimich <serghox@gmail.com>
Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com>
---
 drivers/media/platform/chips-media/coda/coda-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index 33c7e8398f31..555b73816952 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -2440,8 +2440,8 @@ static void coda_decode_ctrls(struct coda_ctx *ctx)
 		max = V4L2_MPEG_VIDEO_H264_LEVEL_4_0;
 	else if (ctx->dev->devtype->product == CODA_960)
 		max = V4L2_MPEG_VIDEO_H264_LEVEL_4_1;
-	else
-		return;
+	else /* CODA_DX6 */
+		max = V4L2_MPEG_VIDEO_H264_LEVEL_3_0;
 	ctx->h264_level_ctrl = v4l2_ctrl_new_std_menu(&ctx->ctrls,
 		&coda_ctrl_ops, V4L2_CID_MPEG_VIDEO_H264_LEVEL, max, 0, max);
 	if (ctx->h264_level_ctrl)
-- 
2.30.2
Re: [PATCH 09/18] media: coda: Fix max h.264 level for CODA_DX6
Posted by Nicolas Dufresne 6 months, 3 weeks ago
Hi,

Le vendredi 14 mars 2025 à 18:29 +0300, Sergey Khimich a écrit :
> From: Vladimir Yakovlev <vovchkir@gmail.com>
> 
> CODA_DX6 has h.264 decoder but v4l2_ctrls of level wasn't setting

Perhaps:
CODA_DX6 supports H.264 decoder, though the maximum level wasn't set
properly.

regards,
Nicolas

> for this device.

> 
> Co-developed-by: Sergey Khimich <serghox@gmail.com>
> Signed-off-by: Sergey Khimich <serghox@gmail.com>
> Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com>
> ---
>  drivers/media/platform/chips-media/coda/coda-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-
> common.c
> index 33c7e8398f31..555b73816952 100644
> --- a/drivers/media/platform/chips-media/coda/coda-common.c
> +++ b/drivers/media/platform/chips-media/coda/coda-common.c
> @@ -2440,8 +2440,8 @@ static void coda_decode_ctrls(struct coda_ctx *ctx)
>  		max = V4L2_MPEG_VIDEO_H264_LEVEL_4_0;
>  	else if (ctx->dev->devtype->product == CODA_960)
>  		max = V4L2_MPEG_VIDEO_H264_LEVEL_4_1;
> -	else
> -		return;
> +	else /* CODA_DX6 */
> +		max = V4L2_MPEG_VIDEO_H264_LEVEL_3_0;
>  	ctx->h264_level_ctrl = v4l2_ctrl_new_std_menu(&ctx->ctrls,
>  		&coda_ctrl_ops, V4L2_CID_MPEG_VIDEO_H264_LEVEL, max, 0, max);
>  	if (ctx->h264_level_ctrl)