From nobody Fri Apr 3 06:26:51 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 ED33739185C for ; Fri, 13 Mar 2026 13:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773408029; cv=none; b=hBbCydPMnEVUraq/7Amd9TwTH7PQIizhz8le4nZGjVbgGjAlSFKdjWms3Cmbm9e7/4kG8175G1OC0ZgerSAycAegXyHTEQX6ZOIPgKc6sOhByH6K67g4zKxB6lxdCsZSQ/cQGCWkSp9nXJfUvUcQQTJR3JTTgkl71bSMPrMLc2A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773408029; c=relaxed/simple; bh=wWAWxa+zvQUMOm9MC7nJeUbKuYl5szXsHWj4/y4OmFE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lmxK1IDLkyKVj6uFoPLhZn0v0ZmfTKUIcf/O5DRgc/+0Fzp2I+d/KneVqjBDEgEmkQl7vkZ5to2qR5N8342Ff7SX2HDXD+eojBWJikIbFzQZgKRDWIWSJTLPi4zj+WIqtMaVlarF9A/N+dBf+hNFGqV8MxaKAPeUXaqZHgrJ86c= 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=NVLgfB0Q; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=f/h423pr; arc=none smtp.client-ip=205.220.180.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="NVLgfB0Q"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="f/h423pr" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62D9B5Fm3906306 for ; Fri, 13 Mar 2026 13:20:27 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= 78U34vjJm32V0mthUVg9KTTl0e12pM8pLb615+vj5PU=; b=NVLgfB0Ql0Ov2eIR TH1I4+IGiCTNTDjm3qtFsJ95ZNLjOassi8nrABjUSaXkvWKoYpv9jxBnfoo/rjaX v1CorF80A73hZ648GaHtVPEwPV6t3EG0w3AjZa1uaNCKiKG+Hw3owUQZIBAO2nF8 PXgXgPS8gnPtCyEzwMnKOyT0iOwZo+30zzWMPq3X8XV8IrTPORyvq0AFSkE3eqKc 4jhE9m0nswq4jjuuQ5BWQqVZ1PGVbr20KXDM8afTDTkTY0lWT73c0aiKLTEeWXVm uO7kfu6fj8onAha6oVCpzWzxLAMiVUCsOO4L6IBt73DsjDPPuVGZI0nex/tDd1Dc 0dorkQ== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cvfqs8sc9-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Mar 2026 13:20:26 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-829fd367abfso1158732b3a.2 for ; Fri, 13 Mar 2026 06:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773408024; x=1774012824; 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=78U34vjJm32V0mthUVg9KTTl0e12pM8pLb615+vj5PU=; b=f/h423prek+zuRZSE57mpRPLGjn4zf3aJ5+Y8X/NMD4kQXiUvG5xjqOVB7UuzRg49w tbtU0+H8XrFzhsS81kOSCfX4mHPtbvUDW+HJ8DdIf56E4rcGy8TSdAGOXkTIaksrAV/l rCbICnze6ajMdmp4l3PrMAPOscC9KwZrIfVR1m5lPyLf4F0i0InEucCR5GVCzsnz2hSk G0MDIsLvTP508scn4NzIhfGjTV9NnmkQcj7kAE9jkaPO8r5Azrbxqx4m72BK3Nis/sav OPquXlKKRwHgfTiAD3/vwl3gCaIhkQFaOrIFbYgkB6kcjOt7U64otX/vPqwp9+k6iE5K UGOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773408024; x=1774012824; 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=78U34vjJm32V0mthUVg9KTTl0e12pM8pLb615+vj5PU=; b=anZwnCOB7mvuD1sPZvcEFJdFXZnIHieVJfEd1mNdUGWzH7611azFHnbFa4b14k3uHF bfHz/qlmtiHmbTJMU2sPsXW0LVwiKflt4AO2fXDgbyQHIhPfZkj9b6P1XkOgwYwVs3XF vdzmsWtYVNubHpiBw713kfvt+wQtVe/tNcRTji/YA+r5k+rjQFhH/6CUxUISseeTpllv r1PELXZyGaR2PtP1IkxOhYVgM9CKoE9gGFlKwEb+S98aS9t5V3462o6DQyD84StrX3Ok m66eKG3P4eXlKyZtss8GnaJ8cCimhNMp1nz6c/Ume2sUdyDKVgwv5LXJrPxcYAIimtUM 9j+w== X-Forwarded-Encrypted: i=1; AJvYcCUSdfE0awTzQ/eN7CCFgntK8wwL1Ig94IVHDmz+Huh2qb18g1O4ZZ9dr49zppgo7UojTkss18/Bf0yRG4w=@vger.kernel.org X-Gm-Message-State: AOJu0YzOnhoW60gMyzNdEAQQDEpLXl2dny2kmbmY0HXrYs6OoeajP3+/ poS0jS2cI2T1vgTczJiRoXIWJMxLJ60gjZzsjxj0ZA5t8JEcNCKWLIMpZlRGVCaSHaUQwBMv+fw bLNYaj2i7I1gTdI1aG1RJGrD6nVb0zZ7ZCReve3DehMoZZqnAM8OUvc/ZRbcYZsR42G4= X-Gm-Gg: ATEYQzycpnk+7ROOqJXaaTCQ8uRGM4gdJCNJJ5IqO27ZmyN6YCa4cao2inJF/rhewhG 8xAbLv65uSITzqYIhmM3hs3DoUHj2/M8tNL7Pld4F3ki0SH6OoR8Yv0HjjHt+dTxKTzfaMn+ZYS +w/oM+lm5YLtbCHQY/3ZZmJK3WzjlPPD9QoXisU9rdZCecw7P0TM0SLeWOek2Hn1dGj6BjKwMjx ESivZMhqq3FvENKgTWDhTm26o/vFjp/qqdzs9idra5egC/TAYEU8bt4ruSmfK97TyXVZgoQLyDk h7jR1gt8opMS1TU8FklNrA5/v23kRVSR5oDYHNP2pW6DhE8zsIAvWKu2ElMaI2i5yxr85axX15i Oom0yD0bJS5YYJ/9z8r1w2BvH9KG7SYzQI8eYh7oIGw0fj7g68mPXDuQ3 X-Received: by 2002:a05:6a00:368b:b0:829:9ea2:3e17 with SMTP id d2e1a72fcca58-82a19703e4fmr2544382b3a.9.1773408024079; Fri, 13 Mar 2026 06:20:24 -0700 (PDT) X-Received: by 2002:a05:6a00:368b:b0:829:9ea2:3e17 with SMTP id d2e1a72fcca58-82a19703e4fmr2544326b3a.9.1773408023414; Fri, 13 Mar 2026 06:20:23 -0700 (PDT) Received: from hu-vgarodia-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82a0724407csm5775254b3a.8.2026.03.13.06.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 06:20:23 -0700 (PDT) From: Vikash Garodia Date: Fri, 13 Mar 2026 18:49:37 +0530 Subject: [PATCH v3 3/7] media: iris: add iris vpu bus support and register it with iommu_buses 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: <20260313-kaanapali-iris-v3-3-9c0d1a67af4b@oss.qualcomm.com> References: <20260313-kaanapali-iris-v3-0-9c0d1a67af4b@oss.qualcomm.com> In-Reply-To: <20260313-kaanapali-iris-v3-0-9c0d1a67af4b@oss.qualcomm.com> To: Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov , Conor Dooley , Saravana Kannan , Joerg Roedel , Will Deacon , Robin Murphy , Stefan Schmidt , Hans Verkuil , Krzysztof Kozlowski , Vishnu Reddy , Hans Verkuil Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Bryan O'Donoghue , Vikash Garodia X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1773407994; l=4125; i=vikash.garodia@oss.qualcomm.com; s=20241104; h=from:subject:message-id; bh=wWAWxa+zvQUMOm9MC7nJeUbKuYl5szXsHWj4/y4OmFE=; b=SqUxLVUKMivw1MUUvqwiRt9NY5AHMtKwGvn4xnwnuMUqvHBHdJ41Zo0Qsq4ulv48Pk/4VS7lp DFGja+GF+9aAQ5ru7BE3cxRxbhi56F34zFu5U0ozbzSgbSTFsEJA/l4 X-Developer-Key: i=vikash.garodia@oss.qualcomm.com; a=ed25519; pk=LY9Eqp4KiHWxzGNKGHbwRFEJOfRCSzG/rxQNmvZvaKE= X-Proofpoint-ORIG-GUID: Q_lEN8-A4tyqV69TSWvRlhR2lHHNETc3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEzMDEwNiBTYWx0ZWRfX2fDmyb7yMKMY fPxfZFlCnhJFrZNU0mjYOR1zOOLa8oWdANXjbJpZWDdq8nCWDR6LWlEq79uwa75ISsfVT5ckUBW 7SDpLXYikfbdJh5vcAAj/2SHJoPJfaACO2SpxXELnuicr4x+LytrDav3D2AwlKHdm2MfTMAYfhx 9GiQdSSSvadAGMb0HpIKwuN1cI482LrRwAWutR9mHxShwZyrJAt8tT1Rx3HitpZNsO1dxlylyEE JyqDOgaBgslpUTJuZTW6DXEMonOJyisLch425UjVKaGPAmYCK9OUw6DC85U80PLaVJK2yUXcBrP 4ElbSuCJQ481l7WM5I3v6+v2sH4ytB3JxGj5vtyNJuNVPJQsUcTPcZgBkckyvymlt3cihOPj/hB xyTJe533tDFWzaHuCRKf05+/u7MhXf8xqEFMcMBRPXt57iYm5hZZuJsV0QS1XtNiCXE/cKV2QlP j0vTvLtam8oALP3VQBg== X-Proofpoint-GUID: Q_lEN8-A4tyqV69TSWvRlhR2lHHNETc3 X-Authority-Analysis: v=2.4 cv=GoNPO01C c=1 sm=1 tr=0 ts=69b40f1a cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=rA3BtQNSaToOiFj8iVsA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 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-13_02,2026-03-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 phishscore=0 clxscore=1015 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603130106 Add iris vpu bus support and hooks the new bus into the iommu_buses list. Iris devices need their own bus so that they can run their own dma_configure() logic. Co-developed-by: Vishnu Reddy Signed-off-by: Vishnu Reddy Signed-off-by: Vikash Garodia --- drivers/iommu/iommu.c | 4 +++ drivers/media/platform/qcom/iris/Makefile | 4 +++ .../platform/qcom/iris/iris_platform_common.h | 6 ++++ drivers/media/platform/qcom/iris/iris_vpu_bus.c | 32 ++++++++++++++++++= ++++ include/linux/iris_vpu_bus.h | 13 +++++++++ 5 files changed, 59 insertions(+) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 35db5178095404fec87cd0f18e44ea97cf354e78..fd5fb7c10da22ab548d359ca1f4= 4504acc3d646c 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -178,6 +179,9 @@ static const struct bus_type * const iommu_buses[] =3D { #ifdef CONFIG_CDX_BUS &cdx_bus_type, #endif +#if IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS) + &iris_vpu_bus_type, +#endif }; =20 /* diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/plat= form/qcom/iris/Makefile index 2abbd3aeb4af07e52bf372a4b2f352463529c92c..6f4052b98491aeddc299669334d= 4c93e9a3420e4 100644 --- a/drivers/media/platform/qcom/iris/Makefile +++ b/drivers/media/platform/qcom/iris/Makefile @@ -31,3 +31,7 @@ qcom-iris-objs +=3D iris_platform_gen1.o endif =20 obj-$(CONFIG_VIDEO_QCOM_IRIS) +=3D qcom-iris.o + +ifdef CONFIG_VIDEO_QCOM_IRIS +obj-y +=3D iris_vpu_bus.o +endif diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 5a489917580eb10022fdcb52f7321a915e8b239d..2273243d1a80446233dd82dcd77= 444aa043ad064 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -204,6 +204,12 @@ struct icc_vote_data { u32 fps; }; =20 +struct iris_context_bank { + char *name; + u32 f_id; + u32 region_mask; +}; + enum platform_pm_domain_type { IRIS_CTRL_POWER_DOMAIN, IRIS_HW_POWER_DOMAIN, diff --git a/drivers/media/platform/qcom/iris/iris_vpu_bus.c b/drivers/medi= a/platform/qcom/iris/iris_vpu_bus.c new file mode 100644 index 0000000000000000000000000000000000000000..9e9fdeb6e405aab26ecf5e57ca9= 1fca6b8eda2c5 --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_vpu_bus.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include + +#include "iris_platform_common.h" + +static int iris_vpu_bus_dma_configure(struct device *dev) +{ + struct iris_context_bank *cb =3D dev_get_drvdata(dev); + + if (!cb) + return -ENODEV; + + return of_dma_configure_id(dev, dev->parent->of_node, true, &cb->f_id); +} + +const struct bus_type iris_vpu_bus_type =3D { + .name =3D "iris-bus", + .dma_configure =3D iris_vpu_bus_dma_configure, +}; +EXPORT_SYMBOL_GPL(iris_vpu_bus_type); + +static int __init iris_vpu_bus_init(void) +{ + return bus_register(&iris_vpu_bus_type); +} + +postcore_initcall(iris_vpu_bus_init); diff --git a/include/linux/iris_vpu_bus.h b/include/linux/iris_vpu_bus.h new file mode 100644 index 0000000000000000000000000000000000000000..422898cdf2f62eb7f4583d970a0= 1c8776dd12164 --- /dev/null +++ b/include/linux/iris_vpu_bus.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only + * + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef __IRIS_VPU_BUS_H__ +#define __IRIS_VPU_BUS_H__ + +#if IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS) +extern const struct bus_type iris_vpu_bus_type; +#endif + +#endif /* __IRIS_VPU_BUS_H__ */ --=20 2.34.1