From nobody Thu Apr 2 15:37:42 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B7163A784E for ; Fri, 27 Mar 2026 20:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774642808; cv=none; b=MkU/yhFAm1gD7oEVD6V5p9EoXJ7LfkR1y/ygCQU7TQFD31pmoCESA4z++LmHk63RW7YTGGKKEB4vy9W/M/zfsWNwr1t0jl19QLZLETHKlYzjcInNPg0nuYFVBEcQwO/TA7YyQkk+JSg0mVP0GeAAlr7OSpVPJm4aZXOoou6QwnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774642808; c=relaxed/simple; bh=Sjkopt6DE1KjMmnlYS+KL4p1o+7A4uaEPfALTWUuNnQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=q35L9oPwuRJuruHOofqDcAKBcVG9ZfBRTOid2QxtmghMXo+2QfIw5B05RJhSinl7BHDrcvFoBdrqUrOSOpHXwdyRP7ayXt0NC3MCwVz9mvHnqigyZ+K2+O47F+0OoMx4sAB5kFbmmbw6sQbAzJuq8GXdWGyksv6XQuNK1b4hKTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hRYHpQTf; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=J78XIAkN; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hRYHpQTf"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="J78XIAkN" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62RI2RcE133569 for ; Fri, 27 Mar 2026 20:20:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= QKlKMp4CxZTt/vapbQeq8RXp1kuuPuBSN620uIJs00I=; b=hRYHpQTfWGrmGu78 3adgtOhIoL4Y9p8AHbSdejsVY2I8sGbMBZCh1i3mutLQKlA69Xpby/Mer+bM8+fw kq50jFphA7Oi4CDV61b1bfnrT0Z3CJ3J7YZpaUqBqA5My9WuCK0bCF0uSLVfUpkj N2JQ8+ly68OUNJXEYZvaaWxhLkErG99Jhb9ORLvJ7VppH2K6vurDFQZnMaIbX7sv ebenrYdsF16AG4wzPziI4j5tF6OQVfso6omQHfCzvkxXSMCuKUan8ymLM09ugDNF 9INkHbnkIYbL++XXsLM91t+mYDEw1wBd7tVXa7N7CG+6SJXxB4RHWb+HkmUhk4Y1 veVGnw== Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d5sxhhj8f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 27 Mar 2026 20:20:06 +0000 (GMT) Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-89a0a2afc55so80200646d6.0 for ; Fri, 27 Mar 2026 13:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1774642805; x=1775247605; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=QKlKMp4CxZTt/vapbQeq8RXp1kuuPuBSN620uIJs00I=; b=J78XIAkNHUkXFNz7ddW767vAsewgc3Q1/Mjn52U1GgRyQXJc7+oKubFXrq/BVPdwLi /Qx/6YdG579SQZlYIuF//gHEvRcH3KXiJv6+m0E/W8PgRpysk0R5iKpuBoYKOcvgzFOi /mfD2FIDzQe45YtDuA0+rgH+sPK+DLalrjBV45gTPW5ou/aRoabzCEBfXcljfCy7wEO7 DVwGTI7kjUFGvwyF5bhlowAKVyOcTgIusjSyRq+TneazAOF3OOjZSinef1pYadwhDREu EaeEObvogqmtZca7EuR9SF3Ks4MPFnik+hzrIi1njbWx/0NhegHzu1ZT0vS2DkkT8EGb cOww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774642805; x=1775247605; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=QKlKMp4CxZTt/vapbQeq8RXp1kuuPuBSN620uIJs00I=; b=IKU2V3+7X2s75luZj5/4s5+1ASpuu7ZUOUEFDiT4J3I8jinQizWJSs2C9me2btZ8aO fk2EzL0mW81C4zkrbdNbY/JauT0FL6MHC4L6lYVVn/pef+fwUukq7OGzsiEwuueS3+FW hlPFzGYuq0WLAH861Ktx0xjTLmfM5gJcWr4M4tWG0J+hEm8I39d325r6uGMyUgxGxi8M 0iL2SyMjZ2hoy+/gokxlGb4Rx3C+H/oSuBvdZOxDiAqf6n0K8RWWi0VIad0KWL123KC1 ubKhP4tQMwgrz9fGI2vCE31f8KfiVbP1asrA11BgEFmCp6ekc2Zte6bnJCaEPd7w0X3r Z7QA== X-Forwarded-Encrypted: i=1; AJvYcCXGs2Ni7XaOCLSEivXmjBiy1HXOrvBN+Ew7P02HR+Q3Z6adBs+yJbjiWrFNFBwgGrdpjvHPvN2Y0Lv51ec=@vger.kernel.org X-Gm-Message-State: AOJu0YyAotwgSkAI3otQ6EANPDGqKlhTFEIiSBArVmW+DuIIM0WXLbBL TcmEeEiQw3OxrBXV1gPqLZqeAlIczmEFqEa/oIUohOu1/Rs4+raNWJtCXHaxdkX5QFAGQflkSKM KWMGxV+QSZIZkehM/VLRPRi4Ng2ubULfX6BU1/dcaorF+csYZ5wqlZtbF3fqoBkfk/Ow= X-Gm-Gg: ATEYQzz+wA/4DNE1uhoWNulId9FRMHJq3bGcEYXG0+wsS916v9p/zubBX3GKrUCRbaw DAlsUGI+OfEZ/c6eeUIu/6XGlVCuhH6MXGrh0HktHVJfwHTsMH8SknW+/pKbChiVFUbPbUPCFtS Mhuw2E4L1q6egVttI5Abn7EoN5f2W4mYOVQE+wNeJsVJBuzaDzmapJpHliBVEBylVw4Kmka3r2p RMNQeki2dpWR/UJ/3vpdmn6ejbkqqF9Je5eRRwm+klXdbs5A5G/Qg1koQIRtuUlsuHHLFpXvBkw ZsgufUMS6NxR2j9Zj04qji6TYyqmp8gcJ6jnHSb/XdhZx2fgac347F3mOi+4VqvmVZjPgmusmLe rcj59yG02Yoh/KAIZKB1HnoXs73qpShWht6tTffhP2VcR4YB+tIQRWSUSolj+1+GekhRZeAQWfk M06X4ZEsIaWtSyWa7YpQwSGrPTTekbDWvXY0Q= X-Received: by 2002:ac8:5848:0:b0:50b:41b7:d6c2 with SMTP id d75a77b69052e-50ba39353a2mr51090451cf.47.1774642805328; Fri, 27 Mar 2026 13:20:05 -0700 (PDT) X-Received: by 2002:ac8:5848:0:b0:50b:41b7:d6c2 with SMTP id d75a77b69052e-50ba39353a2mr51089891cf.47.1774642804764; Fri, 27 Mar 2026 13:20:04 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38c838931acsm506581fa.19.2026.03.27.13.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 13:20:03 -0700 (PDT) From: Dmitry Baryshkov Date: Fri, 27 Mar 2026 22:19:56 +0200 Subject: [PATCH v5 4/4] media: qcom: venus: flip the venus/iris switch Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260327-venus-iris-flip-switch-v5-4-2f4b6c636927@oss.qualcomm.com> References: <20260327-venus-iris-flip-switch-v5-0-2f4b6c636927@oss.qualcomm.com> In-Reply-To: <20260327-venus-iris-flip-switch-v5-0-2f4b6c636927@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , cros-qcom-dts-watchers@chromium.org, Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.15.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5432; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=Sjkopt6DE1KjMmnlYS+KL4p1o+7A4uaEPfALTWUuNnQ=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBpxuZr5r6OVOXEdzWas4EPQjAiJUEbw3UkgCdwv DATYz18u6qJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCacbmawAKCRCLPIo+Aiko 1aIHB/0drkiE8COAyTwG3I6NtvLdH+wqx3VfHE525Wjy5OIjUKAZue4VLoohz4BpWNv9nEXuLW2 mFNJQY/yKcJLvosOAAeugg0FyV5PZLxnFSAsivsgISS0+pO0w34ga/8PHZsFHv8RIm3ekO70nda y0VI+i23F46mD7qrYlet/PxsEd1sEcXNSvBx8FAxGcx536iAq+htojrmIHeCElT3gt530j1dXUp um9+5CATUhwKCQRmkYcf9PxO1K2eBfOsesEFaKi1XcWxUZ3/2OtLssi9kINQKofgaW9uksMml4t mPuxykXCqeOeXMTXwGGG8A4RnAkHjzEIJOOVrZkRQzvmB9Ua X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Authority-Analysis: v=2.4 cv=QZVrf8bv c=1 sm=1 tr=0 ts=69c6e676 cx=c_pps a=oc9J++0uMp73DTRD5QyR2A==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=PTCOktDilvW4XOe9n6IA:9 a=QEXdDO2ut3YA:10 a=iYH6xdkBrDN1Jqds4HTS:22 X-Proofpoint-ORIG-GUID: lCHgfUYnK6M42UwUrrJ-ydGlIB9hGE9T X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI3MDE0MSBTYWx0ZWRfX1KdMgJNAIT3L ay6Aq2buDWSDJPjWxiwAkihWRlofFhylKG/KzE6wW74XvJPvdJCcIBKZ1BiNpqXO0nAsC7hzHqw K2+Uidgi+uaSt1WlYqxlwUJPV0/fDqwuDE1BlGYvgLaTW2OhbI7+34Wc93coA8cCjg8iXkHpcMp 1m4PgTFfqhLu4JpeTuf4Nc13HiH5m45+h2/mNV27JdIh8EGpJs4dzPeZpViyErdeO5wR5VpVQUo OF4TI6WRTFKNrdpwDtQ+LxAW/eiFJzpXwN33qV6AlyOw2SIjZvnx2kMmZ4Mtkmk2UffsN95V/vq PvxE9MxCVO+8z0gehDsAL4RRxe15gX/A1gDUGY7FWDKMiD+6fJaBTuP66prGNenW9gJuWoNu67R t3F3bk3VTXPqZVse8e5cEqwezzl/XrTyst2L/3ctviKomjp9Z6lEITMalDcgHtsSNXEaLz4XO9y Y+FPhToxGekMoT/newA== X-Proofpoint-GUID: lCHgfUYnK6M42UwUrrJ-ydGlIB9hGE9T X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-27_01,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 clxscore=1015 spamscore=0 adultscore=0 priorityscore=1501 impostorscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603270141 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. Reviewed-by: Konrad Dybcio Reviewed-by: Vikash Garodia Signed-off-by: Dmitry Baryshkov --- drivers/media/platform/qcom/iris/Makefile | 5 +---- drivers/media/platform/qcom/iris/iris_probe.c | 2 -- drivers/media/platform/qcom/venus/core.c | 6 ++++++ drivers/media/platform/qcom/venus/core.h | 11 +++++++++++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/plat= form/qcom/iris/Makefile index 2abbd3aeb4af..2fde45f81727 100644 --- a/drivers/media/platform/qcom/iris/Makefile +++ b/drivers/media/platform/qcom/iris/Makefile @@ -10,6 +10,7 @@ qcom-iris-objs +=3D 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 \ @@ -26,8 +27,4 @@ qcom-iris-objs +=3D iris_buffer.o \ iris_vpu_buffer.o \ iris_vpu_common.o \ =20 -ifeq ($(CONFIG_VIDEO_QCOM_VENUS),) -qcom-iris-objs +=3D iris_platform_gen1.o -endif - obj-$(CONFIG_VIDEO_QCOM_IRIS) +=3D qcom-iris.o diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index ddaacda523ec..7b612ad37e4f 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -352,7 +352,6 @@ static const struct of_device_id iris_dt_match[] =3D { .compatible =3D "qcom,qcs8300-iris", .data =3D &qcs8300_data, }, -#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS)) { .compatible =3D "qcom,sc7280-venus", .data =3D &sc7280_data, @@ -361,7 +360,6 @@ static const struct of_device_id iris_dt_match[] =3D { .compatible =3D "qcom,sm8250-venus", .data =3D &sm8250_data, }, -#endif { .compatible =3D "qcom,sm8550-iris", .data =3D &sm8550_data, diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platf= orm/qcom/venus/core.c index 7e639760c41d..45ce57406a4e 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 =3D { .enc_nodename =3D "video-encoder", }; =20 +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS)) static const struct freq_tbl sm8250_freq_table[] =3D { { 0, 444000000 }, { 0, 366000000 }, @@ -1069,6 +1070,7 @@ static const struct venus_resources sc7280_res =3D { .dec_nodename =3D "video-decoder", .enc_nodename =3D "video-encoder", }; +#endif =20 static const struct bw_tbl qcm2290_bw_table_dec[] =3D { { 352800, 597000, 0, 746000, 0 }, /* 1080p@30 + 720p@30 */ @@ -1125,11 +1127,15 @@ static const struct of_device_id venus_dt_match[] = =3D { { .compatible =3D "qcom,msm8998-venus", .data =3D &msm8998_res, }, { .compatible =3D "qcom,qcm2290-venus", .data =3D &qcm2290_res, }, { .compatible =3D "qcom,sc7180-venus", .data =3D &sc7180_res, }, +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS)) { .compatible =3D "qcom,sc7280-venus", .data =3D &sc7280_res, }, +#endif { .compatible =3D "qcom,sdm660-venus", .data =3D &sdm660_res, }, { .compatible =3D "qcom,sdm845-venus", .data =3D &sdm845_res, }, { .compatible =3D "qcom,sdm845-venus-v2", .data =3D &sdm845_res_v2, }, +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS)) { .compatible =3D "qcom,sm8250-venus", .data =3D &sm8250_res, }, +#endif { } }; MODULE_DEVICE_TABLE(of, venus_dt_match); diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platf= orm/qcom/venus/core.h index 7506f5d0f609..c7acacaa53b8 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 }; =20 struct firmware_version { @@ -525,13 +527,22 @@ struct venus_inst { #define IS_V1(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_1XX) #define IS_V3(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_3XX) #define IS_V4(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_4XX) +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS)) #define IS_V6(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_6XX) +#else +#define IS_V6(core) (0) +#endif =20 #define IS_AR50(core) ((core)->res->vpu_version =3D=3D VPU_VERSION_AR50) #define IS_AR50_LITE(core) ((core)->res->vpu_version =3D=3D VPU_VERSION_AR= 50_LITE) #define IS_IRIS1(core) ((core)->res->vpu_version =3D=3D VPU_VERSION_IRIS1) +#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS)) #define IS_IRIS2(core) ((core)->res->vpu_version =3D=3D VPU_VERSION_IRIS2) #define IS_IRIS2_1(core) ((core)->res->vpu_version =3D=3D VPU_VERSION_IRIS= 2_1) +#else +#define IS_IRIS2(core) (0) +#define IS_IRIS2_1(core) (0) +#endif =20 static inline bool is_lite(struct venus_core *core) { --=20 2.47.3