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

From: Sergey Khimich
Date: Fri Mar 14 2025 - 11:32:18 EST


From: Vladimir Yakovlev <vovchkir@xxxxxxxxx>

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

Co-developed-by: Sergey Khimich <serghox@xxxxxxxxx>
Signed-off-by: Sergey Khimich <serghox@xxxxxxxxx>
Signed-off-by: Vladimir Yakovlev <vovchkir@xxxxxxxxx>
---
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