mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil+cisco@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 03/13] media: iris: default the Gen1 encoder level to a usable value
Date: Fri, 04 Dec 2026 20:24:44 +0200	[thread overview]
Message-ID: <20261204-iris-vp8-v2-3-462f9b48d246@oss.qualcomm.com> (raw)
In-Reply-To: <20261204-iris-vp8-v2-0-462f9b48d246@oss.qualcomm.com>

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@oss.qualcomm.com>
---
 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


  parent reply	other threads:[~2026-12-04 18:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 18:24 [PATCH v2 00/13] media: iris: enable VP8, MPEG1/MPEG2 and interlaced MPEG2 support Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 01/13] media: iris: apply the capture buffer minimum in queue_setup Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 02/13] media: iris: translate Gen1 profile/level to HFI enumerants Dmitry Baryshkov
2026-12-04 18:24 ` Dmitry Baryshkov [this message]
2026-12-04 18:24 ` [PATCH v2 04/13] media: iris: size QC08C buffers to fit field-coded pictures Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 05/13] media: iris: split Gen2 firmware data for vpu2-generation SoCs Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 06/13] media: iris: move the decode format list into the firmware data Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 07/13] media: iris: support read-only controls Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 08/13] media: iris: add VP8 decode support on Gen1 firmware Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 09/13] media: iris: add MPEG1 and MPEG2 " Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 10/13] media: iris: support interlaced MPEG2 content Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 11/13] media: iris: move the encode format list into the firmware data Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 12/13] media: iris: accept gen1 encoder output at a non-zero offset Dmitry Baryshkov
2026-12-04 18:24 ` [PATCH v2 13/13] media: iris: add VP8 encode support on Gen1 firmware Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204-iris-vp8-v2-3-462f9b48d246@oss.qualcomm.com \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=vikash.garodia@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®