From nobody Fri Jun 12 11:31:18 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 A058C47D933 for ; Fri, 15 May 2026 11:23:33 +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=1778844215; cv=none; b=HV/7BJWvaRohR+Onx21bn47IlL7ZoGaouGqHxn2xdNnY8z6dyJJvxH1JK4ybnyA8tHaI5/TXBhBxe/u71dQrlUiiGZ0MOczV/Y9u6+ZWrG9ZT1P0Gzt5WI3jbIVkaAHgDZtvdra0KrNvGd2Qrz48Tv6Uu677SNqYBGFbqyCXp9o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844215; c=relaxed/simple; bh=j0MWzPvgoLPGw6n8S8L+DpK+l56gsLOdQ6ijqkKlcaA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lF0O+N0uyx43CzSvHzNFezNNyjfGIsIQuaATUMX5OOyZF3rTdOKHwNwz+3tSIderLBAnhnL/uNbDW1k7Fq7gIItIQ19vPH4082AgSpxo8nBN8d8eoZC0gT6EiiAYuJ2oe5ZpDDJ3MnwE9S5EP4atCQEJfwce+h2wryFf0P/OnTM= 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=DE1yCxuz; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=IysSYmDx; 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="DE1yCxuz"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="IysSYmDx" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FBKHBg4008231 for ; Fri, 15 May 2026 11:23:32 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= HLJq5uY1ZDp7/ijaCB204uGa/x909UxX1syJvDVWjDE=; b=DE1yCxuzCQlmubmL V3AtreGvA5kmrCbctl4ONQd4Hv99zpbZdPhqDHAHzE7wWUOXpo6Mk4x3OttiUnox dOwt2riXsdhnFEKCIagHez2OfQWmbWzzHfM4JcNrvhjuNu9szp26eTrzByqtecwT Q+gCN0J/xeGpUBEXBXewdbszX+6lo6iBf4VT7XS1V4ymn+lup6l8hgTgIne2zErL 8Oe7BqUQB91wp8KWA26cHyp1q1BNG/pcOY21jZqo5wsXgaYP6mp87TkdekxS/lRL Z4WANSVf+DZlE4KgBOolQ+Cu25kV+eIWeZdOGEkLdfqjfT8JiY5tavhuh1XrP1v5 rBqhSQ== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1su1g5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:23:32 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-367f715cbd0so6128520a91.0 for ; Fri, 15 May 2026 04:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844212; x=1779449012; 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=HLJq5uY1ZDp7/ijaCB204uGa/x909UxX1syJvDVWjDE=; b=IysSYmDxUblNc2KKGwCTFlFkyunuKJ/WEVo+DyYWwEYuU2weCZbLL9jQflbMllMD3r NDhkMGuK0dQoHyQJNXBAoJNPEFsmzXc28UfrLiZghXV969F3nFkvQiLJm6biMsiQSqS/ KHRwGg7vVaxXMNEwJNTcQ83yjsuPknoLC/+nugEPWjedgOc8tHDaLvtfqZThx/zKiJyv 9Qhb+F4hY9cP0EJVV+aTJq8Rk0PGBteGfw7ZgCHs28BWnATvcuoj0YlPKlwHXdRWCKIX w3K61dpvNvgTTydpjBgD3q1k8CBvEpVNTRSMlQt5KdhRzq97nSWFPB6ig7Zfjj9kjFMW F+dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844212; x=1779449012; 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=HLJq5uY1ZDp7/ijaCB204uGa/x909UxX1syJvDVWjDE=; b=RCXCmjbh9kVDIZEvWKML7+LtbufVoa97BkapWSCQjfe8wT6STCU8qBWpATRe2xetFC yknwBsJRgbUvmZ42fb57LmAC+rG9Dq09gsu7BKzNb0RMxZ0J5PSgTIxeeNYao4A69bBD kHttmIKgQrtadHpfegXGzD3A7s5hq7EOUEIrWXvuhHbX/hy/cluXsob2lOpSSk4h/0vh GH48fGiaP5IulFa39p2zmIQyPf7aZB0CveCEr/JN07ub7xENiqjwo4j09Gqa294fe/nQ K6g5EJoQFju+7WUE47dOQF8KzqcmOmEaHrf65R5cASrwW52GC3xsLexYl8kP1utRGZvH 7NMQ== X-Gm-Message-State: AOJu0YxjQwsjyVDkwllF6UeO7hFds6+FQv6oRvDQdspbO5xm77VMmD22 tU0lanGBmsBK3ZINzNdNYk4NjhJ8sJRE/E00Fg8d5IZc55SrwlxQkLfc2h7EdQgjRpe8qG3te5o Nduhqdx7bV+UkHppjcHHFesmmUusNQhg4jDhjfbpwHnfTDuKMWTnYCdMY8Ritp/28x2w= X-Gm-Gg: Acq92OGzVtup6hsQ/OfGtXHyvzGa6wCocxqIjCnrELGhN5qx3oeGTK+IaQX073xlm5V DI4sVdfoXiVeGEkg+PPzaNO3Whdyj4z8YniUMPOd6q8o4Sj9OjwRNmPkMA9BllGIE56mkhOzRPo zCBUc46ybXBUgc0+TdusLtQsvsVp7SDliH2MYSF6zqmi9NG325wsa4QMTi55Jw7PkRJGVPb62na Z3tAZbSbrq9lpQ9JfstLqH8y6CTjYQErqm5d5FE3MgCJJrbkVVAamvA+kSq4YGNDZrae+E+9wfD puzjLTkS8mI2fsky6v4HaaTQjInPGQV1B+Aak5DS29y9wpVE3ZpnEMK1+qKeMCrhZL8vkGqkuIb Oi/JbsJ2D01H9gn5dbYskymPUtCYuZzTsh8WoKP3QNtPq2NeU6p9w+HI= X-Received: by 2002:a17:90b:1f8c:b0:35e:3103:d4d8 with SMTP id 98e67ed59e1d1-369518b2048mr3565600a91.6.1778844211642; Fri, 15 May 2026 04:23:31 -0700 (PDT) X-Received: by 2002:a17:90b:1f8c:b0:35e:3103:d4d8 with SMTP id 98e67ed59e1d1-369518b2048mr3565574a91.6.1778844211141; Fri, 15 May 2026 04:23:31 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:23:30 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:16 +0530 Subject: [PATCH v6 01/14] media: iris: Add iris vpu bus support 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: <20260515-glymur-v6-1-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=5399; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=3STlk6tvEix+1H4qQRvpao3EQf0zCnIXrlwAJ17Tn1k=; b=i0pFyI/Xy2g3DshYTpkqE43Hm9w2B0URHMhKQCpyXlASJB5XLVb03c9Wv48D4C7dl75y83XIj YrGBuu+ZQt4B80BO6lFqEekM9fhjrybhqCUEmyv7XrCUx/ih/YU3Hbh X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: THjvSbq5eAy3pk47XsEugvM8nla6f4mr X-Proofpoint-GUID: THjvSbq5eAy3pk47XsEugvM8nla6f4mr X-Authority-Analysis: v=2.4 cv=cZPiaHDM c=1 sm=1 tr=0 ts=6a070234 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=6cGehGV22KE80QuxIsQA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX7SRsPb5M4jC+ zp9oQBUAIwm1brxMbMokBP35U4Gb+ASreVIBPqIfstFg6ozKjel8A1A7+E89Nr9vHkzJda0u4Ki yWGK662rmVJuMNdlwgYBJ7ePvsxyDqKFRa8X+XhzQ11Ipjn+6fmWQ4a2EbLxOA+DpC/B8R9SPMR lMQ9hWwDlzGudXUzl8NjmRpZ4f6m7FnN5WiKkIV/FOkT8OHQQ1zBMpxaieLi9nP/ZxK/Ct0b9CC K8ZdBsgblNFJce8RPgi7gEUOpRX4lKcYcDpUZKe0mSDjNF66TX/Uas6dQUbzPn4++J8eq8P9SAc 9WS8v0lQaoxC5ocF8Q13eBBJOB8WNafP64ePE8e9W/aAT3NA/1ss/GgnNYwt59ks41XuNGJYpMk HcJTehu1MQiMgS00YzSLXvy2yfoW9kjQHpeq1vXnn9tsWWo24brkoQ+JDwV8CKnyQtS2Qyszbf+ OUNvPrvxi14/0Dv3z9w== 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 priorityscore=1501 adultscore=0 suspectscore=0 malwarescore=0 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 From: Vikash Garodia On glymur platform, firmware loading needs a separate IOMMU mapping with its own stream ID. This stream ID is defined in the device tree with the associated firmware function ID in the iommu-map property. To create this mapping, a separate child device is needed so the firmware memory can be isolated in its own IOMMU context. Introduced a new bus called iris-vpu-bus. This creates a dynamic device, and its dma_configure() callback calls of_dma_configure_id() with the function ID provided by the client to map the corresponding stream ID. This sets up a dedicated IOMMU context for the child device. Reviewed-by: Vishnu Reddy Signed-off-by: Vikash Garodia Signed-off-by: Vishnu Reddy Reviewed-by: Dmitry Baryshkov --- MAINTAINERS | 1 + drivers/media/platform/qcom/iris/Kconfig | 4 ++ drivers/media/platform/qcom/iris/Makefile | 1 + drivers/media/platform/qcom/iris/iris_vpu_bus.c | 61 +++++++++++++++++++++= ++++ include/linux/iris_vpu_bus.h | 25 ++++++++++ 5 files changed, 92 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 63389fea5d15..c53d94d7b153 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22017,6 +22017,7 @@ L: linux-arm-msm@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/media/qcom,*-iris.yaml F: drivers/media/platform/qcom/iris/ +F: include/linux/iris_vpu_bus.h =20 QUALCOMM NAND CONTROLLER DRIVER M: Manivannan Sadhasivam diff --git a/drivers/media/platform/qcom/iris/Kconfig b/drivers/media/platf= orm/qcom/iris/Kconfig index af78a1775937..76c9fcd253df 100644 --- a/drivers/media/platform/qcom/iris/Kconfig +++ b/drivers/media/platform/qcom/iris/Kconfig @@ -1,3 +1,6 @@ +config QCOM_IRIS_VPU_BUS + bool + config VIDEO_QCOM_IRIS tristate "Qualcomm iris V4L2 decoder driver" depends on VIDEO_DEV @@ -5,6 +8,7 @@ config VIDEO_QCOM_IRIS select V4L2_MEM2MEM_DEV select QCOM_MDT_LOADER select QCOM_SCM + select QCOM_IRIS_VPU_BUS select QCOM_UBWC_CONFIG select VIDEOBUF2_DMA_CONTIG help diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/plat= form/qcom/iris/Makefile index 48e415cbc439..6deadd531c8e 100644 --- a/drivers/media/platform/qcom/iris/Makefile +++ b/drivers/media/platform/qcom/iris/Makefile @@ -30,3 +30,4 @@ qcom-iris-objs +=3D iris_buffer.o \ iris_vpu_common.o \ =20 obj-$(CONFIG_VIDEO_QCOM_IRIS) +=3D qcom-iris.o +obj-$(CONFIG_QCOM_IRIS_VPU_BUS) +=3D iris_vpu_bus.o 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 000000000000..e3327b227332 --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_vpu_bus.c @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include +#include + +static int iris_vpu_bus_dma_configure(struct device *dev) +{ + const u32 *iommu_fid =3D (const u32 *)dev_get_platdata(dev); + + return of_dma_configure_id(dev, dev->parent->of_node, true, iommu_fid); +} + +const struct bus_type iris_vpu_bus_type =3D { + .name =3D "iris-vpu-bus", + .dma_configure =3D iris_vpu_bus_dma_configure, +}; +EXPORT_SYMBOL_GPL(iris_vpu_bus_type); + +static void iris_vpu_bus_release_device(struct device *dev) +{ + kfree(dev); +} + +struct device *iris_vpu_bus_create_device(struct device *parent_device, co= nst char *name, + u64 dma_mask, const u32 *iommu_fid) +{ + struct device *dev; + int ret; + + dev =3D kzalloc_obj(*dev); + if (!dev) + return ERR_PTR(-ENOMEM); + + dev->release =3D iris_vpu_bus_release_device; + dev->bus =3D &iris_vpu_bus_type; + dev->parent =3D parent_device; + dev->coherent_dma_mask =3D dma_mask; + dev->dma_mask =3D &dev->coherent_dma_mask; + dev->platform_data =3D (void *)iommu_fid; + dev_set_name(dev, "%s", name); + + ret =3D device_register(dev); + if (ret) { + put_device(dev); + return ERR_PTR(ret); + } + + return dev; +} +EXPORT_SYMBOL_GPL(iris_vpu_bus_create_device); + +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 000000000000..62af9ee7e288 --- /dev/null +++ b/include/linux/iris_vpu_bus.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef _LINUX_IRIS_VPU_BUS_H +#define _LINUX_IRIS_VPU_BUS_H + +#include + +#ifdef CONFIG_QCOM_IRIS_VPU_BUS +extern const struct bus_type iris_vpu_bus_type; + +struct device *iris_vpu_bus_create_device(struct device *parent_device, co= nst char *name, + u64 dma_mask, const u32 *iommu_fid); +#else +static inline struct device *iris_vpu_bus_create_device(struct device *par= ent_device, + const char *name, u64 dma_mask, + const u32 *iommu_fid) +{ + return ERR_PTR(-ENODEV); +} +#endif + +#endif /* _LINUX_IRIS_VPU_BUS_H */ --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 DC29847D927 for ; Fri, 15 May 2026 11:23:39 +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=1778844221; cv=none; b=peRN7xM9slkh8fCPedkC5bkHTxcO0ec4tZTnK+zhc+xXBNM0nwqB/RxUxiosoltNAzHZupB+DFdgzFyS8ryrNyqoQh5MH8+LULkzNN3SqP6OEcEj1EJdpBSd3xPIiTjWyw7M5YS2OSatQZuVCktVOY3lS4rJbD7c3uSOTS9hShE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844221; c=relaxed/simple; bh=R4hyx2wkdaEzOFeos/VVceiifZ41pzNik6VeXo4D/4c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fyIz7Vp9yA0IdiS59dq4LSbTsaGzJ9V6sh4uc4tRRWla2zokjYGsNe9kLfK5pCMy/peTmMGy+edr7oNrHcbjbVOImv1bbcLr389IZ/6IyQh0eX6Y0Kfpnh/DN0lq+Lk78JYdXhCEdkBE9agoU5TECTTvXyMV29y+gUOkhMvk2v4= 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=ZH6r/4P/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JLO9LLeP; 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="ZH6r/4P/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JLO9LLeP" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FB1qgK3670906 for ; Fri, 15 May 2026 11:23:39 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= KJAZYj78iKXwM75l/HDp+1jydtLEC0dNPj7aNSYgj0o=; b=ZH6r/4P/bjfihWKc MWvcPuD3B8tBa1R0q1RbSZQfNbO71WlEUb7+LlWA1NB4Uj+Ei3K0zu6B0SzNZ3RC XY6CCujcEv6Vk6gL6ThGZ1qK6ExE13ZKdD8ljdm2ElJ+okYoeEU3+JfFPj0LghC4 Tk/J9EvkavnoiP21apqjS+VWijHKIQVy3494l46PzjaVB4N2+zduvI59FRCUVAZa PhByS9XHmVX1I3QWFtViIXYrdCppNIBXBaVUxpYl4yfk1dvJhRdqkD8msJRLmVnl J6dgdUCPfXlMUkf9F1agxNCJbCB3FM/RZbULEbv+ey/lpIoKxDkeJYPDiXYdIHE9 C13O1g== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1s332r-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:23:39 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3663d5e9bf4so8810111a91.1 for ; Fri, 15 May 2026 04:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844218; x=1779449018; 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=KJAZYj78iKXwM75l/HDp+1jydtLEC0dNPj7aNSYgj0o=; b=JLO9LLePbC2H1wuFgU8p2bNoNtUe316v4P+HQZCgB8y6ScM9PlEqcpdX6w0fq2YzFK mrngxa27CxlgxCMRPuobxSDtfZie2iC7ze3L0daL/av2zqmWkzgqs7S/4C9A98kIivNU dbLJOcmwrqXik+++5vI3LJIHwSuEQ26928CfwTjMGK3Y7oJ9I4vUNTYnYBwa2k0LWmt8 54qQFmuaR+kj3j59Z6xyZs4xExFssMpjEaI6P3k22oL6zT0/81lY9IQ74FMRpCPqtBmm IKSsT4eUnft70pUfvBtgTcxWx5YPJanuzSuIIJzHNbk6qKodgsqebU8bjRxRGjvlmKKv VFdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844218; x=1779449018; 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=KJAZYj78iKXwM75l/HDp+1jydtLEC0dNPj7aNSYgj0o=; b=geojiW3WcA6O1bF939iNm+1Cb4x+CQsxUZG+qEP/UGKEjJbmajB875DO4iJLthwYI3 d4WCotE3q5rcoengoY9WPgOlTwANOkQ3/niM5rgmsFTB2Il5ZbHM3gLR+XKkJ/OyXVLp gBAVZjfir+dSZ9GOdubqwdOFBJ2mOCzb/engFa6QAyznWab54OHfpUIiEG9Z2x4HHAp7 7s856PzJ/ThLOUENGpguycaGB8RV/PtmXU6wQ0s0UrUuUR34gVEY3IDKCm44EzEJWbJW p5TX8OYWsE3GWnPpQzBv2gC0T4suhlHgKzcC4Z0EASM4IYLU7pssNOGbeTb6yob/JHLE rspQ== X-Gm-Message-State: AOJu0Yzsc3IUhL3MQFZeT4Qcocr3z4dfMMLmy8R5jEpCtcdqeb7o2fbc MPWdNndq4PmtbZeLpCWhTHOzeHe/98GOsxodYdm3e5+EzGMMSSSeHpy+WdCZN/XpgiFkKcDnzwf r2Pmt3HtkBWicNfZvl5iAWzFT5FePoNTz8fjae1qpem+d/MqU1c0SybHTeO4mMz4ZuqQ= X-Gm-Gg: Acq92OFCsINeloWH3YPDuqx8O8Ygr85SQzBD5YFBkvmQtUOUjJXHLBQ0EitrQDjsWRo iB+sUMJdpQQ3vAFFH8ejddQn5iz/neZpd9irOZFEUvr7N3wfyPl4FDhkjTP2wKivtyY3b8paHu5 X+qT28hQDTzAcxK9treTLNFDYh4wj4Pgku2CwVLPbDLvzcwE9LIIZbSMMhGWtadqZH4xNPUrIYI xLx1tMaAokqmhmiRI31AZ3kqiufWM5TqBTuOD4Ga/wmi1Vy52eseEMcTCtm629F7mfaJXXEg0S7 gYj/Q+FJyoflrBuyP5nrln/Em9aWsziBOpsxzVB5cJUkP+xOGpkCxabSJykbL8YNsZBsnTHBoHI PT52myQ1RGrEk+F0CcMZ4ymheO5fDtJ/v4Sb7VekmfJBoYBR5uNTuL2Y= X-Received: by 2002:a17:90b:5290:b0:35c:30a8:32a with SMTP id 98e67ed59e1d1-369519ffc97mr3758485a91.9.1778844218287; Fri, 15 May 2026 04:23:38 -0700 (PDT) X-Received: by 2002:a17:90b:5290:b0:35c:30a8:32a with SMTP id 98e67ed59e1d1-369519ffc97mr3758423a91.9.1778844217830; Fri, 15 May 2026 04:23:37 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:23:37 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:17 +0530 Subject: [PATCH v6 02/14] iommu: Add iris-vpu-bus to 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: <20260515-glymur-v6-2-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy , Dmitry Baryshkov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=1090; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=nwLCkv3OjAFGS6jwKQhLZrEXe26RmaJcgKrBgwUePzE=; b=7o6m1C3GzJF7wYxJqXejGuZGgG9YRn2+c6vLHEyNya/et9avgtj9sj4z21cH9Kwy0U+ClNAwo nWMlX1NqLtBBKhO+bHZJ27Ti0SI3s3mRZ7sHQBp2smRB9uo90nuNlRu X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX41qn6r5n47mF NVFzrRkLQJcWwcV5Y7UzXQi0V0Anu3PWatypMqyG7jBW3QbNh2Sk8Qty92Iaei3DCXoIqKvRLY1 9KtBv41qfRNDrvLa17hnOAXoweAa/IuOuVymSRO1N60KEecUX9DnLDwgJ6oWLSFx6Z1qn8KBytG 31Mu4aT9zDU911mDLrRW6UZ2mZC0b9QEPJnDFI8r18D347onjFV24gdS5PNzVcwtQOOUd4GsRWG U+j23csGe2N/kJHfweLFbcpUBFx38xLDwmaAYaWZev/dJPgJBVOaUVHaOC4qX2znf1XYaYXRnUw w+Fk/RblYoZT3SarRsCm4AmyuFeaRCzl1n/T+XaTkWoYEFzoDyXoSxPnfJ9/pnFYykOwhxYY+OD 1nMq90PTAopUUmQ6W2N4whpMg61m6TZXDEht+/dOCtNeZE1KLzPWMZdSVuh8+6El5NH7taGM2X+ /MCy9DfqVFWckyHq+nQ== X-Authority-Analysis: v=2.4 cv=Md5cfZ/f c=1 sm=1 tr=0 ts=6a07023b cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=ZGoT60Gb6PEvP4nDRaMA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: V8d8RHXuYqayhnDqapT_3rfAiHc9RzQ_ X-Proofpoint-ORIG-GUID: V8d8RHXuYqayhnDqapT_3rfAiHc9RzQ_ 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 From: Vikash Garodia Add iris_vpu_bus_type to the iommu_buses array in the core IOMMU subsystem so that the bus notifier callbacks are registered for device addition and removal events. Reviewed-by: Vishnu Reddy Reviewed-by: Dmitry Baryshkov Signed-off-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/iommu/iommu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 61c12ba78206..d2c67f0de13a 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -179,6 +180,9 @@ static const struct bus_type * const iommu_buses[] =3D { #ifdef CONFIG_CDX_BUS &cdx_bus_type, #endif +#ifdef CONFIG_QCOM_IRIS_VPU_BUS + &iris_vpu_bus_type, +#endif }; =20 /* --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 217FA47A0C7 for ; Fri, 15 May 2026 11:23:47 +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=1778844229; cv=none; b=U/lVFT88rp4SGbr4kCvDZIzEJhXEr2Li7ZYftOFqECvU+eAT0oWuq7tnQNKnhmTGlL+Xn+sKuXott0KzxpEo9PX/pRzG7esO/zUOP/K1BXIVzpNjAmJtlenQR6kjFP/GGgr3jIvrbdJbR93hby1yM8a1wFvRfbMI+qfdtt9ELzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844229; c=relaxed/simple; bh=I+FhCbobG6kZdRoyaisDIn3UKwT9sap0kLYTO9LJWVA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d2h3dMSpPphukKzbPiB92rwkyWt/YjPnqePvbLGZXdDzygg+GYUNQOtB46xOvBQA/KHhgXiT2FtStY6PvX/L9bLnJRxie+rxkYhRDDHF4fUHr9/LMhEL7Ziskpdlky/xMRlSrCvuGKiJIcvJh9QIdsmDvpLCUawwjpRkR1hosh0= 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=lmf/tbEz; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hHuBQZIY; 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="lmf/tbEz"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hHuBQZIY" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64F5NauB1848082 for ; Fri, 15 May 2026 11:23:46 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= uSFq1izJ77a0VhXBlRZJfgQFGF3dtNG+x2g54MrIho4=; b=lmf/tbEzdF6ICGA0 SPWcXYO8JX6BNlrJwrCrW2lc8dT89Qmygk2pTLtq+pnuITqDOLQ1BR1y9kCYCqgb Z1Z8s2JRCfGMw+8qVQxfexqCTiUNLDACJoAEzlrE2qpsmYQSOyv2ml495Bw8ZI1S onVTTym3WrjdoaHcHOE4x6P3YE3zgKv5TEu25WjmjIYtt9QtFfHZaPqljJ7DiLpU qoJJD3zw0HH+aCErebn8sEedhlHk4nEt/vwVW7JYlC7To/jWEnxTMJQhILmdsGhF vKLnZcpW06rWkqF0KbNsBtSXRCSBpzp2W6lmcJ8iSiQqCCFb8he8wOhumAb7Rb0Q hWAhhw== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1t2yw0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:23:45 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-366015bca9bso753473a91.1 for ; Fri, 15 May 2026 04:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844225; x=1779449025; 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=uSFq1izJ77a0VhXBlRZJfgQFGF3dtNG+x2g54MrIho4=; b=hHuBQZIYMIdnbVAvEL7BLCTWV3Gak1S58z+VpdBO0duIGnUwn0ie7rwlinRedkHiwV 8Il3W/fQj6m+KrQNxu5GQDvLB92VSP6hoxrARY5w3G7ahSyY/iAvH+yECy2jpah0m/y9 hQbCVB0Y4RJzUS1LnS/KJXBca75Ufzo7cJ5XgSE+U/AqUIsML2Dw6o20rnIOb6yVYx5H GH8b6l0M2rygQ5NPVghOD35EtZCzhC6ueF79VwxXzgBgfuumaggbG7sHiT4jZLd13oF0 NDslHwc2qLjWVbsyOZhI/BB4NpcVp20HRo1pov2DouwlNNHLG+cPlMZ8BEiEk6kikIOf zMVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844225; x=1779449025; 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=uSFq1izJ77a0VhXBlRZJfgQFGF3dtNG+x2g54MrIho4=; b=RRHiEl8MZgd5YOQQElsMdTbtN9PFXS+PJn2EiTA9S/33qCXmXGkWIQf8vShp1Ox3IO CMxN45I8vcM7NMEwiXtNjYvCQPNFj0cVePZ6fW0Eqj/Y6R226UxvwHGmk+VYwzrGyQIA RtNu6zvvPeqRFmTzGzvZZpyLkPhyR8s4tNZYmaeSEwZJtgc/js6367eBQxWghUv/iPdT y1uQBU5Xh7+kO7L8xq/O+vTNXth/E0G5PRebdvrGpkXtrhrc4sRSmVcl9kRL9KegLUWa EaOzNG2Ok7oqKO/Ue+38YILcpdUx6O+Wzwibh8lmmTPENBJGCCY8ZJsXTzjCYkVlIdn5 6hng== X-Gm-Message-State: AOJu0YwW4fp6fpIOQS4cPCZGjtfFWjpOFXJB6aV22PfVfBqII1NJgHTM 9zk9SSaKECL+YJzH6AR2vCbk7HZO12rBdBLPdxUbUve2GObU730gGbJGlN/qu4KvPlQ0VGyIUwx 02LTZoa3r4i+R5eAmhDCOH7FaBVsSbhcZgnGcK0zy96RH8noWinht0rOwL7MrC2fIs4c= X-Gm-Gg: Acq92OFHuqFkdHqFGsWPffHZkHyHPE9F5OkIpnIoHKQvn0oKx0ZBwuZIyVrhc8yYh9z GpHAGlHc4bvb0pAFgIrRaCx53Ewgom/oFyB5Fqo+ORowd6U+J/34WfQ94VnMUFAAHUemwGKcjI8 69A42ucu4UI9mhyXWmI86bsFtIL3PcLm8n5nVX7Mrw6JfIJSTwrpERPhQlEWrJyfcbpJfLn/hl5 +8VOJyXMtd76gWMKrJthUiuSSerU5IY/1MmyEUFUtotrkFFeJaBjedwJwCUMPegJq64Dghp7LMf US5V6qfncJ/IM2k1yr+K75k4ekaeWMUlBgLe5YSw0b9456pe/EMIeNZ3bx3VxPpg8Z+0TJF0YHx fr72ejt7FaXvEeJlwWS7Rc30/910x376tSYR1ZJXoJKQdfuUC/PJB2aqD42infNaF6w== X-Received: by 2002:a17:90b:55d0:b0:368:2832:34fb with SMTP id 98e67ed59e1d1-36951494a98mr2924747a91.10.1778844225024; Fri, 15 May 2026 04:23:45 -0700 (PDT) X-Received: by 2002:a17:90b:55d0:b0:368:2832:34fb with SMTP id 98e67ed59e1d1-36951494a98mr2924726a91.10.1778844224541; Fri, 15 May 2026 04:23:44 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:23:44 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:18 +0530 Subject: [PATCH v6 03/14] media: iris: Fix VM count passed to firmware 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: <20260515-glymur-v6-3-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=1678; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=I+FhCbobG6kZdRoyaisDIn3UKwT9sap0kLYTO9LJWVA=; b=yJSdrJ9U327Cl28LdY+SOP62A7gkCxLZelqSbuJRMwwdlMsr9bwa/rishfpbzasDkgnPXhnQB xWl01CKrnjUCS5apq/6NmAuVWSZB2FxH8R6nmdrWj3Cj7pW7WHPh1Ly X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=D7Z37PRj c=1 sm=1 tr=0 ts=6a070241 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=G9EXm27dpV9j85VmElcA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfXwvv+h1ZZty0h 68gpP6l4CG5T5NZaFMgU3UHJfXQ7b0x40oDeNiACPJVg8zjAMqoGC/9vi6owZB8Vy6EF94fQM2K Jmk+f29dKHnOZYDtnr50DL0/HwdwejqvE8uPGJcM8e9uahm2Kjsi44qLw91kw8y6yPYdU4miXc0 /htiGhxaBPLjOiWOCtLLQTabSrRa6jst+hoEgpJWQe+MFyoheM1jyi6aGVPtFY5H6T1+4cMuI4d UDOAkJgeBQeQ/6CBeQ6q0qfRVJeC8kx2N+mZgLd7zEuw6CNhcscROCSnyQmL6OlrO01mkfR4//9 geiEvdZv51en9NgPVybN3LSGG2X0ZPuIVSB3MVLoZ3aUf1ZtitpyjKXo6epF9P32IiPixvyAopp 9/SBKEEbG6Tgs4Y1+g1M63IKsEe68dwZqV+lJut3jsgsLQJjkAcJijYMIt6xeoytL6B5yo9MOeL +x9ZMDosdeo+gCiCEUQ== X-Proofpoint-ORIG-GUID: 5DHfUH639hD3kTTOJR1k9rPcO4JB8814 X-Proofpoint-GUID: 5DHfUH639hD3kTTOJR1k9rPcO4JB8814 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 adultscore=0 phishscore=0 clxscore=1015 bulkscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 On Glymur, firmware interprets the value written to CPU_CS_SCIACMDARG3 as the number of virtual machines (VMs) and internally adds 1 to it. Writing 1 causes firmware to treat it as 2 VMs. Since only one VM is required, remove this write to leave the register at its reset value of 0. This does not affect other platforms as only Glymur firmware uses this register, earlier platform firmwares ignore it. Fixes: abf5bac63f68 ("media: iris: implement the boot sequence of the firmw= are") Cc: stable@vger.kernel.org Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_vpu_common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 7bba3b6209c2..df76530be809 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -26,7 +26,6 @@ #define QTBL_ENABLE BIT(0) =20 #define QTBL_ADDR (CPU_CS_BASE_OFFS + 0x54) -#define CPU_CS_SCIACMDARG3 (CPU_CS_BASE_OFFS + 0x58) #define SFR_ADDR (CPU_CS_BASE_OFFS + 0x5C) #define UC_REGION_ADDR (CPU_CS_BASE_OFFS + 0x64) #define UC_REGION_SIZE (CPU_CS_BASE_OFFS + 0x68) @@ -78,7 +77,6 @@ int iris_vpu_boot_firmware(struct iris_core *core) iris_vpu_setup_ucregion_memory_map(core); =20 writel(ctrl_init, core->reg_base + CTRL_INIT); - writel(0x1, core->reg_base + CPU_CS_SCIACMDARG3); =20 while (!ctrl_status && count < max_tries) { ctrl_status =3D readl(core->reg_base + CTRL_STATUS); --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 AF15847DFBE for ; Fri, 15 May 2026 11:23:52 +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=1778844234; cv=none; b=q/WoxdxuMe0bXsjHfIL2FYmR8GXhoH0CypDhv+PUDgIfqhVJaqIZRTj2qqds+4+vVLJvIQ+PLRNwAX8HN8eyxS7YfKg6OGMlA/xHb1HenydHYWNT/41+4w+JCjhWoBKTYDxP3l9m6nrEROUZ+UWTYxFEnnGnYQnisPUcuIiqNJY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844234; c=relaxed/simple; bh=/DvZZLK7RoXoyIRcMfNXJX52GjyEq7ffyO8JhHtrg7o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WoxQT6n3ReMsPbzwR01qkqeLia6u6P4V1emPepWxQ/mb8AMNVEr/qeVLtoWxqsjlgsJxNgfBojiIGBHPn5r1PO30elx038CfPvoGojy2Sw1+2kH0bRdJ6HzC3x64xddKLIWCkZXDkBy7Q4ujt8o2jnTPBCI+DL6DBN/FUnUepl0= 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=p4UK0mjV; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=UGSrMw27; 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="p4UK0mjV"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="UGSrMw27" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FBDReV3671020 for ; Fri, 15 May 2026 11:23:52 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= aRznaYXGx0v+j8rw9+afGoTRNyTfcmX12+yAEiEoD8c=; b=p4UK0mjVQ5ePLlm/ +4SIzuq+6RxI098CAYQ0webZ+QYCElXSw47OkE+4zwrPbXd7PRqfv1nor1LY/NqK g9yRLTD/EEGn/wQsSYmxzGJXjdgkUzpU7YHP+H9mgWSn4zub/ne9PP4vf3UKiaVk /dDu4j8CNMSxg0+UqC4W/96EMdUyBu7LlI75V2ic44tIXwK44GPqnVBrgHFTn+ON GcveOXVCyerKZVo9GqRf5A1X4yi4mKIb0tQ+ixRA1qH4skGMpgP7B/+G88XxIrdw ng3eCjlxJ8LRUCgnLdlItQi7iByjHrjyB0SNi3Up/d+vAprqum0DWTP/rBPI09ek xnx5zw== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1s333j-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:23:52 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-368b0dc7731so2754973a91.3 for ; Fri, 15 May 2026 04:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844231; x=1779449031; 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=aRznaYXGx0v+j8rw9+afGoTRNyTfcmX12+yAEiEoD8c=; b=UGSrMw27leeOOStu2uI050wr+Xtk12vmK4PVh1Rw2aNPD2mSHfUFn1310FkSYu8J1q dsD4xDiCxl7CMmD2aQtvyYGrqdd0xhqXBqko+xvzv5NL0rzd15hJtn57OKG346MT3XvZ jSmhRJeBa1GjQIhGq8CZd5XGp0Y+rV8+a2KwVZHPkrZBbcy0IUes3edJAKuLoL1lhrL4 RQ7TIl1B3TyOoVCvw69W/zcUffFjUdYMXqkMudBFOCPZ3kWgG0jexBJ+fnWia01SOImN u0RTiHVJhYuozgdeVl5ZspE/WCT751ucr3tH/bV8Dr5LxPd1kUQa5aNQzqDAFgFyTEkI 7J9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844231; x=1779449031; 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=aRznaYXGx0v+j8rw9+afGoTRNyTfcmX12+yAEiEoD8c=; b=Uot7Fw8nL0dWXibbTUwBkmxEVzdQooFUU29og95t2MvfgxRVFg5YoaDeOfIWQHEqVT 9aV3SSQW23ijLa0hNCLWYBnn9eYtMkr69P6KFo77/oEfru7WQrBIZ182M3ovH3v5PbX8 qeKkRswoYKppnj2wjaKcx7jyeUHGGOpJDJsFv4xZcOnVFq9mveZSw8W+N9Eu56U1gxAp YRK0iv+C//kgBHG5BNLRnOlvdfzW87whMFE5o0JDyBEGuqfIQHRDdmmLhgVte11vXckC PS1MFM4RirTjVgTBvgvtRcs3+vvqLLHCYhOdf8GjOYjWw/GEvhkXNZhfNFYFCg8TpmbE wJ1Q== X-Gm-Message-State: AOJu0YwmEewYErK4q5dIW+2YQUuC/3Md3vTB/hMCwXYeSzufi8ME6LS6 YUx1mORS98UTpyJ0vTk+KAz7BNcJmkREkfyAq+j98mLmEU+e36buCsQ5TX4Fc2MwJWIxTb374gR jRP6lkVSrDUQXYsu1eEm2LSzVFWtvDoEBkNeSwGRBOS2HmqtazQ0RCY1M/5a/pjr9ty4= X-Gm-Gg: Acq92OG2kyW52tYMXxZ8CqIribyX9+UUYuPT1XXzzGTgdQyIqzTlNHRcfSFngIAuw24 mybbyiVpjABEWbACjcAko474cBkdVyRX4qhw339HvvNDmJQhzWgXjihEQ4MNVZ4j6/nzvsGq3eQ Sh7DB8dn8sRqATNcmAoySNc+Ypb61erGDAdx6SjOerI/z3uORRF1q/BjQ0mfTcGlfWE1TxQ8IoF c3TiMEuwDojO8vwdX7CTuC6CvaJpg80QOGkTN2nWfyz+AQi8lQARq0tuXiW8dfYi6bVG4SgWsxU qzLT/TEZ/fvP9MN/jAI8gDOEvB6Dx9Qa+em+ZnN+9Skeq6fQlMDntpmyA7MheT+4pDkVHbBOeeT Ot9AH9k5yEr3qWzUHl/cSL7RgCGvQxaaWdSlqyx+Y6VSVGksgmxzUrXg= X-Received: by 2002:a17:90b:58c4:b0:368:b4a5:c4dd with SMTP id 98e67ed59e1d1-36951895b63mr3504163a91.2.1778844231439; Fri, 15 May 2026 04:23:51 -0700 (PDT) X-Received: by 2002:a17:90b:58c4:b0:368:b4a5:c4dd with SMTP id 98e67ed59e1d1-36951895b63mr3504129a91.2.1778844230955; Fri, 15 May 2026 04:23:50 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:23:50 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:19 +0530 Subject: [PATCH v6 04/14] dt-bindings: media: qcom,venus-common: Raise maxItems for clocks and power-domains 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: <20260515-glymur-v6-4-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=1499; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=/DvZZLK7RoXoyIRcMfNXJX52GjyEq7ffyO8JhHtrg7o=; b=6A0Jw3h5Vd94IDHzZQvQub5VJlKlGcYOvPs6oSe7K/94TXwZygg4g8Mq4ZD3MJ4wrbudfchns SFEp312OVgjC+7B71bLPg2CSrzm/xsca32YE+z7XutZ3KdXXazyB1P+ X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfXzPz2dK5AnYto FFZTnsME6rGle5rAjiVMC5+oKPQa9DcHZpk0FfJRnhRyDTkFypkqtyADUKSj2HMVulTaL2OGdcm Qle1XvdpwhJpnqpVG6GynQMAUDEZxz5zfQ1QkiEn9QXX7vUjqPKHaKdti6Bzwp1e+E4Fs45kzyh XWPaGiNneNjdj19VheNYSq/M0x1QF3NOezAD6nuvryUvHj2MQH2nCMnFpGtHPxuUoZi21571MKG myrvBDaZYi/BvI1U8Tw/L4+pjKkh0EPVqnf3ol/gPnpwxCR/UtWHh8T90ET8s1zY2jNzXtgs93P OQ89pmj/dJ1r1cf7M3TZYf1ZmByx6YTJn0V0Yj35Rq7TXdA4kK3jyorNgBG9A3bQ7+WocCT5MwM TTw9t6zxwz7Lc9qGX+U71oXekKOZlVNpf4+ZlEltaXHg6yR5MM48Sohsb+AS9nl1QWSyNvPv0Wh WlX8Ru3uyf7xo3roUcg== X-Authority-Analysis: v=2.4 cv=Md5cfZ/f c=1 sm=1 tr=0 ts=6a070248 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=xA1TQA8hIoUvplme17oA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: IpMGe_ycuAD0euBvx49v_7du-m_rL6Eq X-Proofpoint-ORIG-GUID: IpMGe_ycuAD0euBvx49v_7du-m_rL6Eq 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 The current maxItems constraints for clocks and power-domains in the common venus schema were sized for platforms available at the time of authoring. The glymur platform introduces a dual core architecture that requires more clocks and power domains, exceeding these limits. Raise maxItems for clocks, clock-names, power-domains and power-domain-names to accommodate the glymur platform. The glymur platform-specific schema have fixed constraints for these properties, so the common schema only acts as an upper bound. Signed-off-by: Vishnu Reddy --- Documentation/devicetree/bindings/media/qcom,venus-common.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml= b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml index 59a3fde846d2..10716a93dd35 100644 --- a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml +++ b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml @@ -20,11 +20,11 @@ properties: =20 clocks: minItems: 3 - maxItems: 7 + maxItems: 9 =20 clock-names: minItems: 3 - maxItems: 7 + maxItems: 9 =20 firmware-name: maxItems: 1 @@ -41,11 +41,11 @@ properties: =20 power-domains: minItems: 1 - maxItems: 4 + maxItems: 5 =20 power-domain-names: minItems: 1 - maxItems: 4 + maxItems: 5 =20 required: - reg --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 0DF7347ECF8 for ; Fri, 15 May 2026 11:24:00 +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=1778844241; cv=none; b=HFlaeJLuLBBJfOgfD0Ks/M931dZna8ivNUfNETcr0tcpj7nq3PHXc3GPiidg0Z78BewVax/O6y8L+H9jEcUj/+Z34kCXucyqSyso7g88P3tQOahz/r6cXNZOH7UpzKeQs2XR+Vz3aO7I4WqqMpOiwWPMEG9SSXAkcR+tpCt8Ja0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844241; c=relaxed/simple; bh=EeIAZMRmgVmSK/Y4l2hVRqTqYGOuHpZ+loERcUpLJ1g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JPCgcghbOH7vmwkavd6scl/vH9IPAKx21hHEIQ9w8AytYt+XkRvxFNmv/DL9QcVCWgCqL96Wn4VVVx3cUt6pkxkLTF5gGvnQgCLDEb7NbkJl7tK/HBd8pzXX3n3qZ9w7QtCPmRa4bvsnewzwMunY4ve1QBXktoVZyAQuggSghuM= 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=itQNes7S; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Bqx07/79; 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="itQNes7S"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Bqx07/79" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FArvuG3671801 for ; Fri, 15 May 2026 11:23:59 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= B2KaNJ7wQbTV8z+VB/6ohB5R61JdVKBpxz4P1XelljE=; b=itQNes7SuhvrpSgM QxK+ZJM48IH0QA7NsuIK/9Z/p89bx+RrUeC9VASU++5Y8hEXp9RCwntEOaVcTsZ3 icnEdq7qkxCX3yXiQe4ipF84x67nLAZoayguq6Zaq7pi0K6lbwUjd2bQek4jJtu0 miSzSJlJnoW5Oj/lClq2E+kJFu1fi8xN+DxHSWyYUX7VnJKXtxHG9gmMuvzsL7CW PJyswY492TE67Fm4I/ROtg1ovYUUl7Ngi45F11K9Kss/BW4gHVDXI7ZDWSJyw2tx Xc8BWR5VwcvrXZmrfFVauAuAr/Ep/LBwTsokdX/m43+mefeEGUl7HsAxtjp4f9M0 A6g+gQ== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1s334a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:23:59 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-3663d5e9bf4so8811131a91.1 for ; Fri, 15 May 2026 04:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844238; x=1779449038; 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=B2KaNJ7wQbTV8z+VB/6ohB5R61JdVKBpxz4P1XelljE=; b=Bqx07/79FiAcSzW6mRZkU0gigPP5uFqvt39/6yNL7quhDJhGJM05HlMDH1uphfM3Z9 NtZYOA/g8yuzpYKXSrElkvgSLfaF5sy8tFqaMSFEVTzJH5h8nR1irJgL0lMNfV0hSGQc SbAVKi5ntL2K2mSUP+Gq3qE7DuXoxaUJrYc1W1IqnRJmlJQDlfldCZ2kxShhO00VFapS NGDDJKQGWM+igSxR/aC2khndWO7DxOwbozGo+vs8ezMVtMrC6c/gBUmP2FlKtmRjCM+7 tBuJj2Gnt1SA64KcOEIl7EV55glAWzjMId9pBOZYxILDOmRv1PElCSEwj4nSr4zBmApV YmCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844238; x=1779449038; 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=B2KaNJ7wQbTV8z+VB/6ohB5R61JdVKBpxz4P1XelljE=; b=qgbS2EibHWGVd6JEjORgeFgrh+1UQ4EIfRuvup5pOHQzJ3iXfetwsejAo0ajhNDqEU PsJ3kr7IbKSrE+H9coe4ULih7TagUDAuB1fgQP6y0UJD6PRvjWrABwbpWVRooVYwv25X xADdcKxa3Unxb48k0QUbIeS1PelEJony/rsD41Ev9VIpjLxa+4h8RAx8tOpCpSutUx6r n0XZp2/J49V2p/ChwYO6nXFHosDpnji91/mymZhmfSa+7lOjlRUcaN26lk022gnIjFD7 hK6t9VaZJtKpzSbV4jA6L2iKNLXtr1nrV3hrYnY3otlUobIgJmEHuanj/IvKmiCEPdmv wXmQ== X-Gm-Message-State: AOJu0Yzk5aWC0n1q5OQIjn3D2PG1y72aDz2czysf42ZmcjAclOS8MKe9 oJlvCZTTgHngKPHRQKuSXqg6c7e5Xhu0lsjs6PBZZILFOGAVzCZ6KqvKFgAmt8Sgz5yxHXtPQi5 00dUSq0byWWi/h/oHjE3V1Uzql9l4h919YAzp4Lr77gyObk6e9YAIi36+3G2rNkZ86B4= X-Gm-Gg: Acq92OEyTgFkGCzxjJA3egqeAtoKlhEWTqeqnPfb3iiFa4a857pZj2LrnXE7nfIV3b6 T3jIieZEwM42oaG/Gbx7MfKSnvm6EZOeV3zF9l9Jv2pPDZPwJ0cPNFxwMmYmn201GsHYaUqs0Jn nwbMK6++qOg0j6xdHT/Na7fwC/emTrva2DEdPE4wWbqiMfAaZeT4+VqPY24Lbg21CuiLI+SbVbg OITq3xXlyHHoVgC6svJL6SnO7gKmV8XGNSxQj6YDSZBNWVa6evTGJwdHQ8X6F//9GIZTG4/c1Xd bawX+3TJF9sX4Nm0RC3usJSeLyoDkcy+Qsg4Rj355fPuPP1cAEJ7vHpNTUtG5PirTe/1WLgQDHT Rt5jPk02F9F/kQ9fDGAixzXljYAmEWizM0/Lump39KqvrPPlR76GlIkc= X-Received: by 2002:a17:90b:2742:b0:368:cefe:ddd0 with SMTP id 98e67ed59e1d1-36951b82f8fmr3535764a91.15.1778844238198; Fri, 15 May 2026 04:23:58 -0700 (PDT) X-Received: by 2002:a17:90b:2742:b0:368:cefe:ddd0 with SMTP id 98e67ed59e1d1-36951b82f8fmr3535721a91.15.1778844237623; Fri, 15 May 2026 04:23:57 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:23:57 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:20 +0530 Subject: [PATCH v6 05/14] dt-bindings: media: qcom,glymur-iris: Add glymur video codec 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: <20260515-glymur-v6-5-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=7497; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=EeIAZMRmgVmSK/Y4l2hVRqTqYGOuHpZ+loERcUpLJ1g=; b=WQ+LE7PjKkMsIjWqAIkBhVmdS4sqY5ZJMsSgCLXJqnXUhtgoBYEJgWF7CZ0FY5eR6sIXTsIr/ TQfAdn5iu91A5xE4QaJcFgORmhUA0u780rGEreGywYbdOeU64zKDY2i X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX1UmErK/wgwnA b6l2MIRaaD4pk1ZZiN0kkFQJWGRWBfUwiCUYj72u5M47RbBkSYWSxaLY0xTdML93lGF84cIOxwB j+zzv1h5Pxdw7qI73JucBlPX5jChwVq5/WNjdxUbHDioOWIMNmPhpcM0LCtja51Ss8BqkoV51Wx SMeqnc7J2b/BoQnvr6JWUwAmib91Z/UBVQ/clhnf6Hd+8YyVeZDnW+Xpt5wajGRqRZiAAdApB2g ezFgpBpvQgt1W2VNLtIGhy7m0uVlpwe0XyjT1cVyp7CGXKA6bXV++i0uK8cmYcIGKDyI+C33qpJ ZKm8Qco/gIkuuyraOw8/U6yTR39ZTcUYiyZQMsuukSUa2aLYfEtLIPCbJTAKmF11B0gDqHs2rt+ Cp1aNfbh6Viqvt6ApjoQan2NB+p8EPzhtam72VguxLihqiNGn0AvZapSkb5PUXU2KDRL65GaMV1 d6PpOG7VOuJw/Ebophw== X-Authority-Analysis: v=2.4 cv=Md5cfZ/f c=1 sm=1 tr=0 ts=6a07024f cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=1OCxxfDL7RIz13hN0lYA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-GUID: VKm88azsLg05j_mQRk1Ei--k7kMiBDqW X-Proofpoint-ORIG-GUID: VKm88azsLg05j_mQRk1Ei--k7kMiBDqW 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 Add device tree binding for the Qualcomm Glymur Iris video codec. Glymur is a new generation of video IP that introduces a dual-core architecture. The second core brings its own power domain, clocks, and reset lines, requiring additional power domains and clocks in the power sequence. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vishnu Reddy --- .../bindings/media/qcom,glymur-iris.yaml | 208 +++++++++++++++++= ++++ include/dt-bindings/media/qcom,glymur-iris.h | 11 ++ 2 files changed, 219 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml = b/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml new file mode 100644 index 000000000000..7b0bb001de85 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml @@ -0,0 +1,208 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,glymur-iris.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Glymur SoC Iris video encoder and decoder + +maintainers: + - Vishnu Reddy + +description: + The Iris video processing unit on Qualcomm Glymur SoC is a video encode = and + decode accelerator. + +properties: + compatible: + const: qcom,glymur-iris + + clocks: + maxItems: 9 + + clock-names: + items: + - const: iface + - const: core + - const: vcodec0_core + - const: iface1 + - const: core_freerun + - const: vcodec0_core_freerun + - const: iface2 + - const: vcodec1_core + - const: vcodec1_core_freerun + + dma-coherent: true + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + iommus: + maxItems: 4 + + iommu-map: + maxItems: 1 + + operating-points-v2: true + opp-table: + type: object + + power-domains: + maxItems: 5 + + power-domain-names: + items: + - const: venus + - const: vcodec0 + - const: mxc + - const: mmcx + - const: vcodec1 + + resets: + maxItems: 6 + + reset-names: + items: + - const: bus0 + - const: bus1 + - const: core + - const: vcodec0_core + - const: bus2 + - const: vcodec1_core + +required: + - clocks + - clock-names + - compatible + - dma-coherent + - interconnects + - interconnect-names + - iommus + - power-domains + - power-domain-names + - resets + - reset-names + +allOf: + - $ref: qcom,venus-common.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + video-codec@aa00000 { + compatible =3D "qcom,glymur-iris"; + reg =3D <0x0aa00000 0xf0000>; + + clocks =3D <&gcc_video_axi0_clk>, + <&videocc_mvs0c_clk>, + <&videocc_mvs0_clk>, + <&gcc_video_axi0c_clk>, + <&videocc_mvs0c_freerun_clk>, + <&videocc_mvs0_freerun_clk>, + <&gcc_video_axi1_clk>, + <&videocc_mvs1_clk>, + <&videocc_mvs1_freerun_clk>; + clock-names =3D "iface", + "core", + "vcodec0_core", + "iface1", + "core_freerun", + "vcodec0_core_freerun", + "iface2", + "vcodec1_core", + "vcodec1_core_freerun"; + + dma-coherent; + + interconnects =3D <&hsc_noc_master_appss_proc &config_noc_slave_ve= nus_cfg>, + <&mmss_noc_master_video &mc_virt_slave_ebi1>; + interconnect-names =3D "cpu-cfg", + "video-mem"; + + interrupts =3D ; + + iommus =3D <&apps_smmu 0x1940 0x0>, + <&apps_smmu 0x1943 0x0>, + <&apps_smmu 0x1944 0x0>, + <&apps_smmu 0x19e0 0x0>; + + iommu-map =3D ; + + memory-region =3D <&video_mem>; + + operating-points-v2 =3D <&iris_opp_table>; + + power-domains =3D <&videocc_mvs0c_gdsc>, + <&videocc_mvs0_gdsc>, + <&rpmhpd RPMHPD_MXC>, + <&rpmhpd RPMHPD_MMCX>, + <&videocc_mvs1_gdsc>; + power-domain-names =3D "venus", + "vcodec0", + "mxc", + "mmcx", + "vcodec1"; + + resets =3D <&gcc_video_axi0_clk_ares>, + <&gcc_video_axi0c_clk_ares>, + <&videocc_mvs0c_freerun_clk_ares>, + <&videocc_mvs0_freerun_clk_ares>, + <&gcc_video_axi1_clk_ares>, + <&videocc_mvs1_freerun_clk_ares>; + reset-names =3D "bus0", + "bus1", + "core", + "vcodec0_core", + "bus2", + "vcodec1_core"; + + iris_opp_table: opp-table { + compatible =3D "operating-points-v2"; + + opp-240000000 { + opp-hz =3D /bits/ 64 <240000000 240000000 360000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_low_svs>; + }; + + opp-338000000 { + opp-hz =3D /bits/ 64 <338000000 338000000 507000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_svs>; + }; + + opp-366000000 { + opp-hz =3D /bits/ 64 <366000000 366000000 549000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_svs_l1>; + }; + + opp-444000000 { + opp-hz =3D /bits/ 64 <444000000 444000000 666000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_nom>; + }; + + opp-533333334 { + opp-hz =3D /bits/ 64 <533333334 533333334 800000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_turbo>; + }; + + opp-655000000 { + opp-hz =3D /bits/ 64 <655000000 655000000 982000000>; + required-opps =3D <&rpmhpd_opp_nom>, + <&rpmhpd_opp_turbo_l1>; + }; + }; + }; diff --git a/include/dt-bindings/media/qcom,glymur-iris.h b/include/dt-bind= ings/media/qcom,glymur-iris.h new file mode 100644 index 000000000000..dcaa2bc21db5 --- /dev/null +++ b/include/dt-bindings/media/qcom,glymur-iris.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DT_BINDINGS_MEDIA_QCOM_GLYMUR_IRIS_H_ +#define _DT_BINDINGS_MEDIA_QCOM_GLYMUR_IRIS_H_ + +#define IOMMU_FID_IRIS_FIRMWARE 0 + +#endif --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 DF5F847DD75 for ; Fri, 15 May 2026 11:24:05 +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=1778844247; cv=none; b=a4Dy+5U78qVnwSFUYAIcLs0L0xaaLF+vcdI6RB+dNFpJLUVaGzQ7UzAKXmYHgPZpR6s12sLVUA1ujuX7nIyfB9FNXb2xogTeuSdnSTYBcPm3iPAxwcHVWEjs0VnuOozEGm3h4Hes44hV/9McrRdTEOwGGaRwSGRHqq+zaJHehHY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844247; c=relaxed/simple; bh=HbJDO7h4MkXgsgKVbQfCPfPwW5H3OtSc6iVBjpNeMBo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XPmyTfniyt6Pkw+gfufpnNaAZW/tK3h8rrhhQM8sn3Dn11tYWKXwz9mS+6RlVliUZuabAINGnuTfQ118kNJqsXznAedp5gHj0ST5JayQTQbKc85ja4YxYPx3n7jB3zvBWUXKgKjKDvGb0hr9fe5d4nIbHJ+KxMs+1ThF+q/xoqs= 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=NHLY65yp; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=iF3c2SpM; 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="NHLY65yp"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="iF3c2SpM" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FB2BC6654942 for ; Fri, 15 May 2026 11:24:05 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= BeUeck/PnJeaOYXxZG3voZpfankG9NVFAX+3uH7MhSk=; b=NHLY65yphjy4Fq7y VoH5KiywMXn3IbSSHFXnj1SouXITkPl/vrs0uwKYv25HgKSP9BD6iCMF77ZHSS1J +zV6toe6EMD4/DHsKMY/mcRRnXeb1HNk7wbcMmgqO790DsJ9MOkVc9p3tyL3LndB 3jarjdv4qto1jqmeUfcrRjnvKdtTrpkWsu8IR7c33CuiXgWRspPGbkqMlr/aFuES 6tjdkGUbiGtURXKcG9dtDqdP5Kn5g0h4JsSEaWx/hwKmA8X5/Bi8+5X5EsRn0i99 qDonOzIqtVK2d4MQ3e+DmLGzmctRbobP4tyZPtxCSA5iba6ibz5lfkaWOpqiE4lp druOlQ== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1pu2ya-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:05 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-367bb9caa54so8369303a91.2 for ; Fri, 15 May 2026 04:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844245; x=1779449045; 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=BeUeck/PnJeaOYXxZG3voZpfankG9NVFAX+3uH7MhSk=; b=iF3c2SpM5V2mnWWFrRE9UEpa9adBtBl9V6VyWHg6MTq1FUVfYkKvvk8LWJpZvKsPC6 nkyESoYcZ1vHjHZh71RQglCa7QGoHUSc5u5qObWxezQ0M9vQw8P314+ytxvFqHky5QNm 9RmSV7q3z6/pBTfn2u/3MHi4LSXL2Dlgqf3hxw1G3Jio8/T6MEe+kxw+ZS4x86VmzkOH QrkebI84YN3IdZVKuRo8iAJMLxqSy4GO+Jjtbfhxq746emQGOeD6NMweAHCtdgz+hQrd o9YkIVqjh/ETHe8grFE9FMpzBAXx4lAxGeq+9zw1pJfeH/VXmB7VBc7gmG2pOMtzuQfr 5aMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844245; x=1779449045; 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=BeUeck/PnJeaOYXxZG3voZpfankG9NVFAX+3uH7MhSk=; b=AW9W/KkjSekJmOlX6ZGGGEFGzjPznpq2Wlib97q8/iRlP918fQwM7AiAL6mr3Us05S U8/Zd51sHVTeVR5qe17u6ipIkEAreKnKBbj3XtPwX9asGDHMBh/gE0WjNR9RBovwGw10 vabCgmtqKvDSrz6hMbIUm9xLSAErlFDB1ESK8GKhZZF9ZPnjbZ/JF5ke/WQaWC29vT/q DaXJTTWh5Iu3LQfIuXv4XKTeXhd6iFNM1P2Y2K/Y8tFloHNXSoWkrAQc1TlqFL3ANDc+ uVuPL/CQ3BUPpaWfRZ4vX9pRypWJLXcVtTZNbxs69AJp+34VQg3k1EZT0k9pRJ+0JnVt 665g== X-Gm-Message-State: AOJu0YyrnaZDSSjR0iY2JW17DUxnY/gaW/xPQYBjepIIXfTJ55yQ0Pb9 6w6UbKJTyC2rdSxQafsf6PuqMG3SG0kltA2t1exk2uXHYsBwf3uD1iC6OvZJHyieLktUmJYjKU3 /87c4V9BxglWufzwQrIuh4IxrXogGAYduuVylsZhBgHpss+JJinGzWxFxG2b/cjo+86w= X-Gm-Gg: Acq92OFp/KsHBF5NkrwnyIzQQ4+3Elet1blG2jrsSUTWeIqyHP+FSFz0d+P7+QIY94B 5/0+v96twLGBJYXL6bOaA5XxFha4e4TdWcIppenePcMC0j1rw8cW4CTi/0UT1sCXNkyP/0/FSiS IR+ki7SM40WkmzdZW8lrp+pIhjUhISOG9HNmHltzZh7i0QkU8PSqfYPjfwnBuWKzOkCsckFaOiI 5uWq54G0UPUOKW3/+VVV7kawgnjim+PJyI1aRKt9m/uIj2Tig3/xGAZ0HVyi9EceIk8jT5X8Tbo 1jxV9rdsizVoITfUrxEm0tg11lfDsGLeNBLHSesoAUwb8XiQ5mKhc8rrNjUVmk4H4cmbaxBwqf6 ySTCZdFa4XN4vhohjwrewADMNPVq9/KdztHJ2xIsYzfe1x7YSREOlsjhLqS5cAChnFw== X-Received: by 2002:a17:90b:2d08:b0:362:e826:cefe with SMTP id 98e67ed59e1d1-36951ca6064mr3530038a91.23.1778844244685; Fri, 15 May 2026 04:24:04 -0700 (PDT) X-Received: by 2002:a17:90b:2d08:b0:362:e826:cefe with SMTP id 98e67ed59e1d1-36951ca6064mr3529993a91.23.1778844244145; Fri, 15 May 2026 04:24:04 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:03 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:21 +0530 Subject: [PATCH v6 06/14] media: iris: Add context bank hooks for platform specific initialization 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: <20260515-glymur-v6-6-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=2952; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=HbJDO7h4MkXgsgKVbQfCPfPwW5H3OtSc6iVBjpNeMBo=; b=5Ql20Vud027qUgCrsDdN8eNBl6av5FzP2NS6aw/2+3z6TP0/pO36FuTHTiqw0h3Z2qRWiyCI6 lTq0CqYJvDvCxrxV5MVdBvRFrCeQ97yAv4xs0DQ0aERecLQ3g5rcKki X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: -yM36iErWjPMbxeJGim5H-y4-66iyiId X-Proofpoint-ORIG-GUID: -yM36iErWjPMbxeJGim5H-y4-66iyiId X-Authority-Analysis: v=2.4 cv=GrhyPE1C c=1 sm=1 tr=0 ts=6a070255 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=hn6c7xJugPWrWid5T_cA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX+iEoZkIaqs9b WzKyBep6g27fwARjD2p9p2uGM2XGHIWZwmDMHUBJEVfpm9Nyy8DK7FVC6Lo5+/QeY5WzbIqCPmE fk9ZAbxiZlvsrxVHllTDVjrAA068kbDzJZkWDbbT2aK1ZX559Qn8KtwoTCMl5lIKIvFdaSMU4V2 i/acRxD6RhgSOK1HwcqX+lDyr0dmbtonv4swOzQ/tbAJ4MgRShE67sRqunXtc0DhGwCU6rqcMWI LHuFV2IhDv7sSk6L5iLeHv8oE5qpVaBBZZpuFKy1rHPT7MdYaPKRjAnP3NtYdSWBsj6tNBIZ57h F3A5ShnCyCBoaaYNvIU4ZtkVQMRNBdammiKRTedw3c/M8ooPGdXV7+WSss/n0cwL9Ed4aiU/Jv7 Die8L60kYMwBo3j7yIT+eoXARPRO5E8gb/Dl13n1OHtpJna1CmlgA5OoTLGGJG8tFyGDQeNlUc4 Hel4zfZgglkAiKoP+sg== 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 The Glymur platform requires a dedicated firmware context bank device which is mapped to the firmware stream ID to load the firmware. Add init and deinit hooks in the platform data for context bank setup. These hooks allow platform specific code to initialize and tear down context banks. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 2 ++ drivers/media/platform/qcom/iris/iris_probe.c | 23 ++++++++++++++++++= +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 6a108173be35..84fc68128c70 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -263,6 +263,8 @@ struct iris_platform_data { */ const struct iris_firmware_desc *firmware_desc; =20 + int (*init_cb_devs)(struct iris_core *core); + void (*deinit_cb_devs)(struct iris_core *core); const struct vpu_ops *vpu_ops; const struct icc_info *icc_tbl; unsigned int icc_tbl_size; diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index d36f0c0e785b..12596c9a3cbf 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -150,6 +150,20 @@ static int iris_init_resources(struct iris_core *core) return iris_init_resets(core); } =20 +static int iris_init_cb_devs(struct iris_core *core) +{ + if (core->iris_platform_data->init_cb_devs) + return core->iris_platform_data->init_cb_devs(core); + + return 0; +} + +static void iris_deinit_cb_devs(struct iris_core *core) +{ + if (core->iris_platform_data->deinit_cb_devs) + core->iris_platform_data->deinit_cb_devs(core); +} + static int iris_register_video_device(struct iris_core *core, enum domain_= type type) { struct video_device *vdev; @@ -206,6 +220,7 @@ static void iris_remove(struct platform_device *pdev) video_unregister_device(core->vdev_enc); =20 v4l2_device_unregister(&core->v4l2_dev); + iris_deinit_cb_devs(core); =20 mutex_destroy(&core->lock); } @@ -272,11 +287,15 @@ static int iris_probe(struct platform_device *pdev) if (ret) return ret; =20 + ret =3D iris_init_cb_devs(core); + if (ret) + return ret; + iris_session_init_caps(core); =20 ret =3D v4l2_device_register(dev, &core->v4l2_dev); if (ret) - return ret; + goto err_deinit_cb; =20 ret =3D iris_register_video_device(core, DECODER); if (ret) @@ -311,6 +330,8 @@ static int iris_probe(struct platform_device *pdev) video_unregister_device(core->vdev_dec); err_v4l2_unreg: v4l2_device_unregister(&core->v4l2_dev); +err_deinit_cb: + iris_deinit_cb_devs(core); =20 return ret; } --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 DE4B846AF2F for ; Fri, 15 May 2026 11:24:12 +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=1778844254; cv=none; b=dKS7F8sEagTpgWuWQgkydCUAiZWn3JBf9vNspeuMTzK0IWJIny9BvJTNX04ZFi7mG0W3SKNAsr2kDdrIt4t50ufAypYMC1Ill6m9DyOce7WSjQ4MUe5UhpYxLCWxFUFJfe8aex5P7TFrImJ4iEXMMJTd41VszO2d5RJ3xnWCD44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844254; c=relaxed/simple; bh=onJeJiw9EMeTDpFkD/CSfgq5ekY6oL32ti+K4AKPSPg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UchXEn05uBzCxmzG806Xm2HYZRE5Ma0AgqDHORdAmNnPJo8MRXAHhxFHVpqzBZ1EXkWo+y2V7/cpdcrKixEMmMdXRa40LNfU0asspDC2Y/nMj1sGWUFtvj/RNm81+arM9k/ANE3q/j3MqMDup7Shl/cQWEu4Pd0T2CEZjvAUK08= 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=VpybtXJK; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Zx6frrY0; 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="VpybtXJK"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Zx6frrY0" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FB5brD3200085 for ; Fri, 15 May 2026 11:24:12 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= kqDWRt1uVdCbnOpqf0M1wXSvFfZm943941fN6LZQjNI=; b=VpybtXJKXRzZNwba 8WbuhX2Zkcyaafql9qS1X3k5OE/Od7UaPjK7oTgpT6XiYFbyceoWLueLj5NdxkeS thxq9h3XGvhKEZqJn3aduRpz+5wHf1orYy2j5WIXYmE3uBQod/5QlRgndk6qHstF Mr47kxvWj3mdyHsSGwYjyfW8cgvluSe/q8fRiIp0KEkNsra5JtWUFS+YxlXPtFp/ uL8CJ0koAlbNoiA9miVsWhyHez4HbXPh6ZilUb286ZpgOBKiWYz8m072x4vW1VpH TEqIyo45LtmTAfV0lqOlTDtrg8P3xMJyhiqnGfVenDcaVlJb6RU1Vw2+UivkYhOB HOrnjQ== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1qtyp5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:12 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-366ded5ab5fso13409953a91.0 for ; Fri, 15 May 2026 04:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844251; x=1779449051; 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=kqDWRt1uVdCbnOpqf0M1wXSvFfZm943941fN6LZQjNI=; b=Zx6frrY0W6hnTyT1OS5ummvhPqH+8UjsRa6oRiMNBRRPJJtUeHq+rSnMJMvExJ76kM 7XyVGJWKL/Igvk97aajBV/lBKqnYNZFcnEDjK0wgsrv42x0ytAg/CVX8+R7FNAIThra9 4FZUs3QKYqbvqCIypg7AjmOydgXfE/x9aLQzQZXMD2HZiJufMLXUnhajPVNVGG7g2OPd S1ZqsNkE4+vIe6zgMQQvFZ7ZsWtfAAyj5pxK2ZfCiqor94F9Cl+vSeYYqT6ZcujF2GGJ OZW+60jPXOhJvHCooEDURlf+l9ay9gUgIPjWUoAfXPKO/m5pTHH0oZht5bNPuL+essTS V3ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844251; x=1779449051; 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=kqDWRt1uVdCbnOpqf0M1wXSvFfZm943941fN6LZQjNI=; b=U/OylyxEx48WpFEY3FzdvOLsvBX/Qit3FPQUeQjpX2t02rYXu/Gm2HN/6M+XyytV9K TEFaGMfjkg9nq5qEWMMjPBKJ8dr7QZX7Uqe74igQ+IzxxdN/h5kZG6adiQkOgHtobq/2 BVUT21WxEaRy+QL57GH8xOSA4TS5ISFCN/rS05nzvLkCgYrwWLE1KloV226dKIn6bLJW OvAXz1i4s/iDWeIIbVsvQQpiMOtrsmKtjgIxOhAmfgAfC/586BWNA7sWWb10YwDH2hXh wNM7Wmps6ix/QRyFEPLxGn3+cjjT7Ri+ImNF14uX4Owqp389k+WzLhcaxttwSTgqQAf1 BsHw== X-Gm-Message-State: AOJu0YzvyCIgaA5l/YjoSSz4ObXiVQhw40QTzqXZrnGBwlhGQ5VXsZUx dkYS9CzAWiClOJOQTL3TlLS6HPX4xFCJh5V9/AYQH1RVNwnopVskHqqBFSPdS6rp4g5RrJY/dPs wsZMjJHlSIj3iBmR4IEFv/CUPfLzI6crQ/MIdo7VbG3N+rH+FCG3kObDuAsapYyDOHSc= X-Gm-Gg: Acq92OHIqjHxdJy3j1UcWlGZYH4S9RKmB0xz1LzkqaJS82qF8BhpHNzpEgL/5WnvXRJ 4CBK+rwIh5eJAPOPgyhTOUDwiKR+2t9aD+OtpfZrMutiNjWTb4k2sS9de9DsTUG6Ux3IcP+lg1F cc58g8dty/k+oznIQCOcFNZcNMT+YWDQ1lVVjvlmytyAVF+D4y57Elz7Gil/wtTF0mBqNFYMdUE 7BGIVD7o2shJi2sQ+WkgojS8xosm492KhkM/Nein6MX1YDYuXq3A4cm3m/LczuH9z76Cb3bfTeF lMo7EoJEXiqT1u7Eju5XuuUaryPnICpNpDnWMH8VceQPAE+evaRUbVCm7HW0hC9qsW6l6VgkFpP 03YuaohrEB8CywdfWj/527rrE5X7a2+kgU3hnjeyXrfTZkduKEv1dpOk= X-Received: by 2002:a17:90b:5203:b0:369:1dff:6bd5 with SMTP id 98e67ed59e1d1-36951b7840amr3169831a91.17.1778844251400; Fri, 15 May 2026 04:24:11 -0700 (PDT) X-Received: by 2002:a17:90b:5203:b0:369:1dff:6bd5 with SMTP id 98e67ed59e1d1-36951b7840amr3169793a91.17.1778844250844; Fri, 15 May 2026 04:24:10 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:10 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:22 +0530 Subject: [PATCH v6 07/14] media: iris: Enable Secure PAS support with IOMMU managed by Linux 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: <20260515-glymur-v6-7-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy , Mukesh Ojha X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=7327; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=37/hiTXVX9eQYBQu3HR7YyKJBAxiMFbmP14R68LJz1k=; b=q2XsJHyGRXSvCFhZ9XflyOp+xKQepeFWo5kYnqWncMEmKnQ9NbTfv1uP2lLTp6gG8XKFZTxf1 hYis/YIYViHCru8bXKmV5UDifTIS+HbBgHtglbIlfNn/Tcn4zV6cfbh X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=HbkkiCE8 c=1 sm=1 tr=0 ts=6a07025c cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=U8OLdchxA3Z7P0hrdlYA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-GUID: JX3vNotqztVCfnpOMKaP5Tv77aayWf2n X-Proofpoint-ORIG-GUID: JX3vNotqztVCfnpOMKaP5Tv77aayWf2n X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfXxLkO8eCLiVnq joAJqk480kYixaC5lpqCCopUwi8kZVsIIiJ5+9wo3jJfuLkZnD2ru38BJBHl/52qyNIMZ2muAwK hiT3B1aFRhNGSkoDKU1dg0YrmmZVDZIw0Q9pXfvOSThIzuIgsgCavogxOfUS5nGH+tGPgnOOTwD XtwiONhrvysb3P/o8dtTEjYzlhy/Xr/Q8NwHHnxOWGGK7uiEYWQ7H+KYydLTDdXadvnoqj7gN1W cHXM27f1pYSdOEs4o37Q17oNQXlsx8nO0bX1vchYnb1vgg8DiXZ7O4mjInrWpouqpLPYXRgjEDB dUlSxDCohy/1YWFQn+rrkzm2645NarLB7rhl4uuApN0O3O77l6zhfAWf1j6hdE5OS9CjKb8dj8c KBE0aAQvOdpsuWz7PF1g+ZHbSa+KDTIHvnzukENaQUJs+BoSsuoW4Sq6Fc5npjMRsIbhfbIFPN1 Sfd0DXDT8vBoeDC8swA== 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 spamscore=0 adultscore=0 suspectscore=0 bulkscore=0 clxscore=1015 impostorscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 From: Mukesh Ojha On platforms where a hypervisor is present, all Secure Monitor Calls (SMC) are intercepted. For qcom_scm_pas_auth_and_reset(), the hypervisor registers a Shared Memory (SHM) bridge over the Peripheral Image Loader (PIL) memory region so that TrustZone (TZ) can access it, forwards the authentication SMC to TZ, and upon return maps the PIL region and triggers the co-processor bring-up sequence: HLOS -> Hypervisor(SHM setup) -> TZ(auth) -> Hypervisor(map+reset) -> IRIS On platforms without a hypervisor, Linux drives these steps directly. The SHM bridge infrastructure required for this is already upstream [1]. To isolate firmware memory in its own Input-Output Memory Management Unit (IOMMU) context, a dedicated stream ID (SID) is required, tied to the firmware function ID. This SID is specified via the iommu-map property in the device tree using the firmware function ID as the lookup key. A firmware device is created and mapped to this SID. The presence of a SID mapped to the firmware device via iommu-map is used to detect whether a hypervisor is absent: when the firmware device has a SID mapped, Linux manages the IOMMU directly; when no SID is mapped, a hypervisor is assumed to be present and these steps are skipped. Extend the Iris driver to support Secure Peripheral Authentication Service (PAS) on platforms where Linux manages the IOMMU, by creating the firmware context device and performing the necessary IOMMU mapping when the firmware device SID is present. [1] https://lore.kernel.org/lkml/20260105-kvmrprocv10-v10-0-022e96815380 @oss.qualcomm.com/ Reviewed-by: Vishnu Reddy Co-developed-by: Vikash Garodia Signed-off-by: Vikash Garodia Signed-off-by: Mukesh Ojha Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_core.h | 4 ++ drivers/media/platform/qcom/iris/iris_firmware.c | 73 ++++++++++++++++++++= ---- 2 files changed, 67 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_core.h b/drivers/media/p= latform/qcom/iris/iris_core.h index 24da60448cf2..2edba569fa25 100644 --- a/drivers/media/platform/qcom/iris/iris_core.h +++ b/drivers/media/platform/qcom/iris/iris_core.h @@ -36,6 +36,8 @@ struct qcom_ubwc_cfg_data; * struct iris_core - holds core parameters valid for all instances * * @dev: reference to device structure + * @fw_dev: reference to the context bank device used for firmware load + * @pas_ctx: SCM PAS context for authenticated firmware load and shutdown * @reg_base: IO memory base address * @irq: iris irq * @v4l2_dev: a holder for v4l2 device structure @@ -81,6 +83,8 @@ struct qcom_ubwc_cfg_data; =20 struct iris_core { struct device *dev; + struct device *fw_dev; + struct qcom_scm_pas_context *pas_ctx; void __iomem *reg_base; int irq; struct v4l2_device v4l2_dev; diff --git a/drivers/media/platform/qcom/iris/iris_firmware.c b/drivers/med= ia/platform/qcom/iris/iris_firmware.c index 1a476146d758..8bdc9273036c 100644 --- a/drivers/media/platform/qcom/iris/iris_firmware.c +++ b/drivers/media/platform/qcom/iris/iris_firmware.c @@ -5,6 +5,7 @@ =20 #include #include +#include #include #include #include @@ -15,11 +16,14 @@ #define IRIS_PAS_ID 9 =20 #define MAX_FIRMWARE_NAME_SIZE 128 +#define IRIS_FW_START_ADDR 0 =20 static int iris_load_fw_to_memory(struct iris_core *core, const char *fw_n= ame) { + struct device *fw_dev =3D core->fw_dev ? core->fw_dev : core->dev; const struct firmware *firmware =3D NULL; - struct device *dev =3D core->dev; + struct qcom_scm_pas_context *pas_ctx; + struct iommu_domain *domain; struct resource res; phys_addr_t mem_phys; size_t res_size; @@ -30,14 +34,18 @@ static int iris_load_fw_to_memory(struct iris_core *cor= e, const char *fw_name) if (strlen(fw_name) >=3D MAX_FIRMWARE_NAME_SIZE - 4) return -EINVAL; =20 - ret =3D of_reserved_mem_region_to_resource(dev->of_node, 0, &res); + ret =3D of_reserved_mem_region_to_resource(core->dev->of_node, 0, &res); if (ret) return ret; =20 mem_phys =3D res.start; res_size =3D resource_size(&res); =20 - ret =3D request_firmware(&firmware, fw_name, dev); + pas_ctx =3D devm_qcom_scm_pas_context_alloc(fw_dev, IRIS_PAS_ID, mem_phys= , res_size); + if (IS_ERR(pas_ctx)) + return PTR_ERR(pas_ctx); + + ret =3D request_firmware(&firmware, fw_name, fw_dev); if (ret) return ret; =20 @@ -53,9 +61,27 @@ static int iris_load_fw_to_memory(struct iris_core *core= , const char *fw_name) goto err_release_fw; } =20 - ret =3D qcom_mdt_load(dev, firmware, fw_name, - IRIS_PAS_ID, mem_virt, mem_phys, res_size, NULL); + pas_ctx->use_tzmem =3D !!core->fw_dev; + ret =3D qcom_mdt_pas_load(pas_ctx, firmware, fw_name, mem_virt, NULL); + if (ret) + goto err_mem_unmap; + + if (pas_ctx->use_tzmem) { + domain =3D iommu_get_domain_for_dev(fw_dev); + if (!domain) { + ret =3D -ENODEV; + goto err_mem_unmap; + } + + ret =3D iommu_map(domain, IRIS_FW_START_ADDR, mem_phys, res_size, + IOMMU_READ | IOMMU_WRITE | IOMMU_PRIV, GFP_KERNEL); + if (ret) + goto err_mem_unmap; + } + + core->pas_ctx =3D pas_ctx; =20 +err_mem_unmap: memunmap(mem_virt); err_release_fw: release_firmware(firmware); @@ -63,6 +89,18 @@ static int iris_load_fw_to_memory(struct iris_core *core= , const char *fw_name) return ret; } =20 +static void iris_fw_iommu_unmap(struct iris_core *core) +{ + struct iommu_domain *domain; + + if (!core->pas_ctx->use_tzmem) + return; + + domain =3D iommu_get_domain_for_dev(core->fw_dev); + if (domain) + iommu_unmap(domain, IRIS_FW_START_ADDR, core->pas_ctx->mem_size); +} + int iris_fw_load(struct iris_core *core) { const struct tz_cp_config *cp_config; @@ -77,13 +115,13 @@ int iris_fw_load(struct iris_core *core) ret =3D iris_load_fw_to_memory(core, fwpath); if (ret) { dev_err(core->dev, "firmware download failed\n"); - return -ENOMEM; + return ret; } =20 - ret =3D qcom_scm_pas_auth_and_reset(IRIS_PAS_ID); + ret =3D qcom_scm_pas_prepare_and_auth_reset(core->pas_ctx); if (ret) { dev_err(core->dev, "auth and reset failed: %d\n", ret); - return ret; + goto err_unmap; } =20 for (i =3D 0; i < core->iris_platform_data->tz_cp_config_data_size; i++) { @@ -95,16 +133,31 @@ int iris_fw_load(struct iris_core *core) if (ret) { dev_err(core->dev, "qcom_scm_mem_protect_video_var failed: %d\n", ret); qcom_scm_pas_shutdown(IRIS_PAS_ID); - return ret; + goto err_pas_shutdown; } } =20 + return 0; + +err_pas_shutdown: + qcom_scm_pas_shutdown(core->pas_ctx->pas_id); +err_unmap: + iris_fw_iommu_unmap(core); + return ret; } =20 int iris_fw_unload(struct iris_core *core) { - return qcom_scm_pas_shutdown(IRIS_PAS_ID); + int ret; + + ret =3D qcom_scm_pas_shutdown(core->pas_ctx->pas_id); + if (ret) + return ret; + + iris_fw_iommu_unmap(core); + + return ret; } =20 int iris_set_hw_state(struct iris_core *core, bool resume) --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 A3ADF46AF2F for ; Fri, 15 May 2026 11:24:19 +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=1778844261; cv=none; b=HMTT05voHaCoSx3TO/OLl21Dwd7qwIOH1HEHp9kzNqGpy0vf+y/YCpKqsauWUqxRnrI9G3Im2kV8Hmq6jvmmf0UIS6IL+yQPTxSP77s4ggPl+ydh8rXmLk7sNl6CXOi3MhmeSz+bnALgZgHUzCV6Q1/YZOUjxC5FH34/5PnuxWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844261; c=relaxed/simple; bh=aTQbaEHitwodG8/WnIVNbJ4TgWhVw1hWuHNb2TIgYl0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iDFEtp9W4mJjJnTjj1qjESmyP9eitoPcldDv9/FFOgi+1ew2Ird9mpyaqfIEFJnx/p0SynWQ44MLL+FFWGgUeGlnSsoLiBbtFxCvQVlaRWDh5bIarCNbQUqimT3LX246X7AbNXYmgv0qrkjUbGtUadCJRwZ8ZAa35WMw9I7Ugf4= 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=OfS9zuvX; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=C+aXl25O; 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="OfS9zuvX"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="C+aXl25O" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FAooMf655515 for ; Fri, 15 May 2026 11:24:19 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= +ympg+n10l1TuEZfcmMymVIoujDY3jyMoN+lzl2X8Rg=; b=OfS9zuvXLZOSAcCS 0fKiZ2/7agEcVWtQBRRq0k4CLkUbqN4ajwlVU/Yc/3jISFbqC4cwxM06R7oVpFuX 0SbxqT7aF1g81QkZWi3agBA90Euahfc4z9a6wkgWlwk/1ZG2jLGYRj9ozk/b92r7 V1tZuXZoaDnq9V0f6ICkJ1aWZNCcobh397tJke9UYBwrRm+QRQRp5MuygNNazatO kNbN/jQEoNn6k+HQHM6zw3XumE88ZsOZ3IV3phgK5gKptW8f3GyliYfV96kNDwLc wKcCfoIPCaRUbFAbebmr7iaZFPNL2Ro7w3+6KPh4jR/zB2Sn9etkzteOffxR43AQ 86edFQ== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1pu2yy-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:18 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-368b15eeb3bso8402060a91.2 for ; Fri, 15 May 2026 04:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844258; x=1779449058; 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=+ympg+n10l1TuEZfcmMymVIoujDY3jyMoN+lzl2X8Rg=; b=C+aXl25OPc8X5IVzU5VFx0u58n5ZfiaZz483nCPK8kJN1CJHmyWzUvWIXgd4hZM2eC w+4TekgD+LFJb2+5utOW7tK/5+0QnaHgYnLneED/nrkfSyBsMVu/gkdFCw2xDfKWnkJs 1eIYjHH9L0F/NaQnSzJfWGisenZrD9/H4M2qYhxUwnMl/s726iUc+qRoeYYaPhsq9p5G c0qSnJA+u+Yw6Z8r/iO5t2Z27Hbm0WflFwQKhnMgkYjkNr2XS+erBRIvu7ApkkL3M5Iu zrxrLgpWZs0Rj6oKo78HCqEvWGZaQJX6diS/GQLAwnRyhhReMMQtPCwfEL6oV5bHtjdS vsPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844258; x=1779449058; 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=+ympg+n10l1TuEZfcmMymVIoujDY3jyMoN+lzl2X8Rg=; b=Jme5HS9eJzhkKSSOlNtDp4TF2bIj+5+82kRakew6UQtw5sjTZwUrBye1VHvemrNxJT T/t6rDYfokpYBLNhldDaGzof0rH2WS82v1uivP32woowfX0D9GESS7tkv/cNZVf94jTf 4b6Z7vMnFWSS4QJec0JbU8p2Y5OabQQcfFrUpcLb3tJzdIpu2wdiD1knpnsEN6KaGws/ KKRGapz+7EA8Cr5ELxTybJN1TrDgSLMsks16598xBcfeVlY/3JsNYLIghXWKU7gUwuwr XdkIm4OydhFgFOwLuAoFMSih+pmCcNkkjqwUmU3X9uErzmc6qnL5x47Xypb1d/lWocNe 29pw== X-Gm-Message-State: AOJu0YyVWOicBYwgENxNOITWS0bpfvq4FFssOufTQi0ITsoac+k21YsN FVX/0a4xTaulcCFkRJX3PinH+TEZkyF21IdpjegDrk7U/L3B0QA27F5myMGDyV2vFOr8LfRHGJW kKFGVK0FcXD9y2ThgnknJJuvqrTdm6Lx4W3OjkSrIW294z0KfpqGzgoyRepQaVfbTJnQ= X-Gm-Gg: Acq92OEDtiT/Si/BpNRThTX/e8DBn5JOYcqtmzszatuul/WUqFKCEtaizfp9otxy9y2 mGW5jh0AwKK+XzOoh7w7dUCHlkdQU1WgzYNN7z8nfOFfWGmwGtHqiKWCVeDuH3PXwNlLXKEhI1+ XdeVfKe/fqPArBaZa8c6ohD3AuCaBOAoTGNobKVkHYrUBchWJLGoHcmLId5gIAjol95vkIKyduo FXIdxfJxAYKE/eWXq7sCvNwrF7mvriGLJTpQC48XYev4LVlEkUAupR3Ql1Z6AvDXEnqaBirUJhC javR/ayogzA835TIzqNnn5bT87xLYs+GdsCG9+0KFxE+zuF3wx2eq7Ut5pnuJBYD5K+Lr9Tn7mL dDoAF++sqFX+XjAMMQRB6D2Sssp190/IfYzvYZA6m4kczV5VRomoiFuY= X-Received: by 2002:a17:90b:4c51:b0:368:2074:b7a with SMTP id 98e67ed59e1d1-369519af671mr3598031a91.5.1778844258030; Fri, 15 May 2026 04:24:18 -0700 (PDT) X-Received: by 2002:a17:90b:4c51:b0:368:2074:b7a with SMTP id 98e67ed59e1d1-369519af671mr3597981a91.5.1778844257438; Fri, 15 May 2026 04:24:17 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:17 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:23 +0530 Subject: [PATCH v6 08/14] media: iris: Rename clock and power domain macros to use vcodec suffix 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: <20260515-glymur-v6-8-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=21442; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=aTQbaEHitwodG8/WnIVNbJ4TgWhVw1hWuHNb2TIgYl0=; b=Z2Od8MA5MXklHXediksxBpxs+ncWMuTtPDbwucTZ+0AceK5jj0QUgMl8z3lANBHIw0uuWFpxn mnWOmYp9IMTBt1gV6rj1EMt23FMcXGbF5hKRgFTYEWY/UGEGqJ24m/o X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: DrE2KLvxrwaaH6b7MI9rW0FVgVzqoZPv X-Proofpoint-ORIG-GUID: DrE2KLvxrwaaH6b7MI9rW0FVgVzqoZPv X-Authority-Analysis: v=2.4 cv=GrhyPE1C c=1 sm=1 tr=0 ts=6a070262 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=hIW5SXrrtB23OXZlDtoA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfXxWYx1q5h/R4T KaLQd3z2eKJHrab2WTRrFEKpUkAJVdY1o3mXPATAWX1UEcT5gkFjPmrtFImP60t+CAwBgFgVd9Y hLPJblY1PnuaMFdYpwoTtpAZ23zKROglqX19VmIwlI/1AQsxaJ9HwfVCpYLlLfGATj/ibxtXs2o cMJHL1dfXA1/1TWwDimx34J54md5dhXgoat0dPkTAyDudU5FLwP49TqeLbdVh1DiOWj/7joc6uc Rvpd5HJ2dFy6X3ZdBRJXHviwso7tCHTQ2oueAhsaz9LV3i7LOWyALRCwrGxSbLcnmIfPL9ibztJ 3A+LlLDxqge36x4tiY96CkKBn+vGEBGhMl8S9Ytwe2zdfqIrQxhMLaUBaeO/jhPI0rTYJGcRAVU a4bDhErLOi4KAQmcCDsDxu6nP0HyqQ1QzAS8fXosLdAaL7iOYFm08Vjo9ChISvi6JY/5Pe1f5KJ leif+afCU+ieLCBE8CQ== 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 The current clock and power domain enum names are too generic. Rename them with a vcodec prefix to make the names more meaningful. Glymur platform has three AXI clocks: axi_vcodec0, axi_ctrl, and axi_vcodec1. Positional names like AXI0, AXI1, AXI2 do not tell what each clock is for. Descriptive names like AXI_VCODEC_CLK and AXI_CTRL_CLK make the purpose clear and also make it easy to add secondary core (vcodec1) enums for the glymur platform. No functional changes. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 22 +++--- .../platform/qcom/iris/iris_platform_sc7280.h | 10 +-- .../platform/qcom/iris/iris_platform_sm8250.h | 6 +- .../platform/qcom/iris/iris_platform_sm8550.h | 6 +- .../platform/qcom/iris/iris_platform_sm8750.h | 12 +-- drivers/media/platform/qcom/iris/iris_vpu3x.c | 25 +++--- drivers/media/platform/qcom/iris/iris_vpu4x.c | 90 +++++++++++-------= ---- drivers/media/platform/qcom/iris/iris_vpu_common.c | 45 +++++------ 8 files changed, 110 insertions(+), 106 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 84fc68128c70..07cc0ce25b84 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -51,17 +51,17 @@ extern const struct iris_platform_data sm8650_data; extern const struct iris_platform_data sm8750_data; =20 enum platform_clk_type { - IRIS_AXI_CLK, /* AXI0 in case of platforms with multiple AXI clocks */ + IRIS_AXI_VCODEC_CLK, IRIS_CTRL_CLK, IRIS_AHB_CLK, - IRIS_HW_CLK, - IRIS_HW_AHB_CLK, - IRIS_AXI1_CLK, + IRIS_VCODEC_CLK, + IRIS_VCODEC_AHB_CLK, + IRIS_AXI_CTRL_CLK, IRIS_CTRL_FREERUN_CLK, - IRIS_HW_FREERUN_CLK, - IRIS_BSE_HW_CLK, - IRIS_VPP0_HW_CLK, - IRIS_VPP1_HW_CLK, + IRIS_VCODEC_FREERUN_CLK, + IRIS_VCODEC_BSE_CLK, + IRIS_VCODEC_VPP0_CLK, + IRIS_VCODEC_VPP1_CLK, IRIS_APV_HW_CLK, }; =20 @@ -198,9 +198,9 @@ struct icc_vote_data { =20 enum platform_pm_domain_type { IRIS_CTRL_POWER_DOMAIN, - IRIS_HW_POWER_DOMAIN, - IRIS_VPP0_HW_POWER_DOMAIN, - IRIS_VPP1_HW_POWER_DOMAIN, + IRIS_VCODEC_POWER_DOMAIN, + IRIS_VCODEC_VPP0_POWER_DOMAIN, + IRIS_VCODEC_VPP1_POWER_DOMAIN, IRIS_APV_HW_POWER_DOMAIN, }; =20 diff --git a/drivers/media/platform/qcom/iris/iris_platform_sc7280.h b/driv= ers/media/platform/qcom/iris/iris_platform_sc7280.h index 0ec8f334df67..6b783e524b81 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_sc7280.h +++ b/drivers/media/platform/qcom/iris/iris_platform_sc7280.h @@ -16,11 +16,11 @@ static const struct bw_info sc7280_bw_table_dec[] =3D { static const char * const sc7280_opp_pd_table[] =3D { "cx" }; =20 static const struct platform_clk_data sc7280_clk_table[] =3D { - {IRIS_CTRL_CLK, "core" }, - {IRIS_AXI_CLK, "iface" }, - {IRIS_AHB_CLK, "bus" }, - {IRIS_HW_CLK, "vcodec_core" }, - {IRIS_HW_AHB_CLK, "vcodec_bus" }, + {IRIS_CTRL_CLK, "core" }, + {IRIS_AXI_VCODEC_CLK, "iface" }, + {IRIS_AHB_CLK, "bus" }, + {IRIS_VCODEC_CLK, "vcodec_core" }, + {IRIS_VCODEC_AHB_CLK, "vcodec_bus" }, }; =20 static const char * const sc7280_opp_clk_table[] =3D { diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8250.h b/driv= ers/media/platform/qcom/iris/iris_platform_sm8250.h index 50306043eb8e..964e1cd92086 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_sm8250.h +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8250.h @@ -16,9 +16,9 @@ static const struct bw_info sm8250_bw_table_dec[] =3D { static const char * const sm8250_opp_pd_table[] =3D { "mx", "mmcx" }; =20 static const struct platform_clk_data sm8250_clk_table[] =3D { - {IRIS_AXI_CLK, "iface" }, - {IRIS_CTRL_CLK, "core" }, - {IRIS_HW_CLK, "vcodec0_core" }, + {IRIS_AXI_VCODEC_CLK, "iface" }, + {IRIS_CTRL_CLK, "core" }, + {IRIS_VCODEC_CLK, "vcodec0_core" }, }; =20 static const char * const sm8250_opp_clk_table[] =3D { diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8550.h b/driv= ers/media/platform/qcom/iris/iris_platform_sm8550.h index a9d9709c2e35..3b3f17b18707 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_sm8550.h +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h @@ -9,9 +9,9 @@ static const char * const sm8550_clk_reset_table[] =3D { "bus" }; =20 static const struct platform_clk_data sm8550_clk_table[] =3D { - {IRIS_AXI_CLK, "iface" }, - {IRIS_CTRL_CLK, "core" }, - {IRIS_HW_CLK, "vcodec0_core" }, + {IRIS_AXI_VCODEC_CLK, "iface" }, + {IRIS_CTRL_CLK, "core" }, + {IRIS_VCODEC_CLK, "vcodec0_core" }, }; =20 static struct platform_inst_caps platform_inst_cap_sm8550 =3D { diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8750.h b/driv= ers/media/platform/qcom/iris/iris_platform_sm8750.h index 719056656a5b..f843f13251c5 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_sm8750.h +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8750.h @@ -11,12 +11,12 @@ static const char * const sm8750_clk_reset_table[] =3D { }; =20 static const struct platform_clk_data sm8750_clk_table[] =3D { - {IRIS_AXI_CLK, "iface" }, - {IRIS_CTRL_CLK, "core" }, - {IRIS_HW_CLK, "vcodec0_core" }, - {IRIS_AXI1_CLK, "iface1" }, - {IRIS_CTRL_FREERUN_CLK, "core_freerun" }, - {IRIS_HW_FREERUN_CLK, "vcodec0_core_freerun" }, + {IRIS_AXI_VCODEC_CLK, "iface" }, + {IRIS_CTRL_CLK, "core" }, + {IRIS_VCODEC_CLK, "vcodec0_core" }, + {IRIS_AXI_CTRL_CLK, "iface1" }, + {IRIS_CTRL_FREERUN_CLK, "core_freerun" }, + {IRIS_VCODEC_FREERUN_CLK, "vcodec0_core_freerun" }, }; =20 #endif diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index 3dad47be78b5..c1355ff74a64 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -209,7 +209,7 @@ static int iris_vpu33_power_off_controller(struct iris_= core *core) =20 disable_power: iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); =20 return 0; } @@ -218,30 +218,31 @@ static int iris_vpu35_power_on_hw(struct iris_core *c= ore) { int ret; =20 - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_= HW_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, + core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); if (ret) return ret; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_AXI_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_AXI_VCODEC_CLK); if (ret) goto err_disable_power; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_FREERUN_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_FREERUN_CLK); if (ret) - goto err_disable_axi_clk; + goto err_disable_axi_vcodec_clk; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_CLK); if (ret) goto err_disable_hw_free_clk; =20 return 0; =20 err_disable_hw_free_clk: - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); -err_disable_axi_clk: - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_FREERUN_CLK); +err_disable_axi_vcodec_clk: + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); err_disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWE= R_DOMAIN]); + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); =20 return ret; } @@ -250,8 +251,8 @@ static void iris_vpu35_power_off_hw(struct iris_core *c= ore) { iris_vpu33_power_off_hardware(core); =20 - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_FREERUN_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); } =20 const struct vpu_ops iris_vpu3_ops =3D { diff --git a/drivers/media/platform/qcom/iris/iris_vpu4x.c b/drivers/media/= platform/qcom/iris/iris_vpu4x.c index 02e100a4045f..5abd19a3d2f8 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu4x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu4x.c @@ -27,20 +27,21 @@ static int iris_vpu4x_genpd_set_hwmode(struct iris_core= *core, bool hw_mode, u32 { int ret; =20 - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER= _DOMAIN], hw_mode); + ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_P= OWER_DOMAIN], + hw_mode); if (ret) return ret; =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) { ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs - [IRIS_VPP0_HW_POWER_DOMAIN], hw_mode); + [IRIS_VCODEC_VPP0_POWER_DOMAIN], hw_mode); if (ret) goto restore_hw_domain_mode; } =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) { ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs - [IRIS_VPP1_HW_POWER_DOMAIN], hw_mode); + [IRIS_VCODEC_VPP1_POWER_DOMAIN], hw_mode); if (ret) goto restore_vpp0_domain_mode; } @@ -56,14 +57,14 @@ static int iris_vpu4x_genpd_set_hwmode(struct iris_core= *core, bool hw_mode, u32 =20 restore_vpp1_domain_mode: if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VPP1_HW_POWER_D= OMAIN], + dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_VPP1_POW= ER_DOMAIN], !hw_mode); restore_vpp0_domain_mode: if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VPP0_HW_POWER_D= OMAIN], + dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_VPP0_POW= ER_DOMAIN], !hw_mode); restore_hw_domain_mode: - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]= , !hw_mode); + dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOM= AIN], !hw_mode); =20 return ret; } @@ -162,47 +163,47 @@ static int iris_vpu4x_enable_hardware_clocks(struct i= ris_core *core, u32 efuse_v { int ret; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_AXI_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_AXI_VCODEC_CLK); if (ret) return ret; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_FREERUN_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_FREERUN_CLK); if (ret) - goto disable_axi_clock; + goto disable_axi_vcodec_clock; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_CLK); if (ret) - goto disable_hw_free_run_clock; + goto disable_vcodec_free_run_clock; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_BSE_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_BSE_CLK); if (ret) - goto disable_hw_clock; + goto disable_vcodec_clock; =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) { - ret =3D iris_prepare_enable_clock(core, IRIS_VPP0_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_VPP0_CLK); if (ret) - goto disable_bse_hw_clock; + goto disable_vcodec_bse_clock; } =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) { - ret =3D iris_prepare_enable_clock(core, IRIS_VPP1_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_VPP1_CLK); if (ret) - goto disable_vpp0_hw_clock; + goto disable_vcodec_vpp0_clock; } =20 return 0; =20 -disable_vpp0_hw_clock: +disable_vcodec_vpp0_clock: if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) - iris_disable_unprepare_clock(core, IRIS_VPP0_HW_CLK); -disable_bse_hw_clock: - iris_disable_unprepare_clock(core, IRIS_BSE_HW_CLK); -disable_hw_clock: - iris_disable_unprepare_clock(core, IRIS_HW_CLK); -disable_hw_free_run_clock: - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); -disable_axi_clock: - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_VPP0_CLK); +disable_vcodec_bse_clock: + iris_disable_unprepare_clock(core, IRIS_VCODEC_BSE_CLK); +disable_vcodec_clock: + iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); +disable_vcodec_free_run_clock: + iris_disable_unprepare_clock(core, IRIS_VCODEC_FREERUN_CLK); +disable_axi_vcodec_clock: + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); =20 return ret; } @@ -210,15 +211,15 @@ static int iris_vpu4x_enable_hardware_clocks(struct i= ris_core *core, u32 efuse_v static void iris_vpu4x_disable_hardware_clocks(struct iris_core *core, u32= efuse_value) { if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) - iris_disable_unprepare_clock(core, IRIS_VPP1_HW_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_VPP1_CLK); =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) - iris_disable_unprepare_clock(core, IRIS_VPP0_HW_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_VPP0_CLK); =20 - iris_disable_unprepare_clock(core, IRIS_BSE_HW_CLK); - iris_disable_unprepare_clock(core, IRIS_HW_CLK); - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_BSE_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_FREERUN_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); } =20 static int iris_vpu4x_power_on_hardware(struct iris_core *core) @@ -226,20 +227,21 @@ static int iris_vpu4x_power_on_hardware(struct iris_c= ore *core) u32 efuse_value =3D readl(core->reg_base + WRAPPER_EFUSE_MONITOR); int ret; =20 - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_= HW_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, + core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); if (ret) return ret; =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) { ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VPP0_HW_POWER_DOMAIN]); + [IRIS_VCODEC_VPP0_POWER_DOMAIN]); if (ret) - goto disable_hw_power_domain; + goto disable_vcodec_power_domain; } =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) { ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VPP1_HW_POWER_DOMAIN]); + [IRIS_VCODEC_VPP1_POWER_DOMAIN]); if (ret) goto disable_vpp0_power_domain; } @@ -261,13 +263,13 @@ static int iris_vpu4x_power_on_hardware(struct iris_c= ore *core) disable_vpp1_power_domain: if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VPP1_HW_POWER_DOMAIN]); + [IRIS_VCODEC_VPP1_POWER_DOMAIN]); disable_vpp0_power_domain: if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VPP0_HW_POWER_DOMAIN]); -disable_hw_power_domain: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWE= R_DOMAIN]); + [IRIS_VCODEC_VPP0_POWER_DOMAIN]); +disable_vcodec_power_domain: + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); =20 return ret; } @@ -339,13 +341,13 @@ static void iris_vpu4x_power_off_hardware(struct iris= _core *core) =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VPP1_HW_POWER_DOMAIN]); + [IRIS_VCODEC_VPP1_POWER_DOMAIN]); =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VPP0_HW_POWER_DOMAIN]); + [IRIS_VCODEC_VPP0_POWER_DOMAIN]); =20 - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWE= R_DOMAIN]); + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); } =20 static int iris_vpu4x_set_hwmode(struct iris_core *core) diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index df76530be809..8b06bd346b83 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -212,7 +212,7 @@ int iris_vpu_power_off_controller(struct iris_core *cor= e) disable_power: iris_disable_unprepare_clock(core, IRIS_AHB_CLK); iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); =20 return 0; @@ -220,10 +220,10 @@ int iris_vpu_power_off_controller(struct iris_core *c= ore) =20 void iris_vpu_power_off_hw(struct iris_core *core) { - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]= , false); - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWE= R_DOMAIN]); - iris_disable_unprepare_clock(core, IRIS_HW_AHB_CLK); - iris_disable_unprepare_clock(core, IRIS_HW_CLK); + dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOM= AIN], false); + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); + iris_disable_unprepare_clock(core, IRIS_VCODEC_AHB_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); } =20 void iris_vpu_power_off(struct iris_core *core) @@ -250,13 +250,13 @@ int iris_vpu_power_on_controller(struct iris_core *co= re) if (ret) goto err_disable_power; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_AXI_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_AXI_VCODEC_CLK); if (ret) goto err_disable_power; =20 ret =3D iris_prepare_enable_clock(core, IRIS_CTRL_CLK); if (ret) - goto err_disable_axi_clock; + goto err_disable_axi_vcodec_clock; =20 ret =3D iris_prepare_enable_clock(core, IRIS_AHB_CLK); if (ret && ret !=3D -ENOENT) @@ -266,8 +266,8 @@ int iris_vpu_power_on_controller(struct iris_core *core) =20 err_disable_ctrl_clock: iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); -err_disable_axi_clock: - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); +err_disable_axi_vcodec_clock: + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); err_disable_power: iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); =20 @@ -278,31 +278,32 @@ int iris_vpu_power_on_hw(struct iris_core *core) { int ret; =20 - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_= HW_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, + core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); if (ret) return ret; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_CLK); if (ret) goto err_disable_power; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_AHB_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_AHB_CLK); if (ret && ret !=3D -ENOENT) - goto err_disable_hw_clock; + goto err_disable_vcodec_clock; =20 return 0; =20 -err_disable_hw_clock: - iris_disable_unprepare_clock(core, IRIS_HW_CLK); +err_disable_vcodec_clock: + iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); err_disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWE= R_DOMAIN]); + iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); =20 return ret; } =20 int iris_vpu_set_hwmode(struct iris_core *core) { - return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_= DOMAIN], true); + return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_PO= WER_DOMAIN], true); } =20 int iris_vpu_switch_to_hwmode(struct iris_core *core) @@ -365,7 +366,7 @@ int iris_vpu35_vpu4x_power_off_controller(struct iris_c= ore *core) disable_power: iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK); - iris_disable_unprepare_clock(core, IRIS_AXI1_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_CTRL_CLK); =20 iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); =20 @@ -382,13 +383,13 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_= core *core) if (ret) return ret; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_AXI1_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_AXI_CTRL_CLK); if (ret) goto err_disable_power; =20 ret =3D iris_prepare_enable_clock(core, IRIS_CTRL_FREERUN_CLK); if (ret) - goto err_disable_axi1_clk; + goto err_disable_axi_ctrl_clk; =20 ret =3D iris_prepare_enable_clock(core, IRIS_CTRL_CLK); if (ret) @@ -398,8 +399,8 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_co= re *core) =20 err_disable_ctrl_free_clk: iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK); -err_disable_axi1_clk: - iris_disable_unprepare_clock(core, IRIS_AXI1_CLK); +err_disable_axi_ctrl_clk: + iris_disable_unprepare_clock(core, IRIS_AXI_CTRL_CLK); err_disable_power: iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); =20 --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 1898F480355 for ; Fri, 15 May 2026 11:24:26 +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=1778844268; cv=none; b=rn59szyYwXsV67T5qL9x6I8sU1olZFnloboFKsabJgjkHozqhBu4Mk7qpaBzWfjVXdVRhG+wvCeo3B3fe88flIuLgY2+1GJA97RfwdEjldoTg3LOOVTXtQi970f5xC9YHRM/r17kKpX7lDn62fI5O689u4nrODdtoXyLg5KZVUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844268; c=relaxed/simple; bh=8GEDarA6be0j50wNyqgSIad0yj0KaVwLw1xvsnqY7XE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=W8RxOl2O2JjceTJasFRPsvFmvOfJwvXxChLJ7nrohwlMz7Cr/cIaTnsfIjhSrMTqRp0ReNlNAKR7YLfumi7+9IWuD7qTI7934r3YX+KEU9dErW+7af1ZjMXFcSVEst2NiBXbtAv5KH8HzyK1PqNNFKTY/DYGvaK9+6AI+cR1iq8= 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=CUEcEKIb; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=LbHhfIrG; 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="CUEcEKIb"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="LbHhfIrG" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64F9HdMp1714936 for ; Fri, 15 May 2026 11:24:25 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= p9e8SFWKX43j8PfXL3Etp/9LfH7ZQMKBil0enXZsfe8=; b=CUEcEKIbJEi756Hd 12EA8ts3ZBQGGRCPXbMZ+SAG6xqajTag8sfMjVUdhJ1jWh2dId63yYO0q1MME6n1 qyz5YyqvwThWkn23xh0rKKPgGn4YbqPEKl6F7OrThPtspqHHWP7LOQ23Q1GajD8J ugvF6IzIjt3SVhw7IFfBB0yqNN4/xdugzBXLOJ6nEw8x5p6syX8qduOXHmIr3WOh eOaOVWERGZxtzpgafgtalYOcRYkY1zgdXjGnXgDmlhHq0LismBH1UYqkjby3b4kS GGIcbgwnYmH2s8zCrPht+CV2caXujMDD/XA7BJdhwSIg9aXToKhtFJAy7lM1+172 YsIZGQ== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5tyxst73-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:25 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-3662668b825so3745908a91.3 for ; Fri, 15 May 2026 04:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844265; x=1779449065; 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=p9e8SFWKX43j8PfXL3Etp/9LfH7ZQMKBil0enXZsfe8=; b=LbHhfIrGrkmP09Ke0TIqJlapGZVP6dTxJHNQlw72lbw8EETdhreX+7N7Zt2cRhFsnU lah86jcvGObR6uH82u5gAZiXu/Ub/SsS+0Ezqv8vupWbkvqinnf/dcYkB77ASum6GLSX kJiyNlOs/GiP4iso6pR96ntRdpA1BvYQ7Rb7c4cDImVDg8q2+9sHSuEL3zLvAKLccztY wfwQZiFeWZRhcQUDi5ZNuGa13qvtIm0D2FCQEC2lyHG/hKVJ8aaG3chn3xnzkU0MIm7M fSZzisq9hjJgmw+Kx9DOv22RGS9lHhScKbfr8MDVgcwS/joEfUV30a55GD7d4WY5VjAB ykPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844265; x=1779449065; 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=p9e8SFWKX43j8PfXL3Etp/9LfH7ZQMKBil0enXZsfe8=; b=Ibjj9OyvmWvxLc7RhQ+/o4ryYHU5Jot3qCAh3gYef7k0DR1cFa5HMLCo7yuQ/Hp1Lr YvKFhXZH5sVM/l7anXTwaELjNGYNx6+5lIdQ4ijl/MDYxAlLNLql5SEwICGjhxMq0mN6 tpd9I76JHBbJp7Mdqc0kcnBqQJEdk3wR/oatZJ2qIbY4X8f2kvTkZe70AHewGoQ4T9zZ /Zb82onXvDr1WeU5uZxXY5o74NGxlCZ2i6KYnAyvPAgowrVgBrnR9vxaApXxXwzCXAeH GKvlxUzAkg/G4wvioOz9mfeHYAmwY6VW1QfMtelsZxmkwzYoSE/DnvadHQRJBPXkJlKE L8GA== X-Gm-Message-State: AOJu0Yyb1UwAtXQeeV6ioYEdKpumHCWrXiu+KI9e5PXO/GdJ4h2pNpRY bE4UtxdVubcnQpUe/AEENA8CFkLZNUHtHwMTo+2AA2z3u3R4Hi7C9QnkUg7Ht6GQ+rMepqU8ETS AQv8sfrKp/ansoaEP96buBwAGbE1pmHFF0W6EOKH/iPiyDX129wOs0i8Lb5L4H9JTNls= X-Gm-Gg: Acq92OFftfleUFD4+Uc+ZMvsFIghqP/UBf5aXzCIPdzNZ1W6gicjgXwmcmWMDrvtp6o dgfepk2IXnZw7gpipkAthRaAtTDcReG17mckGoWQuSazZoeyxu3I5GaVutF0Dobw1PLWVq2mvsr n2rFz2/H5+j5+MJv4lDXhgzSzXVmC3dwwLOJUF9s+S1UkJUaxbIDaQJ0z6lMO6i1sI2lwertoiS VhqKdP0W2IO/RyLuZT5Xtnvc8gszo3CeUcqnKPr7z1Q+zEbFAlgQvepRBYvJtbnRUQBWf8xy5A2 VowT57bN3m0M9gqL54A/rdgzMdXxqFkZTSyxXZha9TNRQPAVWtLrPes2j0qHO0uZmcf8grxk9Dg XgObL5Q4/xzl9HkLk1ltuX1ax2CH/44kFre8k0Tr8/WA/TTu5ZTd1QpE= X-Received: by 2002:a17:90a:fc4d:b0:368:1979:5e8d with SMTP id 98e67ed59e1d1-369519cd892mr3633345a91.2.1778844264460; Fri, 15 May 2026 04:24:24 -0700 (PDT) X-Received: by 2002:a17:90a:fc4d:b0:368:1979:5e8d with SMTP id 98e67ed59e1d1-369519cd892mr3633319a91.2.1778844263916; Fri, 15 May 2026 04:24:23 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:23 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:24 +0530 Subject: [PATCH v6 09/14] media: iris: Use power domain type to look up pd_devs index 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: <20260515-glymur-v6-9-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=22859; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=8GEDarA6be0j50wNyqgSIad0yj0KaVwLw1xvsnqY7XE=; b=SS4N+4KmlSyy0NYCaMj2k8ZAjYrQm6+GwmRgLV7D+pdGsDjUf+zU/77XQSeNqQYGgB/uu3qLm segocow8hqVARirp0lEhJ+nDz36EE+G09ACxsq2Gh0Qq8zDdZjtrYTl X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=dMWWXuZb c=1 sm=1 tr=0 ts=6a070269 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=3jpyDGP9Yv0p6WhxEk8A:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-ORIG-GUID: 2rZBTOoZm152vI4rpPZUE7QoDbMa0BkJ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfXwYBmIW3J5iMh gLw6yo1CupvgRWeJXRu0SPfi9CrtsVVQOmR/n7PKUP/kuO/oKh/6gF3mqjUDuo5Sm4GsOvvrFdA a3CaeUpE6WlzGNz1yo6mt8Im6Xhs73sY0p6a8q3sr7LWAfdDUeQ7t+1gxJ/N225a+HUIr8M6Wgv 5I7vuWvTl1Acd6HlSooSD2oEzY0wvN8xK4fsRULffkF7HKAV3CR0D2+aKn3vx5aFxUHfz7mMC5j m+RnCbiyl6dfpc6zSBKUSxaw1NTCDa7qLWuSLJXM/4TRox7n7DVUN726arFhbf87AYOWZxyQ1nA a6QH+cqRvQSbasH6gVZg0AzE0iocczZqbQJF8Mr066svIGAXNPjn6vhCtgLRouZBLsWZsqev1Hv ey9bMg4fELar6MxvKGPqCc/GJ6Zfb031S4i+b51mRmznDiElyid5tXI847GDFjqHP1pVlvzdeZE gsPK2zvT4UGIpmkOAGQ== X-Proofpoint-GUID: 2rZBTOoZm152vI4rpPZUE7QoDbMa0BkJ 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 phishscore=0 suspectscore=0 malwarescore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 The pmdomain_tbl was a array of strings holding only the power domain names. Callers had to pass a pd_devs[] pointer indexed directly by the platform_pm_domain_type enum value to iris_enable_power_domains() and iris_disable_power_domains(). A future platform may need to introduce a new enum value that aliases an existing one (e.g. IRIS_VCODEC1_POWER_DOMAIN aliasing the IRIS_VPP0_HW_POWER_DOMAIN on Glymur), which would break the assumption that enum values map 1:1 to pd_devs[] indices. To fix this, replace the string array with a new struct platform_pd_data that pairs each power domain name with its platform_pm_domain_type. Add a helper iris_get_pd_index_by_type() that walks this table and returns the correct pd_devs[] index for a given type. Update iris_enable_power_domains() and iris_disable_power_domains() to accept a platform_pm_domain_type instead of a struct device pointer. They now call the helper internally to resolve the index, removing the need for callers to do the index lookup themselves. This prepares the driver for adding new platforms where power domain enum values cannot be used directly as pd_devs[] indices. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 9 +++- .../media/platform/qcom/iris/iris_platform_vpu2.c | 18 +++++--- .../media/platform/qcom/iris/iris_platform_vpu3x.c | 24 ++++++---- drivers/media/platform/qcom/iris/iris_probe.c | 4 +- drivers/media/platform/qcom/iris/iris_resources.c | 43 +++++++++++++++++- drivers/media/platform/qcom/iris/iris_resources.h | 6 ++- drivers/media/platform/qcom/iris/iris_vpu3x.c | 7 ++- drivers/media/platform/qcom/iris/iris_vpu4x.c | 52 ++++++++----------= ---- drivers/media/platform/qcom/iris/iris_vpu_common.c | 23 +++++----- 9 files changed, 115 insertions(+), 71 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 07cc0ce25b84..1d757cb8e9e1 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -70,6 +70,12 @@ struct platform_clk_data { const char *clk_name; }; =20 +struct platform_pd_data { + enum platform_pm_domain_type *pd_types; + const char * const *pd_names; + u32 pd_count; +}; + struct tz_cp_config { u32 cp_start; u32 cp_size; @@ -270,8 +276,7 @@ struct iris_platform_data { unsigned int icc_tbl_size; const struct bw_info *bw_tbl_dec; unsigned int bw_tbl_dec_size; - const char * const *pmdomain_tbl; - unsigned int pmdomain_tbl_size; + const struct platform_pd_data *pmdomain_tbl; const char * const *opp_pd_tbl; unsigned int opp_pd_tbl_size; const struct platform_clk_data *clk_tbl; diff --git a/drivers/media/platform/qcom/iris/iris_platform_vpu2.c b/driver= s/media/platform/qcom/iris/iris_platform_vpu2.c index 41986af8313b..bcf873829fd3 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_vpu2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_vpu2.c @@ -62,7 +62,17 @@ static const struct icc_info iris_icc_info_vpu2[] =3D { =20 static const char * const iris_clk_reset_table_vpu2[] =3D { "bus", "core" = }; =20 -static const char * const iris_pmdomain_table_vpu2[] =3D { "venus", "vcode= c0" }; +static const struct platform_pd_data iris_pmdomain_table_vpu2 =3D { + .pd_types =3D (enum platform_pm_domain_type []) { + IRIS_CTRL_POWER_DOMAIN, + IRIS_VCODEC_POWER_DOMAIN, + }, + .pd_names =3D (const char *[]) { + "venus", + "vcodec0", + }, + .pd_count =3D 2, +}; =20 static const struct tz_cp_config tz_cp_config_vpu2[] =3D { { @@ -80,8 +90,7 @@ const struct iris_platform_data sc7280_data =3D { .icc_tbl_size =3D ARRAY_SIZE(iris_icc_info_vpu2), .bw_tbl_dec =3D sc7280_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sc7280_bw_table_dec), - .pmdomain_tbl =3D iris_pmdomain_table_vpu2, - .pmdomain_tbl_size =3D ARRAY_SIZE(iris_pmdomain_table_vpu2), + .pmdomain_tbl =3D &iris_pmdomain_table_vpu2, .opp_pd_tbl =3D sc7280_opp_pd_table, .opp_pd_tbl_size =3D ARRAY_SIZE(sc7280_opp_pd_table), .clk_tbl =3D sc7280_clk_table, @@ -111,8 +120,7 @@ const struct iris_platform_data sm8250_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(iris_clk_reset_table_vpu2), .bw_tbl_dec =3D sm8250_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sm8250_bw_table_dec), - .pmdomain_tbl =3D iris_pmdomain_table_vpu2, - .pmdomain_tbl_size =3D ARRAY_SIZE(iris_pmdomain_table_vpu2), + .pmdomain_tbl =3D &iris_pmdomain_table_vpu2, .opp_pd_tbl =3D sm8250_opp_pd_table, .opp_pd_tbl_size =3D ARRAY_SIZE(sm8250_opp_pd_table), .clk_tbl =3D sm8250_clk_table, diff --git a/drivers/media/platform/qcom/iris/iris_platform_vpu3x.c b/drive= rs/media/platform/qcom/iris/iris_platform_vpu3x.c index c249ff827541..8a0f67d1a74a 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_platform_vpu3x.c @@ -72,7 +72,17 @@ static const struct bw_info iris_bw_table_dec_vpu3x[] = =3D { { ((1920 * 1080) / 256) * 30, 294000 }, }; =20 -static const char * const iris_pmdomain_table_vpu3x[] =3D { "venus", "vcod= ec0" }; +static const struct platform_pd_data iris_pmdomain_table_vpu3x =3D { + .pd_types =3D (enum platform_pm_domain_type []) { + IRIS_CTRL_POWER_DOMAIN, + IRIS_VCODEC_POWER_DOMAIN, + }, + .pd_names =3D (const char *[]) { + "venus", + "vcodec0", + }, + .pd_count =3D 2, +}; =20 static const char * const iris_opp_pd_table_vpu3x[] =3D { "mxc", "mmcx" }; =20 @@ -103,8 +113,7 @@ const struct iris_platform_data qcs8300_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(sm8550_clk_reset_table), .bw_tbl_dec =3D iris_bw_table_dec_vpu3x, .bw_tbl_dec_size =3D ARRAY_SIZE(iris_bw_table_dec_vpu3x), - .pmdomain_tbl =3D iris_pmdomain_table_vpu3x, - .pmdomain_tbl_size =3D ARRAY_SIZE(iris_pmdomain_table_vpu3x), + .pmdomain_tbl =3D &iris_pmdomain_table_vpu3x, .opp_pd_tbl =3D iris_opp_pd_table_vpu3x, .opp_pd_tbl_size =3D ARRAY_SIZE(iris_opp_pd_table_vpu3x), .clk_tbl =3D sm8550_clk_table, @@ -132,8 +141,7 @@ const struct iris_platform_data sm8550_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(sm8550_clk_reset_table), .bw_tbl_dec =3D iris_bw_table_dec_vpu3x, .bw_tbl_dec_size =3D ARRAY_SIZE(iris_bw_table_dec_vpu3x), - .pmdomain_tbl =3D iris_pmdomain_table_vpu3x, - .pmdomain_tbl_size =3D ARRAY_SIZE(iris_pmdomain_table_vpu3x), + .pmdomain_tbl =3D &iris_pmdomain_table_vpu3x, .opp_pd_tbl =3D iris_opp_pd_table_vpu3x, .opp_pd_tbl_size =3D ARRAY_SIZE(iris_opp_pd_table_vpu3x), .clk_tbl =3D sm8550_clk_table, @@ -169,8 +177,7 @@ const struct iris_platform_data sm8650_data =3D { .controller_rst_tbl_size =3D ARRAY_SIZE(sm8650_controller_reset_table), .bw_tbl_dec =3D iris_bw_table_dec_vpu3x, .bw_tbl_dec_size =3D ARRAY_SIZE(iris_bw_table_dec_vpu3x), - .pmdomain_tbl =3D iris_pmdomain_table_vpu3x, - .pmdomain_tbl_size =3D ARRAY_SIZE(iris_pmdomain_table_vpu3x), + .pmdomain_tbl =3D &iris_pmdomain_table_vpu3x, .opp_pd_tbl =3D iris_opp_pd_table_vpu3x, .opp_pd_tbl_size =3D ARRAY_SIZE(iris_opp_pd_table_vpu3x), .clk_tbl =3D sm8550_clk_table, @@ -198,8 +205,7 @@ const struct iris_platform_data sm8750_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(sm8750_clk_reset_table), .bw_tbl_dec =3D iris_bw_table_dec_vpu3x, .bw_tbl_dec_size =3D ARRAY_SIZE(iris_bw_table_dec_vpu3x), - .pmdomain_tbl =3D iris_pmdomain_table_vpu3x, - .pmdomain_tbl_size =3D ARRAY_SIZE(iris_pmdomain_table_vpu3x), + .pmdomain_tbl =3D &iris_pmdomain_table_vpu3x, .opp_pd_tbl =3D iris_opp_pd_table_vpu3x, .opp_pd_tbl_size =3D ARRAY_SIZE(iris_opp_pd_table_vpu3x), .clk_tbl =3D sm8750_clk_table, diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index 12596c9a3cbf..3f2fc4e197c2 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -44,8 +44,8 @@ static int iris_init_power_domains(struct iris_core *core) int ret; =20 struct dev_pm_domain_attach_data iris_pd_data =3D { - .pd_names =3D core->iris_platform_data->pmdomain_tbl, - .num_pd_names =3D core->iris_platform_data->pmdomain_tbl_size, + .pd_names =3D core->iris_platform_data->pmdomain_tbl->pd_names, + .num_pd_names =3D core->iris_platform_data->pmdomain_tbl->pd_count, .pd_flags =3D PD_FLAG_NO_DEV_LINK, }; =20 diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/me= dia/platform/qcom/iris/iris_resources.c index 773f6548370a..cc61dc038598 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.c +++ b/drivers/media/platform/qcom/iris/iris_resources.c @@ -70,10 +70,42 @@ int iris_opp_set_rate(struct device *dev, unsigned long= freq) return dev_pm_opp_set_opp(dev, opp); } =20 -int iris_enable_power_domains(struct iris_core *core, struct device *pd_de= v) +static int iris_get_pd_index_by_type(struct iris_core *core, enum platform= _pm_domain_type pd_type) { + const struct platform_pd_data *pd_tbl; + u32 i; + + pd_tbl =3D core->iris_platform_data->pmdomain_tbl; + + for (i =3D 0; i < pd_tbl->pd_count; i++) { + if (pd_tbl->pd_types[i] =3D=3D pd_type) + return i; + } + + return -EINVAL; +} + +int iris_genpd_set_hwmode(struct iris_core *core, enum platform_pm_domain_= type pd_type, bool hwmode) +{ + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + + if (pd_index < 0) + return pd_index; + + return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[pd_index], hwm= ode); +} + +int iris_enable_power_domains(struct iris_core *core, enum platform_pm_dom= ain_type pd_type) +{ + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + struct device *pd_dev; int ret; =20 + if (pd_index < 0) + return pd_index; + + pd_dev =3D core->pmdomain_tbl->pd_devs[pd_index]; + ret =3D iris_opp_set_rate(core->dev, ULONG_MAX); if (ret) return ret; @@ -85,10 +117,17 @@ int iris_enable_power_domains(struct iris_core *core, = struct device *pd_dev) return ret; } =20 -int iris_disable_power_domains(struct iris_core *core, struct device *pd_d= ev) +int iris_disable_power_domains(struct iris_core *core, enum platform_pm_do= main_type pd_type) { + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + struct device *pd_dev; int ret; =20 + if (pd_index < 0) + return pd_index; + + pd_dev =3D core->pmdomain_tbl->pd_devs[pd_index]; + ret =3D iris_opp_set_rate(core->dev, 0); if (ret) return ret; diff --git a/drivers/media/platform/qcom/iris/iris_resources.h b/drivers/me= dia/platform/qcom/iris/iris_resources.h index 6bfbd2dc6db0..d5692e4694b1 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.h +++ b/drivers/media/platform/qcom/iris/iris_resources.h @@ -9,11 +9,13 @@ struct iris_core; =20 int iris_opp_set_rate(struct device *dev, unsigned long freq); -int iris_enable_power_domains(struct iris_core *core, struct device *pd_de= v); -int iris_disable_power_domains(struct iris_core *core, struct device *pd_d= ev); +int iris_enable_power_domains(struct iris_core *core, enum platform_pm_dom= ain_type pd_type); +int iris_disable_power_domains(struct iris_core *core, enum platform_pm_do= main_type pd_type); int iris_unset_icc_bw(struct iris_core *core); int iris_set_icc_bw(struct iris_core *core, unsigned long icc_bw); int iris_disable_unprepare_clock(struct iris_core *core, enum platform_clk= _type clk_type); int iris_prepare_enable_clock(struct iris_core *core, enum platform_clk_ty= pe clk_type); +int iris_genpd_set_hwmode(struct iris_core *core, enum platform_pm_domain_= type pd_type, + bool hwmode); =20 #endif diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index c1355ff74a64..39e9c78c3a69 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -208,7 +208,7 @@ static int iris_vpu33_power_off_controller(struct iris_= core *core) iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); =20 disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); + iris_disable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); =20 return 0; @@ -218,8 +218,7 @@ static int iris_vpu35_power_on_hw(struct iris_core *cor= e) { int ret; =20 - ret =3D iris_enable_power_domains(core, - core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); if (ret) return ret; =20 @@ -242,7 +241,7 @@ static int iris_vpu35_power_on_hw(struct iris_core *cor= e) err_disable_axi_vcodec_clk: iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); err_disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); =20 return ret; } diff --git a/drivers/media/platform/qcom/iris/iris_vpu4x.c b/drivers/media/= platform/qcom/iris/iris_vpu4x.c index 5abd19a3d2f8..541e156d2e87 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu4x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu4x.c @@ -27,28 +27,24 @@ static int iris_vpu4x_genpd_set_hwmode(struct iris_core= *core, bool hw_mode, u32 { int ret; =20 - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_P= OWER_DOMAIN], - hw_mode); + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, hw_mode); if (ret) return ret; =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) { - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP0_POWER_DOMAIN], hw_mode); + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC_VPP0_POWER_DOMAIN, hw_mo= de); if (ret) goto restore_hw_domain_mode; } =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) { - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP1_POWER_DOMAIN], hw_mode); + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC_VPP1_POWER_DOMAIN, hw_mo= de); if (ret) goto restore_vpp0_domain_mode; } =20 if (!(efuse_value & DISABLE_VIDEO_APV_BIT)) { - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs - [IRIS_APV_HW_POWER_DOMAIN], hw_mode); + ret =3D iris_genpd_set_hwmode(core, IRIS_APV_HW_POWER_DOMAIN, hw_mode); if (ret) goto restore_vpp1_domain_mode; } @@ -57,14 +53,12 @@ static int iris_vpu4x_genpd_set_hwmode(struct iris_core= *core, bool hw_mode, u32 =20 restore_vpp1_domain_mode: if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_VPP1_POW= ER_DOMAIN], - !hw_mode); + iris_genpd_set_hwmode(core, IRIS_VCODEC_VPP1_POWER_DOMAIN, !hw_mode); restore_vpp0_domain_mode: if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_VPP0_POW= ER_DOMAIN], - !hw_mode); + iris_genpd_set_hwmode(core, IRIS_VCODEC_VPP0_POWER_DOMAIN, !hw_mode); restore_hw_domain_mode: - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOM= AIN], !hw_mode); + iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, !hw_mode); =20 return ret; } @@ -73,8 +67,7 @@ static int iris_vpu4x_power_on_apv(struct iris_core *core) { int ret; =20 - ret =3D iris_enable_power_domains(core, - core->pmdomain_tbl->pd_devs[IRIS_APV_HW_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_APV_HW_POWER_DOMAIN); if (ret) return ret; =20 @@ -85,7 +78,7 @@ static int iris_vpu4x_power_on_apv(struct iris_core *core) return 0; =20 disable_apv_hw_power_domain: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_APV_HW_= POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_APV_HW_POWER_DOMAIN); =20 return ret; } @@ -140,7 +133,7 @@ static void iris_vpu4x_power_off_apv(struct iris_core *= core) =20 disable_clocks_and_power: iris_disable_unprepare_clock(core, IRIS_APV_HW_CLK); - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_APV_HW_= POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_APV_HW_POWER_DOMAIN); } =20 static void iris_vpu4x_ahb_sync_reset_apv(struct iris_core *core) @@ -227,21 +220,18 @@ static int iris_vpu4x_power_on_hardware(struct iris_c= ore *core) u32 efuse_value =3D readl(core->reg_base + WRAPPER_EFUSE_MONITOR); int ret; =20 - ret =3D iris_enable_power_domains(core, - core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); if (ret) return ret; =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) { - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP0_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_VCODEC_VPP0_POWER_DOMAIN); if (ret) goto disable_vcodec_power_domain; } =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) { - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP1_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_VCODEC_VPP1_POWER_DOMAIN); if (ret) goto disable_vpp0_power_domain; } @@ -262,14 +252,12 @@ static int iris_vpu4x_power_on_hardware(struct iris_c= ore *core) iris_vpu4x_disable_hardware_clocks(core, efuse_value); disable_vpp1_power_domain: if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP1_POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_VPP1_POWER_DOMAIN); disable_vpp0_power_domain: if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP0_POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_VPP0_POWER_DOMAIN); disable_vcodec_power_domain: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); =20 return ret; } @@ -340,14 +328,12 @@ static void iris_vpu4x_power_off_hardware(struct iris= _core *core) iris_vpu4x_disable_hardware_clocks(core, efuse_value); =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP1_POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_VPP1_POWER_DOMAIN); =20 if (!(efuse_value & DISABLE_VIDEO_VPP0_BIT)) - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_VCODEC_VPP0_POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_VPP0_POWER_DOMAIN); =20 - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); } =20 static int iris_vpu4x_set_hwmode(struct iris_core *core) diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 8b06bd346b83..1dd3eedb58e8 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -213,15 +213,15 @@ int iris_vpu_power_off_controller(struct iris_core *c= ore) iris_disable_unprepare_clock(core, IRIS_AHB_CLK); iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); + iris_disable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); =20 return 0; } =20 void iris_vpu_power_off_hw(struct iris_core *core) { - dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOM= AIN], false); - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); + iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, false); + iris_disable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); iris_disable_unprepare_clock(core, IRIS_VCODEC_AHB_CLK); iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); } @@ -242,7 +242,7 @@ int iris_vpu_power_on_controller(struct iris_core *core) u32 rst_tbl_size =3D core->iris_platform_data->clk_rst_tbl_size; int ret; =20 - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_= CTRL_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); if (ret) return ret; =20 @@ -269,7 +269,7 @@ int iris_vpu_power_on_controller(struct iris_core *core) err_disable_axi_vcodec_clock: iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); err_disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); + iris_disable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); =20 return ret; } @@ -278,8 +278,7 @@ int iris_vpu_power_on_hw(struct iris_core *core) { int ret; =20 - ret =3D iris_enable_power_domains(core, - core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); if (ret) return ret; =20 @@ -296,14 +295,14 @@ int iris_vpu_power_on_hw(struct iris_core *core) err_disable_vcodec_clock: iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); err_disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); =20 return ret; } =20 int iris_vpu_set_hwmode(struct iris_core *core) { - return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_PO= WER_DOMAIN], true); + return iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, true); } =20 int iris_vpu_switch_to_hwmode(struct iris_core *core) @@ -368,7 +367,7 @@ int iris_vpu35_vpu4x_power_off_controller(struct iris_c= ore *core) iris_disable_unprepare_clock(core, IRIS_CTRL_FREERUN_CLK); iris_disable_unprepare_clock(core, IRIS_AXI_CTRL_CLK); =20 - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); + iris_disable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); =20 reset_control_bulk_reset(clk_rst_tbl_size, core->resets); =20 @@ -379,7 +378,7 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_co= re *core) { int ret; =20 - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_= CTRL_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); if (ret) return ret; =20 @@ -402,7 +401,7 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_co= re *core) err_disable_axi_ctrl_clk: iris_disable_unprepare_clock(core, IRIS_AXI_CTRL_CLK); err_disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); + iris_disable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); =20 return ret; } --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 A7204480953 for ; Fri, 15 May 2026 11:24:33 +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=1778844276; cv=none; b=mPp6PweAgU4O+wsDfkFutynq/No9nkgjQxhlw0/9kJswiWpE67j4yL6B1U25/Dd9WSpOnhbNqCGivS3WfAkLEfhZ8xnKF8pymA7tCV5SOKruGGfsPxVuOBz2dvjtrYRDWbFZd65owWs50/FN2+zyK8psHjXKz277qPTgZKXMPJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844276; c=relaxed/simple; bh=zszHRrVQved9TEjgnC/9obAGZk+o5ba6DgZk+Fq7GGA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i9dc0+iLM7kusbD3mS+KopUVv9QTlvGCqJeJQ24oVgDeWcXq6yiHU3fCmhpVTjQQLiTHN9c3vuVm9AcFb1u6fj6e/ykNXyMEZKn+zeV5g9GLFfaSHXbnEG7BS3yYFnU5J7v3LhY3unK8SYEvwn3vZVZGfRFpULpi3UKuLhi8LlI= 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=g47OT226; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=M9PVOsGf; 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="g47OT226"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="M9PVOsGf" 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 64F5UJOG3198008 for ; Fri, 15 May 2026 11:24:32 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= P7m/a9W9ZC7sp/pAB71Rgbe0RJu0eb2BVEITxHflea0=; b=g47OT226ReBmEbKW Cym1GSQM8AzIQkI+3Gw4WSd1nv+EOVWgCQvmkl2QSr57GqT2SRENyhJ8UBGjkHtn YU3emzzOV8idIjMXrOjJU01OxSeFRVmgEw7mbWVujwmCFFXFQTotDD+E+MTo4RBm ez2A4cqI42afStal3jNEeIicvkZtfCIr0edgQOqW8tjuN5P7BfehKhEi6TrZTH6m M9EX21GnXe2mYgLDGbD4WNhsYpDLoLNz1SFcYjfp05xlH9RXVljRwAOBw17KdwMO Y43Mxjl/pRJb3MFGD9ArfGYH8lknJGi1aBVMmvf8vZksjjpY9Py7+ImspHoWOGhN PrIUuA== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1qb13u-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:32 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-365faf6006dso10541055a91.1 for ; Fri, 15 May 2026 04:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844271; x=1779449071; 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=P7m/a9W9ZC7sp/pAB71Rgbe0RJu0eb2BVEITxHflea0=; b=M9PVOsGfDXhCbmc5YvkudxdrNEryV+mmF+DBGh2gNNS2CsB/gnZ9ZJpb3xRLC0g/ka cfoDNns2ib1pPLfjNFnkQDNdrK1cLs/3CWUbg1Gg5/snrr1f6Szn5LRoJ/ciJL0Q2dFb A6BIp6N0AmHw6h8m16PiInxaWDS7wWV2laTNOlTYnT41CDj8HCN+x7HOmKdHX1jhe3iQ jREUSp2a9WSaNyr6N3r84hL2Gal8YHjZSniHtS4Oz6oIk0o7M5Gs3W2V2phFyAA3t2xM TIZtMXGKDKtzhy5dmb4dai4rfRQSdTDRJDiE5jtuy5UGnglJFp24lHd7L1YL0QJM6xVF 0mgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844271; x=1779449071; 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=P7m/a9W9ZC7sp/pAB71Rgbe0RJu0eb2BVEITxHflea0=; b=ClXo/tao/JBPm9oPfMlyksCdxOGF6RIeCVY5n9R4Ec7amHOQgv5nFKRkibaZ3bCOup Gz9rhoqBfg36pUbBzwqer5opKqePESJQ22JkdDGBx/lMZuJfgRHaWk6nMmKf16Yccdmq L8vaFcYP5iBs6fpWdLxtCT+5pJjaqUbkJzm8UmMre8GYPhtoVpfG5y5C9hed3zY3sfn8 IEwVI3GgmrcUVF5ysbOne33epaF+JDyEE38rfiJJ0rUrkbEvFkmAQIgCJ0PrrmoAIQ9w 5yEuz77+Bbaz+jSWjELY3F8riiszTFKYC0pjriNDTZ07aob0S5aY41ufJ9E5Qz8+NMup 9iUg== X-Gm-Message-State: AOJu0Yw9BQkeszTiSTnmdHtvmcdIQl+PAP22cixBrayez4zvigcC4Ss7 HyLNsRkhzTemdO7zxbJ7R9PS4x1LyHm5IG6svZ0V0HJpWFCRQeEIpQQdWV8rXIAS0lU4pozrFc1 e7sjYe7tJJHCTZZoyzKQkemuFGTlPm/neK0EL4cIyUJj898vksmbS8sZ5QVQvfFcmu5Y= X-Gm-Gg: Acq92OEVAbVEpfnUug5oATS+L7/HlNKQw8xPYEmi10OdoUczFN8eskVGtNiJtedjJTQ mUT77wKiRJvdHdj19cKdaQEoG58IDlomKC6Xa5FU9hVjtLijejANZBVm774XPjeQwab834iAbYt Jhhbu61x88z2zGqNxeUwXxge0p00Fc9upizEzZFKx1wUv70cy1a5Bg9uXZNRfrSN4OkxxjgYqBx qrnz4kbY9biaZ4AY0PrRbpnMpM+ZUhIhUy/FZqlgrgCho4nSZvnT14RybGyKfsx6W6x+jyV3OOU r74KB+1tnm5FWUPsAP/PFKigBR2LoWmGpSD5WnJU3joawWPHfQiOmsncqmnN2AbcPVRVJPoTrDX goVUzRee379QdyeJpWNo2v+0GbsbNcBFmV8Ac0lKgg916JP7DdCPzR2g= X-Received: by 2002:a17:90b:2549:b0:366:4782:1389 with SMTP id 98e67ed59e1d1-36951b8208dmr3490948a91.14.1778844270898; Fri, 15 May 2026 04:24:30 -0700 (PDT) X-Received: by 2002:a17:90b:2549:b0:366:4782:1389 with SMTP id 98e67ed59e1d1-36951b8208dmr3490900a91.14.1778844270304; Fri, 15 May 2026 04:24:30 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:29 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:25 +0530 Subject: [PATCH v6 10/14] media: iris: Add power sequence for Glymur 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: <20260515-glymur-v6-10-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=10275; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=zszHRrVQved9TEjgnC/9obAGZk+o5ba6DgZk+Fq7GGA=; b=ZNvHPaRIS7dTJBI2L6wKjq58j3bNk3OrbBHceclJvEtSozd3y/FOwQMGxJsmR6tiH5B1UV30w oDRyp0dxolqA4lNhKT19CKhs7hVwrfbav4CxDiN/kAT4BJmOJQYrre6 X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: Nt-1wat4zbdblVKnRRR6JrbRslFEaG3W X-Authority-Analysis: v=2.4 cv=GulyPE1C c=1 sm=1 tr=0 ts=6a070270 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=Lnm5EmowVMQMBrtSgN0A:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX/EPYJsB78aE6 Dyzv3l6Ua4KQwqVA9AboRZd6m1J5GFNUymdcrkNc/Hsz6anUPKE4+DxWXGmVLGfE2+wwfYhoSV5 UrFNE1Qi5cRF1SodtCwWvOzd8cbPiq8Rpm95VkbwkSAgHWe4tHjAOlcC4xt+GXbgQ49zhU7TMFC yGsnj/vReiKxTig7ANE8pOhHiT5rgSzVEqyyEk6Zj/Ye7fmdUe7o4nP1RcgYvw2dm5UNf0FWj9W ypvkT3p7lSA7+vsSFo9SKSa9u+OkdVNMrzbVh7c6B12XozAxz3uwkJEmM776cfY3voDmGc7cfAq jnTFq1Y1hEH1ZnlMPa0C2HiciEo/PNf4sUy2Lgj3ar0THkIGJb/fbAggjoJeeIHiU2PbngMTxjy IL4vHPHfEEw50DAWk8MdygaEAPGP5eE2VHLWltoWamX85Bhi9+lx0K+OxmKrjY6Tj9p7qT6n2Yh bw0DqhIf0r3TUS/bDKg== X-Proofpoint-ORIG-GUID: Nt-1wat4zbdblVKnRRR6JrbRslFEaG3W 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 clxscore=1015 impostorscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 The Glymur platform has two video codec cores: vcodec0 and vcodec1. Both cores share a common clock source (video_cc_mvs0_clk_src) and the same power rails. The clock dividers between the source and the branch clocks are fixed. So when both cores are running, the source clock always runs at the highest frequency requested by either core. Since both cores share the same power rails, the power corner cannot be voted independently. Scaling one core's power corner up or down would directly affect the other, leading to under or over-voting. For these reasons, both cores should voted the clock and power rail must be based on the workload of both cores. Reuse the existing code wherever possible and add power sequence for vcodec1. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 4 + drivers/media/platform/qcom/iris/iris_vpu3x.c | 137 +++++++++++++++++= +++- drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 + .../platform/qcom/iris/iris_vpu_register_defines.h | 10 ++ 4 files changed, 147 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 1d757cb8e9e1..366e499dec53 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -63,6 +63,9 @@ enum platform_clk_type { IRIS_VCODEC_VPP0_CLK, IRIS_VCODEC_VPP1_CLK, IRIS_APV_HW_CLK, + IRIS_AXI_VCODEC1_CLK, + IRIS_VCODEC1_CLK, + IRIS_VCODEC1_FREERUN_CLK, }; =20 struct platform_clk_data { @@ -208,6 +211,7 @@ enum platform_pm_domain_type { IRIS_VCODEC_VPP0_POWER_DOMAIN, IRIS_VCODEC_VPP1_POWER_DOMAIN, IRIS_APV_HW_POWER_DOMAIN, + IRIS_VCODEC1_POWER_DOMAIN, }; =20 struct iris_firmware_data { diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index 39e9c78c3a69..68a4997af23f 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -17,14 +17,14 @@ #define NOC_HALT BIT(0) #define AON_WRAPPER_SPARE (AON_BASE_OFFS + 0x28) =20 -static bool iris_vpu3x_hw_power_collapsed(struct iris_core *core) +static bool iris_vpu3x_hw_power_collapsed(struct iris_core *core, u32 pwr_= status_bit) { u32 value, pwr_status; =20 value =3D readl(core->reg_base + WRAPPER_CORE_POWER_STATUS); - pwr_status =3D value & BIT(1); + pwr_status =3D value & pwr_status_bit; =20 - return pwr_status ? false : true; + return !pwr_status; } =20 static void iris_vpu3_power_off_hardware(struct iris_core *core) @@ -32,7 +32,7 @@ static void iris_vpu3_power_off_hardware(struct iris_core= *core) u32 reg_val =3D 0, value, i; int ret; =20 - if (iris_vpu3x_hw_power_collapsed(core)) + if (iris_vpu3x_hw_power_collapsed(core, VCODEC0_POWER_STATUS)) goto disable_power; =20 dev_err(core->dev, "video hw is power on\n"); @@ -78,7 +78,7 @@ static void iris_vpu33_power_off_hardware(struct iris_cor= e *core) u32 count =3D 0; int ret; =20 - if (iris_vpu3x_hw_power_collapsed(core)) + if (iris_vpu3x_hw_power_collapsed(core, VCODEC0_POWER_STATUS)) goto disable_power; =20 dev_err(core->dev, "video hw is power on\n"); @@ -254,6 +254,124 @@ static void iris_vpu35_power_off_hw(struct iris_core = *core) iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); } =20 +static int iris_vpu36_power_on_hw1(struct iris_core *core) +{ + int ret; + + ret =3D iris_enable_power_domains(core, IRIS_VCODEC1_POWER_DOMAIN); + if (ret) + return ret; + + ret =3D iris_prepare_enable_clock(core, IRIS_AXI_VCODEC1_CLK); + if (ret) + goto err_disable_hw1_power; + + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC1_FREERUN_CLK); + if (ret) + goto err_disable_axi1_clk; + + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC1_CLK); + if (ret) + goto err_disable_hw1_free_clk; + + return 0; + +err_disable_hw1_free_clk: + iris_disable_unprepare_clock(core, IRIS_VCODEC1_FREERUN_CLK); +err_disable_axi1_clk: + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC1_CLK); +err_disable_hw1_power: + iris_disable_power_domains(core, IRIS_VCODEC1_POWER_DOMAIN); + + return ret; +} + +static int iris_vpu36_power_on_hw(struct iris_core *core) +{ + int ret; + + ret =3D iris_vpu35_power_on_hw(core); + if (ret) + return ret; + + ret =3D iris_vpu36_power_on_hw1(core); + if (ret) + goto err_power_off_hw; + + return 0; + +err_power_off_hw: + iris_vpu35_power_off_hw(core); + + return ret; +} + +static void iris_vpu36_power_off_hw1(struct iris_core *core) +{ + u32 value, i; + int ret; + + if (iris_vpu3x_hw_power_collapsed(core, VCODEC1_POWER_STATUS)) + goto disable_power; + + value =3D readl(core->reg_base + WRAPPER_CORE_CLOCK_CONFIG); + if (value) + writel(CORE_CLK_RUN, core->reg_base + WRAPPER_CORE_CLOCK_CONFIG); + + for (i =3D 0; i < core->iris_platform_data->num_vpp_pipe; i++) { + ret =3D readl_poll_timeout(core->reg_base + VCODEC1_SS_IDLE_STATUSN + 4 = * i, + value, value & DMA_NOC_IDLE, 2000, 20000); + if (ret) + goto disable_power; + } + + writel(REQ_VCODEC1_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_NOC_= LPI_CONTROL); + ret =3D readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STATU= S, + value, value & NOC_LPI_VCODEC1_STATUS_DONE, 2000, 20000); + if (ret) + goto disable_power; + + writel(0, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL); + + writel(VCODEC1_BRIDGE_SW_RESET | VCODEC1_BRIDGE_HW_RESET_DISABLE, core->r= eg_base + + CPU_CS_AHB_BRIDGE_SYNC_RESET); + writel(VCODEC1_BRIDGE_HW_RESET_DISABLE, core->reg_base + CPU_CS_AHB_BRIDG= E_SYNC_RESET); + writel(0x0, core->reg_base + CPU_CS_AHB_BRIDGE_SYNC_RESET); + +disable_power: + iris_genpd_set_hwmode(core, IRIS_VCODEC1_POWER_DOMAIN, false); + iris_disable_unprepare_clock(core, IRIS_VCODEC1_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC1_FREERUN_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC1_CLK); + iris_disable_power_domains(core, IRIS_VCODEC1_POWER_DOMAIN); +} + +static void iris_vpu36_power_off_hw(struct iris_core *core) +{ + iris_vpu35_power_off_hw(core); + iris_vpu36_power_off_hw1(core); +} + +static int iris_vpu36_set_hwmode(struct iris_core *core) +{ + int ret; + + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, true); + if (ret) + return ret; + + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC1_POWER_DOMAIN, true); + if (ret) + goto error_disable_vcodec_hwmode; + + return 0; + +error_disable_vcodec_hwmode: + iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, false); + + return ret; +} + const struct vpu_ops iris_vpu3_ops =3D { .power_off_hw =3D iris_vpu3_power_off_hardware, .power_on_hw =3D iris_vpu_power_on_hw, @@ -281,3 +399,12 @@ const struct vpu_ops iris_vpu35_ops =3D { .calc_freq =3D iris_vpu3x_vpu4x_calculate_frequency, .set_hwmode =3D iris_vpu_set_hwmode, }; + +const struct vpu_ops iris_vpu36_ops =3D { + .power_off_hw =3D iris_vpu36_power_off_hw, + .power_on_hw =3D iris_vpu36_power_on_hw, + .power_off_controller =3D iris_vpu35_vpu4x_power_off_controller, + .power_on_controller =3D iris_vpu35_vpu4x_power_on_controller, + .calc_freq =3D iris_vpu3x_vpu4x_calculate_frequency, + .set_hwmode =3D iris_vpu36_set_hwmode, +}; diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.h index 09799a375c14..63bf0cec58e2 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h @@ -12,6 +12,7 @@ extern const struct vpu_ops iris_vpu2_ops; extern const struct vpu_ops iris_vpu3_ops; extern const struct vpu_ops iris_vpu33_ops; extern const struct vpu_ops iris_vpu35_ops; +extern const struct vpu_ops iris_vpu36_ops; extern const struct vpu_ops iris_vpu4x_ops; =20 struct vpu_ops { diff --git a/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h b= /drivers/media/platform/qcom/iris/iris_vpu_register_defines.h index 72168b9ffa73..e67d98b8c91e 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h @@ -7,6 +7,7 @@ #define __IRIS_VPU_REGISTER_DEFINES_H__ =20 #define VCODEC_BASE_OFFS 0x00000000 +#define VCODEC1_BASE_OFFS 0x00040000 #define AON_MVP_NOC_RESET 0x0001F000 #define CPU_BASE_OFFS 0x000A0000 #define WRAPPER_BASE_OFFS 0x000B0000 @@ -14,6 +15,8 @@ #define AON_BASE_OFFS 0x000E0000 =20 #define VCODEC_SS_IDLE_STATUSN (VCODEC_BASE_OFFS + 0x70) +#define VCODEC1_SS_IDLE_STATUSN (VCODEC1_BASE_OFFS + 0x70) +#define DMA_NOC_IDLE BIT(22) =20 #define AON_WRAPPER_MVP_NOC_RESET_REQ (AON_MVP_NOC_RESET + 0x000) #define VIDEO_NOC_RESET_REQ (BIT(0) | BIT(1)) @@ -35,6 +38,8 @@ #define CPU_CS_AHB_BRIDGE_SYNC_RESET (CPU_CS_BASE_OFFS + 0x160) #define CORE_BRIDGE_SW_RESET BIT(0) #define CORE_BRIDGE_HW_RESET_DISABLE BIT(1) +#define VCODEC1_BRIDGE_SW_RESET BIT(2) +#define VCODEC1_BRIDGE_HW_RESET_DISABLE BIT(3) =20 #define CPU_CS_X2RPMH (CPU_CS_BASE_OFFS + 0x168) #define MSK_SIGNAL_FROM_TENSILICA BIT(0) @@ -52,14 +57,19 @@ #define WRAPPER_DEBUG_BRIDGE_LPI_STATUS (WRAPPER_BASE_OFFS + 0x58) #define WRAPPER_IRIS_CPU_NOC_LPI_CONTROL (WRAPPER_BASE_OFFS + 0x5C) #define REQ_POWER_DOWN_PREP BIT(0) +#define REQ_VCODEC1_POWER_DOWN_PREP BIT(1) =20 #define WRAPPER_IRIS_CPU_NOC_LPI_STATUS (WRAPPER_BASE_OFFS + 0x60) #define NOC_LPI_STATUS_DONE BIT(0) /* Indicates the NOC handshake is com= plete */ #define NOC_LPI_STATUS_DENY BIT(1) /* Indicates the NOC handshake is den= ied */ #define NOC_LPI_STATUS_ACTIVE BIT(2) /* Indicates the NOC is active */ +#define NOC_LPI_VCODEC1_STATUS_DONE BIT(8) =20 #define WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0 (WRAPPER_BASE_OFFS + 0x78) #define WRAPPER_CORE_POWER_STATUS (WRAPPER_BASE_OFFS + 0x80) +#define VCODEC0_POWER_STATUS BIT(1) +#define VCODEC1_POWER_STATUS BIT(4) + #define WRAPPER_CORE_CLOCK_CONFIG (WRAPPER_BASE_OFFS + 0x88) #define CORE_CLK_RUN 0x0 =20 --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 19E0D480970 for ; Fri, 15 May 2026 11:24:38 +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=1778844281; cv=none; b=RonfDKdrNxuc2YXrUe4dpDMqYcIiL0ZCArwYGZWxKrnC5b9eoHOsPRj1SyYrojGWBHXQcUqSYN8+h6qdQyS7iCt70wpLACWxbY7R7lqVqn4QQIsJGfgl8YzK3O17PtDX8eoPhmJl5knsqSxa6JPQFcYdbIvxJOR3c+uBDvvslE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844281; c=relaxed/simple; bh=U4ZJlUaEUvyw0SG5FaiJ8AT6s6bjHVAfliJZ0qM0l00=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ls+gtTTW5cOTRhgDZycxjHIOamcgdEHJ5rt6lzquft3K5EM0dKkjcPpvI6UHb08HF6k2BwkYGW9gUb1fuKfLG88XF/HqIIYpfmc8HBSpKi/8RmWrz6Awm4eGjmK4DWjSBaypGTBQi5p11ppZgGhX8BS/GWTIraERjGzp1MxcVf8= 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=U5sZVddA; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PHKEPoKo; 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="U5sZVddA"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PHKEPoKo" 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 64F5Hq2E4020904 for ; Fri, 15 May 2026 11:24:38 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= pigFezntYD3M4qve1Er9Q6wCk5JNXuXy+UlEjaKLLRQ=; b=U5sZVddAsxXD07fk dbgIhf0AYM2y07NFBiQF+9LtkEm7sVQOyR2eF4ANUGeyqQg8ogZ8XMG4OvEK9PMh 0VDunx9KbfLLxgdIAUlnweWYoNSAfT4TzxrjfdmzCHk1Rc9dCgXtIGwr2N+z18pR 4aq4DhYa2EMMYMj4DmjrhNl01Q1LHP4aoAE8JuOWlWstOfdlPwcAPAcN2+/5dVWU LmtIhjMsZr06XPZ5V7m2tPIqRS2vGYU4CsAEBCml29cpk1XV3ZwKaRkwvk5fOxCn j1Xke6eY3LpfGgs+KMInkMX0vs49eV+y3XhwoaQ9jFq/EZcIA6aFdudxKvyVlaKy a5aHkQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1ru1hm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:38 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-368b15eeb3bso8402538a91.2 for ; Fri, 15 May 2026 04:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844278; x=1779449078; 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=pigFezntYD3M4qve1Er9Q6wCk5JNXuXy+UlEjaKLLRQ=; b=PHKEPoKos0ApKUUPpd3YZxkZuZk947AufhYT1G0RdR/we1Njdn1bPGZ1eW/+xWD5Rx GwfQ3WRadH5o8me+QcQxDBsfrBOHIJNmgbLLX8OYrfAWhEqgmhTNG6RIFvOL4DTs6llq QE67vSoAnEkYZ1fBbVRm29Dd7l17GSck0K8O9E64s/c8U7L8Ymd6SH67wEGdhp6pXg2i s6nqe+hcj/ijkmEDfzzu9s9zBhatdg/L07v2yLxl2N4LAygTFYiXIsT9I5sNJlV0L3W5 1giddOLiO0kWBPN9ZmRUM8zg4SKw8ZRLJmwlKCXp+c58G002D396P6qhj3BJOsOn8kZO /zkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844278; x=1779449078; 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=pigFezntYD3M4qve1Er9Q6wCk5JNXuXy+UlEjaKLLRQ=; b=Tx4z83XnwOMCVYazS3goSxomW5u8tni9Z/SvR0jqp4Gc3kpnsxqvYE25cmWoxk703E lDup+qnnD0gLsJs55xW+n+hmGcdLhqJ/kTWI/JGqnWKMVCeGDKpnlzP4XJYz5KNRJ/sz cxYFMUTYOkMvPKTBMv/PGH35+LxU4NkohMMJ+rJozxjjtryl4qo8lhhFuPEVDzOsV5le oGCRTArx8dovdGaeDOT9kPBNaQ4MfmzSyAYGFGOCym/jlQ0Im1oojPPqpuLNol88Pg1f g0E1ZYz6jEhtLlKf9g7LTTsXW/MxLGrewcULlGRUoYDj9JiSuy93icdnX/L+yI2Ulko5 gzPQ== X-Gm-Message-State: AOJu0YyID2U7wou1be6rxE84APAKHYhrIrMLUm4D8MlDIobfkniiOONE wXUSXoPDpabZFBE8US8Rdjryvjz2dIyXpcXyQc0yil8klS3Ikhj596Gmus4kZ3ibNPsLjNBCCjv ylK5HRYzQly2/94AKwtmiX/HE3dnE62jDlWgfkgbyFKRzOgtIDsI+kaDy7MqkkXGfLj4= X-Gm-Gg: Acq92OHa3Xe+e2Gr/8cFo5ER4Ecxjr422UorqKcX5NnKyCTyPXwxyjgU0mixMl+QaB6 JuyYMByjAqQ2jKQ7Z9N7GwHPblSbMw681RORaghju5yPM/OYTXjtJ/9gJb8ak1xA+nZsY15Z2qF gmexRv7jVo7Hy/HP/7++5eUZqEPrS4lSJ6k66edIaha8tsh9Hzu/xdNEtDGEZgUnMZxl463hW9E 3rF4o3DeZ65vOWo0oyrv1Ndd3JRlR/C9SOnipd+5RFAL08Y7Hcv2VjuNVZoycYEH5aNN83hNJ5A CnqoBrwMlkoEXyEEk+eTmjc9MUh51ATWhw7PyET799mc2ZYrFz6p5NCoDImIxLMLEMvXCJk920d cZhl2WryhGJLhbQQqXo7WE+a2dQOQrWG9My57MBF+MhKL0xw71BCIX0E= X-Received: by 2002:a17:90b:2d4c:b0:366:52fe:e74f with SMTP id 98e67ed59e1d1-369518badb0mr3745136a91.1.1778844277436; Fri, 15 May 2026 04:24:37 -0700 (PDT) X-Received: by 2002:a17:90b:2d4c:b0:366:52fe:e74f with SMTP id 98e67ed59e1d1-369518badb0mr3745099a91.1.1778844276846; Fri, 15 May 2026 04:24:36 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:36 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:26 +0530 Subject: [PATCH v6 11/14] media: iris: Add support to select core for dual core platforms 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: <20260515-glymur-v6-11-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=18211; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=U4ZJlUaEUvyw0SG5FaiJ8AT6s6bjHVAfliJZ0qM0l00=; b=KQC6QQzKSY2o5da0A2jUWv8mdHH9yjjkcWJz1/bZR9ERjSAO6lceCAH/Xrw3oVqEOvGX7E+r4 vLoC0Ztuz5kBiacC7pW9wVlQGmWpTkzR+s5zE9x9PiUaV3u24td6wqG X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: _3pQRk2JkFaQ3L4OdmjRW16aELgLiWiA X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX3FvoOIJBHJj7 mlWF1xpQKzBY1cVa/+nxwA7t3MnuqVlGu2w+jBZHqvs6c8gzj1GZpLKb35EnWg/IxrLHyAnig9C TQWI4WCnY9lgF9m1GqKOHpAMDkXUCyhgkTec7rRvjZrPiBkfKtov6EDGGtY94oERZIjXBaEaPoh VnmlLn87zbmJjLzLhW5SpuHhI53TKtzJjRjMmHgXJ8y0GcJT1SzxrcdMx6b5Tp0mzCFWr8S+U84 aV1FmIxaIokSQ327oULhxDWI0thZgmS1at9SIX4XUqcmi4OzIzVXDvfM73dtR52XYNmjYRVOoGh Bip5ERm8QfxGn8w4+Z+jA4vYX/uY6lytg8fe9QLfH8Q9xWgzZIMOvrJFa4S/2ctvQ6Md27cmugy WIWFQUp+/AeP6x09OSsXm3xn2TZQsM/Cg7xrGiwdLlH2ZxB6O8Ut9kDMXPLGPw9lk7Tr9mfrpxv wAzmoxvtUOHzRut/oMw== X-Proofpoint-ORIG-GUID: _3pQRk2JkFaQ3L4OdmjRW16aELgLiWiA X-Authority-Analysis: v=2.4 cv=JPELdcKb c=1 sm=1 tr=0 ts=6a070276 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=pq9AK7GQSdwHzPcdQgIA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9: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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 phishscore=0 priorityscore=1501 spamscore=0 malwarescore=0 suspectscore=0 impostorscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 On platforms with two video codec cores, select the hardware core for a new session based on the current Macroblocks Per Frame (MBPF) and Macroblocks Per Second (MBPS) load on each core. The selected core is communicated to the firmware via the HFI_PROP_CORE_ID property at stream-on time. Since both cores share the same clock source, the required clock frequency is the maximum of the aggregated frequencies across both cores. The total session count limit is scaled by the number of cores, since each core independently supports sessions up to its own limit. Signed-off-by: Vishnu Reddy Reviewed-by: Dmitry Baryshkov --- drivers/media/platform/qcom/iris/iris_common.c | 10 ++++ drivers/media/platform/qcom/iris/iris_common.h | 1 + drivers/media/platform/qcom/iris/iris_core.h | 5 ++ drivers/media/platform/qcom/iris/iris_hfi_common.h | 1 + .../platform/qcom/iris/iris_hfi_gen2_command.c | 19 +++++++ .../platform/qcom/iris/iris_hfi_gen2_defines.h | 1 + drivers/media/platform/qcom/iris/iris_instance.h | 2 + .../platform/qcom/iris/iris_platform_common.h | 1 + drivers/media/platform/qcom/iris/iris_power.c | 20 +++++-- drivers/media/platform/qcom/iris/iris_utils.c | 58 +++++++++++++-----= -- drivers/media/platform/qcom/iris/iris_utils.h | 3 +- drivers/media/platform/qcom/iris/iris_vb2.c | 4 ++ drivers/media/platform/qcom/iris/iris_vidc.c | 7 ++- drivers/media/platform/qcom/iris/iris_vpu3x.c | 63 ++++++++++++++++++= ++++ drivers/media/platform/qcom/iris/iris_vpu_common.h | 2 + 15 files changed, 173 insertions(+), 24 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_common.c b/drivers/media= /platform/qcom/iris/iris_common.c index 25836561bcf3..abea6807a59e 100644 --- a/drivers/media/platform/qcom/iris/iris_common.c +++ b/drivers/media/platform/qcom/iris/iris_common.c @@ -46,6 +46,16 @@ void iris_set_ts_metadata(struct iris_inst *inst, struct= vb2_v4l2_buffer *vbuf) inst->metadata_idx++; } =20 +int iris_set_core_id(struct iris_inst *inst) +{ + const struct iris_hfi_session_ops *hfi_ops =3D inst->hfi_session_ops; + + if (!inst->core_id) + return 0; + + return hfi_ops->session_set_core_id(inst, inst->core_id); +} + int iris_process_streamon_input(struct iris_inst *inst) { const struct iris_hfi_session_ops *hfi_ops =3D inst->hfi_session_ops; diff --git a/drivers/media/platform/qcom/iris/iris_common.h b/drivers/media= /platform/qcom/iris/iris_common.h index b2a27b781c9a..34e32c60f768 100644 --- a/drivers/media/platform/qcom/iris/iris_common.h +++ b/drivers/media/platform/qcom/iris/iris_common.h @@ -11,6 +11,7 @@ struct iris_buffer; =20 int iris_vb2_buffer_to_driver(struct vb2_buffer *vb2, struct iris_buffer *= buf); void iris_set_ts_metadata(struct iris_inst *inst, struct vb2_v4l2_buffer *= vbuf); +int iris_set_core_id(struct iris_inst *inst); int iris_process_streamon_input(struct iris_inst *inst); int iris_process_streamon_output(struct iris_inst *inst); int iris_session_streamoff(struct iris_inst *inst, u32 plane); diff --git a/drivers/media/platform/qcom/iris/iris_core.h b/drivers/media/p= latform/qcom/iris/iris_core.h index 2edba569fa25..c8d2df30b8a8 100644 --- a/drivers/media/platform/qcom/iris/iris_core.h +++ b/drivers/media/platform/qcom/iris/iris_core.h @@ -30,6 +30,11 @@ enum domain_type { DECODER =3D BIT(1), }; =20 +enum iris_vcodec_core_id { + IRIS_VCODEC0 =3D 1, + IRIS_VCODEC1, +}; + struct qcom_ubwc_cfg_data; =20 /** diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.h b/drivers/m= edia/platform/qcom/iris/iris_hfi_common.h index a27447eb2519..47786529998d 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_common.h +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.h @@ -131,6 +131,7 @@ struct iris_hfi_session_ops { int (*session_drain)(struct iris_inst *inst, u32 plane); int (*session_resume_drain)(struct iris_inst *inst, u32 plane); int (*session_close)(struct iris_inst *inst); + int (*session_set_core_id)(struct iris_inst *inst, u32 core_id); }; =20 struct hfi_subscription_params { diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/dri= vers/media/platform/qcom/iris/iris_hfi_gen2_command.c index c90b22a75bc5..a3533a1450bb 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c @@ -1300,6 +1300,24 @@ static int iris_hfi_gen2_session_release_buffer(stru= ct iris_inst *inst, struct i inst_hfi_gen2->packet->size); } =20 +static int iris_hfi_gen2_set_core_id(struct iris_inst *inst, u32 core_id) +{ + struct iris_inst_hfi_gen2 *inst_hfi_gen2 =3D to_iris_inst_hfi_gen2(inst); + u32 payload =3D core_id; + + iris_hfi_gen2_packet_session_command(inst, + HFI_PROP_CORE_ID, + HFI_HOST_FLAGS_NONE, + HFI_PORT_NONE, + inst->session_id, + HFI_PAYLOAD_U32, + &payload, + sizeof(u32)); + + return iris_hfi_queue_cmd_write(inst->core, inst_hfi_gen2->packet, + inst_hfi_gen2->packet->size); +} + static const struct iris_hfi_session_ops iris_hfi_gen2_session_ops =3D { .session_open =3D iris_hfi_gen2_session_open, .session_set_config_params =3D iris_hfi_gen2_session_set_config_params, @@ -1313,6 +1331,7 @@ static const struct iris_hfi_session_ops iris_hfi_gen= 2_session_ops =3D { .session_drain =3D iris_hfi_gen2_session_drain, .session_resume_drain =3D iris_hfi_gen2_session_resume_drain, .session_close =3D iris_hfi_gen2_session_close, + .session_set_core_id =3D iris_hfi_gen2_set_core_id, }; =20 static struct iris_inst *iris_hfi_gen2_get_instance(void) diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h b/dri= vers/media/platform/qcom/iris/iris_hfi_gen2_defines.h index cecf771c55dd..600e9dc07669 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h @@ -56,6 +56,7 @@ #define HFI_PROP_BUFFER_HOST_MAX_COUNT 0x03000123 #define HFI_PROP_BUFFER_FW_MIN_OUTPUT_COUNT 0x03000124 #define HFI_PROP_PIC_ORDER_CNT_TYPE 0x03000128 +#define HFI_PROP_CORE_ID 0x030001a9 =20 enum hfi_rate_control { HFI_RC_VBR_CFR =3D 0x00000000, diff --git a/drivers/media/platform/qcom/iris/iris_instance.h b/drivers/med= ia/platform/qcom/iris/iris_instance.h index 352af99699dd..fee162b18296 100644 --- a/drivers/media/platform/qcom/iris/iris_instance.h +++ b/drivers/media/platform/qcom/iris/iris_instance.h @@ -39,6 +39,7 @@ struct iris_fmt { * * @list: used for attach an instance to the core * @core: pointer to core structure + * @core_id: specifies the hardware core on which the session runs * @session_id: id of current video session * @hfi_session_ops: iris HFI session ops * @ctx_q_lock: lock to serialize queues related ioctls @@ -82,6 +83,7 @@ struct iris_fmt { struct iris_inst { struct list_head list; struct iris_core *core; + u32 core_id; u32 session_id; const struct iris_hfi_session_ops *hfi_session_ops; struct mutex ctx_q_lock;/* lock to serialize queues related ioctls */ diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 366e499dec53..b8bd200962f7 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -299,6 +299,7 @@ struct iris_platform_data { u32 num_vpp_pipe; bool no_aon; u32 max_session_count; + u32 num_cores; /* max number of macroblocks per frame supported */ u32 max_core_mbpf; /* max number of macroblocks per second supported */ diff --git a/drivers/media/platform/qcom/iris/iris_power.c b/drivers/media/= platform/qcom/iris/iris_power.c index 91aa21d4070e..a875647b3162 100644 --- a/drivers/media/platform/qcom/iris/iris_power.c +++ b/drivers/media/platform/qcom/iris/iris_power.c @@ -75,14 +75,12 @@ static int iris_vote_interconnects(struct iris_inst *in= st) return iris_set_interconnects(inst); } =20 -static int iris_set_clocks(struct iris_inst *inst) +static u64 iris_get_required_freq(struct iris_inst *inst) { struct iris_core *core =3D inst->core; struct iris_inst *instance; u64 freq =3D 0; - int ret; =20 - mutex_lock(&core->lock); list_for_each_entry(instance, &core->instances, list) { if (!instance->max_input_data_size) continue; @@ -90,6 +88,22 @@ static int iris_set_clocks(struct iris_inst *inst) freq +=3D instance->power.min_freq; } =20 + return freq; +} + +static int iris_set_clocks(struct iris_inst *inst) +{ + const struct vpu_ops *vpu_ops =3D inst->core->iris_platform_data->vpu_ops; + struct iris_core *core =3D inst->core; + u64 freq; + int ret; + + mutex_lock(&core->lock); + if (vpu_ops->get_required_freq) + freq =3D vpu_ops->get_required_freq(inst); + else + freq =3D iris_get_required_freq(inst); + core->power.clk_freq =3D freq; ret =3D iris_opp_set_rate(core->dev, freq); mutex_unlock(&core->lock); diff --git a/drivers/media/platform/qcom/iris/iris_utils.c b/drivers/media/= platform/qcom/iris/iris_utils.c index 29b07d88507e..391855c42164 100644 --- a/drivers/media/platform/qcom/iris/iris_utils.c +++ b/drivers/media/platform/qcom/iris/iris_utils.c @@ -7,6 +7,7 @@ #include =20 #include "iris_instance.h" +#include "iris_vpu_common.h" #include "iris_utils.h" =20 bool iris_res_is_less_than(u32 width, u32 height, @@ -23,7 +24,7 @@ bool iris_res_is_less_than(u32 width, u32 height, return false; } =20 -int iris_get_mbpf(struct iris_inst *inst) +u32 iris_get_mbpf(struct iris_inst *inst) { struct v4l2_format *inp_f =3D inst->fmt_src; u32 height =3D max(inp_f->fmt.pix_mp.height, inst->crop.height); @@ -32,6 +33,13 @@ int iris_get_mbpf(struct iris_inst *inst) return NUM_MBS_PER_FRAME(height, width); } =20 +u32 iris_get_mbps(struct iris_inst *inst) +{ + u32 fps =3D max(inst->frame_rate, inst->operating_rate); + + return iris_get_mbpf(inst) * fps; +} + bool iris_split_mode_enabled(struct iris_inst *inst) { return inst->fmt_dst->fmt.pix_mp.pixelformat =3D=3D V4L2_PIX_FMT_NV12 || @@ -87,40 +95,52 @@ struct iris_inst *iris_get_instance(struct iris_core *c= ore, u32 session_id) return NULL; } =20 -int iris_check_core_mbpf(struct iris_inst *inst) +static int iris_check_core_load(struct iris_inst *inst, bool mbpf) { - struct iris_core *core =3D inst->core; + const struct iris_platform_data *platform_data =3D inst->core->iris_platf= orm_data; + u32 max_load =3D mbpf ? platform_data->max_core_mbpf : platform_data->max= _core_mbps; struct iris_inst *instance; - u32 total_mbpf =3D 0; + u32 total_load =3D 0; =20 - mutex_lock(&core->lock); - list_for_each_entry(instance, &core->instances, list) - total_mbpf +=3D iris_get_mbpf(instance); - mutex_unlock(&core->lock); + list_for_each_entry(instance, &inst->core->instances, list) + total_load +=3D mbpf ? iris_get_mbpf(instance) : iris_get_mbps(instance); =20 - if (total_mbpf > core->iris_platform_data->max_core_mbpf) + if (total_load > max_load) return -ENOMEM; =20 return 0; } =20 -int iris_check_core_mbps(struct iris_inst *inst) +int iris_check_core_mbpf(struct iris_inst *inst) { + const struct vpu_ops *vpu_ops =3D inst->core->iris_platform_data->vpu_ops; struct iris_core *core =3D inst->core; - struct iris_inst *instance; - u32 total_mbps =3D 0, fps =3D 0; + int ret; =20 mutex_lock(&core->lock); - list_for_each_entry(instance, &core->instances, list) { - fps =3D max(instance->frame_rate, instance->operating_rate); - total_mbps +=3D iris_get_mbpf(instance) * fps; - } + if (vpu_ops->check_core_load) + ret =3D vpu_ops->check_core_load(inst, true); + else + ret =3D iris_check_core_load(inst, true); mutex_unlock(&core->lock); =20 - if (total_mbps > core->iris_platform_data->max_core_mbps) - return -ENOMEM; + return ret; +} =20 - return 0; +int iris_check_core_mbps(struct iris_inst *inst) +{ + const struct vpu_ops *vpu_ops =3D inst->core->iris_platform_data->vpu_ops; + struct iris_core *core =3D inst->core; + int ret; + + mutex_lock(&core->lock); + if (vpu_ops->check_core_load) + ret =3D vpu_ops->check_core_load(inst, false); + else + ret =3D iris_check_core_load(inst, false); + mutex_unlock(&core->lock); + + return ret; } =20 bool is_rotation_90_or_270(struct iris_inst *inst) diff --git a/drivers/media/platform/qcom/iris/iris_utils.h b/drivers/media/= platform/qcom/iris/iris_utils.h index b5705d156431..a9958359d2dc 100644 --- a/drivers/media/platform/qcom/iris/iris_utils.h +++ b/drivers/media/platform/qcom/iris/iris_utils.h @@ -43,7 +43,8 @@ static inline enum iris_buffer_type iris_v4l2_type_to_dri= ver(u32 type) =20 bool iris_res_is_less_than(u32 width, u32 height, u32 ref_width, u32 ref_height); -int iris_get_mbpf(struct iris_inst *inst); +u32 iris_get_mbpf(struct iris_inst *inst); +u32 iris_get_mbps(struct iris_inst *inst); bool iris_split_mode_enabled(struct iris_inst *inst); struct iris_inst *iris_get_instance(struct iris_core *core, u32 session_id= ); void iris_helper_buffers_done(struct iris_inst *inst, unsigned int type, diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/pl= atform/qcom/iris/iris_vb2.c index a2ea2d67f60d..dbb89396e651 100644 --- a/drivers/media/platform/qcom/iris/iris_vb2.c +++ b/drivers/media/platform/qcom/iris/iris_vb2.c @@ -176,6 +176,10 @@ int iris_vb2_start_streaming(struct vb2_queue *q, unsi= gned int count) if (ret) goto error; =20 + ret =3D iris_set_core_id(inst); + if (ret) + goto error; + if (V4L2_TYPE_IS_OUTPUT(q->type)) { if (inst->domain =3D=3D DECODER) ret =3D iris_vdec_streamon_input(inst); diff --git a/drivers/media/platform/qcom/iris/iris_vidc.c b/drivers/media/p= latform/qcom/iris/iris_vidc.c index 14d63dc76c9b..3f524ece9d70 100644 --- a/drivers/media/platform/qcom/iris/iris_vidc.c +++ b/drivers/media/platform/qcom/iris/iris_vidc.c @@ -41,16 +41,21 @@ static void iris_v4l2_fh_deinit(struct iris_inst *inst,= struct file *filp) =20 static void iris_add_session(struct iris_inst *inst) { + const struct iris_platform_data *platform_data =3D inst->core->iris_platf= orm_data; + u32 max_session_count =3D platform_data->max_session_count; struct iris_core *core =3D inst->core; struct iris_inst *iter; u32 count =3D 0; =20 + if (platform_data->num_cores) + max_session_count *=3D platform_data->num_cores; + mutex_lock(&core->lock); =20 list_for_each_entry(iter, &core->instances, list) count++; =20 - if (count < core->iris_platform_data->max_session_count) + if (count < max_session_count) list_add_tail(&inst->list, &core->instances); =20 mutex_unlock(&core->lock); diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index 68a4997af23f..bc17f04bf4d4 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -372,6 +372,67 @@ static int iris_vpu36_set_hwmode(struct iris_core *cor= e) return ret; } =20 +static int iris_vpu36_check_core_load(struct iris_inst *inst, bool mbpf) +{ + const struct iris_platform_data *platform_data =3D inst->core->iris_platf= orm_data; + u32 max_load =3D mbpf ? platform_data->max_core_mbpf : platform_data->max= _core_mbps; + u32 max_session_cnt =3D platform_data->max_session_count; + u32 core0_session_cnt =3D 0, core1_session_cnt =3D 0; + u32 core0_load =3D 0, core1_load =3D 0; + bool select_core0, select_core1; + struct iris_inst *instance; + u32 load, new_load; + + inst->core_id =3D 0; + + list_for_each_entry(instance, &inst->core->instances, list) { + load =3D mbpf ? iris_get_mbpf(instance) : iris_get_mbps(instance); + + if (instance->core_id =3D=3D IRIS_VCODEC0) { + core0_load +=3D load; + core0_session_cnt++; + } else if (instance->core_id =3D=3D IRIS_VCODEC1) { + core1_load +=3D load; + core1_session_cnt++; + } + } + + new_load =3D mbpf ? iris_get_mbpf(inst) : iris_get_mbps(inst); + + select_core0 =3D core0_load + new_load <=3D max_load && core0_session_cnt= < max_session_cnt; + select_core1 =3D core1_load + new_load <=3D max_load && core1_session_cnt= < max_session_cnt; + + if (select_core0 && select_core1) + inst->core_id =3D (core0_load <=3D core1_load) ? IRIS_VCODEC0 : IRIS_VCO= DEC1; + else if (select_core0) + inst->core_id =3D IRIS_VCODEC0; + else if (select_core1) + inst->core_id =3D IRIS_VCODEC1; + else + return -ENOMEM; + + return 0; +} + +static u64 iris_vpu36_get_required_freq(struct iris_inst *inst) +{ + u64 vcodec0_freq =3D 0, vcodec1_freq =3D 0; + struct iris_core *core =3D inst->core; + struct iris_inst *instance; + + list_for_each_entry(instance, &core->instances, list) { + if (!instance->max_input_data_size) + continue; + + if (instance->core_id =3D=3D IRIS_VCODEC0) + vcodec0_freq +=3D instance->power.min_freq; + else + vcodec1_freq +=3D instance->power.min_freq; + } + + return max(vcodec0_freq, vcodec1_freq); +} + const struct vpu_ops iris_vpu3_ops =3D { .power_off_hw =3D iris_vpu3_power_off_hardware, .power_on_hw =3D iris_vpu_power_on_hw, @@ -407,4 +468,6 @@ const struct vpu_ops iris_vpu36_ops =3D { .power_on_controller =3D iris_vpu35_vpu4x_power_on_controller, .calc_freq =3D iris_vpu3x_vpu4x_calculate_frequency, .set_hwmode =3D iris_vpu36_set_hwmode, + .check_core_load =3D iris_vpu36_check_core_load, + .get_required_freq =3D iris_vpu36_get_required_freq, }; diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.h index 63bf0cec58e2..0de715bd810d 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h @@ -23,6 +23,8 @@ struct vpu_ops { void (*program_bootup_registers)(struct iris_core *core); u64 (*calc_freq)(struct iris_inst *inst, size_t data_size); int (*set_hwmode)(struct iris_core *core); + int (*check_core_load)(struct iris_inst *inst, bool mbpf); + u64 (*get_required_freq)(struct iris_inst *inst); }; =20 int iris_vpu_boot_firmware(struct iris_core *core); --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 76993480DD2 for ; Fri, 15 May 2026 11:24:45 +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=1778844287; cv=none; b=IwE/Zq2XP3DNQkyXCrPDyXGtrwmJpsBAFbxlOjmUv+y2HXM3rwem8QxG77hQ4F8JJiH0rehanz4UDMOjbe7mfhtKXJpb9JZ/2pZSeT9VIC/+QoqLpPU0obSCrDBLhNibcZbdNRJs9BU+BURVH2XhOGvQxt+sr+YegAYhPEQPbjg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844287; c=relaxed/simple; bh=GuDkSGHXh51394zehdssZwBFyWSqgABeQjzsuWrMbYA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kY+J8cVpH22pnkY1jGbkDdds5TYeTmuImGesMrmxXLLpuRuhfQAUu2ncV9tKJbusgWJ96HCh4PCIGd1gCS5zt9nBifkykySbWUymyMyR95om7Eebz0JRwtbcXDaf+IU4IohTFUowwpED8+WbzvshAVn0YJ6rvjFSgy0NQ3Ga7UI= 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=FpPasz/x; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=h4tFtyTo; 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="FpPasz/x"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="h4tFtyTo" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FBI1B5655050 for ; Fri, 15 May 2026 11:24:45 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= 96cmMTj3N00MudUqygedt3aK0QSx3cDzw0CEI6BkIuk=; b=FpPasz/xd4FAQ62f hGy71BFJDvdKCmdaAqlDofnGrM1hLy+wpQ4bA40Qq6Hy/Dqtt3t4bPs4TroGj6D3 EbYFQ/sdLmX5z7iV7crGqL073OxDdkwllkjBv17hG1klaj3KgnsW9kFEp0/4yepC bQNLFZENdS1N7FpQBDKxW99Y5S01HqxdNEsKm3QpOzxyZYDRsFOV3judn620oEvp XDCs5LOS+tYBg1LuqjkMJi3E4fND6JBN/dGwyCuyWiWTiywIB2UujFx9CILvl57Y GeR9pZbxzk2MpLrLxCbXRM3e1Y8PXrkmBzJSz+YBeRHLmEGpeoz2yqDUCTci9KNw pZJDDw== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1pu31m-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:44 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-36641fe4aedso14263051a91.1 for ; Fri, 15 May 2026 04:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844284; x=1779449084; 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=96cmMTj3N00MudUqygedt3aK0QSx3cDzw0CEI6BkIuk=; b=h4tFtyTo3FGsmSNLk3HKRzZTic/xIGrVWB34kS9c1AieqaSru0p3BX8BYCYGZ05/nZ X0Ls514riBiJ2H1V0VhjDcoM7Gx+90bxMA52TBKGALQIqwc5dVzPzPdJD1t0KUNqenDG pjYQJUkPtlJEwhun1SMSChEH6YqLfzg6+SlAKCbR6AOxXGF06yj7t6n/nnRnXWqjO4Tv ieuYMfw1Cr98wn9FYwpvaPK1kCvn79zY1wb0v2aIz+NJyi8LpZa8yWDVAqLXtgLSyrwa KfgTfTZASJbZivX/SP5fkgHenFHhidMfcrizLLKh5bPCeUFYnXo3GdcG4m5hBSswdEXx piqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844284; x=1779449084; 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=96cmMTj3N00MudUqygedt3aK0QSx3cDzw0CEI6BkIuk=; b=f008b6v7wnfqQlxTtxVYt8UzOGaXMhCKMRYk7UhhC0CfxZ/e4OjwckpvVDPDQgs59T FlzeIs3i8W8KhpQoHFh40NWTkp6UCjvMFQOxoW/b8as+jya+gB9WI1LaLDreQjTp4MRa ZWHHZ7qmOKL6x/qWfyhW4/i5f+zdRCM066jYFZx/wCfNy3nGhOtxeNyjr8OuoX71USA5 AxyUb7OkFGxCMM7/RHES1rObX7CsVZ0oP+BAnGzwD5W8iJsZk5Gi2scpPVku+euzzLuy PLB/DGWV7QtNel4lPqYs1PK76TI1OftEcpX6n2Usr2yOvOyncUcslwTnFWP8Yn+rpzhO B6FQ== X-Gm-Message-State: AOJu0YwRVpNFQSCZEqi+sffEVehdS98uBHV4r/p+KDFLUaiddmHVlgOx AgSyy2JXAir3PnV8FS36ejhbjRUUJBibVZQRNu7Yo1Bx8u6UX23OXLajzy72w8tD0QaoR9g970k v5TkPaK9WST1Kd+lFTjWasMlWHUfgWFhzOkKMIppQo1X6RYjbkMwVTEX6DOrhYFafSl4= X-Gm-Gg: Acq92OHdX9QpyMPNoRyIdgyBtlVPGxJWAcIp6LqDrfdhThcUf5jp9b9asxvslhl9b/v ggXUBOg0b4n8mvrJhEyjC1vSfS42JT+mEHV34gjpugE4W9iQ0iz16W81c4VXKxRN3VFThXC2x/I J97f4p2R8QeBYnd24L7RNxfb4rPbmWHkghvkte1JJDKnk7a8L4Y3IkE/yMf8KPUAczRFWSBuraN Io8/tHPx9ynj395MDuyprXdPo8IJlcUVExyme4TdtezbBjWQFquEAPwj1XZI6T63bBN2j6uPlnq Q0WK07RVadvzVTdIr4wcp28gPylH4Vm6EzJUh3yRreW/9rFql/kMWvB1Q7XjhuVZhSTmNKIcivS wPcrpV7cQoXGwz0EEUF1zNZKuDfvvgfVaSDs5gGn4uNjn3QQGxC76XFI= X-Received: by 2002:a17:90b:3505:b0:364:e97f:64e7 with SMTP id 98e67ed59e1d1-36951dc1726mr3488471a91.27.1778844283974; Fri, 15 May 2026 04:24:43 -0700 (PDT) X-Received: by 2002:a17:90b:3505:b0:364:e97f:64e7 with SMTP id 98e67ed59e1d1-36951dc1726mr3488435a91.27.1778844283338; Fri, 15 May 2026 04:24:43 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:42 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:27 +0530 Subject: [PATCH v6 12/14] media: iris: Add platform data for glymur 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: <20260515-glymur-v6-12-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=9058; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=GuDkSGHXh51394zehdssZwBFyWSqgABeQjzsuWrMbYA=; b=RETb7f6l0Da9In8p5tzfZrL+21AaTpbM+1XUZnJHO7MmoSQgXFee7tt7nKwMe1+FfP8VlC8Jy 5mVE1HsVU+QCai8/vXVpZBidjKVYWyYfwGoRJscN9s0y3bXX6o7yXvd X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: STCUxERWl9wuTcUWF6jQZ_B5CjnnkVB- X-Proofpoint-ORIG-GUID: STCUxERWl9wuTcUWF6jQZ_B5CjnnkVB- X-Authority-Analysis: v=2.4 cv=GrhyPE1C c=1 sm=1 tr=0 ts=6a07027c cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=fUP_7ltcoKe1ygVge38A:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX/mr8C2DatP/F J9dnyQ83h98SdmhuqPWF7hyR7MZPyCS5Gqq/KGH3KWpTlvsnvQLqQt3EYcTyh2zZYMeLcV7cB8+ YEWaFCFiIN+kAt/d2kdMcGNzpPpdW7Pb/XZmN54kHhu4zkO6EH43V5sgBotBLrtnrXglsrP9Lub 2zeImUv+Uw9VpzKFFlGaB4Y66FeXcwFHRAgmXfgzeknfkkkC11HwmBl1v3qUDeC+ea1bdzjvyqM yYQzVgPDKJWRyJgA35W93pMVefHlLzt1I0jyCitLNvc6Xa6YufX14xtXT1i+bgmUPw2JayIwHLS uprhsGC/073dsSdwjlBKANDgjmapYxZeP374Ou4dUnO12u83+rCgiHDHYjpYaje1IEbsiPPU4OG SUQnmu9e/cZ4VxiyPp2tw1yE0r/XVw50vSvyhbK6FF8I+BM4RYMZzU3vUsUZ243izYSCdYf+gv1 PTBZhRs/mhzZBtDl/KA== 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 On glymur platform, the iris core shares most properties with the iris core on the SM8550 platform. The major difference is that glymur integrates two codec cores (vcodec0 and vcodec1), while SM8550 has only one. Add glymur specific platform data, reusing SM8550 definitions wherever applicable. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/Makefile | 1 + .../platform/qcom/iris/iris_platform_common.h | 5 ++ .../platform/qcom/iris/iris_platform_glymur.c | 98 ++++++++++++++++++= ++++ .../platform/qcom/iris/iris_platform_glymur.h | 17 ++++ .../media/platform/qcom/iris/iris_platform_vpu3x.c | 38 +++++++++ drivers/media/platform/qcom/iris/iris_probe.c | 4 + 6 files changed, 163 insertions(+) diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/plat= form/qcom/iris/Makefile index 6deadd531c8e..6c45d4ad13a8 100644 --- a/drivers/media/platform/qcom/iris/Makefile +++ b/drivers/media/platform/qcom/iris/Makefile @@ -12,6 +12,7 @@ qcom-iris-objs +=3D iris_buffer.o \ iris_hfi_gen2_packet.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ + iris_platform_glymur.o \ iris_platform_vpu2.o \ iris_platform_vpu3x.o \ iris_power.o \ diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index b8bd200962f7..9abf970c71ae 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -29,6 +29,10 @@ struct iris_inst; #define DEFAULT_QP 20 #define BITRATE_DEFAULT 20000000 =20 +#define VIDEO_REGION_SECURE_FW_REGION_ID 0 +#define VIDEO_REGION_VM0_SECURE_NP_ID 1 +#define VIDEO_REGION_VM0_NONSECURE_NP_ID 5 + enum stage_type { STAGE_1 =3D 1, STAGE_2 =3D 2, @@ -43,6 +47,7 @@ enum pipe_type { extern const struct iris_firmware_data iris_hfi_gen1_data; extern const struct iris_firmware_data iris_hfi_gen2_data; =20 +extern const struct iris_platform_data glymur_data; extern const struct iris_platform_data qcs8300_data; extern const struct iris_platform_data sc7280_data; extern const struct iris_platform_data sm8250_data; diff --git a/drivers/media/platform/qcom/iris/iris_platform_glymur.c b/driv= ers/media/platform/qcom/iris/iris_platform_glymur.c new file mode 100644 index 000000000000..4c5b9fcf5019 --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_platform_glymur.c @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include + +#include "iris_core.h" +#include "iris_platform_common.h" +#include "iris_platform_glymur.h" + +const struct platform_clk_data iris_glymur_clk_table[] =3D { + {IRIS_AXI_VCODEC_CLK, "iface" }, + {IRIS_CTRL_CLK, "core" }, + {IRIS_VCODEC_CLK, "vcodec0_core" }, + {IRIS_AXI_CTRL_CLK, "iface1" }, + {IRIS_CTRL_FREERUN_CLK, "core_freerun" }, + {IRIS_VCODEC_FREERUN_CLK, "vcodec0_core_freerun" }, + {IRIS_AXI_VCODEC1_CLK, "iface2" }, + {IRIS_VCODEC1_CLK, "vcodec1_core" }, + {IRIS_VCODEC1_FREERUN_CLK, "vcodec1_core_freerun" }, +}; + +const char * const iris_glymur_clk_reset_table[] =3D { + "bus0", + "bus1", + "core", + "vcodec0_core", + "bus2", + "vcodec1_core", +}; + +const char * const iris_glymur_opp_clk_table[] =3D { + "vcodec0_core", + "vcodec1_core", + "core", + NULL, +}; + +const struct platform_pd_data iris_glymur_pmdomain_table =3D { + .pd_types =3D (enum platform_pm_domain_type []) { + IRIS_CTRL_POWER_DOMAIN, + IRIS_VCODEC_POWER_DOMAIN, + IRIS_VCODEC1_POWER_DOMAIN, + }, + .pd_names =3D (const char *[]) { + "venus", + "vcodec0", + "vcodec1", + }, + .pd_count =3D 3, +}; + +const struct tz_cp_config iris_glymur_tz_cp_config[] =3D { + { + .cp_start =3D VIDEO_REGION_SECURE_FW_REGION_ID, + .cp_size =3D 0, + .cp_nonpixel_start =3D 0, + .cp_nonpixel_size =3D 0x1000000, + }, + { + .cp_start =3D VIDEO_REGION_VM0_SECURE_NP_ID, + .cp_size =3D 0, + .cp_nonpixel_start =3D 0x1000000, + .cp_nonpixel_size =3D 0x24800000, + }, + { + .cp_start =3D VIDEO_REGION_VM0_NONSECURE_NP_ID, + .cp_size =3D 0, + .cp_nonpixel_start =3D 0x25800000, + .cp_nonpixel_size =3D 0xda600000, + }, +}; + +int iris_glymur_init_cb_devs(struct iris_core *core) +{ + u64 dma_mask =3D core->iris_platform_data->dma_mask; + const u32 fw_fid =3D IOMMU_FID_IRIS_FIRMWARE; + struct device *dev; + + dev =3D iris_vpu_bus_create_device(core->dev, "iris-firmware", dma_mask, = &fw_fid); + if (IS_ERR(dev)) + return PTR_ERR(dev); + + if (device_iommu_mapped(dev)) + core->fw_dev =3D dev; + else + device_unregister(dev); + + return 0; +} + +void iris_glymur_deinit_cb_devs(struct iris_core *core) +{ + if (core->fw_dev) + device_unregister(core->fw_dev); +} diff --git a/drivers/media/platform/qcom/iris/iris_platform_glymur.h b/driv= ers/media/platform/qcom/iris/iris_platform_glymur.h new file mode 100644 index 000000000000..e0d07ccf658c --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_platform_glymur.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef __IRIS_PLATFORM_GLYMUR_H__ +#define __IRIS_PLATFORM_GLYMUR_H__ + +extern const struct platform_clk_data iris_glymur_clk_table[9]; +extern const char * const iris_glymur_clk_reset_table[6]; +extern const char * const iris_glymur_opp_clk_table[4]; +extern const struct platform_pd_data iris_glymur_pmdomain_table; +extern const struct tz_cp_config iris_glymur_tz_cp_config[3]; +int iris_glymur_init_cb_devs(struct iris_core *core); +void iris_glymur_deinit_cb_devs(struct iris_core *core); + +#endif /* __IRIS_PLATFORM_GLYMUR_H__ */ diff --git a/drivers/media/platform/qcom/iris/iris_platform_vpu3x.c b/drive= rs/media/platform/qcom/iris/iris_platform_vpu3x.c index 8a0f67d1a74a..b15555bf25ca 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_platform_vpu3x.c @@ -12,6 +12,7 @@ #include "iris_vpu_buffer.h" #include "iris_vpu_common.h" =20 +#include "iris_platform_glymur.h" #include "iris_platform_qcs8300.h" #include "iris_platform_sm8550.h" #include "iris_platform_sm8650.h" @@ -41,6 +42,12 @@ static const struct iris_firmware_desc iris_vpu35_p4_gen= 2_desc =3D { .fwname =3D "qcom/vpu/vpu35_p4.mbn", }; =20 +static const struct iris_firmware_desc iris_vpu36_p4_s7_gen2_desc =3D { + .firmware_data =3D &iris_hfi_gen2_data, + .get_vpu_buffer_size =3D iris_vpu_buf_size, + .fwname =3D "qcom/vpu/vpu36_p4_s7.mbn", +}; + static struct iris_fmt iris_fmts_vpu3x_dec[] =3D { [IRIS_FMT_H264] =3D { .pixfmt =3D V4L2_PIX_FMT_H264, @@ -100,6 +107,37 @@ static const struct tz_cp_config tz_cp_config_vpu3[] = =3D { }, }; =20 +const struct iris_platform_data glymur_data =3D { + .firmware_desc =3D &iris_vpu36_p4_s7_gen2_desc, + .init_cb_devs =3D iris_glymur_init_cb_devs, + .deinit_cb_devs =3D iris_glymur_deinit_cb_devs, + .vpu_ops =3D &iris_vpu36_ops, + .icc_tbl =3D iris_icc_info_vpu3x, + .icc_tbl_size =3D ARRAY_SIZE(iris_icc_info_vpu3x), + .clk_rst_tbl =3D iris_glymur_clk_reset_table, + .clk_rst_tbl_size =3D ARRAY_SIZE(iris_glymur_clk_reset_table), + .bw_tbl_dec =3D iris_bw_table_dec_vpu3x, + .bw_tbl_dec_size =3D ARRAY_SIZE(iris_bw_table_dec_vpu3x), + .pmdomain_tbl =3D &iris_glymur_pmdomain_table, + .opp_pd_tbl =3D iris_opp_pd_table_vpu3x, + .opp_pd_tbl_size =3D ARRAY_SIZE(iris_opp_pd_table_vpu3x), + .clk_tbl =3D iris_glymur_clk_table, + .clk_tbl_size =3D ARRAY_SIZE(iris_glymur_clk_table), + .opp_clk_tbl =3D iris_glymur_opp_clk_table, + /* Upper bound of DMA address range */ + .dma_mask =3D 0xffe00000 - 1, + .inst_iris_fmts =3D iris_fmts_vpu3x_dec, + .inst_iris_fmts_size =3D ARRAY_SIZE(iris_fmts_vpu3x_dec), + .inst_caps =3D &platform_inst_cap_sm8550, + .tz_cp_config_data =3D iris_glymur_tz_cp_config, + .tz_cp_config_data_size =3D ARRAY_SIZE(iris_glymur_tz_cp_config), + .num_vpp_pipe =3D 4, + .max_session_count =3D 16, + .num_cores =3D 2, + .max_core_mbpf =3D NUM_MBS_8K * 2, + .max_core_mbps =3D ((8192 * 4320) / 256) * 60, +}; + /* * Shares most of SM8550 data except: * - inst_caps to platform_inst_cap_qcs8300 diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index 3f2fc4e197c2..69f4c534288f 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -382,6 +382,10 @@ static const struct dev_pm_ops iris_pm_ops =3D { }; =20 static const struct of_device_id iris_dt_match[] =3D { + { + .compatible =3D "qcom,glymur-iris", + .data =3D &glymur_data, + }, { .compatible =3D "qcom,qcs8300-iris", .data =3D &qcs8300_data, --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 81BA6480DF4 for ; Fri, 15 May 2026 11:24:52 +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=1778844293; cv=none; b=gZP1zP90nUQTDvJQLSgSYYFU4lo/3h3sqCC2ZQ8j+u26I/jubMFwfFOY2kfegt6upRIEBxIvS2gxNEqgJZaZMPMD0wNHsque0OYwxoTlTKlikPKXn872vuRUoG/nWOSwVt8YFTleO4fQ//zat301GJuAr+2422yZhJmLSSp1K28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844293; c=relaxed/simple; bh=PD1gpoX4LAukVY7c9h2PcdOHpE6W9WE7RaExHqCiq04=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XlzM4lhTtyzouuoulVohnvNaVcul+LGF2+Tg6EPaaTnJUVPLzszYdAJ/UG+6ZWa9j7JQieTIcYkHZdKZeDfsAidXPoabjdZNuLUcqTMhf0uonSubgYTYFFCwzqo6iYoxr1ruHGKypUey80dMYJCwhO5IxcFnX9uqLbqN86IqvO8= 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=hERO8Hl3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=IVqIhdUS; 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="hERO8Hl3"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="IVqIhdUS" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64F50kRb3795625 for ; Fri, 15 May 2026 11:24:51 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= geJxq8Fym74xZf3sPrd/0n2hwRmsRBx/QMPFY1ao6wk=; b=hERO8Hl3xPxqS3SN t2kMhuGHwde75G4FYB8m6Sr/8ihrh6zqw4NrEOWnA08R5sKtl6tvNhahDO1P1G05 KRYymDA5SXXN9ViRrWtJnkH0LALa/BRdKdnGgq2dJJs8XI+4SOwDukUCYbZJ1i1f xOyLGKBB0V/FDsKQrCNnsDktcJtak7CSBE46jqiRN/Bb+ekEaZXoNiNeBwd+qbcF SpySJ06RnoX/0oED/ndj7KzcwlrBnytkxJpIANi2TVDWp9KxiZDzA6eKMfXQA2ni g+3pIkKX1AW2UikLDHLcPCfCMjTBqlfE+syXR433DLmTzarkVtYqblrTVNK90Hfd a1EI3w== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1styh1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:51 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-365d4d2fa04so8688399a91.3 for ; Fri, 15 May 2026 04:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844290; x=1779449090; 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=geJxq8Fym74xZf3sPrd/0n2hwRmsRBx/QMPFY1ao6wk=; b=IVqIhdUSvD1ZinDENCosrlQobip2OpSCQ7sDBFjrohzMEcmr2c7RyFds7XzWgwk0lA Wl9iVRrYwl/opEhH9kbL/n1Q25iyhahkUHvtg7NYc4vEbkP21KGAA4/j06mI/ooXRBCZ nnuPnZpz6BpY1ygf5b3XGo04pyTLcELUCx/DteXDI8a4LotNBCw7ltROdv82T0OB/Hl1 pwxH6qTCtMHokPT1vyWS1d+6APSsapIzajjp21cQk83831DUYH8rbBJV/BP8st42KEsM z2ynOgC2Ep8f/q/rcSau/yJu4zLHTTYNRVaYn/moJ/radcRs9slqKQ81cTK2wTf4BQvo SWpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844290; x=1779449090; 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=geJxq8Fym74xZf3sPrd/0n2hwRmsRBx/QMPFY1ao6wk=; b=nmFtRAjMQZheC83FEXdHvzNRMWguKzByV+7ILO+cp8U+OLNgU9NQuRaS/ZeRl/zP2l vgATxv+KItEOMCKDp9ivkkaHRdfPvTFmwJRy+250+jjNNL+s8Xz3mFPvtfmRCeoY/qgw wOkBnDZ+dKMoZzoTTsHMKEbtP/xvzh03d+CplWl9dER34SE0pHqfR8YlE1RAjyqabVNi lXOkQfVgowzpG5iTXlj5vnjDmsCUj5+f+aGaOSQbSHbzoi0YJKQYlJbV9HMtWLd6kUXi M5yovfVDPq44o5QCLnEzrcqs7083DTLdqfztzsXRcfRQhcqCO4eoggak9R/gUKcdTWHf ATNA== X-Gm-Message-State: AOJu0YyqCETjOY9QnzOmQrNDt6W5dZrDl+2mYw2dOQ6Ik69Vz9bKkWfD GgyObC+2tqsb7hNbabyEuBRdOUUCsOGiztbn/9NZuGWEASNn7zVh3mH+CJaYVTZbZUyyJMFWCCc 1eiUE6XWfcPhRlI3M06g2pF5WNKyLXN5qepu9P3NBM6vSsJYWDCkGyzSN4h0YjMndVOA= X-Gm-Gg: Acq92OHpmeLlo2uUgpeNJV/cQFigK554+mUqfh+Ri/+uvT3MbKJ0Z3xUOZZLpH/WpGc Q1vjASWiW7t+tpq6syW7fUyo7I6ob1o812SPar0MNOwvZELIlEOIPNpq1eFqtdutdLKujQ1i2ag jBbnf6RDmyKWbkWWo3/2OYmjB6P60JFU22SSuKXIVOjWc+eqWAMPFafXfpvPPLUEdJfxaljCrr9 xahGwkHZ5gKHecUraA8nq+cv5DD3JYp79O0yyV7iHh+1fOwBroXvC7NBhCIl4AcHndnqdIZJJqE 4NVbSo8r2ugttFJ78CdwzOagHTE9c1xz+Pi7JpDAgRegq7glI3efm/iPgk+DT29o9JzZpp7F5W2 EhYj4zzJn+ggv08PSNhs5kNMhFQ1dOAmmNC1g7yTHe3XpwhKv/kPZxULLxl+pIgkBYg== X-Received: by 2002:a17:90b:5808:b0:368:b881:b2da with SMTP id 98e67ed59e1d1-369519e2d13mr3830595a91.9.1778844290382; Fri, 15 May 2026 04:24:50 -0700 (PDT) X-Received: by 2002:a17:90b:5808:b0:368:b881:b2da with SMTP id 98e67ed59e1d1-369519e2d13mr3830549a91.9.1778844289795; Fri, 15 May 2026 04:24:49 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:49 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:28 +0530 Subject: [PATCH v6 13/14] arm64: dts: qcom: glymur: Add iris video node 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: <20260515-glymur-v6-13-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=4603; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=PD1gpoX4LAukVY7c9h2PcdOHpE6W9WE7RaExHqCiq04=; b=RafsrPim/rP3V0hWeEn1IFZtpupVqQAaWH4UDuUEcPA1FE3rDk252otVElqHF1B667wj06Lai xA6l+LxgTOSAz47lfmEmHmMoLAbV+wm19GnyKSFgLI8CdZ5wqWGBcvH X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX9vp5o4adQrKr ezxPkOOBu9ZyTLJtZuu58YZU5ry0JTrduYi3vSlMXJ+aORk+0Hlt/cphOxs3eKfWujvQZ1vfDge 4gvjVbfdN75OoAzkktF7TTHaJbYRm7lyL5GYiTTEMiwkAneLk7PH3XdTK92XPvZ1wCal9IPQMol qLcTQ5Sufeh2T0oppA+ErPE1VEdaEedv2p+1p8a0Miif5GBStx/DKuTEyL9rrnNIX/OnH07IU2L 4RyPzxPG/hG7cGBQZB97Tx9vW96sXEB0x3G80Zs2M1lwBRltPjRX5h2BMvB1PrJEnjTnOADHwSB QxQAy0KSim92zGM8YRQmqJrTIxVDCnpQOTlf2W9IX0sxb5q5IDnTFRO5KHQxhclX39bCn976DjS toWzi4PWxznDPE/JadHxnntmx2jvWCNdh02tXH09gttbgriIBNR8IFp1N8VXDHE7XrtYdTZ8q9U lYGs5HWhCFxlN1eC/ow== X-Authority-Analysis: v=2.4 cv=cZXiaHDM c=1 sm=1 tr=0 ts=6a070283 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=VYrRtalYO0MCCBblpesA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-GUID: 8VIYVk3f86mbnkq00j6gZOQBBYmkzAtD X-Proofpoint-ORIG-GUID: 8VIYVk3f86mbnkq00j6gZOQBBYmkzAtD 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 impostorscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 Add iris video codec to glymur SoC, which comes with significantly different powering up sequence than previous platforms, thus different clocks and resets. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- arch/arm64/boot/dts/qcom/glymur.dtsi | 118 +++++++++++++++++++++++++++++++= ++++ 1 file changed, 118 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/glymur.dtsi b/arch/arm64/boot/dts/qco= m/glymur.dtsi index f23cf81ddb77..c47443174f97 100644 --- a/arch/arm64/boot/dts/qcom/glymur.dtsi +++ b/arch/arm64/boot/dts/qcom/glymur.dtsi @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -4163,6 +4164,123 @@ usb_mp: usb@a400000 { status =3D "disabled"; }; =20 + iris: video-codec@aa00000 { + compatible =3D "qcom,glymur-iris"; + reg =3D <0x0 0xaa00000 0x0 0xf0000>; + + clocks =3D <&gcc GCC_VIDEO_AXI0_CLK>, + <&videocc VIDEO_CC_MVS0C_CLK>, + <&videocc VIDEO_CC_MVS0_CLK>, + <&gcc GCC_VIDEO_AXI0C_CLK>, + <&videocc VIDEO_CC_MVS0C_FREERUN_CLK>, + <&videocc VIDEO_CC_MVS0_FREERUN_CLK>, + <&gcc GCC_VIDEO_AXI1_CLK>, + <&videocc VIDEO_CC_MVS1_CLK>, + <&videocc VIDEO_CC_MVS1_FREERUN_CLK>; + clock-names =3D "iface", + "core", + "vcodec0_core", + "iface1", + "core_freerun", + "vcodec0_core_freerun", + "iface2", + "vcodec1_core", + "vcodec1_core_freerun"; + + dma-coherent; + + interconnects =3D <&hsc_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names =3D "cpu-cfg", + "video-mem"; + + interrupts =3D ; + + iommus =3D <&apps_smmu 0x1940 0x0>, + <&apps_smmu 0x1943 0x0>, + <&apps_smmu 0x1944 0x0>, + <&apps_smmu 0x19e0 0x0>; + + iommu-map =3D ; + + memory-region =3D <&video_mem>; + + operating-points-v2 =3D <&iris_opp_table>; + + power-domains =3D <&videocc VIDEO_CC_MVS0C_GDSC>, + <&videocc VIDEO_CC_MVS0_GDSC>, + <&rpmhpd RPMHPD_MXC>, + <&rpmhpd RPMHPD_MMCX>, + <&videocc VIDEO_CC_MVS1_GDSC>; + power-domain-names =3D "venus", + "vcodec0", + "mxc", + "mmcx", + "vcodec1"; + + resets =3D <&gcc GCC_VIDEO_AXI0_CLK_ARES>, + <&gcc GCC_VIDEO_AXI0C_CLK_ARES>, + <&videocc VIDEO_CC_MVS0C_FREERUN_CLK_ARES>, + <&videocc VIDEO_CC_MVS0_FREERUN_CLK_ARES>, + <&gcc GCC_VIDEO_AXI1_CLK_ARES>, + <&videocc VIDEO_CC_MVS1_FREERUN_CLK_ARES>; + reset-names =3D "bus0", + "bus1", + "core", + "vcodec0_core", + "bus2", + "vcodec1_core"; + + /* + * IRIS firmware is signed by vendors, only + * enable on boards where the proper signed firmware + * is available. + */ + status =3D "disabled"; + + iris_opp_table: opp-table { + compatible =3D "operating-points-v2"; + + opp-240000000 { + opp-hz =3D /bits/ 64 <240000000 240000000 360000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_low_svs>; + }; + + opp-338000000 { + opp-hz =3D /bits/ 64 <338000000 338000000 507000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_svs>; + }; + + opp-366000000 { + opp-hz =3D /bits/ 64 <366000000 366000000 549000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_svs_l1>; + }; + + opp-444000000 { + opp-hz =3D /bits/ 64 <444000000 444000000 666000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_nom>; + }; + + opp-533333334 { + opp-hz =3D /bits/ 64 <533333334 533333334 800000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_turbo>; + }; + + opp-655000000 { + opp-hz =3D /bits/ 64 <655000000 655000000 982000000>; + required-opps =3D <&rpmhpd_opp_nom>, + <&rpmhpd_opp_turbo_l1>; + }; + }; + }; + mdss: display-subsystem@ae00000 { compatible =3D "qcom,glymur-mdss"; reg =3D <0x0 0x0ae00000 0x0 0x1000>; --=20 2.34.1 From nobody Fri Jun 12 11:31:18 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 F1F7E481237 for ; Fri, 15 May 2026 11:24:58 +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=1778844300; cv=none; b=S5auopLpqWNIRiuoGj1bBoWr3f9HDX74bVhhun2HsexWcla6B7a7ys/ma0+M3n2VUfLHvWCQwSRoUKM0j+3nrtbXK9h4Ypq8Faisd1z2+qNHMI/d/aHUQUUfvDPj9g2+hlUBoTbWKwzVGKPW8p2T9dxiYjhPGq7fwOvIPRc/e70= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778844300; c=relaxed/simple; bh=mB3ax+sGyD+thy/S+owtTT++uI8XjdDtWOIrFE8Yvn8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DoS62EW5dNK3KvtHNCiudO0vINPXZHDOM38wi3EyFeRMJK3+mMniA5wrZ47Tt9TCVLr3IDarLniClpElr/+VVMLSfU1k4+yNs4JpRV2tCJavtCq7EiQ0EEnmLCgC8/2KIQpjX35N9LqYRihthZF3Hz9/tjSwH6qhlmqSQrHqN9Q= 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=Ugvn8ITM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=i5BPHWbU; 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="Ugvn8ITM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="i5BPHWbU" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64F5U6YW4008246 for ; Fri, 15 May 2026 11:24:58 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= hICxZj15kBmkUDSg2CSx6+F75VQu4k37C8p6b0IsqL4=; b=Ugvn8ITM5bq/Ebp+ XyzKfxVb7RJj5ZGNRQMPY+/xmjZhho/aQvgBf9fa+Ce8LN/47s0yUOIRGBR5FFBZ K5qNAnzd2lvSfSyGvbhBCcm/Hr4N4llpW3E/EtO0WbcpoeCRutAwfzNdEgJDmdmi oH31Sc0f1izXsL1INrtgQuYV95larZq9itsg6aAGWfF8ovCZScBGw6bYdtpw2qae LI23anlW7IzyHP9c6+lR6VWFbx5WF3z85KWj4un6bzCbTb8RpGUNQJ7rYCcpfaiG ERNd+zb8haXs71W7yo+K2MoV+YgdzUdyvOHl+O5eqeO0+wj9YBZg2sUBKkwwdXm4 D0rD5w== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1su1qc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 11:24:58 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-36865d109dcso5787376a91.1 for ; Fri, 15 May 2026 04:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778844297; x=1779449097; 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=hICxZj15kBmkUDSg2CSx6+F75VQu4k37C8p6b0IsqL4=; b=i5BPHWbUpcEA9PydLmSYOwUOHloCpBeNpbxhGZCFKBOcv3JEp3ZlUauDynuG5QPxPB 44c9tqnYPGp9SDg3KJSWlcfxzhGm4MrGoOZsiq71+Jh/WJCG2nqnOd9eKmlk+cvRYnZv MKLE1nnZpjbdU+TzzkoNBNH9GhkaRJwGA79TqyOLbDdYyYU/0eu5mzRHggqfq9cRhz/9 P9JCgXCsCw8DJTZMn1xyUKNEL3Kiv089ohi+n6ljdayIYByv5m9aQ6/A2LM9weX+foju aeaBOtnL/cmy1v2jOXwKLdJVeMWu0SPC43tZujPb/fHxz21en36qyI/VWdvKoScx9phO sa/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778844297; x=1779449097; 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=hICxZj15kBmkUDSg2CSx6+F75VQu4k37C8p6b0IsqL4=; b=FBbaI1bRdcP5FyAfk0xGDMwvkmmxppPeeLTfEBAJeQ6mL9ZN7LjSDHMrW5jkKO7arR J8vjq+hxLi6z4hsVIc3vlpTwBqbKbL3udMspx3RGVZBDjW5PcvnMVGWiI0+R3TdAcMkb pSORAqC9Nx2XrN1meMVVlyaqKeV/aAH87HqU356+LTmW6SMfTJTDF+22C4tEUyVk06wv oTQcFDhDgefgfesBa7ndwgOZl1pas0uvWgiaq9RYVnpN0B6Gzi8iDVJeLmHv5PFKg+Td Imlms1npsMqVCfh9AirGhIWZgA57/fDtFhVokhRwKVnf6cgDEjxUgQld6SfcyrgqBoXp jUjQ== X-Gm-Message-State: AOJu0Yy7p6GykjHVaFLQ/nrgPUG+KP8/MGlmGkhtUtE1KzN/NLh1pPct GFaoJ5hfeWFMl7Ll+GeyQP27RMVCAhh9G3HLCWhy8+VSR9ie9vN6AjDEVI5RU0yTxw/FHoXWtsh XWN68/y1Jf/YIzescgaWyWomtGb4Qesqw0/3z2XMpgfF1hg2E3ssvLkP9wCo9zwZC8CA= X-Gm-Gg: Acq92OEasnLBz/eWsLR0I/CZTjNMtlbVXGB1O+N+OfhD72vebBI3/8ORqEbmcIac7U/ IfkAXcAulIVll/UOIsA2SvfuRg2dITOfNcOaKfrFvI2v8wQoLE1iunT2gDe32nLCBNmNEK5d2Ne tCrwvyO9V+o/ib5hoJtT6T1AYe2z+yyzPM7DWq0btBVo5lxwNLgvlBL3r9iSDmfQuY6erI0fXMT 2AmL3jxY0Ej/c/UgxjXxZO0I0ML0rkZ51V66dcaBT+HgLP+Fi1ItWmj1/rotvxYwnm5OOzLm7Cx 3gOPnfpcln722NsxMOInSEEXBPDJz4dqC/vgwfjPxUUgS+DQ47JLcAMhjx4wPFgfCZMH3qNZFed deVPkeOgs83DPphlDUo/hGIoScwTKsPJq2cuCj+OGkdprGa/u4cbBSrw= X-Received: by 2002:a17:90b:58c4:b0:368:b4a5:c4dd with SMTP id 98e67ed59e1d1-36951895b63mr3507732a91.2.1778844297055; Fri, 15 May 2026 04:24:57 -0700 (PDT) X-Received: by 2002:a17:90b:58c4:b0:368:b4a5:c4dd with SMTP id 98e67ed59e1d1-36951895b63mr3507692a91.2.1778844296564; Fri, 15 May 2026 04:24:56 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36951584654sm2476249a91.7.2026.05.15.04.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 04:24:56 -0700 (PDT) From: Vishnu Reddy Date: Fri, 15 May 2026 16:51:29 +0530 Subject: [PATCH v6 14/14] arm64: dts: qcom: glymur-crd: Enable iris video codec node 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: <20260515-glymur-v6-14-f6a99cb43a24@oss.qualcomm.com> References: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> In-Reply-To: <20260515-glymur-v6-0-f6a99cb43a24@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy , Dmitry Baryshkov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778844197; l=828; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=mB3ax+sGyD+thy/S+owtTT++uI8XjdDtWOIrFE8Yvn8=; b=PkZtwhvTexrUnZWWAE21Y2y7ROg0444tAsb/bRuCRc76y02WUWY7ps7jFUEMVmPTgL1iUL9my GGaPgGvD3bDApcsPuObmhs21d4H9/RAnJwDeZHTK1P7mtZ4A2GqU0Mm X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: UxYgKrNNxDmbfR_ZUj4w8tcJagYe8t3K X-Proofpoint-GUID: UxYgKrNNxDmbfR_ZUj4w8tcJagYe8t3K X-Authority-Analysis: v=2.4 cv=cZPiaHDM c=1 sm=1 tr=0 ts=6a07028a cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=Dn0IJEph4XI5J7oltBAA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDExNSBTYWx0ZWRfX+LEPI0atwkk4 IwZyD3OnnGlwLg4Bhgpi5sJQK/+KW1p/jvE3DLc5iYbrujVnmIL0XVnJEZTh6KvM1sgQVt9JgLH BEODyH9N9cc/yqYjbMtXkGUnjQ/9aQtCKxG9DoVgqpviwXnZheM6Rvksm6RexVJGyHTHUqsUOS7 Gr8CKQBZBkDhHjV5rqtaSylXvDURrWvEgFcVrvyH3Fh4DHT1vj3zXwF1I+GU2tyFSTpf/1ckx30 bxdgXBrlOePRbISI1WsHcN/IJcLZSKZjNRM/r6/W7TmE4oMzr2vwqDyGNjNqtHUFXU9W3a6NYNB 2LR0TgeAMPOlZc75rKx4sTDxFGZ51ZTT56dpzDfBoYnsdrr5KvIwYiXnWEyzMfTisZIUbU7C5eA kGPzDVNr59GcNzuEoQ5sLXDKjSAuR2F4R0C6iWq1fCVGqvdZTB4WUTc8EDiH60MtC4FJtNeWZYG dFNkPqxt6zQcwET94Hg== 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-05-15_02,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 priorityscore=1501 adultscore=0 suspectscore=0 malwarescore=0 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150115 The iris hardware block is described in the glymur SoC DTSI, and enabling it here allows the media iris driver to probe and use the video codec functionality. Reviewed-by: Vikash Garodia Reviewed-by: Dmitry Baryshkov Signed-off-by: Vishnu Reddy --- arch/arm64/boot/dts/qcom/glymur-crd.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/glymur-crd.dts b/arch/arm64/boot/dts/= qcom/glymur-crd.dts index 35aaf09e4e2b..8d6ea857634b 100644 --- a/arch/arm64/boot/dts/qcom/glymur-crd.dts +++ b/arch/arm64/boot/dts/qcom/glymur-crd.dts @@ -198,6 +198,10 @@ ptn3222_1: redriver@47 { }; }; =20 +&iris { + status =3D "okay"; +}; + &mdss { status =3D "okay"; }; --=20 2.34.1