From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Subject: Re: [PATCH v7 04/18] media: iris: Filter UBWC raw formats based on hardware capabilities
Date: Fri, 17 Jul 2026 09:16:42 +0530 [thread overview]
Message-ID: <2ec138d8-242d-6d0a-0b87-cd6a65c7228c@oss.qualcomm.com> (raw)
In-Reply-To: <20260709-iris-ar50lt-v7-4-76af9dd4d1f6@oss.qualcomm.com>
On 7/9/2026 7:11 PM, Dmitry Baryshkov wrote:
> From: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
>
> The raw formats supported by Iris were previously advertised
> unconditionally, assuming UBWC support on all platforms. However, some
> platforms do not support UBWC which results in incorrect format
> capability exposure.
>
> Use the UBWC configuration provided by the platform to dynamically
> filter raw formats at runtime. If UBWC is not supported, UBWC-based
> formats are omitted from the advertised capability list, while linear
> formats remain available.
>
> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_vdec.c | 26 ++++++++++++++++++++++----
> drivers/media/platform/qcom/iris/iris_venc.c | 25 +++++++++++++++++++++----
> 2 files changed, 43 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c
> index 4c8bc7aac135..9fee5f28097d 100644
> --- a/drivers/media/platform/qcom/iris/iris_vdec.c
> +++ b/drivers/media/platform/qcom/iris/iris_vdec.c
> @@ -3,6 +3,7 @@
> * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> +#include <linux/soc/qcom/ubwc.h>
> #include <media/v4l2-event.h>
> #include <media/v4l2-mem2mem.h>
>
> @@ -69,8 +70,14 @@ static const u32 iris_vdec_formats_cap[] = {
> V4L2_PIX_FMT_QC10C,
> };
>
> +static const u32 iris_vdec_formats_noubwc_cap[] = {
> + V4L2_PIX_FMT_NV12,
> + V4L2_PIX_FMT_P010,
> +};
> +
> static bool check_format(struct iris_inst *inst, u32 pixfmt, u32 type)
> {
> + const struct qcom_ubwc_cfg_data *ubwc = inst->core->ubwc_cfg;
> unsigned int size, i;
> const u32 *fmt;
>
> @@ -80,8 +87,13 @@ static bool check_format(struct iris_inst *inst, u32 pixfmt, u32 type)
> size = inst->core->iris_platform_data->inst_iris_fmts_size;
> break;
> case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
> - fmt = iris_vdec_formats_cap;
> - size = ARRAY_SIZE(iris_vdec_formats_cap);
> + if (ubwc->ubwc_enc_version) {
> + fmt = iris_vdec_formats_cap;
> + size = ARRAY_SIZE(iris_vdec_formats_cap);
> + } else {
> + fmt = iris_vdec_formats_noubwc_cap;
> + size = ARRAY_SIZE(iris_vdec_formats_noubwc_cap);
> + }
> break;
> default:
> return false;
> @@ -110,6 +122,7 @@ static bool check_format(struct iris_inst *inst, u32 pixfmt, u32 type)
>
> static u32 find_format_by_index(struct iris_inst *inst, u32 index, u32 type)
> {
> + const struct qcom_ubwc_cfg_data *ubwc = inst->core->ubwc_cfg;
> unsigned int size;
> const u32 *fmt;
>
> @@ -119,8 +132,13 @@ static u32 find_format_by_index(struct iris_inst *inst, u32 index, u32 type)
> size = inst->core->iris_platform_data->inst_iris_fmts_size;
> break;
> case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
> - fmt = iris_vdec_formats_cap;
> - size = ARRAY_SIZE(iris_vdec_formats_cap);
> + if (ubwc->ubwc_enc_version) {
> + fmt = iris_vdec_formats_cap;
> + size = ARRAY_SIZE(iris_vdec_formats_cap);
> + } else {
> + fmt = iris_vdec_formats_noubwc_cap;
> + size = ARRAY_SIZE(iris_vdec_formats_noubwc_cap);
> + }
> break;
> default:
> return 0;
> diff --git a/drivers/media/platform/qcom/iris/iris_venc.c b/drivers/media/platform/qcom/iris/iris_venc.c
> index 16c52ad07e2c..2f2c56bf9122 100644
> --- a/drivers/media/platform/qcom/iris/iris_venc.c
> +++ b/drivers/media/platform/qcom/iris/iris_venc.c
> @@ -3,6 +3,7 @@
> * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> +#include <linux/soc/qcom/ubwc.h>
> #include <media/v4l2-event.h>
> #include <media/v4l2-mem2mem.h>
>
> @@ -89,15 +90,25 @@ static const u32 iris_venc_formats_out[] = {
> V4L2_PIX_FMT_QC08C,
> };
>
> +static const u32 iris_venc_formats_noubwc_out[] = {
> + V4L2_PIX_FMT_NV12,
> +};
> +
> static bool check_format(struct iris_inst *inst, u32 pixfmt, u32 type)
> {
> + const struct qcom_ubwc_cfg_data *ubwc = inst->core->ubwc_cfg;
> unsigned int size, i;
> const u32 *fmt;
>
> switch (type) {
> case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
> - fmt = iris_venc_formats_out;
> - size = ARRAY_SIZE(iris_venc_formats_out);
> + if (ubwc->ubwc_enc_version) {
> + fmt = iris_venc_formats_out;
> + size = ARRAY_SIZE(iris_venc_formats_out);
> + } else {
> + fmt = iris_venc_formats_noubwc_out;
> + size = ARRAY_SIZE(iris_venc_formats_noubwc_out);
> + }
> break;
> case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
> fmt = iris_venc_formats_cap;
> @@ -117,13 +128,19 @@ static bool check_format(struct iris_inst *inst, u32 pixfmt, u32 type)
>
> static u32 find_format_by_index(struct iris_inst *inst, u32 index, u32 type)
> {
> + const struct qcom_ubwc_cfg_data *ubwc = inst->core->ubwc_cfg;
> unsigned int size;
> const u32 *fmt;
>
> switch (type) {
> case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
> - fmt = iris_venc_formats_out;
> - size = ARRAY_SIZE(iris_venc_formats_out);
> + if (ubwc->ubwc_enc_version) {
> + fmt = iris_venc_formats_out;
> + size = ARRAY_SIZE(iris_venc_formats_out);
> + } else {
> + fmt = iris_venc_formats_noubwc_out;
> + size = ARRAY_SIZE(iris_venc_formats_noubwc_out);
> + }
> break;
> case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
> fmt = iris_venc_formats_cap;
Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
next prev parent reply other threads:[~2026-07-17 3:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 13:41 [PATCH v7 00/18] media: iris: Add AR50LT core support and enable Agatti platform Dmitry Baryshkov
2026-07-09 13:41 ` [PATCH v7 01/18] media: iris: Add Gen2 firmware autodetect and fallback Dmitry Baryshkov
2026-07-10 4:23 ` Vishnu Reddy
2026-07-21 13:49 ` Vikash Garodia
2026-07-21 22:15 ` Bryan O'Donoghue
2026-07-21 22:17 ` Dmitry Baryshkov
2026-07-09 13:41 ` [PATCH v7 02/18] media: iris: Skip UBWC configuration when not supported Dmitry Baryshkov
2026-07-09 13:41 ` [PATCH v7 03/18] media: iris: drop IRIS_FMT_foo enumeration Dmitry Baryshkov
2026-07-17 3:38 ` Vishnu Reddy
2026-07-09 13:41 ` [PATCH v7 04/18] media: iris: Filter UBWC raw formats based on hardware capabilities Dmitry Baryshkov
2026-07-17 3:46 ` Vishnu Reddy [this message]
2026-07-21 14:07 ` Vikash Garodia
2026-07-21 15:04 ` Dmitry Baryshkov
2026-07-21 16:23 ` Vikash Garodia
2026-07-21 22:16 ` Bryan O'Donoghue
2026-07-22 5:54 ` Vikash Garodia
2026-07-09 13:41 ` [PATCH v7 05/18] media: iris: Introduce set_preset_register as a vpu_op Dmitry Baryshkov
2026-07-09 13:41 ` [PATCH v7 06/18] media: iris: Introduce interrupt_init " Dmitry Baryshkov
2026-07-09 13:41 ` [PATCH v7 07/18] media: iris: add vpu op hook to disable ARP buffer Dmitry Baryshkov
2026-07-09 13:41 ` [PATCH v7 08/18] media: iris: Add platform data field for watchdog interrupt mask Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 09/18] media: iris: Add platform flag for instantaneous bandwidth voting Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 10/18] media: iris: skip PIPE if it is not supported by the platform Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 11/18] media: iris: Add framework support for AR50_LITE video core Dmitry Baryshkov
2026-07-10 10:25 ` Vikash Garodia
2026-07-17 4:30 ` Vishnu Reddy
2026-07-09 13:42 ` [PATCH v7 12/18] media: iris: add minimal GET_PROPERTY implementation Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 13/18] media: iris: update buffer requirements based on received info Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 14/18] media: iris: implement support for the Agatti platform Dmitry Baryshkov
2026-07-21 15:23 ` Vikash Garodia
2026-07-09 13:42 ` [PATCH v7 15/18] media: iris: Introduce buffer size calculations for AR50LT Dmitry Baryshkov
2026-07-21 15:30 ` Vikash Garodia
2026-07-21 20:30 ` Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 16/18] media: iris: add Gen2 firmware support on the Agatti platform Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 17/18] media: venus: skip QCM2290 if Iris driver is enabled Dmitry Baryshkov
2026-07-09 13:42 ` [PATCH v7 18/18] media: iris: constify inst_fw_cap_sm8250_dec 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=2ec138d8-242d-6d0a-0b87-cd6a65c7228c@oss.qualcomm.com \
--to=busanna.reddy@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=andersson@kernel.org \
--cc=bod@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@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=robh@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®