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 9/9] media: iris: add VP8 encode support on Gen1 firmware
Date: Thu, 09 Jul 2026 22:37:06 +0300 [thread overview]
Message-ID: <20260709-iris-vp8-v1-9-6af3ab578a7c@oss.qualcomm.com> (raw)
In-Reply-To: <20260709-iris-vp8-v1-0-6af3ab578a7c@oss.qualcomm.com>
The Gen1 firmware supports encoding VP8, but the iris driver never
advertised or wired up the codec.
Advertise VP8 through the Gen1 encode format list and register the VP8
profile control, sending the profile to the firmware through the
profile/level property. VP8 has no level, so only the profile is set.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_ctrls.c | 3 +++
drivers/media/platform/qcom/iris/iris_hfi_gen1.c | 23 ++++++++++++++++++++--
.../platform/qcom/iris/iris_hfi_gen1_command.c | 12 +++++++++++
.../platform/qcom/iris/iris_hfi_gen1_defines.h | 5 +++++
4 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c
index 8f9347c1df2b..c065ebc24d7d 100644
--- a/drivers/media/platform/qcom/iris/iris_ctrls.c
+++ b/drivers/media/platform/qcom/iris/iris_ctrls.c
@@ -621,6 +621,9 @@ int iris_set_profile_level_gen1(struct iris_inst *inst, enum platform_inst_fw_ca
if (inst->codec == V4L2_PIX_FMT_H264) {
pl.profile = inst->fw_caps[PROFILE_H264].value;
pl.level = inst->fw_caps[LEVEL_H264].value;
+ } else if (inst->codec == V4L2_PIX_FMT_VP8) {
+ pl.profile = inst->fw_caps[PROFILE_VP8].value;
+ pl.level = 0;
} else {
pl.profile = inst->fw_caps[PROFILE_HEVC].value;
pl.level = inst->fw_caps[LEVEL_HEVC].value;
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1.c
index 0451ee321840..b3c567349a6b 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen1.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1.c
@@ -150,6 +150,19 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8250_enc[] = {
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
.set = iris_set_profile_level_gen1,
},
+ {
+ .cap_id = PROFILE_VP8,
+ .min = V4L2_MPEG_VIDEO_VP8_PROFILE_0,
+ .max = V4L2_MPEG_VIDEO_VP8_PROFILE_3,
+ .step_or_mask = BIT(V4L2_MPEG_VIDEO_VP8_PROFILE_0) |
+ BIT(V4L2_MPEG_VIDEO_VP8_PROFILE_1) |
+ BIT(V4L2_MPEG_VIDEO_VP8_PROFILE_2) |
+ BIT(V4L2_MPEG_VIDEO_VP8_PROFILE_3),
+ .value = V4L2_MPEG_VIDEO_VP8_PROFILE_0,
+ .hfi_id = HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT,
+ .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
+ .set = iris_set_profile_level_gen1,
+ },
{
.cap_id = HEADER_MODE,
.min = V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,
@@ -470,6 +483,12 @@ static const u32 iris_hfi_gen1_ar50lt_dec_fmts[] = {
static const u32 iris_hfi_gen1_enc_fmts[] = {
V4L2_PIX_FMT_H264,
V4L2_PIX_FMT_HEVC,
+ V4L2_PIX_FMT_VP8,
+};
+
+static const u32 iris_hfi_gen1_ar50lt_enc_fmts[] = {
+ V4L2_PIX_FMT_H264,
+ V4L2_PIX_FMT_HEVC,
};
const struct iris_firmware_data iris_hfi_gen1_data = {
@@ -728,8 +747,8 @@ const struct iris_firmware_data iris_hfi_gen1_ar50lt_data = {
.dec_fmts = iris_hfi_gen1_ar50lt_dec_fmts,
.dec_fmts_size = ARRAY_SIZE(iris_hfi_gen1_ar50lt_dec_fmts),
- .enc_fmts = iris_hfi_gen1_enc_fmts,
- .enc_fmts_size = ARRAY_SIZE(iris_hfi_gen1_enc_fmts),
+ .enc_fmts = iris_hfi_gen1_ar50lt_enc_fmts,
+ .enc_fmts_size = ARRAY_SIZE(iris_hfi_gen1_ar50lt_enc_fmts),
.dec_input_config_params_default =
sm8250_vdec_input_config_param_default,
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
index 53ba48f88410..c652c61db19d 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c
@@ -542,6 +542,13 @@ static const struct iris_hfi_gen1_id_mapping iris_hfi_gen1_hevc_levels[] = {
{ HFI_HEVC_LEVEL_62, V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2 },
};
+static const struct iris_hfi_gen1_id_mapping iris_hfi_gen1_vp8_profiles[] = {
+ { HFI_VPX_PROFILE_VERSION_0, V4L2_MPEG_VIDEO_VP8_PROFILE_0 },
+ { HFI_VPX_PROFILE_VERSION_1, V4L2_MPEG_VIDEO_VP8_PROFILE_1 },
+ { HFI_VPX_PROFILE_VERSION_2, V4L2_MPEG_VIDEO_VP8_PROFILE_2 },
+ { HFI_VPX_PROFILE_VERSION_3, V4L2_MPEG_VIDEO_VP8_PROFILE_3 },
+};
+
static u32 iris_hfi_gen1_find_hfi_id(u32 v4l2_id,
const struct iris_hfi_gen1_id_mapping *array,
unsigned int array_sz)
@@ -577,6 +584,11 @@ iris_hfi_gen1_profile_level(struct iris_inst *inst, u32 v4l2_pf, u32 v4l2_lvl,
pl->level = iris_hfi_gen1_find_hfi_id(v4l2_lvl, iris_hfi_gen1_hevc_levels,
ARRAY_SIZE(iris_hfi_gen1_hevc_levels));
break;
+ case V4L2_PIX_FMT_VP8:
+ pl->profile = iris_hfi_gen1_find_hfi_id(v4l2_pf, iris_hfi_gen1_vp8_profiles,
+ ARRAY_SIZE(iris_hfi_gen1_vp8_profiles));
+ pl->level = 0;
+ break;
default:
pl->profile = 0;
pl->level = 0;
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_defines.h b/drivers/media/platform/qcom/iris/iris_hfi_gen1_defines.h
index 3c8ae1c82540..2fe1cb7928b5 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_defines.h
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_defines.h
@@ -63,6 +63,11 @@
#define HFI_HEVC_LEVEL_61 0x00000800
#define HFI_HEVC_LEVEL_62 0x00001000
+#define HFI_VPX_PROFILE_VERSION_0 0x00000004
+#define HFI_VPX_PROFILE_VERSION_1 0x00000008
+#define HFI_VPX_PROFILE_VERSION_2 0x00000010
+#define HFI_VPX_PROFILE_VERSION_3 0x00000020
+
#define HFI_ERR_NONE 0x0
#define HFI_CMD_SYS_INIT 0x10001
--
2.47.3
next prev parent reply other threads:[~2026-07-09 19:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 19:36 [PATCH 0/9] media: iris: enable VP8, MPEG2 and interlaced video support Dmitry Baryshkov
2026-07-09 19:36 ` [PATCH 1/9] media: iris: translate Gen1 profile/level to HFI enumerants Dmitry Baryshkov
2026-08-05 16:11 ` Vishnu Reddy
2026-07-09 19:36 ` [PATCH 2/9] media: iris: account for UBWC extradata in the QC08C buffer size Dmitry Baryshkov
2026-08-05 15:58 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 3/9] media: iris: add support for interlaced decoded content Dmitry Baryshkov
2026-07-09 19:37 ` [PATCH 4/9] media: iris: split Gen2 firmware data for vpu2-generation SoCs Dmitry Baryshkov
2026-08-05 17:08 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 5/9] media: iris: move the decode format list into the firmware data Dmitry Baryshkov
2026-08-26 4:09 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 6/9] media: iris: add VP8 decode support on Gen1 firmware Dmitry Baryshkov
2026-08-26 4:18 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 7/9] media: iris: add MPEG2 " Dmitry Baryshkov
2026-08-26 4:50 ` Vishnu Reddy
2026-07-09 19:37 ` [PATCH 8/9] media: iris: move the encode format list into the firmware data Dmitry Baryshkov
2026-07-09 19:37 ` Dmitry Baryshkov [this message]
2026-07-30 22:52 ` [PATCH 0/9] media: iris: enable VP8, MPEG2 and interlaced video support Dmitry Baryshkov
2026-07-31 7:37 ` Vikash Garodia
2026-07-31 12:25 ` 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=20260709-iris-vp8-v1-9-6af3ab578a7c@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®