[PATCH v2 03/13] media: iris: default the Gen1 encoder level to a usable value

From: Dmitry Baryshkov

Date: Fri Dec 04 2026 - 13:25:30 EST


The Gen1 encoder H.264 and HEVC level controls default to level 1. Now
that the level is translated to its HFI value, unless userspace sets the
level, every Gen1 stream is encoded as level 1, which only allows tiny
frames (176x144 for H.264): a 1280x720 stream claims a level it exceeds
many times over, which strict decoders may refuse.

Default the level to the highest one the core is meant for, as the
Gen2 platforms do: 5.1 for SM8250-class cores, 4.2 (H.264) and 4.1
(HEVC) for AR50_LITE.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
drivers/media/platform/qcom/iris/iris_hfi_gen1.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1.c
index 1f87cef986ef..c377ae1f84db 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen1.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1.c
@@ -89,7 +89,7 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8250_enc[] = {
BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_2) |
BIT(V4L2_MPEG_VIDEO_H264_LEVEL_5_0) |
BIT(V4L2_MPEG_VIDEO_H264_LEVEL_5_1),
- .value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
+ .value = V4L2_MPEG_VIDEO_H264_LEVEL_5_1,
.hfi_id = HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT,
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
.set = iris_set_profile_level_gen1,
@@ -111,7 +111,7 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8250_enc[] = {
BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_6) |
BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1) |
BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2),
- .value = V4L2_MPEG_VIDEO_HEVC_LEVEL_1,
+ .value = V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1,
.hfi_id = HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT,
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
.set = iris_set_profile_level_gen1,
@@ -512,7 +512,7 @@ static const struct platform_inst_fw_cap inst_fw_cap_gen1_ar50lt_enc[] = {
BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_0) |
BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_1) |
BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_2),
- .value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
+ .value = V4L2_MPEG_VIDEO_H264_LEVEL_4_2,
.hfi_id = HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT,
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
.set = iris_set_profile_level_gen1,
@@ -528,7 +528,7 @@ static const struct platform_inst_fw_cap inst_fw_cap_gen1_ar50lt_enc[] = {
BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1) |
BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_4) |
BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1),
- .value = V4L2_MPEG_VIDEO_HEVC_LEVEL_1,
+ .value = V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1,
.hfi_id = HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT,
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
.set = iris_set_profile_level_gen1,

--
2.47.3