From: Neil Armstrong <neil.armstrong@linaro.org>
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>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: [PATCH v2 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
Date: Fri, 17 Apr 2026 11:37:46 +0200 [thread overview]
Message-ID: <20260417-topic-sm8x50-iris-10bit-decoding-v2-6-c987b65a31d5@linaro.org> (raw)
In-Reply-To: <20260417-topic-sm8x50-iris-10bit-decoding-v2-0-c987b65a31d5@linaro.org>
Add the necessary bits into the gen2 platforms tables and handlers
to allow decoding streams into 10bit pixel formats.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
.../media/platform/qcom/iris/iris_hfi_gen2_response.c | 16 +++++++++++++++-
drivers/media/platform/qcom/iris/iris_instance.h | 2 ++
drivers/media/platform/qcom/iris/iris_platform_gen2.c | 8 +++++---
drivers/media/platform/qcom/iris/iris_vdec.c | 8 ++++++++
4 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
index 0541e02d7507..b6d815c01f1d 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c
@@ -542,6 +542,15 @@ static void iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst)
pixmp_ip->width = width;
pixmp_ip->height = height;
+ if (subsc_params.bit_depth == BIT_DEPTH_8 &&
+ pixmp_op->pixelformat != V4L2_PIX_FMT_NV12 &&
+ pixmp_op->pixelformat != V4L2_PIX_FMT_QC08C)
+ pixmp_op->pixelformat = V4L2_PIX_FMT_NV12;
+ else if (subsc_params.bit_depth == BIT_DEPTH_10 &&
+ pixmp_op->pixelformat != V4L2_PIX_FMT_P010 &&
+ pixmp_op->pixelformat != V4L2_PIX_FMT_QC10C)
+ pixmp_op->pixelformat = V4L2_PIX_FMT_P010;
+
switch (pixmp_op->pixelformat) {
case V4L2_PIX_FMT_P010:
pixmp_op->width = ALIGN(width, 128);
@@ -625,7 +634,12 @@ static void iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst)
inst->fw_caps[POC].value = subsc_params.pic_order_cnt;
inst->fw_caps[TIER].value = subsc_params.tier;
- if (subsc_params.bit_depth != BIT_DEPTH_8 ||
+ if (subsc_params.bit_depth == BIT_DEPTH_8)
+ inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_8;
+ else
+ inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_10;
+
+ if ((subsc_params.bit_depth != BIT_DEPTH_8 && subsc_params.bit_depth != BIT_DEPTH_10) ||
!(subsc_params.coded_frames & HFI_BITMASK_FRAME_MBS_ONLY_FLAG)) {
dev_err(core->dev, "unsupported content, bit depth: %x, pic_struct = %x\n",
subsc_params.bit_depth, subsc_params.coded_frames);
diff --git a/drivers/media/platform/qcom/iris/iris_instance.h b/drivers/media/platform/qcom/iris/iris_instance.h
index 16965150f427..16424d1e94a6 100644
--- a/drivers/media/platform/qcom/iris/iris_instance.h
+++ b/drivers/media/platform/qcom/iris/iris_instance.h
@@ -25,6 +25,8 @@ enum iris_fmt_type_out {
enum iris_fmt_type_cap {
IRIS_FMT_NV12,
IRIS_FMT_QC08C,
+ IRIS_FMT_TP10,
+ IRIS_FMT_QC10C,
};
struct iris_fmt {
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index 5da90d47f9c6..ceed4b5d96ca 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -56,9 +56,10 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
{
.cap_id = PROFILE_HEVC,
.min = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
- .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
+ .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,
.step_or_mask = BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN) |
- BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE),
+ BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) |
+ BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10),
.value = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
.hfi_id = HFI_PROP_PROFILE,
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
@@ -287,7 +288,7 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
{
.cap_id = BIT_DEPTH,
.min = BIT_DEPTH_8,
- .max = BIT_DEPTH_8,
+ .max = BIT_DEPTH_10,
.step_or_mask = 1,
.value = BIT_DEPTH_8,
.hfi_id = HFI_PROP_LUMA_CHROMA_BIT_DEPTH,
@@ -866,6 +867,7 @@ static const u32 sm8550_vdec_output_config_params[] = {
HFI_PROP_OPB_ENABLE,
HFI_PROP_COLOR_FORMAT,
HFI_PROP_LINEAR_STRIDE_SCANLINE,
+ HFI_PROP_UBWC_STRIDE_SCANLINE,
};
static const u32 sm8550_venc_output_config_params[] = {
diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c
index 55c4acf1aba3..3b18bb9bb71f 100644
--- a/drivers/media/platform/qcom/iris/iris_vdec.c
+++ b/drivers/media/platform/qcom/iris/iris_vdec.c
@@ -76,6 +76,14 @@ static const struct iris_fmt iris_vdec_formats_cap[] = {
.pixfmt = V4L2_PIX_FMT_QC08C,
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
},
+ [IRIS_FMT_TP10] = {
+ .pixfmt = V4L2_PIX_FMT_P010,
+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ },
+ [IRIS_FMT_QC10C] = {
+ .pixfmt = V4L2_PIX_FMT_QC10C,
+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ },
};
static const struct iris_fmt *
--
2.34.1
next prev parent reply other threads:[~2026-04-17 9:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 9:37 [PATCH v2 0/6] media: qcom: iris: add support for decoding 10bit formats Neil Armstrong
2026-04-17 9:37 ` [PATCH v2 1/6] media: qcom: iris: add helpers for 8bit and " Neil Armstrong
2026-04-22 9:19 ` Dikshita Agarwal
2026-04-17 9:37 ` [PATCH v2 2/6] media: qcom: iris: add QC10C & P010 buffer size calculations Neil Armstrong
2026-04-17 9:37 ` [PATCH v2 3/6] media: qcom: iris: gen2: add support for 10bit decoding Neil Armstrong
2026-04-22 9:13 ` Dikshita Agarwal
2026-04-22 13:43 ` Neil Armstrong
2026-04-30 7:38 ` Neil Armstrong
2026-04-17 9:37 ` [PATCH v2 4/6] media: qcom: iris: vdec: update size and stride calculations for 10bit formats Neil Armstrong
2026-04-17 9:37 ` [PATCH v2 5/6] media: qcom: iris: vdec: update find_format to handle 8bit and " Neil Armstrong
2026-04-17 9:37 ` Neil Armstrong [this message]
2026-04-17 9:59 ` [PATCH v2 0/6] media: qcom: iris: add support for decoding " Neil Armstrong
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=20260417-topic-sm8x50-iris-10bit-decoding-v2-6-c987b65a31d5@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--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