[PATCH] media: qcom: venus: flip the venus/iris switch

Dmitry Baryshkov posted 1 patch 1 week, 5 days ago
drivers/media/platform/qcom/iris/Makefile        |  5 +----
drivers/media/platform/qcom/iris/iris_probe.c    |  2 --
drivers/media/platform/qcom/venus/Makefile       |  5 ++++-
drivers/media/platform/qcom/venus/core.c         |  6 ++++++
drivers/media/platform/qcom/venus/core.h         | 11 +++++++++++
drivers/media/platform/qcom/venus/helpers.c      |  7 ++++++-
drivers/media/platform/qcom/venus/hfi_helper.h   | 11 +++++++++++
drivers/media/platform/qcom/venus/hfi_platform.c |  2 ++
drivers/media/platform/qcom/venus/hfi_platform.h |  2 ++
drivers/media/platform/qcom/venus/pm_helpers.c   |  3 +++
drivers/media/platform/qcom/venus/venc.c         |  3 +--
11 files changed, 47 insertions(+), 10 deletions(-)
[PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Dmitry Baryshkov 1 week, 5 days ago
With the Iris and Venus driver having more or less feature parity for
"HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
switch. Use Iris by default for SM8250 and SC7280, the platforms which
are supported by both drivers, and use Venus only if Iris is not
compiled at all. Use IS_ENABLED to strip out the code and data
structures which are used by the disabled platforms.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Note: then intention is to land this in 6.20, which might let us to
start dropping those platforms from the Venus driver in 6.21+.
---
 drivers/media/platform/qcom/iris/Makefile        |  5 +----
 drivers/media/platform/qcom/iris/iris_probe.c    |  2 --
 drivers/media/platform/qcom/venus/Makefile       |  5 ++++-
 drivers/media/platform/qcom/venus/core.c         |  6 ++++++
 drivers/media/platform/qcom/venus/core.h         | 11 +++++++++++
 drivers/media/platform/qcom/venus/helpers.c      |  7 ++++++-
 drivers/media/platform/qcom/venus/hfi_helper.h   | 11 +++++++++++
 drivers/media/platform/qcom/venus/hfi_platform.c |  2 ++
 drivers/media/platform/qcom/venus/hfi_platform.h |  2 ++
 drivers/media/platform/qcom/venus/pm_helpers.c   |  3 +++
 drivers/media/platform/qcom/venus/venc.c         |  3 +--
 11 files changed, 47 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/platform/qcom/iris/Makefile
index fad3be044e5fe783db697a592b4f09de4d42d0d2..ce360c67846b1243dd9245972672591076bfdee2 100644
--- a/drivers/media/platform/qcom/iris/Makefile
+++ b/drivers/media/platform/qcom/iris/Makefile
@@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \
              iris_hfi_gen2_packet.o \
              iris_hfi_gen2_response.o \
              iris_hfi_queue.o \
+             iris_platform_gen1.o \
              iris_platform_gen2.o \
              iris_power.o \
              iris_probe.o \
@@ -25,8 +26,4 @@ qcom-iris-objs += iris_buffer.o \
              iris_vpu_buffer.o \
              iris_vpu_common.o \
 
-ifeq ($(CONFIG_VIDEO_QCOM_VENUS),)
-qcom-iris-objs += iris_platform_gen1.o
-endif
-
 obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o
diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
index 9bc9b34c2576581635fa8d87eed1965657eb3eb3..0d5f37e51558ed1207554b3a3841096d8699c755 100644
--- a/drivers/media/platform/qcom/iris/iris_probe.c
+++ b/drivers/media/platform/qcom/iris/iris_probe.c
@@ -356,7 +356,6 @@ static const struct of_device_id iris_dt_match[] = {
 		.compatible = "qcom,qcs8300-iris",
 		.data = &qcs8300_data,
 	},
-#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS))
 	{
 		.compatible = "qcom,sc7280-venus",
 		.data = &sc7280_data,
@@ -365,7 +364,6 @@ static const struct of_device_id iris_dt_match[] = {
 		.compatible = "qcom,sm8250-venus",
 		.data = &sm8250_data,
 	},
-#endif
 	{
 		.compatible = "qcom,sm8550-iris",
 		.data = &sm8550_data,
diff --git a/drivers/media/platform/qcom/venus/Makefile b/drivers/media/platform/qcom/venus/Makefile
index 91ee6be10292e0c275106f090f521f268da4c50a..60a3f948adbfaa4c6c91abdbbbe050f0bd724c9c 100644
--- a/drivers/media/platform/qcom/venus/Makefile
+++ b/drivers/media/platform/qcom/venus/Makefile
@@ -5,7 +5,10 @@ venus-core-objs += core.o helpers.o firmware.o \
 		   hfi_venus.o hfi_msgs.o hfi_cmds.o hfi.o \
 		   hfi_parser.o pm_helpers.o dbgfs.o \
 		   hfi_platform.o hfi_platform_v4.o \
-		   hfi_platform_v6.o hfi_plat_bufs_v6.o \
+
+ifeq ($(CONFIG_VIDEO_QCOM_IRIS),)
+venus-core-objs += hfi_platform_v6.o hfi_plat_bufs_v6.o
+endif
 
 venus-dec-objs += vdec.o vdec_ctrls.o
 venus-enc-objs += venc.o venc_ctrls.o
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 24d2b2fd0340b55ed1aa329f49ded449dc466f14..646dae3407b4d13454eedd8e926f16e7470d5d3d 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -949,6 +949,7 @@ static const struct venus_resources sc7180_res = {
 	.enc_nodename = "video-encoder",
 };
 
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 static const struct freq_tbl sm8250_freq_table[] = {
 	{ 0, 444000000 },
 	{ 0, 366000000 },
@@ -1069,6 +1070,7 @@ static const struct venus_resources sc7280_res = {
 	.dec_nodename = "video-decoder",
 	.enc_nodename = "video-encoder",
 };
+#endif
 
 static const struct bw_tbl qcm2290_bw_table_dec[] = {
 	{ 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */
@@ -1125,11 +1127,15 @@ static const struct of_device_id venus_dt_match[] = {
 	{ .compatible = "qcom,msm8998-venus", .data = &msm8998_res, },
 	{ .compatible = "qcom,qcm2290-venus", .data = &qcm2290_res, },
 	{ .compatible = "qcom,sc7180-venus", .data = &sc7180_res, },
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 	{ .compatible = "qcom,sc7280-venus", .data = &sc7280_res, },
+#endif
 	{ .compatible = "qcom,sdm660-venus", .data = &sdm660_res, },
 	{ .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
 	{ .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 	{ .compatible = "qcom,sm8250-venus", .data = &sm8250_res, },
+#endif
 	{ }
 };
 MODULE_DEVICE_TABLE(of, venus_dt_match);
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 7506f5d0f609ac8984ab90ba207e64750df8a9ec..c7acacaa53b880c66b11bba2cca8d625b4f8fb9d 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -54,8 +54,10 @@ enum vpu_version {
 	VPU_VERSION_AR50,
 	VPU_VERSION_AR50_LITE,
 	VPU_VERSION_IRIS1,
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 	VPU_VERSION_IRIS2,
 	VPU_VERSION_IRIS2_1,
+#endif
 };
 
 struct firmware_version {
@@ -525,13 +527,22 @@ struct venus_inst {
 #define IS_V1(core)	((core)->res->hfi_version == HFI_VERSION_1XX)
 #define IS_V3(core)	((core)->res->hfi_version == HFI_VERSION_3XX)
 #define IS_V4(core)	((core)->res->hfi_version == HFI_VERSION_4XX)
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 #define IS_V6(core)	((core)->res->hfi_version == HFI_VERSION_6XX)
+#else
+#define IS_V6(core)	(0)
+#endif
 
 #define IS_AR50(core)		((core)->res->vpu_version == VPU_VERSION_AR50)
 #define IS_AR50_LITE(core)	((core)->res->vpu_version == VPU_VERSION_AR50_LITE)
 #define IS_IRIS1(core)		((core)->res->vpu_version == VPU_VERSION_IRIS1)
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 #define IS_IRIS2(core)		((core)->res->vpu_version == VPU_VERSION_IRIS2)
 #define IS_IRIS2_1(core)	((core)->res->vpu_version == VPU_VERSION_IRIS2_1)
+#else
+#define IS_IRIS2(core)		(0)
+#define IS_IRIS2_1(core)	(0)
+#endif
 
 static inline bool is_lite(struct venus_core *core)
 {
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 2e4363f8223171b497e6326877d37c5075735a30..f44f382f7d8dfbe71014c0b167b686e18616ffe2 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -329,6 +329,7 @@ static const unsigned int intbuf_types_4xx[] = {
 	HFI_BUFFER_INTERNAL_PERSIST_1,
 };
 
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 static const unsigned int intbuf_types_6xx[] = {
 	HFI_BUFFER_INTERNAL_SCRATCH(HFI_VERSION_6XX),
 	HFI_BUFFER_INTERNAL_SCRATCH_1(HFI_VERSION_6XX),
@@ -336,6 +337,7 @@ static const unsigned int intbuf_types_6xx[] = {
 	HFI_BUFFER_INTERNAL_PERSIST,
 	HFI_BUFFER_INTERNAL_PERSIST_1,
 };
+#endif
 
 int venus_helper_intbufs_alloc(struct venus_inst *inst)
 {
@@ -343,10 +345,13 @@ int venus_helper_intbufs_alloc(struct venus_inst *inst)
 	size_t arr_sz, i;
 	int ret;
 
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 	if (IS_V6(inst->core)) {
 		arr_sz = ARRAY_SIZE(intbuf_types_6xx);
 		intbuf = intbuf_types_6xx;
-	} else if (IS_V4(inst->core)) {
+	} else
+#endif
+	if (IS_V4(inst->core)) {
 		arr_sz = ARRAY_SIZE(intbuf_types_4xx);
 		intbuf = intbuf_types_4xx;
 	} else {
diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h
index f44059f19505a0b33e582f8c6c0723bf7f6ce30b..6157aa79f80aa8eb3c7f33c7dc87739cec632a74 100644
--- a/drivers/media/platform/qcom/venus/hfi_helper.h
+++ b/drivers/media/platform/qcom/venus/hfi_helper.h
@@ -395,6 +395,7 @@
 #define HFI_BUFFER_OUTPUT2			0x3
 #define HFI_BUFFER_INTERNAL_PERSIST		0x4
 #define HFI_BUFFER_INTERNAL_PERSIST_1		0x5
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 #define HFI_BUFFER_INTERNAL_SCRATCH(ver)	\
 	(((ver) == HFI_VERSION_4XX ||		\
 	(ver) == HFI_VERSION_6XX) ? 0x6 : 0x1000001)
@@ -404,6 +405,14 @@
 #define HFI_BUFFER_INTERNAL_SCRATCH_2(ver)	\
 	(((ver) == HFI_VERSION_4XX ||		\
 	(ver) == HFI_VERSION_6XX) ? 0x8 : 0x1000006)
+#else
+#define HFI_BUFFER_INTERNAL_SCRATCH(ver)	\
+	((ver) == HFI_VERSION_4XX ? 0x6 : 0x1000001)
+#define HFI_BUFFER_INTERNAL_SCRATCH_1(ver)	\
+	((ver) == HFI_VERSION_4XX ? 0x7 : 0x1000005)
+#define HFI_BUFFER_INTERNAL_SCRATCH_2(ver)	\
+	((ver) == HFI_VERSION_4XX ? 0x8 : 0x1000006)
+#endif
 #define HFI_BUFFER_EXTRADATA_INPUT(ver)		\
 	(((ver) == HFI_VERSION_4XX) ? 0xc : 0x1000002)
 #define HFI_BUFFER_EXTRADATA_OUTPUT(ver)	\
@@ -560,7 +569,9 @@ enum hfi_version {
 	HFI_VERSION_1XX,
 	HFI_VERSION_3XX,
 	HFI_VERSION_4XX,
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 	HFI_VERSION_6XX,
+#endif
 };
 
 struct hfi_buffer_info {
diff --git a/drivers/media/platform/qcom/venus/hfi_platform.c b/drivers/media/platform/qcom/venus/hfi_platform.c
index cde7f93045ac4567bf4239eeb3c489b887d4ad01..fa4262a5cd284a3f123b564ff71bf460942d1790 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform.c
+++ b/drivers/media/platform/qcom/venus/hfi_platform.c
@@ -11,8 +11,10 @@ const struct hfi_platform *hfi_platform_get(enum hfi_version version)
 	switch (version) {
 	case HFI_VERSION_4XX:
 		return &hfi_plat_v4;
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 	case HFI_VERSION_6XX:
 		return &hfi_plat_v6;
+#endif
 	default:
 		break;
 	}
diff --git a/drivers/media/platform/qcom/venus/hfi_platform.h b/drivers/media/platform/qcom/venus/hfi_platform.h
index 5e4f8013a6b1db4f4f83cd983ef9e83347ef4e0a..164ef5a892fbdce6c6d2833e8d2ab3b03c5193a8 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform.h
+++ b/drivers/media/platform/qcom/venus/hfi_platform.h
@@ -62,7 +62,9 @@ struct hfi_platform {
 };
 
 extern const struct hfi_platform hfi_plat_v4;
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 extern const struct hfi_platform hfi_plat_v6;
+#endif
 
 const struct hfi_platform *hfi_platform_get(enum hfi_version version);
 unsigned long hfi_platform_get_codec_vpp_freq(struct venus_core *core,
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c
index f0269524ac70eb72384a06aa6a215e2046abf5c2..62b2ae661a365941dfe8987f1c0733189a6d4de9 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.c
+++ b/drivers/media/platform/qcom/venus/pm_helpers.c
@@ -1188,8 +1188,11 @@ const struct venus_pm_ops *venus_pm_get(enum hfi_version version)
 	case HFI_VERSION_3XX:
 		return &pm_ops_v3;
 	case HFI_VERSION_4XX:
+		return &pm_ops_v4;
+#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
 	case HFI_VERSION_6XX:
 		return &pm_ops_v4;
+#endif
 	}
 
 	return NULL;
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index b478b982a80daec54554e46f7c582a6f9b68e352..164152257bdee17b6dceef07a0df8ed2df15bd31 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -898,8 +898,7 @@ static int venc_set_properties(struct venus_inst *inst)
 	if (ret)
 		return ret;
 
-	if (inst->core->res->hfi_version == HFI_VERSION_4XX ||
-	    inst->core->res->hfi_version == HFI_VERSION_6XX) {
+	if (IS_V4(inst->core) || IS_V6(inst->core)) {
 		ptype = HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE_V2;
 
 		if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_HEVC) {

---
base-commit: b179ce312bafcb8c68dc718e015aee79b7939ff0
change-id: 20251119-venus-iris-flip-switch-d59a3fbc6a4b

Best regards,
-- 
With best wishes
Dmitry
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Vikash Garodia 4 days, 14 hours ago
On 11/19/2025 8:48 PM, Dmitry Baryshkov wrote:
> With the Iris and Venus driver having more or less feature parity for
> "HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
> switch. Use Iris by default for SM8250 and SC7280, the platforms which
> are supported by both drivers, and use Venus only if Iris is not
> compiled at all. 

Good to see platforms moving to iris.

> Use IS_ENABLED to strip out the code and data
> structures which are used by the disabled platforms.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> Note: then intention is to land this in 6.20, which might let us to
> start dropping those platforms from the Venus driver in 6.21+.
> ---
>   drivers/media/platform/qcom/iris/Makefile        |  5 +----
>   drivers/media/platform/qcom/iris/iris_probe.c    |  2 --
>   drivers/media/platform/qcom/venus/Makefile       |  5 ++++-
>   drivers/media/platform/qcom/venus/core.c         |  6 ++++++
>   drivers/media/platform/qcom/venus/core.h         | 11 +++++++++++
>   drivers/media/platform/qcom/venus/helpers.c      |  7 ++++++-
>   drivers/media/platform/qcom/venus/hfi_helper.h   | 11 +++++++++++
>   drivers/media/platform/qcom/venus/hfi_platform.c |  2 ++
>   drivers/media/platform/qcom/venus/hfi_platform.h |  2 ++
>   drivers/media/platform/qcom/venus/pm_helpers.c   |  3 +++
>   drivers/media/platform/qcom/venus/venc.c         |  3 +--
>   11 files changed, 47 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/platform/qcom/iris/Makefile
> index fad3be044e5fe783db697a592b4f09de4d42d0d2..ce360c67846b1243dd9245972672591076bfdee2 100644
> --- a/drivers/media/platform/qcom/iris/Makefile
> +++ b/drivers/media/platform/qcom/iris/Makefile
> @@ -10,6 +10,7 @@ qcom-iris-objs += iris_buffer.o \
>                iris_hfi_gen2_packet.o \
>                iris_hfi_gen2_response.o \
>                iris_hfi_queue.o \
> +             iris_platform_gen1.o \
>                iris_platform_gen2.o \
>                iris_power.o \
>                iris_probe.o \
> @@ -25,8 +26,4 @@ qcom-iris-objs += iris_buffer.o \
>                iris_vpu_buffer.o \
>                iris_vpu_common.o \
>   
> -ifeq ($(CONFIG_VIDEO_QCOM_VENUS),)
> -qcom-iris-objs += iris_platform_gen1.o
> -endif
> -
>   obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o
> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> index 9bc9b34c2576581635fa8d87eed1965657eb3eb3..0d5f37e51558ed1207554b3a3841096d8699c755 100644
> --- a/drivers/media/platform/qcom/iris/iris_probe.c
> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> @@ -356,7 +356,6 @@ static const struct of_device_id iris_dt_match[] = {
>   		.compatible = "qcom,qcs8300-iris",
>   		.data = &qcs8300_data,
>   	},
> -#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS))
>   	{
>   		.compatible = "qcom,sc7280-venus",
>   		.data = &sc7280_data,
> @@ -365,7 +364,6 @@ static const struct of_device_id iris_dt_match[] = {
>   		.compatible = "qcom,sm8250-venus",
>   		.data = &sm8250_data,
>   	},
> -#endif
>   	{
>   		.compatible = "qcom,sm8550-iris",
>   		.data = &sm8550_data,
> diff --git a/drivers/media/platform/qcom/venus/Makefile b/drivers/media/platform/qcom/venus/Makefile
> index 91ee6be10292e0c275106f090f521f268da4c50a..60a3f948adbfaa4c6c91abdbbbe050f0bd724c9c 100644
> --- a/drivers/media/platform/qcom/venus/Makefile
> +++ b/drivers/media/platform/qcom/venus/Makefile
> @@ -5,7 +5,10 @@ venus-core-objs += core.o helpers.o firmware.o \
>   		   hfi_venus.o hfi_msgs.o hfi_cmds.o hfi.o \
>   		   hfi_parser.o pm_helpers.o dbgfs.o \
>   		   hfi_platform.o hfi_platform_v4.o \
> -		   hfi_platform_v6.o hfi_plat_bufs_v6.o \
> +
> +ifeq ($(CONFIG_VIDEO_QCOM_IRIS),)
> +venus-core-objs += hfi_platform_v6.o hfi_plat_bufs_v6.o
> +endif
>   
>   venus-dec-objs += vdec.o vdec_ctrls.o
>   venus-enc-objs += venc.o venc_ctrls.o
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 24d2b2fd0340b55ed1aa329f49ded449dc466f14..646dae3407b4d13454eedd8e926f16e7470d5d3d 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -949,6 +949,7 @@ static const struct venus_resources sc7180_res = {
>   	.enc_nodename = "video-encoder",
>   };
>   
> +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
>   static const struct freq_tbl sm8250_freq_table[] = {
>   	{ 0, 444000000 },
>   	{ 0, 366000000 },
> @@ -1069,6 +1070,7 @@ static const struct venus_resources sc7280_res = {
>   	.dec_nodename = "video-decoder",
>   	.enc_nodename = "video-encoder",
>   };
> +#endif

There are configs check all over the venus driver, like the one above. 
Can we do this with keeping _only_ the compat under config check ? And 
if needed to keep it inline with iris code, we can keep the makefile change.

Regards,
Vikash
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Stephan Gerhold 1 week, 3 days ago
On Wed, Nov 19, 2025 at 05:18:18PM +0200, Dmitry Baryshkov wrote:
> With the Iris and Venus driver having more or less feature parity for
> "HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
> switch. Use Iris by default for SM8250 and SC7280, the platforms which
> are supported by both drivers, and use Venus only if Iris is not
> compiled at all. Use IS_ENABLED to strip out the code and data
> structures which are used by the disabled platforms.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

I think this will break the ChromeOS SC7280 platform, because the new
Iris driver does not (yet) support the non-PAS/TZ startup sequence.
Given that this is a dead (never released) platform, it probably does
not make sense blocking the switch from Venus to Iris, but it should be
made clear in the commit message at least. And perhaps the affected DTs
should be changed to disable Venus/Iris then.

It would be easy to add support for the non-PAS/TZ startup sequence in
the Iris driver. The changes exist already [1], they are just stuck on
the never ending discussion about how to model the additional
video-firmware IOMMU entry in the DT for newer platforms [2]. Perhaps
the existing legacy usage in SC7280 would be enough precedent to land
this patch as-is, although I don't have access to any SC7280-based board
for testing.

Thanks,
Stephan

[1]: https://git.codelinaro.org/stephan.gerhold/linux/-/commit/14db4bfae9279a0e69a0a9d2ccdd684658916431
[2]: https://lore.kernel.org/r/20250823155349.22344-2-krzysztof.kozlowski@linaro.org/
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Dmitry Baryshkov 1 week, 3 days ago
On Fri, Nov 21, 2025 at 02:22:46PM +0100, Stephan Gerhold wrote:
> On Wed, Nov 19, 2025 at 05:18:18PM +0200, Dmitry Baryshkov wrote:
> > With the Iris and Venus driver having more or less feature parity for
> > "HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
> > switch. Use Iris by default for SM8250 and SC7280, the platforms which
> > are supported by both drivers, and use Venus only if Iris is not
> > compiled at all. Use IS_ENABLED to strip out the code and data
> > structures which are used by the disabled platforms.
> > 
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> 
> I think this will break the ChromeOS SC7280 platform, because the new
> Iris driver does not (yet) support the non-PAS/TZ startup sequence.
> Given that this is a dead (never released) platform, it probably does
> not make sense blocking the switch from Venus to Iris, but it should be
> made clear in the commit message at least. And perhaps the affected DTs
> should be changed to disable Venus/Iris then.

Indeed, I totally forgot about SC7280 ChromeOS here.

> 
> It would be easy to add support for the non-PAS/TZ startup sequence in
> the Iris driver. The changes exist already [1], they are just stuck on
> the never ending discussion about how to model the additional
> video-firmware IOMMU entry in the DT for newer platforms [2]. Perhaps
> the existing legacy usage in SC7280 would be enough precedent to land
> this patch as-is, although I don't have access to any SC7280-based board
> for testing.

I think that for current platforms, which don't have that ABI defined,
we should use the upcoming iommu-maps, once the rework lands. We should
even be able to define it in the base DTSI, making sure that this entry
is ignored if TZ / PAS is available.

> 
> Thanks,
> Stephan
> 
> [1]: https://git.codelinaro.org/stephan.gerhold/linux/-/commit/14db4bfae9279a0e69a0a9d2ccdd684658916431
> [2]: https://lore.kernel.org/r/20250823155349.22344-2-krzysztof.kozlowski@linaro.org/

-- 
With best wishes
Dmitry
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Bryan O'Donoghue 1 week, 4 days ago
On 19/11/2025 15:18, Dmitry Baryshkov wrote:
> With the Iris and Venus driver having more or less feature parity for
> "HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
> switch. Use Iris by default for SM8250 and SC7280, the platforms which
> are supported by both drivers, and use Venus only if Iris is not
> compiled at all. Use IS_ENABLED to strip out the code and data
> structures which are used by the disabled platforms.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> Note: then intention is to land this in 6.20, which might let us to
> start dropping those platforms from the Venus driver in 6.21+.
In principal this seems fine. I think we should have a metrics as 
opposed to vibes based criteria for the drop though i.e. an analysis of 
encoder/decoder features supported and test comparators to show either 
nop or benefit from the switch.

---
bod
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Dmitry Baryshkov 1 week, 3 days ago
On Thu, Nov 20, 2025 at 09:58:18AM +0000, Bryan O'Donoghue wrote:
> On 19/11/2025 15:18, Dmitry Baryshkov wrote:
> > With the Iris and Venus driver having more or less feature parity for
> > "HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
> > switch. Use Iris by default for SM8250 and SC7280, the platforms which
> > are supported by both drivers, and use Venus only if Iris is not
> > compiled at all. Use IS_ENABLED to strip out the code and data
> > structures which are used by the disabled platforms.
> > 
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > Note: then intention is to land this in 6.20, which might let us to
> > start dropping those platforms from the Venus driver in 6.21+.
> In principal this seems fine. I think we should have a metrics as opposed to
> vibes based criteria for the drop though i.e. an analysis of encoder/decoder
> features supported and test comparators to show either nop or benefit from
> the switch.

Agreed

-- 
With best wishes
Dmitry
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Jorge Ramirez 1 week, 4 days ago
On 20/11/25 09:58:18, Bryan O'Donoghue wrote:
> On 19/11/2025 15:18, Dmitry Baryshkov wrote:
> > With the Iris and Venus driver having more or less feature parity for
> > "HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
> > switch. Use Iris by default for SM8250 and SC7280, the platforms which
> > are supported by both drivers, and use Venus only if Iris is not
> > compiled at all. Use IS_ENABLED to strip out the code and data
> > structures which are used by the disabled platforms.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > Note: then intention is to land this in 6.20, which might let us to
> > start dropping those platforms from the Venus driver in 6.21+.
> In principal this seems fine. I think we should have a metrics as opposed to
> vibes based criteria for the drop though i.e. an analysis of encoder/decoder
> features supported and test comparators to show either nop or benefit from
> the switch.

why not just revalidate using the same set of tests used for the particular
platform to be replaced ?

ie, when AR50_LITE support is moved to Iris, perhaps just re-run the tests
detailed in the commit:  https://lwn.net/Articles/1033022/
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Bryan O'Donoghue 1 week, 4 days ago
On 20/11/2025 09:58, Bryan O'Donoghue wrote:
> In principal

*principle

learn to type english plz

---
bod
Re: [PATCH] media: qcom: venus: flip the venus/iris switch
Posted by Konrad Dybcio 1 week, 4 days ago
On 11/19/25 4:18 PM, Dmitry Baryshkov wrote:
> With the Iris and Venus driver having more or less feature parity for
> "HFI 6xx" platforms and with Iris gaining support for SC7280, flip the
> switch. Use Iris by default for SM8250 and SC7280, the platforms which
> are supported by both drivers, and use Venus only if Iris is not
> compiled at all. Use IS_ENABLED to strip out the code and data
> structures which are used by the disabled platforms.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> Note: then intention is to land this in 6.20, which might let us to
> start dropping those platforms from the Venus driver in 6.21+.
> ---

[...]

>  MODULE_DEVICE_TABLE(of, venus_dt_match);
> diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
> index 7506f5d0f609ac8984ab90ba207e64750df8a9ec..c7acacaa53b880c66b11bba2cca8d625b4f8fb9d 100644
> --- a/drivers/media/platform/qcom/venus/core.h
> +++ b/drivers/media/platform/qcom/venus/core.h
> @@ -54,8 +54,10 @@ enum vpu_version {
>  	VPU_VERSION_AR50,
>  	VPU_VERSION_AR50_LITE,
>  	VPU_VERSION_IRIS1,
> +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
>  	VPU_VERSION_IRIS2,
>  	VPU_VERSION_IRIS2_1,
> +#endif

This feels a little overkill, but your changes look good

Konrad