From nobody Wed Jun 17 06:04:46 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 11D021C5F13 for ; Thu, 23 Apr 2026 13:30:06 +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=1776951008; cv=none; b=jngnc2tRbSXvdL3UWf3oVPvaS2uyFBzFudwY2hERbJkYd9bGy6ImL9uH3MZVAdYFlPE6/OFjYp0JfjBZS3M8IlQayxQnGVNJx/e1E3a4/LXnKu5+ByRgITjCGrxoK0gIeAsXk6u72xpkkshNiNFhMiqpcs+cJLX45mTI2E07GCE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951008; c=relaxed/simple; bh=9ojkIAdTpgdWLJL63T3L3LzXB40PPdXzhWOQLp7Cpgc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Svmngq2R1YYDWQ3VFCeKnetl6N2VEZItt+rw6tlaXSYT/Hkw7VMfx3bxfqTM+x/yJvw5LUJ2nWpPg1KfkBi23+7OLH25oua9QKhdwkmAhj2yeOpL7L74lOa31Ks/bktm8sgTs0Gkvrz89tUUCCHUtIbQSe3rhxK8rNDqOzSwfUc= 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=inrUE1eF; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=aWk+YDEd; 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="inrUE1eF"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="aWk+YDEd" 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 63N96eDW1204968 for ; Thu, 23 Apr 2026 13:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tdvgFuqYyOWNHAPEPDaWlWX5rBlDjzWDByFTGDon+SU=; b=inrUE1eFryx5382j 3x7rs59o2EAw0GE7yiTLTv6vxcNjIksca0eovJL55QwMmtmF0ghirHogM4Ku6YGY bLCa8odqqLPmBKzzeNDMepoaZaXk8ieuZYRiBHdEWeX5q4ApQBx+p8E7i2r3zqRN hm6AApefZAMvcbqH0VoQ4vLcsd+n6kdWs9UhsXDfN3FwN1KxcDl0qS0O74W2XAa0 wBVmQX1BLh196ISWpAFrH6rYA+Y8xRxVksDSOcw+XLKIAICQYDCzAYACXF5l4vzG aI9/WqTstkkEgqEvQVfYA1ljH9cb8f7kjOCvWb/wxda5/10m+yYcBurx4gmsRovt zBJ8bA== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqggn91ag-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:30:06 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2b4530a90fdso132343155ad.1 for ; Thu, 23 Apr 2026 06:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951006; x=1777555806; 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=tdvgFuqYyOWNHAPEPDaWlWX5rBlDjzWDByFTGDon+SU=; b=aWk+YDEdRHh/OCbh3ZU3IYGpYjJ2Kz5OsLcGf+FTTsJZXSz5lxL0VhxzPo2M1zrHsy pSZn6q34okLTRifSrDM1Vps0pgZkOwGgmHfnNj5G4a8GNGvUEK5QdAYvc/z5frkrafbK Z6BeE0ODwKjcxghQlLXoUnQiwR/SI8ZKJFXOX4Vnr/bmubL/7KvC6nxEuYRu1MTSmajT /Y555zJA3lIzdBbxVv5Ygao+ev3pEynMtt5HMuf+sd7hRb+2Qf/HdyhtvyaHQD/mRiwV OT+jW7KiIa7mjkLtMWYuUyBSFRvEkD/EbxTqd6UbFpyMa8scKT39OWito/mr8/KObZXP zBNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951006; x=1777555806; 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=tdvgFuqYyOWNHAPEPDaWlWX5rBlDjzWDByFTGDon+SU=; b=D+G6tZ16S8Fks+AYFattXIMLUiisvZmktkuYxqCnRBD85VICMoCzGSsPwKExMEr53w Z3N70UyfoiMAbqzFvnr18DEmKG5Z1aBfFvJQF3BX3GKZq0SaT1eb1hve+MKa6Gs6ZuPY NcE/1YLe8Em5OPjXXFp6D8iEYNT86lUWGyju1FD3eckXpUmKDMrp9SNQ08VSb02VsI4b venE68NJd6daB60rqJ0R0q/AuZYBL0eqhvAXGvnGf66K34bcPp8wBnXZjG8hf3c8c1Y7 9gLGhPsHR49ufNO4x5O0hA8EbUERyQPzu+wEyw/w7di/PYhQ3tocuvuw1J+0gQuv/gYd hY+A== X-Forwarded-Encrypted: i=1; AFNElJ9V284BPzsWdeX11/9OoPhQaMArQ06ip5hg1mLxd+2VKdt2yEmIXYJNqrUeHStcxn0YVdSeRf94gYrAugE=@vger.kernel.org X-Gm-Message-State: AOJu0YxMzVFNDFEbbWHzjOG4T6jTuRXRa+7UpM5MtK3kIUh1CVmWXfHU 8qMDNMxfZizDCWE3mY6PHpRA5J4cQQGtahKEIjNsY8+4K/N17ALCxc81PNrZwf256lJIrzFEYte M9FUOrIA0LAjEEMYZAViFLMCtt+BW4izhcahrZQGIBoq3002zqdy/NzEld+a802nBtTs= X-Gm-Gg: AeBDietulZzaY+XeWrl+gq8d34eaKLtfo/iM4twWvMoBMyGPP9kV6i+txTmxjXXPkxy imVfdu7nuuemEEsDGse1gT9EYwXK8ME7tTgSz2ViNulJB7J1ZHzmIjLqs9c7bTVoTn37v/AbbgB zkDMnSeDhvhqXUfkbtlFtnjTfEkpe4miwWM84w+oeswzMnaG6FjHkx8CYM6PuBcCKhAva8FEi+M uYd4ze54onw4O005QPBuyCjO6NsnlUU9gCZYpb+GL6NHNWLxT5DUPzPOYItqoblMhL622bU42Aj 7dgDoFQS6l5d838gwvfB85a3TE+bLi1qJ6dvXgej3Ga42v5/U79Hs2449e8Gl6f+wPJ7LJnosds zVfF4f7apf6Dy6k/hKqTxHSj2EDbsUFsfneXHrQWNufKvkMenTXg9cdEXA3zN2G0U2A== X-Received: by 2002:a17:902:f551:b0:2b7:9ed0:4f92 with SMTP id d9443c01a7336-2b79ed0505amr34984255ad.32.1776951005405; Thu, 23 Apr 2026 06:30:05 -0700 (PDT) X-Received: by 2002:a17:902:f551:b0:2b7:9ed0:4f92 with SMTP id d9443c01a7336-2b79ed0505amr34983465ad.32.1776951004706; Thu, 23 Apr 2026 06:30:04 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:04 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:30 +0530 Subject: [PATCH v2 01/13] 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: <20260423-glymur-v2-1-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=1361; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=9ojkIAdTpgdWLJL63T3L3LzXB40PPdXzhWOQLp7Cpgc=; b=kLZ5VkIwiLF40laB5sma2d3q4alpT4zAEZptqRbq23De2A/jVlXuy2rCJ87n8t/knrGPt5QnQ BQ50ze3n+5yDir6GHjn/LjLJmJfxx/KjeK3oF0PhnKyu8vo9IOmZtqI X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: L1o4klut1VUnrhFYVn4MHCWGbmZ2BGFP X-Authority-Analysis: v=2.4 cv=YZeNIQRf c=1 sm=1 tr=0 ts=69ea1ede cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=nrYi3PkkErC94SPB-twA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX2OhlPRIXddcO TuF3ahvtAj4OEXZLiks2Z4pDbegh6b44ZjI+9/SCBNLcMNv06B7e4MWX2zxGuI3HiqWh6thGPW6 101dF6v6MzLGCXMumlkjUZy2dYW/WeapFMIW5bb1DGqgKRwwNX/M6W7hHNMbUF/Ez9wM9fURkYr wI6nrrcq0C18kzqrGJOhc/JPNaW7YzNd0wTdQBpTBzsvdQpOQ+fYrFdcYPw8uYcEPPhScnOoK4V QsVzQSHnXb9H6jfrrOWkaObhVqaGl3XTJ2rBl3A/6W9V0SRme1onVzeolkt5Co/w7qk1GtXhs3/ iPFpzPmWCcQjWl3KC2aEE22yoTxc1gNEVvxi69U+iVJ3mk5u/L288i0kF3FqwN6wBg4KpTBKW9v YnJxWCS2Z/EZmvMFFue3tv4fh54MTnYzRmlL1s2GntO/witF+sGraHyxsWEDr9c29Q81FHJl9dH 7N5MZRoj48SGC3FvXuw== X-Proofpoint-GUID: L1o4klut1VUnrhFYVn4MHCWGbmZ2BGFP 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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 malwarescore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 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: abf5bac63f68a ("media: iris: implement the boot sequence of the firm= ware") Cc: stable@vger.kernel.org Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_vpu_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 548e5f1727fd..bfd1e762c38e 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -78,7 +78,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 Wed Jun 17 06:04:46 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 739E024886E for ; Thu, 23 Apr 2026 13:30:16 +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=1776951017; cv=none; b=Eary4dRQij+ENgxBmQGYqENtmctjked/aZjGrT022gnhNlnAHZsoiaqmk522VBq9gtvl54O+KwWIXaKHPpB9L5yk17bSkjlyKk6YhuFL9f//Th9UjVcoV7gruo07HzBQwEtjoTEZo/jXqL/VSLuSc/yDWooF+WkvbP0h9CT0IG0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951017; c=relaxed/simple; bh=IQk9tf8jtI734WVYY1gXH96FiyZAYSnp0pjs1ZGk6Dw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HozXErbOL9OdSj33U5eMbcoOmezx5sC9RLsOOBccUgpsOS39K7uYtJMFXiRn/IoLzRNsseYHDeXdkMKdpUXMa9ShDF/w7948QUwjSxigyOYSENggpb4t8ChLByqTACryhlsltAgnKVhEip9ej4Q9tYMxUD3gTIrvvy0EEdre1sc= 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=W83kJCb9; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HnsKjtIQ; 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="W83kJCb9"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HnsKjtIQ" 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 63N8tqZM028797 for ; Thu, 23 Apr 2026 13:30:16 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= oFs1RbQ0XkUdAOvZ3WrAthRL+JhVyLKMhXKejRMG50Q=; b=W83kJCb90RXTWXsv +N4MsWO5j3J1l018/9HTuTnXyck6N5sO3sEEcmhS6D/J1UM/Numbte+0JLmFIG7Y fDB8QyPCUSsSLwS8LDR933AUrLI7bmggaJMItyAr9c89SwvCR68I0DTo74N1nMPR mUyAUDvVEp8wWry2YPw3McZb9pj9zoLi+oijVtIH/sCL4RxmiT9PSj5zHM7B96YU 8Wk+xoeVo6mf5vdmbRsDNU1TM8zC+h2Q0oj+OnIVF4Tb1JyUEKvEI3BRvZWV+Ajz 1atvVcHB4z+RISev0c0n14GFqxUk7VkRYeozQfZ2qqh1VZnXh5sZqMLtyfM5Peup 5+72rQ== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqdjm1qqe-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:30:15 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2b24308165dso77481515ad.1 for ; Thu, 23 Apr 2026 06:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951015; x=1777555815; 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=oFs1RbQ0XkUdAOvZ3WrAthRL+JhVyLKMhXKejRMG50Q=; b=HnsKjtIQp1p0pIkHzGrUR8cXxpLeaEE93TYXK+1K0N7hnVuKIu4UBYjtKCONCRilLy pJV0SwGAwRU0kTvEl+Vps3rlVQO27EQ1b7mUzEZygji60mHO8/1crVs2y6DYDEIWJzPt dNEbGLWBgssBbFtVU7RF2hwqNDr89FANxN9Yw1wg2sUbf9EvLZs44FVnktDSmGhw1NNH MNYGeRTLZlA5i22ohQo5Xe/qPVN9YtgInibaiLh3Upsj0oOjTUdfdqgf62hBjyv9K2CI ks3+D5UbGq5v144CZXN4RkzXHCCd3T0YQ4V8nhGanZQ8DGeMN3yTLttZfZcEptqgd5Nm qqOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951015; x=1777555815; 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=oFs1RbQ0XkUdAOvZ3WrAthRL+JhVyLKMhXKejRMG50Q=; b=VQvV6BZqAx+vomocoY555hfTTeJSDgK+7t9vscPLPoLnoz4bqQOgGyOcVZtyVMvyiq vZZe3dxoopb2iWqAZHHuTsqsoCJU21AmgHN6kyMMh6Cr7p0Qh1Mz/fsZsLQtEdc1LAci WFD+/RE1Dm0WKMYCgmjwsM+LNGGDOXnQSw+SSoesLtMeHp2J8FFNf2HRzj8ufO+c885e IJSuA5jn/XvQpEAzouwiDRN1j3g6r01BlCebdfahQFgS21n8TTcjRN+QkaqI00/7NhoR 0kLG9Tn0Rmay4gFn1TWH5oqrJF5HOmX9vN4AnIoEknNlwokFyzwJpMiDcjIT3PQBoJi6 H9ig== X-Forwarded-Encrypted: i=1; AFNElJ/qom6fleOfNBGiDxKzUyPx+qLQtoYJpB9Z7N9E9kTD1cDH2LsdYNKW7fhkIyF/O2C+Uc1v2LIUMR/hduE=@vger.kernel.org X-Gm-Message-State: AOJu0YwoN4We1xUYaHAeugCc0NPELg3B/es2cZyxFRK9GU4NoG9+9rr8 QyDfXbn8kmNxCfYsUtF5jrx93IGhKw9NR1oFD/PO4hDZw23HsZsjfFaRIgLfkA8GyE6rSCYBsVk 4vXZGyG49/k0oAezerJmR424Plrc3uuZNe2JcNUU8kVZmGYU1TaKNB4Bzh2ajzfTFFrE= X-Gm-Gg: AeBDiethhpAGpDb51mP+HgD1G/JisnNFpHelL62UVT5abN9bou6aAS8PEDCDB4qJ/Kt GL2QfUxBt1O8u6FkK4LWiE9O1ZgR7vqx/hICSOhMSJfjWPBKzHzYrZCzZ9Ugt7lmbIYzCKOmOBz XPDHyF9KzJczLEdGy9FcGfU98PC5FLlHT5aKNZg4vyBVtTJFdfwcm6a6ZgfFoCoseLU5b8sipMO BQaMjZJHpH+uoxFAIgPj49XIEsBiW+6vnA+HmsK3BpnTqaXzSNk2hJ/N+mk6vSkFbTdUFvzKnQU 1ieREcO+56PLNTszIMNQ02IgUWPBTg6PrCL2TMg1OudAuWmsZ6wvfkRbsN+3CA5UVWFwWhllpI5 zsnsveVyfIDww0kO5AESFeq//Cwzlp20ATcuurBkPZ84vP8KzeyXyePPd3S1Ea68gkA== X-Received: by 2002:a17:903:1104:b0:2b4:6529:7b9f with SMTP id d9443c01a7336-2b5f9f37032mr302687055ad.26.1776951014865; Thu, 23 Apr 2026 06:30:14 -0700 (PDT) X-Received: by 2002:a17:903:1104:b0:2b4:6529:7b9f with SMTP id d9443c01a7336-2b5f9f37032mr302686055ad.26.1776951014097; Thu, 23 Apr 2026 06:30:14 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:13 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:31 +0530 Subject: [PATCH v2 02/13] drivers: base: Add generic dma context bus 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: <20260423-glymur-v2-2-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy , Ekansh Gupta , Dmitry Baryshkov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=5182; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=m9Ev3cg1dRS/apkqmuIWrlLItkWfgL3nCRaQ+GTJ4d8=; b=a0MO/i8o4a8De0o+pVmxc5nct6busfcAWycf0+sRmWbw7J9/KUDBhEJPpZ7lySVphzTFDiOk0 lCbAAc8uQyBCNukA9WgkyrwbsxQ7npM3UxMTlbG7g7ze+2dYMgz8VVH X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=EZn4hvmC c=1 sm=1 tr=0 ts=69ea1ee7 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=nxtABoNUPiTGfhWLCFsA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-GUID: GpXfVcoVg86JEfySEEBvzaNQxkdESJnF X-Proofpoint-ORIG-GUID: GpXfVcoVg86JEfySEEBvzaNQxkdESJnF X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX5CNC+JJCBFFL Zz8UG7uOGTlS9wQXiN1VRpy1sOm0UMKeWJ+tBl9kLmZIdJ8IDTyUbi80qeJxKf7fHPbhzj2VkJv FuV0NtW7zrzYwwXXHK4vU9iwusMkWYbH4rFxecz1AIftguN0SeFjUrHIXANslr2rCh6ScRo1/AM iKT/SEBGqjhE02Xm3hV758InyTzIVetGNVO0Lifa8x4hzqsHx26lKRCZdO9x/4Wk8bIXh1L1vGE zHzTMoe0gsOxDSrKoGc4Kznew+EsjeIEbF4u+thMeraejh2D3Y7Xl3rRB+Hb6yEMnMuSf1ufPUL gWoEslt6SyHAXPO6EKC2vdwkCQ+RIp7vZH5EWBW/o3J1dXox1gnbvPQ4391MTqO2ORZGAbHpgmf n4+X8WkD8e4maP2OeWpXjP5hKSYgpKhMpkWpoQMzEdl6hZMlNQB778aXEhf00YpJpjS2L02YV0j s3iqTljiBd+DiGmO0uw== 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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 clxscore=1015 impostorscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 From: Ekansh Gupta When a driver needs to create virtual device at runtime and map it to an IOMMU context for memory isolation, there is no common bus available for this purpose. Each driver ends up implementing its own bus type, leading to duplicated logic across multiple drivers. host1x driver implemented its own bus type to attach an IOMMU context to a dynamically created device. The Iris VPU driver now has the same requirement. Rather than duplicating the same bus logic again, a shared bus type is introduced under drivers/base that multiple drivers can use directly. The bus takes care of creating a device and attaching the IOMMU context to it based on the client inputs. Suggested-by: Dmitry Baryshkov Signed-off-by: Ekansh Gupta Signed-off-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/base/Kconfig | 3 ++ drivers/base/Makefile | 1 + drivers/base/dma_context_bus.c | 77 +++++++++++++++++++++++++++++++++++++= ++++ include/linux/dma_context_bus.h | 26 ++++++++++++++ 4 files changed, 107 insertions(+) diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index f7d385cbd3ba..499ea92dd88f 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -4,6 +4,9 @@ menu "Generic Driver Options" config AUXILIARY_BUS bool =20 +config DMA_CONTEXT_BUS + bool + config UEVENT_HELPER bool "Support for uevent helper" help diff --git a/drivers/base/Makefile b/drivers/base/Makefile index 8074a10183dc..348e69695e55 100644 --- a/drivers/base/Makefile +++ b/drivers/base/Makefile @@ -8,6 +8,7 @@ obj-y :=3D component.o core.o bus.o dd.o syscore.o \ topology.o container.o property.o cacheinfo.o \ swnode.o faux.o obj-$(CONFIG_AUXILIARY_BUS) +=3D auxiliary.o +obj-$(CONFIG_DMA_CONTEXT_BUS) +=3D dma_context_bus.o obj-$(CONFIG_DEVTMPFS) +=3D devtmpfs.o obj-y +=3D power/ obj-$(CONFIG_ISA_BUS_API) +=3D isa.o diff --git a/drivers/base/dma_context_bus.c b/drivers/base/dma_context_bus.c new file mode 100644 index 000000000000..c2ac189ce08d --- /dev/null +++ b/drivers/base/dma_context_bus.c @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include +#include + +static atomic_t dma_context_bus_device_id =3D ATOMIC_INIT(0); + +static int dma_context_bus_device_configure(struct device *dev) +{ + const u32 *iommu_fid =3D dev_get_drvdata(dev); + struct device_node *of_node =3D dev->of_node; + + if (!of_node) + of_node =3D dev->parent->of_node; + + return of_dma_configure_id(dev, of_node, true, iommu_fid); +} + +const struct bus_type dma_context_bus_type =3D { + .name =3D "dma-context-bus", + .dma_configure =3D dma_context_bus_device_configure, +}; +EXPORT_SYMBOL_GPL(dma_context_bus_type); + +static void release_dma_context_bus_device(struct device *dev) +{ + kfree(dev); +} + +struct device *create_dma_context_bus_device(struct device *parent_device, + struct device_node *of_node, + u64 dma_mask, const u32 *iommu_fid) +{ + struct device *dev; + int dev_id, ret; + + dev =3D kzalloc_obj(*dev); + if (!dev) + return ERR_PTR(-ENOMEM); + + dev->release =3D release_dma_context_bus_device; + dev->bus =3D &dma_context_bus_type; + dev->parent =3D parent_device; + dev->coherent_dma_mask =3D dma_mask; + dev->dma_mask =3D &dev->coherent_dma_mask; + dev->of_node =3D of_node; + + dev_id =3D atomic_inc_return(&dma_context_bus_device_id); + dev_set_name(dev, "dma-context-bus-%d", dev_id); + dev_set_drvdata(dev, (void *)iommu_fid); + + ret =3D device_register(dev); + if (ret) { + put_device(dev); + return ERR_PTR(ret); + } + + return dev; +} +EXPORT_SYMBOL_GPL(create_dma_context_bus_device); + +static int __init dma_context_bus_init(void) +{ + int err; + + err =3D bus_register(&dma_context_bus_type); + if (err) { + pr_err("dma-context-bus registration failed: %d\n", err); + return err; + } + + return 0; +} +postcore_initcall(dma_context_bus_init); diff --git a/include/linux/dma_context_bus.h b/include/linux/dma_context_bu= s.h new file mode 100644 index 000000000000..3d89594fbce4 --- /dev/null +++ b/include/linux/dma_context_bus.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _LINUX_DMA_CONTEXT_BUS_H +#define _LINUX_DMA_CONTEXT_BUS_H + +#include + +#ifdef CONFIG_DMA_CONTEXT_BUS +extern const struct bus_type dma_context_bus_type; + +struct device *create_dma_context_bus_device(struct device *parent_device, + struct device_node *of_node, + u64 dma_mask, const u32 *iommu_f_id); +#else +static inline struct device *create_dma_context_bus_device(struct device *= parent_device, + struct device_node *of_node, + u64 dma_mask, const u32 *iommu_f_id) +{ + return NULL; +} +#endif + +#endif /* _LINUX_DMA_CONTEXT_BUS_H */ --=20 2.34.1 From nobody Wed Jun 17 06:04:46 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 3CE1324E4C3 for ; Thu, 23 Apr 2026 13:30: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=1776951027; cv=none; b=gJZLj3Lj5EFt+sxvQOQWOe6MiGgAVEgLZyidMQiMW9ddaf/mhzv2Pk2VN5J8hnIq6MwY8wI+BFexNm0HCUG6Pga3sBBr4ft6A2NcwOvNTGf+9GvFV3Zu/ECY5lHHBrFi5vdzRZ+nnSgKKM2dhQpTZX/OeQZ8ydQxdUiCzghAIho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951027; c=relaxed/simple; bh=Y0zyByaU5r9q2V9Qz/hj7ehLyQOPReW9OMOlFcYfif0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cosKmvRYz/qkuix4L/BnseTL66SzBMuMEzr302V5HNOJBIB5GEQFgUTLr645qYpdAjIOVKxIuUjf8tQ7kaxXTaWgILSP4bvHBv+z4xYYGV3cR3q1JcEHTGp1d/BFQiMnLKT2SidjPtq24TqRbchW9n3R501D/zdmp53G45h8f2k= 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=ghjhN4sM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Nk6Qqv1a; 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="ghjhN4sM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Nk6Qqv1a" 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 63N96WqY1204779 for ; Thu, 23 Apr 2026 13:30: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= JgwjwFdvvj5l++UKF5Dcssi0Wo7kEhu0ad5cAFD1lJs=; b=ghjhN4sMDwiDYsIQ Re09rM5kmTRK4/3Qs5o8Ji8YmRTsBUq2t7Qb2gEZLqiU9+xly3MT5TtnIbklDNFq IrAvAhTNA4BG5Mmj1FpoOQ0wy2qQVyK8nNQcIt+dr4lU96qulA0KvwXofmMt44Is 02PGvYX2JezK5VsRpXVpdZTgBvgYbt0rLLSBUWn7nN5gOLpgpPCYRDrlrfcZyd1c g7YSy7jOMNNwQJQH3L+pjRk3J/tr7pNtifMrkpLAbZjWeu7W1SqLw0XJFSzJ7y6e c6qyezTNDPdO4iQEgIB9RwVRtwpMMHCZ56uPJo5BZBIOv3VrYLnUVsiaYlMaKlVd B0pYig== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqggn91c7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:30:25 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2b24af7ca99so90459555ad.1 for ; Thu, 23 Apr 2026 06:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951025; x=1777555825; 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=JgwjwFdvvj5l++UKF5Dcssi0Wo7kEhu0ad5cAFD1lJs=; b=Nk6Qqv1aZV7ZNFbaxNosooiFNQTt7tk5Jd/yntzLGZ1WMA6eLStxt78wa+6ezF9nu8 Xd+BRbrYSo92T4+M7ynj4V7pARKzU5YfdXB6LVdQfa9Dk79Y2GTIFV0cjD5bfArOzSHC Ufhf5gOjVSxp3w/ae/QJBcnPPlokX7zbeEwBQUtBjZ3a75zuR47l+ThTF4fGaDboQsLf pESM4kNHGiANqTj2M0cxEEcU/cOlqfnzNeCMSZgZfRAOqO1b5noCpXzdUM7oGOyjCflM lZft8s+3W2HEW9uoOouIGgHFx3DoukBtdAfikcEJ1jxCDiSob1UxCVEsgAZbAl9O+agu pxZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951025; x=1777555825; 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=JgwjwFdvvj5l++UKF5Dcssi0Wo7kEhu0ad5cAFD1lJs=; b=mykbnTbzqOvz/5IpqpEm81t2hqahSgdw48Sd0SamMa27sShe44rACqdqir4EyEZzC/ +sxNPZ18blSnrQn6Gnoghk802lPstIrBvJ5WGF52Xk9pPSt0u9LI8R8DSIdPPkmEXUcm pOlsvbck3XPzztXn4PQuxFWpmR9HVQW6ArNd+ZCF2v/ej1s0Y/QYpBu9pk8L1aVuS1KB +YAXVFG8EC5D+9sFHbF3zZ/14xXLzAXeBUrl3iC/2r7cmY0mLFQBoWIBlxU5OJE/eWIe RjuIs2OAEMZu78Q7Nqwn44ez3SMsh0OC75HPfemACwuSbQF1qYeGhX350HXJZnrZAxLn jWMw== X-Forwarded-Encrypted: i=1; AFNElJ8JtbfnMJr+BHWR/qeOygl0e9UlXNTzsO+f3UW7N/9rAPr5KdCjKl2Qh4g789ZZfV6P8Rv6WaskBBgr/3c=@vger.kernel.org X-Gm-Message-State: AOJu0Yx1h7rF3yoQEHuRvZNN26bRqYESB3/KWAGhESMngS+bTKHuofDf z+ka5VNiClqVvEQBro9gxh0TjqaHj73Q+7Z/PxWP26cn0fRlWZ0FzkDYtRktkcrk4p0RAk3vIEk arMisd5jDqg0GTkEhJKVDhhOFGQ0nBOTbMN0CU4iHGO0b8uvkpDBNUZiajprwsJEl0Q8= X-Gm-Gg: AeBDieu1vHKzFmnYR68jYJLckVnEE+pinPbct1AFI5ATdxnSi2DTbC6wOEE66O1gF2M Ot+gKtMjS9l6SMWhN+79mwoPuQFDIgYXBcmT3dU1epmorZIN2zIXpKZ4s+47iv3Qd0O1c9oZPfN dod8AEiybXbD+OHnCa5iUMstyW0e6wdfv8Clq73qvaxPkJL+/aB4mJWGliftcxjU0INjQzaf9D1 Rz5xDtSto9ij0PaZvjthu1hRgV6kfyXLLlMYwazjhCp62USdVAN2fjlS/TWh+pyeim5Wb9zmBRY jUvlyYVyYnsKfBsaMx9Bzjh12vwhiKApEsnOZKw1+sfoViTByfe3DZuWeP6aHTTbliqF3jYHUVA QnQ7fmmbNVQPNiaITDtIGuoQ8nyeWA6NShzYiWT93+qQzItYIx1XIT84xUv2QoHSXJw== X-Received: by 2002:a17:902:ea12:b0:2b0:6e4a:32d0 with SMTP id d9443c01a7336-2b5f9fbbdacmr283588415ad.35.1776951024339; Thu, 23 Apr 2026 06:30:24 -0700 (PDT) X-Received: by 2002:a17:902:ea12:b0:2b0:6e4a:32d0 with SMTP id d9443c01a7336-2b5f9fbbdacmr283587505ad.35.1776951023495; Thu, 23 Apr 2026 06:30:23 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:23 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:32 +0530 Subject: [PATCH v2 03/13] gpu: host1x: Migrate to generic dma context bus 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: <20260423-glymur-v2-3-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy , Ekansh Gupta X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=9125; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=KAZGJcms8W81ZmK2zjFmjrcOZ1HBohJzHFPq/diKVJY=; b=G6RcIQ17RYpJWR8JDM591/LpwoVkQ6XZG36hL1jc+jg2eaqYSNxbMR/xAkW6nsA4aDE06Ugnh G6EQkaClw2AAJ756RAnNV8DDM78rg/FXf7UziboAh2VUdY6eWdWtwwA X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: Ny-bk9QdMEXrAptYyQwUUJ_HE9BbrwK_ X-Authority-Analysis: v=2.4 cv=YZeNIQRf c=1 sm=1 tr=0 ts=69ea1ef1 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=smED1w4oCYVFD8D0vxMA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX3dSBdw1Jijv7 hgxqi/1j8X6P49f1wMTmw9biSAj4SQfFZFAUdfe6xCw9hgmCIACiXMt1rSscNV/2N9vLa5dTG4S rHzCp9haIKcpiA8rB5QoOe+OaBzRA5KPKQL7NWObjRTaxNQMHczuafINIFSx/AaCZNlnXnoClLl CNM+xuLbYpHh3Y2MdRoms+6B4c/njapEdr+ubLGqc78p2ZmQS00/2kKs5GN67PJYyufpSIXJ3Pd Tfx1v0o9KWF7i7ONEsGWYqOCBp30em31LYqZ3nRmmti7GTllbX42+oqrEtVvSceHmptJedPgcXc HevV25ZqfK5RoUeulLsmPHnCXFgTBHJrAGG28ZYWnMKE1e4r7025pBJiv/denX9qq55R/aN7h1+ 5zQ6hMRbaN8k6w72GDVAiKy87CIvaRLJrE7SAh5jFcCfHNsqk7Y2VSFtQirCmJOKqF4nRDvJjFz km0q1LCauObpbjGdKSQ== X-Proofpoint-GUID: Ny-bk9QdMEXrAptYyQwUUJ_HE9BbrwK_ 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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 malwarescore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 From: Ekansh Gupta The host1x driver creates context bank devices to map IOMMU contexts for memory isolation. Previously, this required a host1x-specific bus type with its own device setup and IOMMU configuration logic. A generic "dma-context-bus" is now available in the driver core that handles this for any driver. Replace the host1x-specific bus with this shared generic bus. This removes the private bus registration, device setup, and of_dma_configure_id() from host1x, as the generic bus handles all of this internally. The IOMMU subsystem is also updated to reference the generic bus instead of the host1x-specific one. Signed-off-by: Ekansh Gupta Signed-off-by: Vishnu Reddy --- drivers/gpu/drm/tegra/uapi.c | 2 +- drivers/gpu/host1x/Kconfig | 5 +--- drivers/gpu/host1x/Makefile | 1 - drivers/gpu/host1x/context.c | 47 ++++++++++++----------------------= ---- drivers/gpu/host1x/context.h | 3 +-- drivers/gpu/host1x/context_bus.c | 26 --------------------- drivers/iommu/iommu.c | 6 ++--- include/linux/host1x.h | 2 +- include/linux/host1x_context_bus.h | 15 ------------ 9 files changed, 21 insertions(+), 86 deletions(-) diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c index c0ac6b45f2d7..9547725a6c3c 100644 --- a/drivers/gpu/drm/tegra/uapi.c +++ b/drivers/gpu/drm/tegra/uapi.c @@ -215,7 +215,7 @@ int tegra_drm_ioctl_channel_map(struct drm_device *drm,= void *data, struct drm_f kref_init(&mapping->ref); =20 if (context->memory_context) - mapping_dev =3D &context->memory_context->dev; + mapping_dev =3D context->memory_context->dev; else mapping_dev =3D context->client->base.dev; =20 diff --git a/drivers/gpu/host1x/Kconfig b/drivers/gpu/host1x/Kconfig index e6c78ae2003a..0539ff057a51 100644 --- a/drivers/gpu/host1x/Kconfig +++ b/drivers/gpu/host1x/Kconfig @@ -1,13 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only =20 -config TEGRA_HOST1X_CONTEXT_BUS - bool - config TEGRA_HOST1X tristate "NVIDIA Tegra host1x driver" depends on ARCH_TEGRA || COMPILE_TEST select DMA_SHARED_BUFFER - select TEGRA_HOST1X_CONTEXT_BUS + select DMA_CONTEXT_BUS select IOMMU_IOVA help Driver for the NVIDIA Tegra host1x hardware. diff --git a/drivers/gpu/host1x/Makefile b/drivers/gpu/host1x/Makefile index fead483af0b4..2ccd9a5f1c65 100644 --- a/drivers/gpu/host1x/Makefile +++ b/drivers/gpu/host1x/Makefile @@ -23,4 +23,3 @@ host1x-$(CONFIG_IOMMU_API) +=3D \ context.o =20 obj-$(CONFIG_TEGRA_HOST1X) +=3D host1x.o -obj-$(CONFIG_TEGRA_HOST1X_CONTEXT_BUS) +=3D context_bus.o diff --git a/drivers/gpu/host1x/context.c b/drivers/gpu/host1x/context.c index d50d41c20561..ab7b156ab002 100644 --- a/drivers/gpu/host1x/context.c +++ b/drivers/gpu/host1x/context.c @@ -13,16 +13,12 @@ #include "context.h" #include "dev.h" =20 -static void host1x_memory_context_release(struct device *dev) -{ - /* context device is freed in host1x_memory_context_list_free() */ -} - int host1x_memory_context_list_init(struct host1x *host1x) { struct host1x_memory_context_list *cdl =3D &host1x->context_list; struct device_node *node =3D host1x->dev->of_node; struct host1x_memory_context *ctx; + struct device *dev; unsigned int i; int err; =20 @@ -44,42 +40,27 @@ int host1x_memory_context_list_init(struct host1x *host= 1x) =20 ctx->host =3D host1x; =20 - device_initialize(&ctx->dev); - /* * Due to an issue with T194 NVENC, only 38 bits can be used. * Anyway, 256GiB of IOVA ought to be enough for anyone. */ ctx->dma_mask =3D DMA_BIT_MASK(38); - ctx->dev.dma_mask =3D &ctx->dma_mask; - ctx->dev.coherent_dma_mask =3D ctx->dma_mask; - dev_set_name(&ctx->dev, "host1x-ctx.%d", i); - ctx->dev.bus =3D &host1x_context_device_bus_type; - ctx->dev.parent =3D host1x->dev; - ctx->dev.release =3D host1x_memory_context_release; - - ctx->dev.dma_parms =3D &ctx->dma_parms; - dma_set_max_seg_size(&ctx->dev, UINT_MAX); - - err =3D device_add(&ctx->dev); - if (err) { + + dev =3D create_dma_context_bus_device(host1x->dev, NULL, ctx->dma_mask, = &i); + if (IS_ERR(dev)) { + err =3D PTR_ERR(dev); dev_err(host1x->dev, "could not add context device %d: %d\n", i, err); - put_device(&ctx->dev); goto unreg_devices; } =20 - err =3D of_dma_configure_id(&ctx->dev, node, true, &i); - if (err) { - dev_err(host1x->dev, "IOMMU configuration failed for context device %d:= %d\n", - i, err); - device_unregister(&ctx->dev); - goto unreg_devices; - } + ctx->dev =3D dev; + ctx->dev->dma_parms =3D &ctx->dma_parms; + dma_set_max_seg_size(ctx->dev, UINT_MAX); =20 - if (!tegra_dev_iommu_get_stream_id(&ctx->dev, &ctx->stream_id) || - !device_iommu_mapped(&ctx->dev)) { + if (!tegra_dev_iommu_get_stream_id(ctx->dev, &ctx->stream_id) || + !device_iommu_mapped(ctx->dev)) { dev_err(host1x->dev, "Context device %d has no IOMMU!\n", i); - device_unregister(&ctx->dev); + device_unregister(ctx->dev); =20 /* * This means that if IOMMU is disabled but context devices @@ -96,7 +77,7 @@ int host1x_memory_context_list_init(struct host1x *host1x) =20 unreg_devices: while (i--) - device_unregister(&cdl->devs[i].dev); + device_unregister(cdl->devs[i].dev); =20 kfree(cdl->devs); cdl->devs =3D NULL; @@ -110,7 +91,7 @@ void host1x_memory_context_list_free(struct host1x_memor= y_context_list *cdl) unsigned int i; =20 for (i =3D 0; i < cdl->len; i++) - device_unregister(&cdl->devs[i].dev); + device_unregister(cdl->devs[i].dev); =20 kfree(cdl->devs); cdl->len =3D 0; @@ -132,7 +113,7 @@ struct host1x_memory_context *host1x_memory_context_all= oc(struct host1x *host1x, for (i =3D 0; i < cdl->len; i++) { struct host1x_memory_context *cd =3D &cdl->devs[i]; =20 - if (cd->dev.iommu->iommu_dev !=3D dev->iommu->iommu_dev) + if (cd->dev->iommu->iommu_dev !=3D dev->iommu->iommu_dev) continue; =20 if (cd->owner =3D=3D pid) { diff --git a/drivers/gpu/host1x/context.h b/drivers/gpu/host1x/context.h index 3e03bc1d3bac..558638c457d6 100644 --- a/drivers/gpu/host1x/context.h +++ b/drivers/gpu/host1x/context.h @@ -8,13 +8,12 @@ #ifndef __HOST1X_CONTEXT_H #define __HOST1X_CONTEXT_H =20 +#include #include #include =20 struct host1x; =20 -extern struct bus_type host1x_context_device_bus_type; - struct host1x_memory_context_list { struct mutex lock; struct host1x_memory_context *devs; diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_= bus.c deleted file mode 100644 index 7cd0e1a5edd1..000000000000 --- a/drivers/gpu/host1x/context_bus.c +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Copyright (c) 2021, NVIDIA Corporation. - */ - -#include -#include - -const struct bus_type host1x_context_device_bus_type =3D { - .name =3D "host1x-context", -}; -EXPORT_SYMBOL_GPL(host1x_context_device_bus_type); - -static int __init host1x_context_device_bus_init(void) -{ - int err; - - err =3D bus_register(&host1x_context_device_bus_type); - if (err < 0) { - pr_err("bus type registration failed: %d\n", err); - return err; - } - - return 0; -} -postcore_initcall(host1x_context_device_bus_init); diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 61c12ba78206..5d0fad1402eb 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -173,8 +173,8 @@ static const struct bus_type * const iommu_buses[] =3D { #ifdef CONFIG_FSL_MC_BUS &fsl_mc_bus_type, #endif -#ifdef CONFIG_TEGRA_HOST1X_CONTEXT_BUS - &host1x_context_device_bus_type, +#ifdef CONFIG_DMA_CONTEXT_BUS + &dma_context_bus_type, #endif #ifdef CONFIG_CDX_BUS &cdx_bus_type, diff --git a/include/linux/host1x.h b/include/linux/host1x.h index 1f5f55917d1c..30dbb3a71828 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h @@ -462,7 +462,7 @@ struct host1x_memory_context { struct pid *owner; =20 struct device_dma_parameters dma_parms; - struct device dev; + struct device *dev; u64 dma_mask; u32 stream_id; }; diff --git a/include/linux/host1x_context_bus.h b/include/linux/host1x_cont= ext_bus.h deleted file mode 100644 index c928cb432680..000000000000 --- a/include/linux/host1x_context_bus.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (c) 2021, NVIDIA Corporation. All rights reserved. - */ - -#ifndef __LINUX_HOST1X_CONTEXT_BUS_H -#define __LINUX_HOST1X_CONTEXT_BUS_H - -#include - -#ifdef CONFIG_TEGRA_HOST1X_CONTEXT_BUS -extern const struct bus_type host1x_context_device_bus_type; -#endif - -#endif --=20 2.34.1 From nobody Wed Jun 17 06:04:46 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 E5B361F099C for ; Thu, 23 Apr 2026 13:30:34 +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=1776951036; cv=none; b=Pdk2L1CRGcnyDkPi5EedRucUMkFtML+ef52wZLy63Us67RWVlUG6LpEjFGGOTCYBYtlrzfG92uFCq78nL/loYSLm/h3zXBOHPtPcojiXp8tQVo6lWVMpZhBgmy7R/vANEu/pTImTMSoJbMqViVPmqc0U42rdCS+79w7ThGC2MoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951036; c=relaxed/simple; bh=EqdrZDhwbeUXkKMJ4KC0f5Nf+jlPc2iG/3BjVoOnKh0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=R/3P3ZH1OabVnGQNxCbpjUbRVh83OPlSKR9Mqo+BRNatbNojTTr4QBmf0Zd91uvW7lWRsk8iWMON+9qjclhQsELFYXzS0+kogXXfn0mGFhmPbcbq6Y7HeoullA8STPKxvIVs4Qn0xKdigoytHSn3IUwKlx3uoDE04eZbDzqWWGI= 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=WkLmNkn7; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=TGPc+hNb; 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="WkLmNkn7"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="TGPc+hNb" 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 63N8tp5q179266 for ; Thu, 23 Apr 2026 13:30:34 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= IxKnnpsONYWDC/UdxZPj9n7rzpecjTFOvlyc5AqI6kM=; b=WkLmNkn7VwC2zF0j 9ru9bL+9hZNmCUHDzpAlo2Vn6XYfy+gkgR41grcxb7bJdvzCwi51w1XV0W/wtl+N shW4kos8aog2IE6eW1ybAJP1ARSFsI0MMaVfJ3UVXkxF40n/SxKEnUOr90WqXPkf HS/MCCPo0JJhVplALEyPr7pSWKOpRYXR4mBLhL4O9xlO7yQW2QiNiZwyNFHY1D3a FcICWMhTqPq3HbZbI4Yeifgu13M9KBUTGgTcmZogzKQlHm7EUXOy1oxk/PP0D9Bb 3ag4FFzVbJsanDg7iIN2SIaOgyoVgSRn5Sdhb/sO/uaPlPkITZl3a4mRR5CrtbQI JtVVsw== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqe62hnkh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:30:34 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2b250d3699aso136953475ad.2 for ; Thu, 23 Apr 2026 06:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951034; x=1777555834; 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=IxKnnpsONYWDC/UdxZPj9n7rzpecjTFOvlyc5AqI6kM=; b=TGPc+hNbec7oF3aBHXXIyBZSoSYSGfPP/JqA8uFYd1y3MNwPmBtiD+URPprIUDwUPD ToQWJVhMmPeCfcDGGrvkh/l0u8kF15UoWjXmgqx7/7iO9hAahHEg9KfW/7RtevTJlgKz zA8awSgbVzXMCtDJ8Yy6ZYMA1L+Mu8SbPcqWEkAItHpaZMc03jPYgux76MAI3lS8hmKF 3Z2OdcdX7xf0XOm5NipHXXE0wJnAykCvitX+S85xqz5PY1VZK++MSngiIwW08F9q83bG fInu31nv7tlLmPGNhvwDsKx+7dUW++ZNjYLr7kURJwXy59RXzjK1QrnDoZKddCe7F3ux fR2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951034; x=1777555834; 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=IxKnnpsONYWDC/UdxZPj9n7rzpecjTFOvlyc5AqI6kM=; b=Wsd2+PmSXNHlskXGj8BJju5aD6o+bdi4UpTzFg2STmQLGW7CevQo49OKYPLr/ohpXf nBurH15XaJrKZJbYB8S5RqFl+ZhL9newVdrsWA9dYelWNt61dfFzXkusLhYNQXFfJw/G FN9FJ3UgL912r6Lae3qmLy/QM9Rc1Y+fl0aMM5WhrCNP70rPhzvvI4hSDuYoKjmgNiHX YmVnTNRyevGiyqXwznWAj/JY04MRH+CptvSJ3QdrkAYTwF0xatLjCX4wrwroPkrW8it1 WqFs9WhH205bUWgpB52PzH8vv9gdjh04f4NINiLhpedfjEijVb1OhRaJ3KAy1iZCqrh+ xBOw== X-Forwarded-Encrypted: i=1; AFNElJ+KQ1uSig5ilPqyQUhqoZBBKW0JEOyGGctIoB6HIP3ZpraR3VnSXV2jVFF4LYhL2Gvtb9rCoD0ExKCgRiQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yw4mhwszxwRUBWeV9KDIvFYPz3wkFrkpYg2CNBJfEyLPy5jHmFI SV4+H9/QXHoSQPODCvAp6pcNfjaaM20snz44XMYAzRYL0UC/zMOKHVbXB0CtMlSEmodM8JAeWa9 YU9AObFFaa2AQE4/Dxhg5wgHP5MoOhyWOWhLY3nsCGjJ+Z+QYkt/BEI6smM6tIVkHK2I= X-Gm-Gg: AeBDiesDZDF4yBH0EnfHEiq5/F7eC+Sr+k+gDsD62CgNydoxyXaRX42jaIZU8H7w5FD FIOTXodyORlQbDYr3H9zKocufCmDYD3TcEeYun84/lwl/lnEMntMdUkUD5+/aA/SR3OGSM35/Cg GEChSybPhl8vtsI1Dlp19+C5n0mmLCjs9TVWU6fBecSKlhV/GgOt1pK5IpMOzWNPjCwHYwEeDwV Z39RqRbnQmR38gcr9hahUgLmfNtXbR4sZNz8TbPeQwITr5tsfzvLDnztZOm+lWRnEhp9jGosmTC zyvwBiFUEB8ggpp9nlNGraDmCCxmUn6dhxJqEsUzIvz3aDImuChji99xXfyEIVd6zOzwsdMM2Hm uyqQcAnLuYy8tE8sd4wmv0QkwDenEq3PXqsswWxuWi1Z98vhLPjP9u47J0FjFvWIG7w== X-Received: by 2002:a17:903:2acb:b0:2b4:6398:6aa2 with SMTP id d9443c01a7336-2b5f9f3a802mr308921895ad.27.1776951033395; Thu, 23 Apr 2026 06:30:33 -0700 (PDT) X-Received: by 2002:a17:903:2acb:b0:2b4:6398:6aa2 with SMTP id d9443c01a7336-2b5f9f3a802mr308921065ad.27.1776951032700; Thu, 23 Apr 2026 06:30:32 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:32 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:33 +0530 Subject: [PATCH v2 04/13] 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: <20260423-glymur-v2-4-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=7570; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=EqdrZDhwbeUXkKMJ4KC0f5Nf+jlPc2iG/3BjVoOnKh0=; b=DWWeTu5sHeIIPoCMxxKeKnUf2R7cu3pGbQ+jYfdVZkIXigbOi/ygY3cFzpTJKwEs98YuT397d 803RuZl0G89C1d1JcfrPcKhpHAcQX1cQd6AXFddmyDniHzZlnyXOdzi X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: jfTwRH5lJ1xWiMtEqLcL2rRgNQ0_-9So X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfXzGhpwI2KIUNr qn7wZmkii2qQwd6FDFcUqj+dFpHyy1ud4juiIw26WhADJuP5xXeYiBV2K6kzlDVt4+5Jj3/Hlx/ 0gVTS+f0j+FZIv8ayfYAiw5jSe1obC/40YFDQPLCoqKt1GR3mVndzXB3tXmmcbDLGvE2wP+xJuQ iqjOAj025lTYni6M7VrfIYrosuS/yAWotoAV/TOBBvgKiQwznHmsWQRSSCXNoZ5Xh0J9U2VHlql 7EIBDU5986baOks1PdE31anD3q8m411vP+xRVVGNJjxDgKkm+CfPyPkFgfkbIO76Ln8t6CgF5wq nS2zWgmatS1u0G3wplGf/JG6RcgmVtjmD3I57aOXBto3fZZ6v36V2yP1gCe8ZElFUQYEqzgX00s 5myTuk0GOaggXnqaVkt2uVMiCvrgJVppDVZJ08AErs51QBIU69Y/AFfWa+Z0YwASbC4eGqeHS5Q 7bWM2L8Kad3CcFLQCfQ== X-Proofpoint-ORIG-GUID: jfTwRH5lJ1xWiMtEqLcL2rRgNQ0_-9So X-Authority-Analysis: v=2.4 cv=Nv7htcdJ c=1 sm=1 tr=0 ts=69ea1efa cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=17OVpTNTOV0qq6DYWkQA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 a=sptkURWiP4Gy88Gu7hUp: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 clxscore=1015 bulkscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 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. Signed-off-by: Vishnu Reddy --- .../bindings/media/qcom,glymur-iris.yaml | 220 +++++++++++++++++= ++++ include/dt-bindings/media/qcom,glymur-iris.h | 11 ++ 2 files changed, 231 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..0fd8a8db01af --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml @@ -0,0 +1,220 @@ +# 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 + + reg: + maxItems: 1 + + 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 + + firmware-name: + maxItems: 1 + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + interrupts: + maxItems: 1 + + iommus: + maxItems: 4 + + iommu-map: + maxItems: 1 + + memory-region: + 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: + - compatible + - reg + - clocks + - clock-names + - dma-coherent + - interconnects + - interconnect-names + - interrupts + - iommus + - memory-region + - power-domains + - power-domain-names + - resets + - reset-names + +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 Wed Jun 17 06:04:46 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 87DDA250BEC for ; Thu, 23 Apr 2026 13:30:44 +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=1776951046; cv=none; b=ChlSZRvGG+VC1f2rvzLyGSwAg2rqjEqNW0j7PAKh5n/2Yer1YVSgFrDkpRrfAIT6O47j9rxcJDKKyWm9b8qKQmc++iQGol0mAu6O0KI8M5DP4l/JpbI1FtGUrDl6WQAuFvCWMpWmsa/9VahVZ5/hHBHyWfdGgHMmEUB/Vhs9xw8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951046; c=relaxed/simple; bh=HB+2dN7dauUgdrMwzh7J5kQuRahuzqqEHBqE2I7xdDA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hxDjZReucNF2rbst3FubdJzW/usQ3a3RGiACLGoTo0QYOZjNYwJVvITOEcur7JOr2TXUS2pY2yM6RB9lIIK20ANRhFOGAcq1d6Xq6lmjy/KftXrF1jAYDap/vb6dFYALERxvpae/WZD67HsVsxs2MPHBXCpEOrnZA60psm21Gtc= 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=JQjdEduo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RvheGNtz; 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="JQjdEduo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RvheGNtz" 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 63N8uP223769521 for ; Thu, 23 Apr 2026 13:30:43 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= yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=JQjdEduo3jUB4J80 UxY01Cnk4y+htGI6K4HB4Q9VDGH+RDJj4KsPymFhpf7PdRne3+z38qSjHKKdTCTI maE419NrLKzQIFyJf80l3FKqZANQx+9NL7JKfQQHU1+o1rKZxXuy82M4oLkjzL8N jN9t1SdVEGYdvdegpuVRKFp6Jx7PbciC3MVFdfDNs1cwXyCDIM0kAOaSON+6dEbg 5URf07jh1XQ0GReKmv3koAWR9AfJUeoyqq/4F4qrrVz0Tkb1rrJZ4kiXluiwghpb Txi5+QjMDdGLFLpydNyXVjC1een+SDhfTCXse8e0xMENr3xxdMdvW3qTppJ6q1gi drl6iA== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1hq42cv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:30:43 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2b242b9359aso66356695ad.0 for ; Thu, 23 Apr 2026 06:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951042; x=1777555842; 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=yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=RvheGNtz9V7WEPuJCDJN7ts+Ys0clWdJVv2I7Gi72VsgoMRK/9MZIlnXgssUTtFisb GZ1XgCAEvCXueph0AbARQSHYxjAA2YFImKL2XaauDRoqQmFogmcHG1NrvguE85I23Nad 4al5a1mA8PoaUQlX16bv2qsNMGW4HKP4by4EYrE1fRr2vh3fYOJp5c+AQTBE20JKkzpA xEWnDT8CQtoCORDB27ghJBpR/8URNAwai0eawN4LzX+EIzX3htqclQyfauuUyRvR1XJX TQBh3uk6MJfTQ6f1HRkmjMhsLH8UtMIM5TdFXsNOnuBcYOA5YM7v5Zdk8IUh7tknVPNn AqbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951042; x=1777555842; 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=yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=fWft1f1D3EIhf0uDXlT/PGTD3sWZVFCtTa/3jwhhOcAninLZZUMoYAMaYAMzFJmgFn Xz65NXqkYLu5vOiiBylwmrceuXt5rm0u1+4DGTydCX0Kfu5R0gX4oqWjf2lIK7A+6vK2 sgwPOU8+ZdrmK2c1YkWafYtE635Tx6OfFa2zYqTDR0U9/VdOtT/zHKp0+Q+/a0srEM0I jqGHxODqkEOg7L7vK/3nnRP7J4jSnQHtb/qXguDBUbfky7yrHNXlirJ1qJYG1pDFWPn+ 7yWNmFLX8Xoc6sGki5ygo7N7GE+QbVcvvjRoGrsUEBZO5kZrl7RKX2JjCFMFFyXzz5gW 42PA== X-Forwarded-Encrypted: i=1; AFNElJ/7KtI4JOKTgnZdd4BMzMaknhFJUp/as/uQNeFbLpSajvuTxtfYlEif7vIyMM4uvq2tPNzIxjsQ0YBk4ng=@vger.kernel.org X-Gm-Message-State: AOJu0YyfmCBTRb9ukOBkGgcE5AssxuA4wXSTKAOo0msbAa7vwXUC3S6f dFsHBEbwBcOg8Luvi7jJFnk5cvDo040iilLU5I20ECFMPx1Ql7IP7hwZ8O3s2h2zPAHuMiwTh/f ugn+nr1RPxU/lCtsiWJc6CBRQ+2fxkIS440gexA7FjKsYPj2iXFQowDZxqB3Lg40JiDc= X-Gm-Gg: AeBDieuBUvFO4KwZk8YQOcl2oCVU1NEhwLFh7Do4urGGOfSdf+iX/OOpxBcHf2TzdSb Ef7HSpQk2ORmKHfeOpmD6ex/80jBLFidUEGVOiasHbDhn6nDLyhg7K2/gr1UVSeVe6uQgW9Z8dL nCzSTDKiohbI4DX9m55RiQwEYxaeRBp2CC6wZFASz499V1VPaKxJJWcwg/ahXbILQ3aYH5o3fuY I+GeWpgi4e3KL4CoDAs+Gc0xi/KwdWg6jbcAcuEfjMJ2ZojzQQQUC0El5G1DgY5vRXJYy8baTZz ca2cmdgBUE+Lr8olL4ToaYkEOmBQad1ogbRCQIP//Z0Zx9eauCoWuRB6PhOXbqonmH4n5nqOwiv WWq/5tIt7uotYmKYmUGbIxWT/r5qHu21QBQwth1PUX+GamAy8oHkqMN09cx9IXgJiag== X-Received: by 2002:a17:903:246:b0:2b6:309:9f72 with SMTP id d9443c01a7336-2b603099feamr251901945ad.21.1776951042370; Thu, 23 Apr 2026 06:30:42 -0700 (PDT) X-Received: by 2002:a17:903:246:b0:2b6:309:9f72 with SMTP id d9443c01a7336-2b603099feamr251901185ad.21.1776951041662; Thu, 23 Apr 2026 06:30:41 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:41 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:34 +0530 Subject: [PATCH v2 05/13] 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: <20260423-glymur-v2-5-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=3016; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=HB+2dN7dauUgdrMwzh7J5kQuRahuzqqEHBqE2I7xdDA=; b=gOrXRuyYOx63Ro+9sR82pXcBF5nq7YQVv4DGUiouKMpmgBheyBYqtRlAtDz0YtwxU4xK4b9hl ZU9S3UONyzDCyAMpp7MxY5zrCrXMGnz4RUuNOm3Zcit7fSDGObuuaq4 X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX17GuX3e8o3b6 f4PYfChSFS6bmlG4eApdnN6TYPkppiuCHkXjawDLAPCpejNxEP51h0oSM3cPYZ5o0K+zksKlxLN n6q2CxNuNKDSAp8S3yY5yEcnsNrXKNUW3kYoUVFvNYTADMVu96Lux8vjJ/aV7TxafC50SjzWYKz w5QaqX7yYLucRL84ra/Ouu0WmPQEH7Re08nb0Tl41w+2A5yc27CpDP9ewe5z17H84IKuoSefN2Z gM8J4oPH23xi8R6NzlwepWX6v/mEaHwaj2gJT07dVy9SXhg8/NIlPkyLNsj08fF+KswbBOnfWa2 B/+kxmhntCocwh8kXxWxBmRW2rghfbdKjaGrAMPbccQXLGMpe/Ehj9U+orWKfvQ5NkjO8fx1DLS xphXobDmcwsVj0L+5u8MF3wjS6omWX5V1hKhTMJnH+a4KuwQhnYMpmxS/XUoHeNXsCl5Td68FEW RXT2szhx1NBGixLi5Yg== X-Proofpoint-ORIG-GUID: 5ups5DjkPehYK5Oh18qVEFWG3TLLAwPR X-Proofpoint-GUID: 5ups5DjkPehYK5Oh18qVEFWG3TLLAwPR X-Authority-Analysis: v=2.4 cv=TJt1jVla c=1 sm=1 tr=0 ts=69ea1f03 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=hn6c7xJugPWrWid5T_cA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 clxscore=1015 malwarescore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 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. 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 5a489917580e..55ff6137d9a9 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -219,6 +219,8 @@ struct iris_platform_data { u32 (*get_vpu_buffer_size)(struct iris_inst *inst, enum iris_buffer_type = buffer_type); const struct vpu_ops *vpu_ops; void (*set_preset_registers)(struct iris_core *core); + int (*init_cb_devs)(struct iris_core *core); + void (*deinit_cb_devs)(struct iris_core *core); const struct icc_info *icc_tbl; unsigned int icc_tbl_size; const struct bw_info *bw_tbl_dec; diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index ddaacda523ec..34751912f871 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -142,6 +142,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; @@ -193,6 +207,7 @@ static void iris_remove(struct platform_device *pdev) return; =20 iris_core_deinit(core); + iris_deinit_cb_devs(core); =20 video_unregister_device(core->vdev_dec); video_unregister_device(core->vdev_enc); @@ -259,11 +274,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) @@ -298,6 +317,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 Wed Jun 17 06:04:46 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 43C6D2749E6 for ; Thu, 23 Apr 2026 13:30:54 +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=1776951055; cv=none; b=caSL4hHq71o5LdeVpmyVxNzGXh777790FvSAPZAzSDlvmkGd7g1pizDUNvbcny4EbrOuciiaQUrPHxj3trWPsq+3TWicEabgV8cO0+vVVd0MqTPSkUJr66wITruDMi+R3fIfQxUKIGWzSIG6v2jfLEYZtUCLaactTapm/lRYX8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951055; c=relaxed/simple; bh=5XMD1PTwD/LTxgA60yhE1YYtYnYGkszZwhjmWff2fnQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Xsb8HyK26akFiL4bJEDpKzqJqJ5b9calKDkk7Ls8EBYDKIfmIpxPAOLM4l2RWeM3Suu9eaqWY0YcRDBWpuxBeYwqRM+NzAkMP9M+//iVXvwy26xyco7yBrjna09OaOrH1wgFPNYkunieGiISn3yYmLo9cRoynbSmW5pEf7O6uB4= 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=ctgTCfjt; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ghca5sgQ; 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="ctgTCfjt"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ghca5sgQ" 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 63N8uFpe3044126 for ; Thu, 23 Apr 2026 13:30:53 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= bTy4Bkwh+gr6ISqDQC1YSZGoQJgQwg2cLAvk32oAfkI=; b=ctgTCfjtpa4PTPv5 PyyNE+e/s7ZoDKoP3ycz663AdQE6rQZarcbdD1F6YUw3fWdh7FypSF0LBksp93iK DzelQTaMlKXfLas8nCX79AA8eqQ3AN3rVNciLyQZqqBYks0Ae4uDtTyTe7BUx7BU BILu61X3m5ukuSfw6Mue+Wdvv5B/mZJ1byo9MoQywOwd2IMMIRMERaWYdqRT5me2 QSDr8fVr4oyBBLVnRGYfE6x5Oh46gF11X/zk76SNFhKewaC939f6AuqqcbxZJ/Jv NsaDThfbGynSWY/8ZQvPQCi1jsQ23m9ejVb6PjGHSyBjf0PzUy6K+W8lGll5HdB0 P+iSgA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1jh436y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:30:53 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2b465bf993cso69139465ad.1 for ; Thu, 23 Apr 2026 06:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951052; x=1777555852; 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=bTy4Bkwh+gr6ISqDQC1YSZGoQJgQwg2cLAvk32oAfkI=; b=ghca5sgQtPdt99E1zVUyF9rJMZXGm42yro3vAF1F4sKrNsJ+sMHALEKJ9yr2HKTx6U FbaFOxqNJk9z7cKFj2w6dekCiUpFIND+timWsNxCoVbH5xV/+ImTef115hcoVN3OTVNp ZTMHxwuJVmiXA8RE2Wv7dVEskUXZFvoHTgGKq4WCWjV/W+RuPz6aTsrFr12g0jLxqveo cPeIieE2addlFzNl/WZi26NWn7TUeJ03eqOQzdcmWl2atRY0IpLBUxOY8t7dmXzjAJSr U8JIYx80kFKEOE9wgD8YCDLKaTQE+zbNMiy3h8me8DQkRw6fUOoTQalH4zRPerUrP7ag 9Gng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951052; x=1777555852; 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=bTy4Bkwh+gr6ISqDQC1YSZGoQJgQwg2cLAvk32oAfkI=; b=E4k356quHjFr5pewgkwYby9pLlmDmj3Z97KmSlPCZt4W5No8B1gRftkrO1HqdcaN0P T8Or8eT5b3irJJZWefOuI8N5k8LmiCTVViGdctVUZ0q7OkT9G3Xo4DBQjh97+eNlRCld Ae2qCrcHMvjyyprfkynZli+guV8nHfs7dEZQoFWCO6VA6/0QQW5sXf9t9IIPPZ68GGz3 /GQ9hh7ktMsZV5yPL3I6nZ+5MITcT5SIubOYlgLk0h3xt8EEcTg9Crd4M3gnkFdz20G2 HbeHooDdNZHYbwQkkg/FtNAeSULnSIMjGlN+fxzsKT+WP1TXj19pkokaykmKBp4rt/OK cYxQ== X-Forwarded-Encrypted: i=1; AFNElJ/TZfFtwhHx0me0K0PVyCa4/8fgM+nYLRr6tKe/MJYhitFDhnY3Sq3HhnE1aUKaEvlWyfOYD5Ti4Rcu0VA=@vger.kernel.org X-Gm-Message-State: AOJu0Yx2jpy3XPPI6j0RrD29r+jvpqku7y/xmdYUyJFktKdb7xMfWsdQ V5o56KudzkN+irbRGGh2NrjmoS0Nskmwi7ztkYNBf0WzXCy2eVkTAIMbSkdjae1haVsUmZZhFcU +nY3rQJuM5LH70REbJSXz3yvEHDwN2ru63ifR7GrUxtb35ozAClQDOYjzE7IL2p1sKh8= X-Gm-Gg: AeBDieuD3qlezOHRCbTPwzNsuZ1kwAMVfoPb9DwJi8/YU/Ff9cY257FnoSbzgdhZSVN AajA09qHIgQjvcOqoRZzNoO+LxxvFtJ6DQsqSwoi9IMdcTaIBLwaf7GS/P22M0RIOh3CUFRjEeF F9wnsJHYAMkkGvRsW78gb4weq/uXhFWRiIG3ewMO4DsDSi+4TWUxC5nuAuqIWijgl9ze9QHty9t JCc+SzePmJ5VzNolMuXwzlY94TU40/eEk2LUjHe8FPlgdCJOLo3HSPrr+PQDgXyulhxmWw1uIjV HF2qtlns9URmy+aeSMFjfHRxRlQoTOW/z9C1zKB5miP8/uw1av54c9beIY2oc1JD2wkwCQPRX+c dR8Zg5kV+oYVX1Yvr7pZ0qBIkoAUqZlvIE2Wvr+LswPny8iC6QGvLjrvz9ttrq0ihJw== X-Received: by 2002:a17:903:1103:b0:2b0:6b98:59ec with SMTP id d9443c01a7336-2b5f9f7abacmr276507005ad.34.1776951051710; Thu, 23 Apr 2026 06:30:51 -0700 (PDT) X-Received: by 2002:a17:903:1103:b0:2b0:6b98:59ec with SMTP id d9443c01a7336-2b5f9f7abacmr276506155ad.34.1776951050947; Thu, 23 Apr 2026 06:30:50 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:50 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:35 +0530 Subject: [PATCH v2 06/13] 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: <20260423-glymur-v2-6-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy , Mukesh Ojha X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=6587; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=+wQbHvxygQq1aTrGxrx3UsURZ3ABehuwxnmcohM5NBw=; b=IHAV46nQNLUubTgKIDVGhPfQgFqulUO86Kl3iSQPjE5X2LvjBkucJI7tXaO5ADNUMyAYQSmUy GeU+J5TShgmD+pOBgO8R/SKND0QoCtlowbWHzfA7yq598FkxFpcLcGV X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX64MGKzUTvXdF ko6sdjhmtnA35YsOjcPuGXFpZ9QLKfnnGvRZQ5DBJsFtb3yK+OdnZ30fr9FVx8Aswn3bVRNNJRL laOZDLG5GOqmwX7Bf1XGXD7GGQnvHI2EwbyQ0g24beYmuANWOVhQPY4+yIv/I9sJrNfMpDsK/sZ T4fQW23t6ogYTfTfPs54Cp9oCTAhI/9yIuFSLzHswFiqqaOGnuz9ep+RXNIIH00Elf069FmWaWi NVAK6HwnylFjda7NsDknSu9xYhZZf1IKi4K3BEpavb8+1egGrecvSUYI8imqbbCRedr8yhVAt5B u5+2uTrX/sia+OaZDw8vam5jwj7OQvB98nWB/kt2uDhTHGUKIWtrmfvjH2TawmPgVV1zZI21v04 +ha+5+fXbeBpWaxdfuJzu2fFdf+wW0CKT52hbhMVGeGY0Iv/gAXHk0XgrXi8SgA7E5AFiBCvq9b Y0odcCulvQFwlmKxJ8Q== X-Authority-Analysis: v=2.4 cv=OeyoyBTY c=1 sm=1 tr=0 ts=69ea1f0d cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=gbwaY6mYjfx-u0ET_fsA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-GUID: p0j2JyWp50OqGHFMUHBRf6UEV_If5I4e X-Proofpoint-ORIG-GUID: p0j2JyWp50OqGHFMUHBRf6UEV_If5I4e 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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 adultscore=0 suspectscore=0 phishscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 From: Mukesh Ojha Most Qualcomm platforms feature a proprietary hypervisor (such as Gunyah or QHEE), which typically handles IOMMU configuration. This includes mapping memory regions and device memory resources for remote processors by intercepting qcom_scm_pas_auth_and_reset() calls. These mappings are later removed during teardown. Additionally, SHM bridge setup is required to enable memory protection for both remoteproc metadata and its memory regions. When the hypervisor is absent, the operating system must perform these configurations instead. Support for handling IOMMU and SHM setup in the absence of a hypervisor is now in place. Extend the Iris driver to enable this functionality on platforms where IOMMU is managed by Linux (i.e., non-Gunyah, non-QHEE). Additionally, the Iris driver must map the firmware and its required resources to the firmware SID, which is now specified via iommu-map in the device tree. 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 | 72 ++++++++++++++++++++= ---- 2 files changed, 66 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 fb194c967ad4..b396c8cf595e 100644 --- a/drivers/media/platform/qcom/iris/iris_core.h +++ b/drivers/media/platform/qcom/iris/iris_core.h @@ -34,6 +34,8 @@ enum domain_type { * 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 @@ -77,6 +79,8 @@ enum domain_type { =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 5f408024e967..0085dd7ec052 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 @@ -13,12 +14,15 @@ #include "iris_firmware.h" =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; u32 pas_id =3D core->iris_platform_data->pas_id; 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; @@ -29,14 +33,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, 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 @@ -52,9 +60,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, - 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; + } =20 + core->pas_ctx =3D pas_ctx; + +err_mem_unmap: memunmap(mem_virt); err_release_fw: release_firmware(firmware); @@ -62,6 +88,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; @@ -79,10 +117,10 @@ int iris_fw_load(struct iris_core *core) return -ENOMEM; } =20 - ret =3D qcom_scm_pas_auth_and_reset(core->iris_platform_data->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++) { @@ -93,17 +131,31 @@ int iris_fw_load(struct iris_core *core) cp_config->cp_nonpixel_size); if (ret) { dev_err(core->dev, "qcom_scm_mem_protect_video_var failed: %d\n", ret); - qcom_scm_pas_shutdown(core->iris_platform_data->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(core->iris_platform_data->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 Wed Jun 17 06:04:46 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 99F76283CB5 for ; Thu, 23 Apr 2026 13:31:03 +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=1776951065; cv=none; b=aSaQP+mmpcsJryD19VqGDDpLq1ii72PgWUKqWG8vYQFJhj3qlZKUGm4hSkxmFk9og6BlkOQEaArPCY7fROdZ83lbks7Jq58rq0GthUnQYhDjf/8CeT2d97QMuW6w+MoMW7IF4dqRB3kR7LcCAjTgqoJACT1LeZ2IpFMprB4Laao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951065; c=relaxed/simple; bh=m5k//9k2AZqLBLTijFuX7klJ8v4jofc5QHXrTy9WJIk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ThZtOyFy/UpYNprb4mWqO0wGgaCWX2SwHoHDFamf7ZwOmjW2JDQfU1zZma1r+VL53stYFr4ILuVZ8utnS9ilt6bigzRMwR37LsWziakCoodFJnYWSqzW4pTcxGyEBlnSJPVCSxuusaOnKtB9yZQb7D+q3PDl9QkCtFesA5W8jwg= 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=HhD3r7gE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=d3mP9rfQ; 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="HhD3r7gE"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="d3mP9rfQ" 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 63N8u4043769021 for ; Thu, 23 Apr 2026 13:31:02 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= 4BuwJDFwl9orRME+wdYyrWEnQLmpCChqNE71P1LyFhI=; b=HhD3r7gErjJUQMqA BRLbq7nzC7WIL8MiX9DGFMADFo8jio5/Got22XwKbyySKhXgbzESlysaOFfvJhSb GYUl8h+P52h7tGH3j/mTwDAnAHBzyG6k8/oSxtyVdpy2y0dhKFuY9NMVaifrS3FD cfc25llbPLangxF5Je87vN2MAtvQIOoGKFSGEdaH6VmMQLCA3A1amdls5HRyigjg 4YMvyT7OxcQQrmemioBZVcIu/hNbfomSUyO5WPI1pQnNpPA+kEaiRx3gheVxQycq BFM3+7Dz070b0ILahCiSGCzWrkRzt4EY7BBlCs41YM2rJ19bKULxNFXdUBEagKz5 fhWWKQ== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1hq42e1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:31:02 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2b7aba0af02so6664905ad.2 for ; Thu, 23 Apr 2026 06:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951061; x=1777555861; 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=4BuwJDFwl9orRME+wdYyrWEnQLmpCChqNE71P1LyFhI=; b=d3mP9rfQysN97FPu+S82Ktm6fR1X4uQSWAEJl1RTYQYfzJRWeAUOHW4C3XQhHrThQW 35CFJ2Acir2UTPf8VTfA2vgr6htLFrJa2+1FtCTN+4hDgPIVMevzCsDG6TbEhcfPsfvq O8yazCXgzA6iOhwflf/7ML5HbFWFVL3NG3+1PFGRacmHfh3wIBhZrcng/VBh1VwFWGaW II4j9Fq5eC/I/Hs9rO+EIGQbdYkG61uRbxtG1ZMutYnAy3KB/RHMDmEATQi1Rxf5CcpV lSTgw4JhUurPx+WWDSeT/omckx5V9A620DltIKhmLFozZk32G0XIN0B6RtMN77y5wxOH SIgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951061; x=1777555861; 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=4BuwJDFwl9orRME+wdYyrWEnQLmpCChqNE71P1LyFhI=; b=cbt5y8HRj5JGEKiHLG+CburcV52sNFWiHy55t8VPhb2ePYvjKolIGCD/teTzVVNQTX xDNaSNWq893eTwmtTd1W72MUdqsn2ASw3GtXnPv3EawPq38JwPkeEle8CzR310ROdaPI EJthFE89LCGDmWm6iz1UQaXy65q6MUp1rqi2njjP7W62DlZdlsllIuw4E+dn7Zl99dPI I51MJTPYg+cUNwcDarPjZKH+0H1Ptf0uZlYEZu9/dcoDu3lkWnycpPdrG/ZGTnLLzRhO svmkT2c7LbN98LKx2duegL5gVE13JfxvrEQnZ51ldzxEMfgM1HLz3/W8+1ovBMHK6rwL qJrA== X-Forwarded-Encrypted: i=1; AFNElJ+80xwSrSYO4ZTbOb1awTb0c4b2SPZJYTevIPBRA633IEGt4Oq0YOEm1I2ki4wWxNMjeGyADbsiG6bp0So=@vger.kernel.org X-Gm-Message-State: AOJu0YzerTBneBVgIO6OEh2d8AkuNwuz1ka9WSwnX3Rq+TYdZOLqyWhg 6663h4xf/t5eu8r4ryNjYSVRClXeat2Y+PZ9qMwjZU0TgsP5f1mqsOz9DhYenBaQmWFZuWgxTrl zbN61f3HeeGJdc8pSIJ8FA/ykfwZQPCZO4ty7Wh15T6ZtudtYq9FV4ByIiKjaHRauQ4c= X-Gm-Gg: AeBDieucrv5pgfT+3XPN4SPh5JT5/5Qk6dPR1FMs1RhuoYS67DfNzaOpmj/dbZ1kvzj dW6egoA8n1/llXdZ76CTtNtm6ZcjSPqSJ1/raLI/OKBFwXS8qa+ha+dKWFBL5cfNgj+fgkPlb2q x/35VdABbPk5ySCk0dCXH3XKUs0Wejge0rxt8d2O+JiIIw4d/xoGSpJe4lPbk2XJn5bwLJ1kW9G 2U5cW9YSaJOO3yEVSEEuDlKsfUFFIplcdWSwiBeNNomLYvmsHbusaiZvfHhmFpbJXZIt3j9TtC4 HjqWa7OFA9EqMrvewEjaLxv+H6Qy+StNDDQSHjvZlvc5oMwB5kael2xJfUU5YI/OX8+Fq8p1i5G vzLXUl7cii9y63Pw5y6z2BqvjyPUUwYlHrqSMUT9BcIJBXXfkHP9C6tgMfJLVWLqvvA== X-Received: by 2002:a17:902:fb03:b0:2b4:5f19:1d46 with SMTP id d9443c01a7336-2b5f9f3c5efmr196507475ad.19.1776951060986; Thu, 23 Apr 2026 06:31:00 -0700 (PDT) X-Received: by 2002:a17:902:fb03:b0:2b4:5f19:1d46 with SMTP id d9443c01a7336-2b5f9f3c5efmr196507005ad.19.1776951060191; Thu, 23 Apr 2026 06:31:00 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:59 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:36 +0530 Subject: [PATCH v2 07/13] media: iris: Rename clock and power domain macros to use vcodec prefix 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: <20260423-glymur-v2-7-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=17094; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=m5k//9k2AZqLBLTijFuX7klJ8v4jofc5QHXrTy9WJIk=; b=1Ygyh6Mhycy7NX/U8Ce0KIUOHTLFfBGTXVdgRPbkst+rOtOaW8mFgoRJ/0R8tsBXKiBpJKUH4 5tEAYWHFTlTBFQBnShzPMGCGC54yssp+2PbCe5Jf73uu52/MVqWSF+b X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfXxxL79mVxEmLe TPUOwMxmbwszxwtAce52HA0e77Bs3lNutHYAH1lKwrylsn5zxccYp7+6Fziyfc2v9i//XVvEqPw GviV6Q/m6bdEk8WCHrMgEawCk5VCNc4nvctqB+ykAsG1dMxRVykDcjMx/y9OfPR9IBlzyXtuYnz qZo1Bio4A7ow807J3zfAIL6IqIA9bN/2N8rabjCpYFCn9Hjx0xTu/iyIkEpZa6EcDVG2Ysh2FXH RYb4EKY0YEL/Dgr8oYNhIsDBJfaN8LyfEjZAN7eqYIdlv2fU9qffclrWxX9MrI6tm8+4p83iD36 RSw7DVxJQg/7k0f2DlbOMWGhDohg/VIJltQGVJtB0va/SDyC884dFCOUzOgCCE6nxGEuycOqfcx fYnJwJehAypsGnNQZw9AUgYUUeVvZKFjenfPo5bhKsMfADISvBtkU9aiuhldZvncCpf8rcougch UbesauyInkJZxs0z/mg== X-Proofpoint-ORIG-GUID: qV9-pWR2DSFFTr6FYg0mvOr2_jcGBW63 X-Proofpoint-GUID: qV9-pWR2DSFFTr6FYg0mvOr2_jcGBW63 X-Authority-Analysis: v=2.4 cv=TJt1jVla c=1 sm=1 tr=0 ts=69ea1f16 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=kpNcZxiqwdVgWfiEekEA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 clxscore=1015 malwarescore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 The current clock and power domain enum names are too generic. Rename them with a vcodec prefix to make the names more meaningful and to easily accommodate vcodec1 enums for the secondary core for glymur platform. No functional changes intended. Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 12 ++++---- .../media/platform/qcom/iris/iris_platform_gen1.c | 6 ++-- .../media/platform/qcom/iris/iris_platform_gen2.c | 6 ++-- .../platform/qcom/iris/iris_platform_sc7280.h | 10 +++---- .../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 | 30 ++++++++++--------- drivers/media/platform/qcom/iris/iris_vpu_common.c | 35 +++++++++++-------= ---- 8 files changed, 70 insertions(+), 66 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 55ff6137d9a9..30e9d4d288c6 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -49,14 +49,14 @@ 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_VCODEC_FREERUN_CLK, IRIS_BSE_HW_CLK, IRIS_VPP0_HW_CLK, IRIS_VPP1_HW_CLK, @@ -206,7 +206,7 @@ struct icc_vote_data { =20 enum platform_pm_domain_type { IRIS_CTRL_POWER_DOMAIN, - IRIS_HW_POWER_DOMAIN, + IRIS_VCODEC_POWER_DOMAIN, IRIS_VPP0_HW_POWER_DOMAIN, IRIS_VPP1_HW_POWER_DOMAIN, IRIS_APV_HW_POWER_DOMAIN, diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/driver= s/media/platform/qcom/iris/iris_platform_gen1.c index df8e6bf9430e..be6a631f8ede 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c @@ -284,9 +284,9 @@ static const char * const sm8250_pmdomain_table[] =3D {= "venus", "vcodec0" }; static const char * const sm8250_opp_pd_table[] =3D { "mx" }; =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_gen2.c b/driver= s/media/platform/qcom/iris/iris_platform_gen2.c index 5da90d47f9c6..47c6b650f0b4 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c @@ -780,9 +780,9 @@ static const char * const sm8550_pmdomain_table[] =3D {= "venus", "vcodec0" }; static const char * const sm8550_opp_pd_table[] =3D { "mxc", "mmcx" }; =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 const char * const sm8550_opp_clk_table[] =3D { 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_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 fe4423b951b1..1f0a3a47d87f 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,36 +218,37 @@ 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; =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 - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER= _DOMAIN], true); + ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_P= OWER_DOMAIN], true); if (ret) goto err_disable_hw_clk; =20 return 0; =20 err_disable_hw_clk: - iris_disable_unprepare_clock(core, IRIS_HW_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); err_disable_hw_free_clk: - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_FREERUN_CLK); err_disable_axi_clk: - iris_disable_unprepare_clock(core, IRIS_AXI_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; } @@ -256,8 +257,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 a8db02ce5c5e..4082d331d2f3 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu4x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu4x.c @@ -27,7 +27,8 @@ 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 @@ -63,7 +64,7 @@ static int iris_vpu4x_genpd_set_hwmode(struct iris_core *= core, bool hw_mode, u32 dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VPP0_HW_POWER_D= OMAIN], !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,15 +163,15 @@ 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; =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; =20 @@ -198,11 +199,11 @@ static int iris_vpu4x_enable_hardware_clocks(struct i= ris_core *core, u32 efuse_v disable_bse_hw_clock: iris_disable_unprepare_clock(core, IRIS_BSE_HW_CLK); disable_hw_clock: - iris_disable_unprepare_clock(core, IRIS_HW_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_CLK); disable_hw_free_run_clock: - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_FREERUN_CLK); disable_axi_clock: - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); =20 return ret; } @@ -216,9 +217,9 @@ static void iris_vpu4x_disable_hardware_clocks(struct i= ris_core *core, u32 efuse iris_disable_unprepare_clock(core, IRIS_VPP0_HW_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_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,7 +227,8 @@ static int iris_vpu4x_power_on_hardware(struct iris_cor= e *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 @@ -278,7 +280,7 @@ static int iris_vpu4x_power_on_hardware(struct iris_cor= e *core) 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_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_VCODEC_= POWER_DOMAIN]); =20 return ret; } @@ -356,7 +358,7 @@ static void iris_vpu4x_power_off_hardware(struct iris_c= ore *core) iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs [IRIS_VPP0_HW_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 const struct vpu_ops iris_vpu4x_ops =3D { diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index bfd1e762c38e..006fd3ffc752 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -213,7 +213,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; @@ -221,10 +221,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) @@ -251,7 +251,7 @@ int iris_vpu_power_on_controller(struct iris_core *core) 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 @@ -268,7 +268,7 @@ int iris_vpu_power_on_controller(struct iris_core *core) err_disable_ctrl_clock: iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); err_disable_axi_clock: - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + 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 @@ -279,30 +279,31 @@ 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; =20 - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER= _DOMAIN], true); + ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_P= OWER_DOMAIN], true); if (ret) goto err_disable_hw_ahb_clock; =20 return 0; =20 err_disable_hw_ahb_clock: - iris_disable_unprepare_clock(core, IRIS_HW_AHB_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_AHB_CLK); err_disable_hw_clock: - iris_disable_unprepare_clock(core, IRIS_HW_CLK); + 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; } @@ -362,7 +363,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 @@ -379,7 +380,7 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_co= re *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 @@ -396,7 +397,7 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_co= re *core) 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); + 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 Wed Jun 17 06:04:46 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 ED60C2D739C for ; Thu, 23 Apr 2026 13:31:12 +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=1776951076; cv=none; b=ipmKdRfhzeVrWQH515jBfGDP33enYEJKyaxPdYgGII/Mq8VduLKMfNqERluxza1k6SLcnwDx0t++Z33oV+MqtMQRiisRvoIDWOhBzQCTDuR7mUDJzo41Mz+zi89po5f7fRNizA0luWqSsYwgGnIkqBXVwkW0ZPgCA4l/f98o6gA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951076; c=relaxed/simple; bh=snCiGYnE5lR7k11Sd8HZYZBUpIgzZpSwTWZQd9WBf78=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Lgd0qOB8c7aOklv7uQs7xEGcW8QbX60TJ7ViekJPI+5MDFdEmDgAwoGpSHYqvt18yAPCzlnnIkzDxv4kdi8cxbypwBeG1Jb9hAc0kvkA4RE6qVEi47DZuzJ8BYkzFtGhU+U0VMjjLIR1uuNAStEuEYKrN77X/tM97y2KcZ+ZCCk= 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=MX8sGrcq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Ce6Rp88s; 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="MX8sGrcq"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Ce6Rp88s" 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 63N8u4S53768928 for ; Thu, 23 Apr 2026 13:31: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= B78CjQBbuZjRK4uBze+IvM6DTXnaPD6tJ8oMVVcOAus=; b=MX8sGrcqJf8loBNi Ak3CGBtYIZVxyMmFQ1qWiNGwut0aag948vpuYEmcD+h7bJxA8rM4URpcbUFDh3Pn 4TCi8FCaeqvG+B+jaL9ud+NnvWV/aeIhbw9HpVReK95qf7pv/rbdtLutGZzG+/BP UDU9T1r6dEwWR5EM3rrSVWRfnWDZwXYk+kQ2xfxJJt/3pPrE1IeHfuGJQeTLTxxP b881haxJfiMRClhRry3QKsE5qbglSrFIsl0dIta7IQHRZam4ksYGp1fwsiR37p7X UU5SkYlYpoLKDckxoyv1kHMTZnzIJa4WJZWcnp9jVvaDvFda2OwOMWGOhXE0nnfU ndfSPg== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1hq42f3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:31:11 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2b2e91add2aso58328175ad.1 for ; Thu, 23 Apr 2026 06:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951071; x=1777555871; 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=B78CjQBbuZjRK4uBze+IvM6DTXnaPD6tJ8oMVVcOAus=; b=Ce6Rp88se+LE+Mns3k4v3ocKiMeUdmFSSZpgKbln/5g9vGEQTTu9cveKanG+VtUSpn Ab8bbmflkmk+VcCABqDlQ3JFzPkByfCcRzqtZA1Tr2G1CPWcVyY81zYF4G7xSLLxl/6v TiPHmM5W3DrdXtRwr9AXoUrZq8/taEuIpnZxDLykCY3XFw8LocfMZPKMe6myurZsEOw4 RdF3rXOBeOmzec9laKRQ21ITVZTQDSbuKg2x6zDBSw0kqXv7NEMKZUSgB4tXDOsgL88o kaydIObTRmwqABlXh8oHr1snLuD5OU/0akOy96SpegY3FVTvMJUIJ9PffWTDuxNzOdle u31Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951071; x=1777555871; 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=B78CjQBbuZjRK4uBze+IvM6DTXnaPD6tJ8oMVVcOAus=; b=g84z8Dg2iGUH6KUl/Nw1fYGcThAmyQE96VdQY4s1kysjpCAyO5LVg3ser4GMldqWm/ xO+lmv/8kQ1to0jWgPqNlXK59RGrg/rAPEHZww+iT98uQXQ0vz70ROjwUc5D+GtcWkc1 SWWAD9CeR95sXm0lTgEIBoJpecblOETx0U++cuQi3FdQxbnZMpv42gzzhuo38PeQgSOi lYKG7QqruEx81ZZJuwzX+weCfRoPAvkpjqDnw5y/aQOvgEyzNbktUEtfLCUlQa9fN+xM wn+LbywLIT+pZCBMm1aYw99PBmbnaUsLM6/eqh/h+Y4Cv4mXWoDY92r9BYjo42LmOHM0 bPDA== X-Forwarded-Encrypted: i=1; AFNElJ+wkGHySAQuW6opfcstta+NO1xBm77RqTiOMzjOdTt8TikIrNV174EZ1nkj6fwKPeRgo8nHZTMaFRNI/hI=@vger.kernel.org X-Gm-Message-State: AOJu0YwzLUPYiwA6i/P9q0QWb8nuz42iyhPVoavgPH9Ah6dwAl93dX+E ZdbyYLGzNzFabX+7SQe1HmXBpbyAGwEbz26FphO1BoUhzGog6x7pZfM7FOkpvRXVA48NS0ZL5LS Xd49VVjnldujLpr561ButqoC0VRaJRFZf7UYq4a4TKOpc4ogNj9NOnYBZUlqdiGPAQqk= X-Gm-Gg: AeBDiev230STPLsDLfsBHp1ijdz8/hItEzWDTslmMJ5p8j6BmBV4HwiYdEWZNe0c5VJ li8GOWht9ASH6YV/Z4y5r5zMK4zVMdclgjA0p8FRI3A2IYy9vGy3EF/fm0COo6tqslF6G7/eBwh /WAhpT7ovBKIGQUA1i7i8uuKgrUh/iHvrdBgZjg/wlW5mGgXmMfyNmZKYktf7ab6MT9uPmBCuYl D4P03PTqH8e7o/wC5H2h/Yq0KqiMD45faGx6O4LnYZKyVomDtZvV21GVHmdzPpXbv8wFtVd8HN2 xw09U9qUcmeUlEJJL8e532hCHOIyeNkZyYfLEzLRzU6AocDCX/c5Te0VyW+CrjL5/2PDINqrhSy DmgjZAxK/ruf/Nc8jz9+gqCTa6InL3AgwvT6RZROZof96SpP7RzXzNIczi2p6V6WqWQ== X-Received: by 2002:a17:902:b946:b0:2b4:63bf:5535 with SMTP id d9443c01a7336-2b5f9f53480mr168745365ad.41.1776951070321; Thu, 23 Apr 2026 06:31:10 -0700 (PDT) X-Received: by 2002:a17:902:b946:b0:2b4:63bf:5535 with SMTP id d9443c01a7336-2b5f9f53480mr168744695ad.41.1776951069423; Thu, 23 Apr 2026 06:31:09 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:31:08 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:37 +0530 Subject: [PATCH v2 08/13] 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: <20260423-glymur-v2-8-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=23045; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=snCiGYnE5lR7k11Sd8HZYZBUpIgzZpSwTWZQd9WBf78=; b=pGyp064lgiKzU7aaLuO6hn1B6gZtziER1XyFZ5rtaSBdVqLv2bijg47KbU3J0iQwVzuE3dPlT RyqvuxQJIjsALVpa8mE8yckSaoF063plyk+NtK3Ki9M8r4FucM7Datx X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX2t+T/LWY8gXY u59NCHdQm23y/thxGJPGaTXfdsCugIWQ4tVxkhte2JZ6TpA/r9One6SXRs2mog9Q4ROtAA/u3+x R8YgRicIEP+wWEwqBZkOtbNyjt0xcRnsXmAMhE0NCTLgNEE41lUNDrky8LqT9oZJGczosm3QyyS rZRU5jk9N9d9iIDrV/CF4IkrgMl0NOmjHK/OaErxhUoVB30eOkdZGbYjcWHC59fpZt0foxJ0TIp Mm6SDQ2N4bl/WDkva64WnQRY95HIpNO+nSfbYGM2geOSEkkFM36FMrB42eX02lleQEGUxaeCk5w CnzkLMZ+F04U+XpXsF3Iy8DHDzuJc3PkV4EDP1KC6MX8cEJGuuO91LLh106qU7vnBiiuSYTUZ1E Bm/eLj3rSqLcCS3QyyZc34Bvl3fjSNjQmwgH08HIb6M3ykxp29C+BdOLZM4TAntO/yl5i6ZIHzE Z9o4106ado13elYAdJg== X-Proofpoint-ORIG-GUID: HGzrfcZ8h0Y2UoqoSHi088RjoYOeCEnr X-Proofpoint-GUID: HGzrfcZ8h0Y2UoqoSHi088RjoYOeCEnr X-Authority-Analysis: v=2.4 cv=TJt1jVla c=1 sm=1 tr=0 ts=69ea1f1f cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=3jpyDGP9Yv0p6WhxEk8A:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 clxscore=1015 malwarescore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 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. Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 9 +++- .../media/platform/qcom/iris/iris_platform_gen1.c | 18 +++++--- .../media/platform/qcom/iris/iris_platform_gen2.c | 24 ++++++---- drivers/media/platform/qcom/iris/iris_probe.c | 4 +- drivers/media/platform/qcom/iris/iris_resources.c | 44 +++++++++++++++++- drivers/media/platform/qcom/iris/iris_resources.h | 6 ++- drivers/media/platform/qcom/iris/iris_vpu3x.c | 9 ++-- drivers/media/platform/qcom/iris/iris_vpu4x.c | 52 ++++++++----------= ---- drivers/media/platform/qcom/iris/iris_vpu_common.c | 23 +++++----- 9 files changed, 117 insertions(+), 72 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 30e9d4d288c6..7d59e6364e9d 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -212,6 +212,12 @@ enum platform_pm_domain_type { IRIS_APV_HW_POWER_DOMAIN, }; =20 +struct platform_pd_data { + enum platform_pm_domain_type *pd_types; + const char **pd_names; + u32 pd_count; +}; + struct iris_platform_data { void (*init_hfi_command_ops)(struct iris_core *core); void (*init_hfi_response_ops)(struct iris_core *core); @@ -225,8 +231,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_gen1.c b/driver= s/media/platform/qcom/iris/iris_platform_gen1.c index be6a631f8ede..0ec73783bc10 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c @@ -279,7 +279,17 @@ static const struct bw_info sm8250_bw_table_dec[] =3D { { ((1920 * 1080) / 256) * 30, 416000 }, }; =20 -static const char * const sm8250_pmdomain_table[] =3D { "venus", "vcodec0"= }; +static const struct platform_pd_data sm8250_pmdomain_table =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 sm8250_opp_pd_table[] =3D { "mx" }; =20 @@ -350,8 +360,7 @@ const struct iris_platform_data sm8250_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(sm8250_clk_reset_table), .bw_tbl_dec =3D sm8250_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sm8250_bw_table_dec), - .pmdomain_tbl =3D sm8250_pmdomain_table, - .pmdomain_tbl_size =3D ARRAY_SIZE(sm8250_pmdomain_table), + .pmdomain_tbl =3D &sm8250_pmdomain_table, .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, @@ -403,8 +412,7 @@ const struct iris_platform_data sc7280_data =3D { .icc_tbl_size =3D ARRAY_SIZE(sm8250_icc_table), .bw_tbl_dec =3D sc7280_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sc7280_bw_table_dec), - .pmdomain_tbl =3D sm8250_pmdomain_table, - .pmdomain_tbl_size =3D ARRAY_SIZE(sm8250_pmdomain_table), + .pmdomain_tbl =3D &sm8250_pmdomain_table, .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, diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/driver= s/media/platform/qcom/iris/iris_platform_gen2.c index 47c6b650f0b4..5862c89a4971 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c @@ -775,7 +775,17 @@ static const struct bw_info sm8550_bw_table_dec[] =3D { { ((1920 * 1080) / 256) * 30, 294000 }, }; =20 -static const char * const sm8550_pmdomain_table[] =3D { "venus", "vcodec0"= }; +static const struct platform_pd_data sm8550_pmdomain_table =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 sm8550_opp_pd_table[] =3D { "mxc", "mmcx" }; =20 @@ -934,8 +944,7 @@ const struct iris_platform_data sm8550_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(sm8550_clk_reset_table), .bw_tbl_dec =3D sm8550_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sm8550_bw_table_dec), - .pmdomain_tbl =3D sm8550_pmdomain_table, - .pmdomain_tbl_size =3D ARRAY_SIZE(sm8550_pmdomain_table), + .pmdomain_tbl =3D &sm8550_pmdomain_table, .opp_pd_tbl =3D sm8550_opp_pd_table, .opp_pd_tbl_size =3D ARRAY_SIZE(sm8550_opp_pd_table), .clk_tbl =3D sm8550_clk_table, @@ -1039,8 +1048,7 @@ const struct iris_platform_data sm8650_data =3D { .controller_rst_tbl_size =3D ARRAY_SIZE(sm8650_controller_reset_table), .bw_tbl_dec =3D sm8550_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sm8550_bw_table_dec), - .pmdomain_tbl =3D sm8550_pmdomain_table, - .pmdomain_tbl_size =3D ARRAY_SIZE(sm8550_pmdomain_table), + .pmdomain_tbl =3D &sm8550_pmdomain_table, .opp_pd_tbl =3D sm8550_opp_pd_table, .opp_pd_tbl_size =3D ARRAY_SIZE(sm8550_opp_pd_table), .clk_tbl =3D sm8550_clk_table, @@ -1135,8 +1143,7 @@ const struct iris_platform_data sm8750_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(sm8750_clk_reset_table), .bw_tbl_dec =3D sm8550_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sm8550_bw_table_dec), - .pmdomain_tbl =3D sm8550_pmdomain_table, - .pmdomain_tbl_size =3D ARRAY_SIZE(sm8550_pmdomain_table), + .pmdomain_tbl =3D &sm8550_pmdomain_table, .opp_pd_tbl =3D sm8550_opp_pd_table, .opp_pd_tbl_size =3D ARRAY_SIZE(sm8550_opp_pd_table), .clk_tbl =3D sm8750_clk_table, @@ -1235,8 +1242,7 @@ const struct iris_platform_data qcs8300_data =3D { .clk_rst_tbl_size =3D ARRAY_SIZE(sm8550_clk_reset_table), .bw_tbl_dec =3D sm8550_bw_table_dec, .bw_tbl_dec_size =3D ARRAY_SIZE(sm8550_bw_table_dec), - .pmdomain_tbl =3D sm8550_pmdomain_table, - .pmdomain_tbl_size =3D ARRAY_SIZE(sm8550_pmdomain_table), + .pmdomain_tbl =3D &sm8550_pmdomain_table, .opp_pd_tbl =3D sm8550_opp_pd_table, .opp_pd_tbl_size =3D ARRAY_SIZE(sm8550_opp_pd_table), .clk_tbl =3D sm8550_clk_table, diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index 34751912f871..34c981be9bc1 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -43,8 +43,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..ae27488579d7 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.c +++ b/drivers/media/platform/qcom/iris/iris_resources.c @@ -70,10 +70,43 @@ 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 pd_count, i; + + pd_tbl =3D core->iris_platform_data->pmdomain_tbl; + pd_count =3D core->iris_platform_data->pmdomain_tbl->pd_count; + + for (i =3D 0; i < 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 +118,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 1f0a3a47d87f..a9f43dbfc695 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 @@ -235,7 +234,7 @@ static int iris_vpu35_power_on_hw(struct iris_core *cor= e) if (ret) goto err_disable_hw_free_clk; =20 - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_P= OWER_DOMAIN], true); + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, true); if (ret) goto err_disable_hw_clk; =20 @@ -248,7 +247,7 @@ static int iris_vpu35_power_on_hw(struct iris_core *cor= e) err_disable_axi_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 4082d331d2f3..7b8922d8aec7 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_VPP0_HW_POWER_DOMAIN], hw_mode); + ret =3D iris_genpd_set_hwmode(core, IRIS_VPP0_HW_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); + ret =3D iris_genpd_set_hwmode(core, IRIS_VPP1_HW_POWER_DOMAIN, hw_mode); 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_VPP1_HW_POWER_D= OMAIN], - !hw_mode); + iris_genpd_set_hwmode(core, IRIS_VPP1_HW_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_VPP0_HW_POWER_D= OMAIN], - !hw_mode); + iris_genpd_set_hwmode(core, IRIS_VPP0_HW_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_VPP0_HW_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_VPP0_HW_POWER_DOMAIN); if (ret) goto disable_hw_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]); + ret =3D iris_enable_power_domains(core, IRIS_VPP1_HW_POWER_DOMAIN); if (ret) goto disable_vpp0_power_domain; } @@ -273,14 +263,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_VPP1_HW_POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VPP1_HW_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]); + iris_disable_power_domains(core, IRIS_VPP0_HW_POWER_DOMAIN); disable_hw_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; } @@ -351,14 +339,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_VPP1_HW_POWER_DOMAIN]); + iris_disable_power_domains(core, IRIS_VPP1_HW_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_disable_power_domains(core, IRIS_VPP0_HW_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 const struct vpu_ops iris_vpu4x_ops =3D { diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 006fd3ffc752..74b4dccd6a66 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -214,15 +214,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); } @@ -243,7 +243,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 @@ -270,7 +270,7 @@ int iris_vpu_power_on_controller(struct iris_core *core) err_disable_axi_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; } @@ -279,8 +279,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 @@ -292,7 +291,7 @@ int iris_vpu_power_on_hw(struct iris_core *core) if (ret && ret !=3D -ENOENT) goto err_disable_hw_clock; =20 - ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_P= OWER_DOMAIN], true); + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, true); if (ret) goto err_disable_hw_ahb_clock; =20 @@ -303,7 +302,7 @@ int iris_vpu_power_on_hw(struct iris_core *core) err_disable_hw_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; } @@ -365,7 +364,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 @@ -376,7 +375,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 @@ -399,7 +398,7 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_co= re *core) err_disable_axi1_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 Wed Jun 17 06:04:46 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 4EE3A2D94A0 for ; Thu, 23 Apr 2026 13:31:21 +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=1776951082; cv=none; b=hyTSKUfd7mgliLX5oTwMTFI4/bM82dKTKhpo3RKjFpUD+o43DY+i4iXZC7A1kdsfIEXuoXbVVeTCDozG8jv3duXcwe3/dZQa6iajm6lrRyV1bDjZ3SJ7KsmAgHX6yRXrgyYq4qseQz5ML2UOvDWhaKRvZlpyABTfDn/g/FIjiF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951082; c=relaxed/simple; bh=LCMjOJtIxtHep2v0soQ3sUv2MXiTZMrsIoi3l55k2cY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fRbQj6l6x3Kmyr0iqJdQ8VttbUNfThpz7+Rtft6Hvfgshd9BhnWmPUCPZSg32pUqItc+g2xuO4YoK1/yqZm3oaBGFlPtyk9e/P3nBp1+BsW6R1fen96p/JelWPEfAT20xO7svAVtfcd6VECI+HkhTDbB8j251wUrRn9PMN+28Ww= 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=OEV6R9wW; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=abDw+TcZ; 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="OEV6R9wW"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="abDw+TcZ" 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 63NCkAgp3803987 for ; Thu, 23 Apr 2026 13:31:20 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= nayjuY7g5QVFWHFlaeUOOsPyzRCe/yAlG6cR/ITXMU0=; b=OEV6R9wWKHsBjjF4 W0ZtMmUQMdnWtR/CrwHpgS5TF6gdu71dGYtNDWcS8PnyBCH1PU7ftb8P+0NydsBc /Bdd7ZMSg+6VlXFOBIH77Ck5DDsdBQkHz876b3qEy2FJ0L2GrKYU0W1hhWehGcL2 8uOW5qV4iuA8L02NZMn20k7Vfo55r5VLbhDOSmcobpYtlSKIKojmZ71U4ZfzrG3u Dboqlp57bjjRMg6L5xumzMR84Al8yQOFOVVLtYrptHTydkc91VyPOHlnlPCQkIAJ pVukQdi4EoY/i4h9bruVn/IK4kZxdMpGEDdn1gVGhN5CQtA3U1VVz0MzbT72/YqS +BcogQ== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqkqfr4s5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:31:20 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2b7a77b8ec9so6862815ad.3 for ; Thu, 23 Apr 2026 06:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951080; x=1777555880; 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=nayjuY7g5QVFWHFlaeUOOsPyzRCe/yAlG6cR/ITXMU0=; b=abDw+TcZVLf9EQ/iwWPTcMI2v5u6fU/7drPLvr42004/e2AAk9/ubTSgSRxOxxbOR+ CP5auYfYFjxajKJ55EwsHMAqQgnMqTF/ahomJhPRZ9I/B60i1CyevDAlL5R7X+CZzL4N Y4cZnsDVswZY+40Bx6Yr0qCV0giNz9tfjAXL7CV5nyAbZg9M+o+L5YyWXUlDKvKBHNfM OJYXmDYf3+3Gdhrh+XgNqW4Ahx6Ktvw+tHsQ7Yg7H9amObspF1secpn6wv28ClNj5w8r xM8+0p6dEaRQZNCvmlkQEBG2MTeV2FuGTI31npLJx4uaJrbtJwAWL15ggNSM1QwP9glv BenA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951080; x=1777555880; 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=nayjuY7g5QVFWHFlaeUOOsPyzRCe/yAlG6cR/ITXMU0=; b=r+41Oi02I8YCJslfx3pIzJcdIem5nKbAsvQ9wwsS4UyKNHn2r1IJfCEWm0YmyZFECN hmdG8RXOAlZDjxZksjJPgjnWynV/B8RBzzAwDeXEO6USpwgvWB51o3ESHcRbsdJUoPzq 9ljqZSZ14OAwfq6EPZcGozaeRkzDyIPFd83VXLbn0KX9wxoDt2jrGXtVX0mskR1qvSzu zCNnqfRux0N02IVYoXKiT6dFDGlJSbUwN6CvGEOuWFnPmGp9H037Zo8W4aIcE2PjhPx8 GJzg3K9zGbSnPtLt7tsd5+8k38Y12wFR2W4jXgvxlC7aUHxNV2fooOyhxjgJaIx0rces i/tw== X-Forwarded-Encrypted: i=1; AFNElJ850Mu0liOSI0UDOhC0XFm8UGVeb1e57rTSAw+H7pUEZXSfwyRZaFp41aOuwXkwoIwoVj4DBKDO5ZfOZc4=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7pU/uAyOgZHOeZesZJ4fiWfYu2sUGhbC6eCfjxS1TDU+39An2 RPQliUwyzuhiaxQSVpA8qiJArJSJwQuEhc4ZVxiCpyHaDIxCH3iPMSiPwL9ji3ZWaHsqg0k5kFq nCgQ180ZHebmeL+oBZcFbNeNpNHBD9XuV945tSqTs1DMvRwtig7jIZYIR0qxekZo5AzM+AIc+U1 s= X-Gm-Gg: AeBDiesZPseYRzesWsoJK9UzHoAz1GqAIQlGnKVPhaOWSOGbiAIL5qIBHjxtoLxUgJJ p/M1/AyMaaJyAnDTlkUlAdjBdvRn83QrVs1P8uOrQXDLCf3MxQSQezuzJ8xj+QB0UN6R3eKdSEv M1s9ROULfu3o+fOIw6U6o1MWKKczYujIO8KRDVFUgCSTB0qjbUyykW9ja2dBjXggdWY6E2qTF6B DILNOF8w628biC9MuPt/f0/m48rueFAQhcz/G7vn9RjyI5RZCA2l4NsnMXUUoXkMG7wqonOWqnt z3k0esyCPdIWIOvhbH+vDJ0/yxpjbCp8pGNRKXwRiwEmlcNd2FGoD2ubGJiq+vpqYreXcTPhlFO C+7uu3LFTirB5xUSdKEkoX5yo7xCUqvGz1I3puWY7Mh5HL6xsgXeqygQ0Sf/rIWMN/w== X-Received: by 2002:a17:902:76c3:b0:2b4:6281:60c0 with SMTP id d9443c01a7336-2b5f9f527efmr211822225ad.35.1776951079551; Thu, 23 Apr 2026 06:31:19 -0700 (PDT) X-Received: by 2002:a17:902:76c3:b0:2b4:6281:60c0 with SMTP id d9443c01a7336-2b5f9f527efmr211821615ad.35.1776951078971; Thu, 23 Apr 2026 06:31:18 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:31:18 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:38 +0530 Subject: [PATCH v2 09/13] 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: <20260423-glymur-v2-9-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=8487; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=LCMjOJtIxtHep2v0soQ3sUv2MXiTZMrsIoi3l55k2cY=; b=7X/KgTns18PVEGW+JrZHBV69wODcTX7hJ2smtGg1g7f1oG/DnqCmvhadmTbY/a4SUjPS/a2+w 69rqAkfhfBwCWSwyuhuGWmWYYSCS7QeYMV5zBevR560DXNeInl5+Klh X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: I1baDl319iZNqrdRwm0Y8rmFsUGVMIpN X-Proofpoint-ORIG-GUID: I1baDl319iZNqrdRwm0Y8rmFsUGVMIpN X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX7AwVSzfI919/ xTwTkamQ+l/AkXXd4u18Dg8Lvqda9NDUojXQuBqMzKwk1swpptLv29bUNj6ohlPQ+XusjrfmhNp +DfRMGZv1JNv/n3E29Q12rTTqaOfcX5WhfA4huCSyBo1LKCNgsT7rzqPFMK50c4SPp5k/a7XZeR Bn2OySgm/YWVxuFgnaz0SlX22I1DKO52N5mQKJwU5nRWM3ZKUXDi6cQf8dAbmlTXN8NTCT3WCpq dv0IkVvoy063wslcjUl9yskNlGjFrd3k6m9NkQkeuAKsf/3Y6mHCSZ+UYDno6hlCdB0X1rX0gus /5RzdIJ6q6mXZ5VsvMw49me4a0ZhQ9QwNmuLCbXfVDytBhDcGjGbesV8J7871jVRzWC3YJck2TT GX/wO7BN19kVlPQiQukRbU9+nAP/xW3K8Kh9uX8OUbMNxhuEjsTV6nRUB6n40NHcDxYHiM+gm51 ymTpwMndIc4Tj6qWw6A== X-Authority-Analysis: v=2.4 cv=ablRWxot c=1 sm=1 tr=0 ts=69ea1f28 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=Js87xDwMZ--NYW6i2EgA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 priorityscore=1501 suspectscore=0 adultscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 Glymur has a secondary video codec core (vcodec1), equivalent to the primary core (vcodec0), but with independent power domains, clocks, and reset lines. Reuse the existing code wherever possible and add power sequence for vcodec1. Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 4 + drivers/media/platform/qcom/iris/iris_vpu3x.c | 122 +++++++++++++++++= ++++ drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 + .../platform/qcom/iris/iris_vpu_register_defines.h | 7 ++ 4 files changed, 134 insertions(+) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 7d59e6364e9d..8995136ad29e 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -61,6 +61,9 @@ enum platform_clk_type { IRIS_VPP0_HW_CLK, IRIS_VPP1_HW_CLK, IRIS_APV_HW_CLK, + IRIS_AXI_VCODEC1_CLK, + IRIS_VCODEC1_CLK, + IRIS_VCODEC1_FREERUN_CLK, }; =20 struct platform_clk_data { @@ -210,6 +213,7 @@ enum platform_pm_domain_type { IRIS_VPP0_HW_POWER_DOMAIN, IRIS_VPP1_HW_POWER_DOMAIN, IRIS_APV_HW_POWER_DOMAIN, + IRIS_VCODEC1_POWER_DOMAIN, }; =20 struct platform_pd_data { diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index a9f43dbfc695..bd70d1c0ea76 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -27,6 +27,16 @@ static bool iris_vpu3x_hw_power_collapsed(struct iris_co= re *core) return pwr_status ? false : true; } =20 +static bool iris_vpu36_hw1_power_collapsed(struct iris_core *core) +{ + u32 value, pwr_status; + + value =3D readl(core->reg_base + WRAPPER_CORE_POWER_STATUS); + pwr_status =3D value & BIT(4); + + return !pwr_status; +} + static void iris_vpu3_power_off_hardware(struct iris_core *core) { u32 reg_val =3D 0, value, i; @@ -260,6 +270,110 @@ 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; + + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC1_POWER_DOMAIN, true); + if (ret) + goto err_disable_hw1_clk; + + return 0; + +err_disable_hw1_clk: + iris_disable_unprepare_clock(core, IRIS_VCODEC1_CLK); +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_vpu36_hw1_power_collapsed(core)) + 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); +} + 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, @@ -284,3 +398,11 @@ const struct vpu_ops iris_vpu35_ops =3D { .program_bootup_registers =3D iris_vpu35_vpu4x_program_bootup_registers, .calc_freq =3D iris_vpu3x_vpu4x_calculate_frequency, }; + +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, +}; diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.h index f6dffc613b82..99e75fb4b10d 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..37f234484f1b 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,11 +57,13 @@ #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) --=20 2.34.1 From nobody Wed Jun 17 06:04:46 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 43D812F28FF for ; Thu, 23 Apr 2026 13:31:31 +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=1776951094; cv=none; b=Kah2a1l1YpgreyuqJcYn6wCZ3BBsrLGs3N8GBB1PtzOEavhme7XVSdsC/nDTSL0huOrIF/7j4XF03ixbYunVTsUlJHY8z0iVDVo+xD5byd/AP+CnWTEw36xDvE8Hz2+wgFsNpRBEJVMwk6bsPYaN2s0zlS3jJbhRwbJqTfni4HA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951094; c=relaxed/simple; bh=PdPE7KqUQFuwPsQRz26oiYLnLc9ew3D9O8MAtZ75eWw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ovv0QfNa+Bt48VPVtzgAQoh1YoqZkbU2eHw6lNlZYTNcQZEH3iw6jjgmUsD6FvXLh11IkYPgKFgvWJ37d8rfJ3fd1AHKmXCab61yY7igSxVPgr6z/zHKkEfbnBtxtsdehWGISnXjLpjGu1X+hoRf5YPXiT7dUU6sXgWH/3AsTW8= 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=Ou1L+JEe; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=kGm3btSd; 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="Ou1L+JEe"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kGm3btSd" 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 63N8trFK179321 for ; Thu, 23 Apr 2026 13:31:30 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= UCyS/VSZ598bgRvBororH4kzu2wJIntee/DjGCCJkUA=; b=Ou1L+JEeJU6MbIKI 20PGOoNTYvsyMdxzlYGyJ9kq7WniVsEPfbjt8jX4NIn4S8VZgaUPCLXKSlBrHP9I eYJa3dm1iWqQ/G+MkYFsIi1IYUIfsfZ4JJ9rTkk2QiadNTNXxLcZmvER/DHrq6tm QbfnRHrnWnbYa5/2s01/BVDp7bapY5lx/8LgLg5yU/0ZfHGRxx65L5LBxwGC9RgZ D9rqeFyPz0WIfHEhvXOD3jPRFzoCZlHWwYeALhbJBTeFikC4sW6cPr0juo0nqaUb dbX7rt8WJXvjnFl4wlm+kXQTsATInldn4HxRaLXjLLfGrKpdW4k06ZPRuyf9+JIN Z+ypug== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqe62hnqr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:31:30 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2b465bf993cso69148105ad.1 for ; Thu, 23 Apr 2026 06:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951089; x=1777555889; 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=UCyS/VSZ598bgRvBororH4kzu2wJIntee/DjGCCJkUA=; b=kGm3btSdS2B4MoUMdIo1DAohj0q1mPvpH0n3joK/BtWNBKoKS8T9ijAAc5raa1nhYz o+1qAteMK0OqLHCkX4d4pCgVKZtakoL/pZozKdZk1qmxwsNFC+PMfZBOPIi+ThHQ4A1C YxoW61y2D9JE+5BoCYlzBKJbVIhdwsYW03SoJKnX1rAIpmOZrr3Tw2uGgmp84QX+C+GF DwU7CtlSbdz9RggW0Tiwq6Alib84i/tJYaw0di7rV/1unPr9hSl2S5sgxOQXbXB1pFBL YpcXcscK9+HS89HXBU3mECbNmBxX9a7HDpKjG4evYui5DoX+vTXelH1bYm+2nPOU4XmI j4yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951089; x=1777555889; 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=UCyS/VSZ598bgRvBororH4kzu2wJIntee/DjGCCJkUA=; b=CnkR52hnrfMz+U+X+PiIovOo+OXYSC1rbDM/WLNQWpNnGFiznyNv/nLwZOiOO3AxUa MylsVkekUabsFCNhhXKkjnQBEqK4BlmElabe6XchzUahXQrvLbMMYtmp7Qlz4BGnYCg0 Pd77raV2kmGOZWB+PuwkITKxCp9ONb3uNJqF1DlVh26V9iRWHtzMwxT52qxgYjFDr25N zrSoCGB5m1hXhSAIHFg+R/DFG6Npi2l4KtebjU2oFY1V8bUb0bH08EoDpoR0xod5UKEy Pdn3oiVYhR7efnu501zq6QueJvNOUfTbhz2eYmBHoTopE8gLBOXIU0lThwn061m526Aj kg0g== X-Forwarded-Encrypted: i=1; AFNElJ9oLT5H1XQ8EeTUtQnVmbc4MGZDslpjPZw/MRGrnNKkvLsb2Nu1x6pAS1w+kV5wrADDURQLS5N/WExOcww=@vger.kernel.org X-Gm-Message-State: AOJu0YyTaXs/F8crvFjyYkja7ZstccGJEVc1+AOkD1SPe0ohtWEgMzU4 xzci5MnGHHmuFFVlZdyB2ZZECz3gsU3FlELMNnADDwAq/RWVqcW91EezFMIVjUXLPnxl1y0csn5 BA7NOlF6OPqQpW5f/HLhpjVedxY1S6O0cak4XDZu7CVerL6pXAkkHTjT7bun1Wo5OSQU= X-Gm-Gg: AeBDievMB9RLA9By2Hr42xBmMHbAEKBuH61uvi/Fg9IYePWyL9xrbv4u7QPiyBgzOzl dF6PEoGpieuRNJdSp8cmLC3pGD97OUV1s75NjvXEO6sm9+nw9BWOKqJgSDdY+jasPR9ufX7GxPp G0/Ri141iNGvrk2CkV58K4NuPo/9rTOEQFvdZVDlgKe1Arh+AApOnrJSBhnB/uRiOHtRU41iLJM 77GGkLgxmcRsMeaQGdJE9NtdE1uNVBqkWHrAYznhnrp88XaEGMh6nlYqMIHH8vltAfBXglZ1W6e 4nyX9oHgzMHUDt2j3UwjnZgei8UTwQeo3fFHKVZQhVtpmYn5gsC4g/LjnLz4Pcozz+QyriRIVnu 4m65YZJBpK334QPJRjPTurFhWwAzqtDMbknHQBTN5VsXU7t2v43d6lu+qXZAjMSf91g== X-Received: by 2002:a17:902:cec6:b0:2b2:49a7:a5ca with SMTP id d9443c01a7336-2b5f9e8f561mr281600635ad.5.1776951089186; Thu, 23 Apr 2026 06:31:29 -0700 (PDT) X-Received: by 2002:a17:902:cec6:b0:2b2:49a7:a5ca with SMTP id d9443c01a7336-2b5f9e8f561mr281599595ad.5.1776951088360; Thu, 23 Apr 2026 06:31:28 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:31:27 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:39 +0530 Subject: [PATCH v2 10/13] 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: <20260423-glymur-v2-10-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=13641; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=PdPE7KqUQFuwPsQRz26oiYLnLc9ew3D9O8MAtZ75eWw=; b=ImYzh5zI6yr2cxuvnsS3NP1ZxtpA4Gb5upNYrdl8KmojLsvNQS0KxwJWnSCqn0T4niPiCmIXd OmPsDqBaNvDCwc23rFgUnqkYj4LCtnAuz6yD325zsNO/VMxRMifTHN4 X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: ppW3awLxr9vS3HgR7n4PlPQ1TZf0xmlh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfXwbxPthgQHJCA 6AidQIBAbEmpAd+DBNRRmjPqxUVw7IopbD4Vyf1HRoNl439yL3WEwxAfZnkJ39g8wfl5+ZMgg/L aL36agWDlSsFqDPAUdfBDWOwyX1/PNSPL1eKg5PxCaUXVWwdJHe9zoFY55G3YIUOSBC+vOxSs6x y+U2QpT+OURcddg7HQDTy8o2Jb1MHARKjmyqEzfQWql25PVW+sp8MGwwn28dtgW7QujKoF1nhE4 Il2rEWaFawrrXOfbwoELmiQzyRVFzWqVHv62fV1Ytz9gYpPxZFJKzI3WrHeLN2xNbGpyXd5wtod deYkYbOUK9YerSVa4tGIMXajse0UugZUkVW55Dy+4+bHLPsr4+drbK8Np8A9XfMV2X8/qjWai7n wVI/rZOgGdNMyvWgB37TO2VE3gQOQ2HfDqldRcZXe+a+SQJPLz9Z5Bw/M7kR7tpBnHHsZubz8KB 1vEXhO3IWFakvx871fg== X-Proofpoint-ORIG-GUID: ppW3awLxr9vS3HgR7n4PlPQ1TZf0xmlh X-Authority-Analysis: v=2.4 cv=Nv7htcdJ c=1 sm=1 tr=0 ts=69ea1f32 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=SR9mA3E-jA3Ceylw1tAA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 clxscore=1015 bulkscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 On platforms with dual vcodec cores, select the hardware core for a session based on current load. Assign the session to vcodec0 if its MBPF/MBPS capacity allows it, otherwise assign to vcodec1. Communicate the selected core to firmware using the new HFI_PROP_CORE_ID property. Signed-off-by: Vishnu Reddy --- 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 | 11 ++- drivers/media/platform/qcom/iris/iris_utils.c | 87 +++++++++++++++++-= ---- drivers/media/platform/qcom/iris/iris_vb2.c | 4 + drivers/media/platform/qcom/iris/iris_vidc.c | 6 +- 12 files changed, 123 insertions(+), 25 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_common.c b/drivers/media= /platform/qcom/iris/iris_common.c index 7f1c7fe144f7..3b3fc482e194 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_command_ops *hfi_ops =3D inst->core->hfi_ops; + + if (!inst->core->iris_platform_data->dual_core) + 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_command_ops *hfi_ops =3D inst->core->hfi_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 b396c8cf595e..54a8649841e4 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 iris_core - holds core parameters valid for all instances * diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.h b/drivers/m= edia/platform/qcom/iris/iris_hfi_common.h index 3edb5ae582b4..fbaf852a6b99 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_common.h +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.h @@ -124,6 +124,7 @@ struct iris_hfi_command_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 iris_hfi_response_ops { 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 30bfd90d423b..9d9fae587297 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_command_ops iris_hfi_gen2_command_ops =3D { .sys_init =3D iris_hfi_gen2_sys_init, .sys_image_version =3D iris_hfi_gen2_sys_image_version, @@ -1317,6 +1335,7 @@ static const struct iris_hfi_command_ops iris_hfi_gen= 2_command_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 void iris_hfi_gen2_command_ops_init(struct iris_core *core) 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 16965150f427..dd341ca5be57 100644 --- a/drivers/media/platform/qcom/iris/iris_instance.h +++ b/drivers/media/platform/qcom/iris/iris_instance.h @@ -37,6 +37,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 * @ctx_q_lock: lock to serialize queues related ioctls * @lock: lock to seralise forward and reverse threads @@ -79,6 +80,7 @@ struct iris_fmt { struct iris_inst { struct list_head list; struct iris_core *core; + u32 core_id; u32 session_id; struct mutex ctx_q_lock;/* lock to serialize queues related ioctls */ struct mutex lock; /* lock to serialize forward and reverse threads */ diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 8995136ad29e..502d7099085c 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -258,6 +258,7 @@ struct iris_platform_data { const struct tz_cp_config *tz_cp_config_data; u32 tz_cp_config_data_size; u32 core_arch; + bool dual_core; u32 hw_response_timeout; struct ubwc_config_data *ubwc_config; u32 num_vpp_pipe; diff --git a/drivers/media/platform/qcom/iris/iris_power.c b/drivers/media/= platform/qcom/iris/iris_power.c index 91aa21d4070e..0e116c63f529 100644 --- a/drivers/media/platform/qcom/iris/iris_power.c +++ b/drivers/media/platform/qcom/iris/iris_power.c @@ -77,9 +77,9 @@ static int iris_vote_interconnects(struct iris_inst *inst) =20 static int iris_set_clocks(struct iris_inst *inst) { + u64 vcodec0_freq =3D 0, vcodec1_freq =3D 0; struct iris_core *core =3D inst->core; struct iris_inst *instance; - u64 freq =3D 0; int ret; =20 mutex_lock(&core->lock); @@ -87,11 +87,14 @@ static int iris_set_clocks(struct iris_inst *inst) if (!instance->max_input_data_size) continue; =20 - freq +=3D instance->power.min_freq; + if (instance->core_id =3D=3D IRIS_VCODEC0) + vcodec0_freq +=3D instance->power.min_freq; + else if (instance->core_id =3D=3D IRIS_VCODEC1) + vcodec1_freq +=3D instance->power.min_freq; } =20 - core->power.clk_freq =3D freq; - ret =3D iris_opp_set_rate(core->dev, freq); + core->power.clk_freq =3D vcodec0_freq > vcodec1_freq ? vcodec0_freq : vco= dec1_freq; + ret =3D iris_opp_set_rate(core->dev, core->power.clk_freq); mutex_unlock(&core->lock); =20 return ret; diff --git a/drivers/media/platform/qcom/iris/iris_utils.c b/drivers/media/= platform/qcom/iris/iris_utils.c index cfc5b576ec56..1be4cfd7d9af 100644 --- a/drivers/media/platform/qcom/iris/iris_utils.c +++ b/drivers/media/platform/qcom/iris/iris_utils.c @@ -90,40 +90,87 @@ 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 u32 iris_get_mbps(struct iris_inst *inst) { - struct iris_core *core =3D inst->core; - struct iris_inst *instance; - u32 total_mbpf =3D 0; + u32 fps =3D max(inst->frame_rate, inst->operating_rate); + + return iris_get_mbpf(inst) * fps; +} + +static void iris_get_core_load(struct iris_core *core, u32 *core_load, u32= *core_session, bool mbpf) +{ + bool dual_core =3D core->iris_platform_data->dual_core; + struct iris_inst *inst; + u32 load; + + core_load[0] =3D 0; + core_load[1] =3D 0; + core_session[0] =3D 0; + core_session[1] =3D 0; =20 mutex_lock(&core->lock); - list_for_each_entry(instance, &core->instances, list) - total_mbpf +=3D iris_get_mbpf(instance); + list_for_each_entry(inst, &core->instances, list) { + if (mbpf) + load =3D iris_get_mbpf(inst); + else + load =3D iris_get_mbps(inst); + + if (inst->core_id =3D=3D IRIS_VCODEC0) { + core_load[0] +=3D load; + core_session[0]++; + } else if (dual_core && inst->core_id =3D=3D IRIS_VCODEC1) { + core_load[1] +=3D load; + core_session[1]++; + } + } mutex_unlock(&core->lock); +} + +static int iris_select_core_id(struct iris_inst *inst, u32 *core_load, u32= *core_session, + u32 max_load, u32 new_load) +{ + u32 max_session =3D inst->core->iris_platform_data->max_session_count; + bool dual_core =3D inst->core->iris_platform_data->dual_core; + u32 core_index; + + core_index =3D (core_load[0] > core_load[1] && dual_core) ? 1 : 0; + + if (core_session[core_index] >=3D max_session) + core_index =3D core_index =3D=3D 0 && dual_core ? 1 : 0; =20 - if (total_mbpf > core->iris_platform_data->max_core_mbpf) + if (core_session[core_index] >=3D max_session) + return -ENOMEM; + + if (core_load[core_index] + new_load <=3D max_load) + inst->core_id =3D core_index =3D=3D 0 ? IRIS_VCODEC0 : IRIS_VCODEC1; + else return -ENOMEM; =20 return 0; } =20 -int iris_check_core_mbps(struct iris_inst *inst) +int iris_check_core_mbpf(struct iris_inst *inst) { - struct iris_core *core =3D inst->core; - struct iris_inst *instance; - u32 total_mbps =3D 0, fps =3D 0; + u32 max_core_mbpf =3D inst->core->iris_platform_data->max_core_mbpf; + u32 core_mbpf[2], core_session[2], new_mbpf; =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; - } - mutex_unlock(&core->lock); + inst->core_id =3D 0; + iris_get_core_load(inst->core, core_mbpf, core_session, true); + new_mbpf =3D iris_get_mbpf(inst); =20 - if (total_mbps > core->iris_platform_data->max_core_mbps) - return -ENOMEM; + return iris_select_core_id(inst, core_mbpf, core_session, max_core_mbpf, = new_mbpf); +} =20 - return 0; +int iris_check_core_mbps(struct iris_inst *inst) +{ + u32 max_core_mbps =3D inst->core->iris_platform_data->max_core_mbps; + u32 core_mbps[2] =3D {0, 0}, core_session[2], new_mbps; + + inst->core_id =3D 0; + iris_get_core_load(inst->core, core_mbps, core_session, false); + new_mbps =3D iris_get_mbps(inst); + + return iris_select_core_id(inst, core_mbps, core_session, max_core_mbps, = new_mbps); } =20 bool is_rotation_90_or_270(struct iris_inst *inst) diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/pl= atform/qcom/iris/iris_vb2.c index bf0b8400996e..5a05f7d65501 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 bd38d84c9cc7..eb167cede4c0 100644 --- a/drivers/media/platform/qcom/iris/iris_vidc.c +++ b/drivers/media/platform/qcom/iris/iris_vidc.c @@ -41,16 +41,20 @@ static void iris_v4l2_fh_deinit(struct iris_inst *inst,= struct file *filp) =20 static void iris_add_session(struct iris_inst *inst) { + u32 max_session_count =3D inst->core->iris_platform_data->max_session_cou= nt; struct iris_core *core =3D inst->core; struct iris_inst *iter; u32 count =3D 0; =20 + if (inst->core->iris_platform_data->dual_core) + max_session_count *=3D 2; + 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); --=20 2.34.1 From nobody Wed Jun 17 06:04:46 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 AF886302756 for ; Thu, 23 Apr 2026 13:31:40 +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=1776951102; cv=none; b=aFb7YnBQYSmk9k4CMvao+oxi0ebCT0+/mE6tHKN7Yn2Jsxd2eWtPwpbHtkm+CMPPQr7lq/S4vdlaxBsRmKwULpKUvzpS75zSGCYA8OhSR/pgiXEx1WiuVAzM94gYzeCkLEusxztz4/8npNIl+QJVnha0S/tN5L9BdIzyCRPEKWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951102; c=relaxed/simple; bh=ebFEmvXGGkqJKD9mFiIVA1LtU6HQ5Bywf5jEMGrP3G0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pcOGCyUAPPFabJTCdxFxmeaA0toEAB7/wtlAxYEYu5CdO1GqFjxF2Q9uPq3aDdhyT8hwhjV++SU/NTbCMWCzBuBHfFZgkOqrF8ec9jSHLCgy47wnnt8Bve+qQGrS0YmkRXeZF7LCEKLjLVWvS64Xy4TBJgfsBtGoHSRGhL4KJfg= 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=gg7QXMgw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=AdR4xRtS; 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="gg7QXMgw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AdR4xRtS" 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 63N8u40E3769021 for ; Thu, 23 Apr 2026 13:31: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= m8HVxJ0pTOUMaGM5sF22jVvxmxUgeEH0LTk097GA07s=; b=gg7QXMgwOV1shweU RcerV4o2vU+G0PAZKT37xgsx1XatL3FYPGu/gX41xZUkofpC9P0GYLlein6D+KDw uEghegjDPPw9vINbXnFQeKoT9F17MvLu2/PkYcA71HBO2y/0GGBcZ6tgAn3dSLru dKlItWKwsvh3dGq3UtzPScZw3oVG9MgF6ri4t+TmdbArx7Qv9sCzkAaB359X6DEq wcDHWDhKNehWssmONfMoxmcFpB5Xcym2LPhv0DUfTnDBaeEmZ2bV8MmubF6AyKdg +qvh5YssFPbg0mGgpQ0d+dbA2NB26kTqNX5ib9SLZLE05tZ6nnh2tUvgXvkA4tU5 AbV+UA== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1hq42hr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:31:39 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2b249975139so122951735ad.0 for ; Thu, 23 Apr 2026 06:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951098; x=1777555898; 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=m8HVxJ0pTOUMaGM5sF22jVvxmxUgeEH0LTk097GA07s=; b=AdR4xRtSI5R6G+s5zJQfdMgFGhRTGE+DC2Tn6zd43WUE3LiS3XKvtT3vmG3TDH1UOM 7NSAPsyKbODvamHo5bI2RL3VLxpin24CsZ+siBTrFJ2SjDKKdz3NnlY7x6+Afec1bVIf qD1gcwGrOhwI3Oi0Hi/YtVa9pBL1YliHybTZ4c+L8pmFXQbMo+81ii5l16t5gCzt+ia9 1WzPMosoXYQQbXpVwfwyfbFsvLIFCFVmusYvJU2b3DBguEfl3JUPTzTWHB0LZqVkoZwY ZGyVg/czanUtTC7zCMgOZkKAKk7yO0SR6rt/Z+avKjZPB1soItDmCFESwZf/xFJ29NeC HHSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951098; x=1777555898; 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=m8HVxJ0pTOUMaGM5sF22jVvxmxUgeEH0LTk097GA07s=; b=WCvAeZZCwsrWvJ87j32tkiQkZ2fe+xn7K8xgxkuQm/DcRrSHA6UVxGLVaX0857ea4z A2Zp5dnG2e0IewEmVS7Q0ROGzSgf7D7QR8Wa2ZAoAeQzm30PdrziRFxmB6DC6AkE9wbj XsX52wxJoGk9Oy+Yv9UcqQzRejS9ZEeJUCAyqHCzy7dkBPdEeZCxPaSWBoUhNtSHQGcC +9JIP3SS4LuKYwkc4vgpShUCXNVF1zfFGFzmi6tkU50YDjRTS99aN8j9FpV8yYcVKx4G DkpXA/fqkJiBYsVm/KgWAPdoMll0cbUi5t4Qz4c65/DB0n5WrYQNDXwvdqyzDDw2+K4H pJng== X-Forwarded-Encrypted: i=1; AFNElJ93F66OTs2oS+t5YVA/EgPgax3i3bB4iLKEnavGCUS97kteD36gP2Um6qaBAZZRGkJ2af0MHm2V0uxw1nc=@vger.kernel.org X-Gm-Message-State: AOJu0YxBRQl6R9fIcUKneje0dUC5SrEz6UuogWfKrQLruCTz/JiB4qY5 K98UQpobiY+JDR618MwbaD4tUv5wazEPrMSfimyhcvHZh9DWqHAuONiYJ7T79rpUoDkUy9x95C/ DQFlP1U/lhYM1TzjJ2e3i4+Vg7so1K1Z24CXZdVsCbtE1I0h1vIfolT8Vbc5oSbfv7wM= X-Gm-Gg: AeBDieuPyqHaJpLgvqrJFaSKj9KR4/FNSCPnGV79HmevSL+8pNMUL1wOusG6UovrzpY wvjeJVXafQnuRmmok52st4/4+C/KACt2t+2hKCkNiN7/ddMhsUJtoBsClODjdQiRQRP/1GoRIm0 YU0K2mG53otFV4jJy6aHCbjbL2s30gMq4b/63Jl39TDf6u166YoPSSsaQYfk14sUjtvE7OwW6yx UX0l6IHQY/1XEptcLIPUZwBS+K/3NUXH7Z2UmTWC4B090dHSabApfCHvPdCK7BqVeTm4TPUaPUA Zp4VLJnObqS3PphWx9NRUtvVLtGKXyA69wQNB2Nln84ns7MWEkj/8xeOdsjor/UpZmzU0pSB7h3 poEBhrpZcTJz0GoW0bON5bWIoKC/dihHnJBiAmn/VKEcaXDVoDZta0lntArDcnvgJeA== X-Received: by 2002:a17:903:3688:b0:2b2:501c:ba8 with SMTP id d9443c01a7336-2b5f9f7d700mr214914005ad.26.1776951098349; Thu, 23 Apr 2026 06:31:38 -0700 (PDT) X-Received: by 2002:a17:903:3688:b0:2b2:501c:ba8 with SMTP id d9443c01a7336-2b5f9f7d700mr214913615ad.26.1776951097773; Thu, 23 Apr 2026 06:31:37 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:31:37 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:40 +0530 Subject: [PATCH v2 11/13] media: iris: Select DMA_CONTEXT_BUS to create firmware device 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: <20260423-glymur-v2-11-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=1132; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=ebFEmvXGGkqJKD9mFiIVA1LtU6HQ5Bywf5jEMGrP3G0=; b=bQ2hOZeQXviL9nyF3kRsnvZT4zluN72vayk4KkSLYRcfIp5ZJavRUHXeaeh7XDtSU5FxhOQqO 0m/xHMr57rABgvyiSf0X1xDEkWlvlf58cukHzX9Ec8r7jTMd6Tw/pND X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX2UEPvcuuSUsh wUEvkwZcZL+NbY0DASHgCHL+j3za/2M6KbLtmC7JxdoS+FEFyQ38UizeKMS/BHp8M+F++ItYCME kMH6bbaBLYUrbIPkfJckDSSTgU/3p1DUN4TJb+FDsYSZYW/dtMqLQ2HJFIehkvQsmC0OvRLGjI3 +3/0hH1DKnw7HFjyLdkibEjA3UH4JLIAzKBsg3QzJ43s2yDYAsqWbmnuDUMrnmD2Bs81JBtuVmw ZlMxkLX7W15fDGb2TOY/y6ZCBTi9tL6AOwIN5dUSUeViQffIjQRH4+vWK0at01YQBZbap3cF/uX Jhu2NgT1RyxsrplrB+0kdCNoBQ7ZdM4R+9HYwMdD4dt/usfin7f+TOdqETnDexSUlauVJs4fSOd RJP3RtIbt591g3p6WMptLlKNpGvJIQ7J8jUTlaeG/BQt8go1dH9fUpX03OJPkf6vVcsQrCoaalF bENGpG68HxO/LH9YeHg== X-Proofpoint-ORIG-GUID: 6bBYng3ivThF2Z2J67JcOAyWvbAc1WWj X-Proofpoint-GUID: 6bBYng3ivThF2Z2J67JcOAyWvbAc1WWj X-Authority-Analysis: v=2.4 cv=TJt1jVla c=1 sm=1 tr=0 ts=69ea1f3b cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=LyCF3VY0PmB3I9bQj-wA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 clxscore=1015 malwarescore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 Iris need a firmware device to enable secure PAS (peripheral authentication service) support in case of non-Gunyah. This device requires its own IOMMU context for memory isolation. The generic dma-context-bus provides the infrastructure to create the device and configure its firmware stream ID. Select DMA_CONTEXT_BUS to ensure this bus is available when VIDEO_QCOM_IRIS is enabled. Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/qcom/iris/Kconfig b/drivers/media/platf= orm/qcom/iris/Kconfig index 3c803a05305a..de1fc4b07ff8 100644 --- a/drivers/media/platform/qcom/iris/Kconfig +++ b/drivers/media/platform/qcom/iris/Kconfig @@ -6,6 +6,7 @@ config VIDEO_QCOM_IRIS select QCOM_MDT_LOADER if ARCH_QCOM select QCOM_SCM select VIDEOBUF2_DMA_CONTIG + select DMA_CONTEXT_BUS help This is a V4L2 driver for Qualcomm iris video accelerator hardware. It accelerates decoding operations on various --=20 2.34.1 From nobody Wed Jun 17 06:04:46 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 39ABE2D7DEF for ; Thu, 23 Apr 2026 13:31:50 +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=1776951112; cv=none; b=i/11BN3HcE6FTfyIbD3wUaRwAfJMxO3L+DGKgJVc0RCbD/R/tozNw5nHM1b75N/TbeZ74Pj/cnshv/KA6yicOoYHqQ8PdLdR3Xj50RdIKuFBYJL69+gZN+RpUBBXmBd+JYQ6lwh65NOPpDU1OgtrJGZuikUj6kThsCfMYVEaIWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951112; c=relaxed/simple; bh=IpKGagBtaKo+T7hDhMwWB/G/phGQIlwytr+yRoflFcc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HCFZYM7eOXSGYqDTk3tYl2VCvECT69GQHgfx9aN1YwiSY9/CN6oGG7YeNCRL09WfR5/L1wkwq3+52VYS1JganCBK/cIAyp/czTbuQxQJ/qitfO5hTgABnl/RkFCw4PlFWDJWXdoCpn/yTtRdvmaOEKcX9eGF6XW9EGZQunQsZLM= 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=PX2EyF/Y; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cWT9vl9U; 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="PX2EyF/Y"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cWT9vl9U" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63N8u9hI366400 for ; Thu, 23 Apr 2026 13:31:49 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= sRAKC9hi31Yyo8fJRgLAvMXlpdcXIf37sd88eishkDE=; b=PX2EyF/YrU5xruaj qOpmN0NpQdAkSeYNwMxT07pJwLVfpmcS07cQ+Vfo4GqqF5p6r1/gsSj5ns62O77W jgBz0W33vSmGY5nyJeBde48cy8jFicybcVCvXcetjQhbKlqThaN54YYchm+6nehH YoMqiRMwHrmge3bQ42QRG7ecAvd2A+xDKBZzhGw/I+yJOUTanmrAfREE0gDMzTqI tjTuQy48lr6OLaTLOXzPcxiVN+KEaiJpm8jY5bsbcsVytQo6dbQHOhW/rqQXCYkU GLE8/aG0s0MQF0q6bxyMIMia5kplf/sY1MmnNAKLgJULsNms4lEKkz10uqb1m/qy GAymFA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq35rbnnu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:31:49 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2b4530a90fdso132372465ad.1 for ; Thu, 23 Apr 2026 06:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951108; x=1777555908; 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=sRAKC9hi31Yyo8fJRgLAvMXlpdcXIf37sd88eishkDE=; b=cWT9vl9UJFac3dPUt24vKNv0cV3eSndCEZpGv+AoYhfYzQTEDZU3BFUZ9EvwHRQtkH n9CJhjQPgEGL1Dt8qZSL9JvYD2+9g7aYidSDBJSspOuJBcoe52jfengkUu7nqzqe/gM1 2WnDRqhEWMz8jdmHt295T7zYtEdFldIKZ8B9/zGy9IGEAxrdbTudCQK5ejn87f0qSYRs qa9lpj9Qg9tZDK9+DP7kIMTPBBpkWkpVOL2k3TV8no/wSvLQ+o5R7+XL19Q8Smr0tiUA L7Ca30u1oTve2i/2vldFNuCU3GFUrtbEKLxsD8SUvtzMSA2QR+4irI7XYMeZQ3N/T8lu Xw7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951108; x=1777555908; 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=sRAKC9hi31Yyo8fJRgLAvMXlpdcXIf37sd88eishkDE=; b=GuTS8jZPvkyUx19Q0rhSJvkxs5ZbRVnS5mol0r7gS6Ula2plEkzXtoHPr+hW2X8JjK ak73GiNSjmEhNVRI788+pheHYHxFbJ97FNkmrr6cRVF82T3jGpm5vR1i0MCIXTW4cVxH XjCRNlN9ZXyjfLeDEvfqd/xBaGWfWtCYaRc+rbQd2Fxq+LnRxMDRUb9WBa1QVnkJVjX/ 0tXHU7skmR3xbHUlVPmQUPSZkeClnP32hd9t4ffIh/ET3mmzXQ+ZUAlmSE14ftfUAO6r rrIR1+ICMurMVwjdWCUJ7gXbrm+ipU3Bq153y+uHgPRQRng2MHAtQc/3b3KerUq1HiFy K10w== X-Forwarded-Encrypted: i=1; AFNElJ8UFQMZ+vMGLrUAiJB/ciU3FN8Kyf6uc2eg2mMs5Xm7XdnrAhLoU1ZZeZm8IrPNLVgNAWtq78K47+KG0T0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz9U0hM1Ar3FnIRvtlGbM2KHgh9Duqx5uwhSTINxJxQa+lIvM7v CC3pzYkeWRHjSwO7+ZAiH+3aMYcDD5KT3HeGisIF/qdnkSxs9YlxHCyREMifNK4VCXVP2DDxQ9G S+gQBAeiCC5kUBfPMdiZ3pH9w4Ti2aZlNyJaXInIMXZuI0231sACPYz+dwn/Oe0k2FAo= X-Gm-Gg: AeBDiesssJcVzExKs/IHwLrQS1LnmHSH7mS0ejVKry0CPpgkp2G3yThACSfFGwHpfy3 yeAKWgwP0A5qqu6exw50708Z3gZkzEsndtXm8oedTmIwo9hjxKArLhgqFOoviZlfJ01wvIJQCd4 pJMnRXAFwDsc3CVhg0LXgUchxWCz6lz1Gq3IQU/55otWBRMBYtNGx4virZ8/u0ybj41w1jKI3Uj J9WjxhB21zKTWUZJxF9mBjPDmNfrxDO9EG+V52JRZ/GbYsFmTR1qrFwfPCQq50BXd9pDEe10N1j RTic2NmVE8BRxdDKkqkLSGhkpNR/zlsdzrJyG4bryln/GLJcQVllZ/btPBcg+IZIm5mxjxIwdsn 9AH+M2/DXv5x0m2C7KBkhEnhZxljeaKHxglkN+OtGJBrdysU4Gm6Rt9iktsAkS9Q5Jw== X-Received: by 2002:a17:902:8b87:b0:2b0:a980:367c with SMTP id d9443c01a7336-2b5f9eb0513mr209694465ad.2.1776951107612; Thu, 23 Apr 2026 06:31:47 -0700 (PDT) X-Received: by 2002:a17:902:8b87:b0:2b0:a980:367c with SMTP id d9443c01a7336-2b5f9eb0513mr209694195ad.2.1776951106964; Thu, 23 Apr 2026 06:31:46 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:31:46 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:41 +0530 Subject: [PATCH v2 12/13] 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: <20260423-glymur-v2-12-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=11396; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=IpKGagBtaKo+T7hDhMwWB/G/phGQIlwytr+yRoflFcc=; b=RAxNFsn0oM6btTQpSMOyV1izkkgutjTgKTb69aqE5Vl1IUWaWYuLOYk88Otl6AC7tCRH2jkMR L6e/GWPYk83AEBqzXuidea632kn+l4rO4kL5DxAZBG+nodY+3tVSZd1 X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX5QfRKYdSN5Lo HHaFEy3zeFEzgzoPELlycFv5oa1aVef4VZsVnbCVFe6QfE6+DaChx69Af2YsSaO+g+16ywTS+0D dMKXZsIv+WseTKWuXRiqkKpm1BmIGaoBuRSl01D211tVKq4Cf23bzuFBFkQXSWxuaEdl7sJQcfy ivSfpts+6+kzU1aaaca1tpaDJ4yyJ1K51V7Eqn6KEZLRUAh1KdTtQh+IOx0UPhcYc7sNbI1ma3p nRslA27KRZmJPMNGiqc4RWs7hquIkAKwWMh5b5WnsJH+k/9HF/gtCb47QFQsSQddxmMZbqBYiNt 8ErDmlAzjr3fn81WPo3yMCutWRo6qh5p8JZGt7fE7DThe2Za2lwgy10ndz0NVB0jQ7dJFNfLFG9 aKjcKM2jAsWguqbnFVD5eOPqTD3iaE1gF7XQc9bUbLlb+FrFKutM4I2WhS4hlob/FnJ4ruYYVH0 1i17SyRGT8Dh0o824fQ== X-Proofpoint-ORIG-GUID: jhCu4zA7nntxl7qiNWKh-wDmJeRDSaED X-Proofpoint-GUID: jhCu4zA7nntxl7qiNWKh-wDmJeRDSaED X-Authority-Analysis: v=2.4 cv=f5J4wuyM c=1 sm=1 tr=0 ts=69ea1f45 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=syK4oCsQgbaUnHKzOKsA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 Add glymur platform data by reusing most of the SM8550 definitions. Move configuration that differs in a per-SoC platform specific data. Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/Makefile | 1 + .../platform/qcom/iris/iris_platform_common.h | 5 ++ .../media/platform/qcom/iris/iris_platform_gen2.c | 99 ++++++++++++++++++= ++++ .../platform/qcom/iris/iris_platform_glymur.c | 97 ++++++++++++++++++= +++ .../platform/qcom/iris/iris_platform_glymur.h | 17 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 4 + 6 files changed, 223 insertions(+) diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/plat= form/qcom/iris/Makefile index 2abbd3aeb4af..2a50f3cafc38 100644 --- a/drivers/media/platform/qcom/iris/Makefile +++ b/drivers/media/platform/qcom/iris/Makefile @@ -11,6 +11,7 @@ qcom-iris-objs +=3D iris_buffer.o \ iris_hfi_gen2_response.o \ iris_hfi_queue.o \ iris_platform_gen2.o \ + iris_platform_glymur.o \ iris_power.o \ iris_probe.o \ iris_resources.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 502d7099085c..2003b7186480 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -30,6 +30,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, @@ -41,6 +45,7 @@ enum pipe_type { PIPE_4 =3D 4, }; =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_gen2.c b/driver= s/media/platform/qcom/iris/iris_platform_gen2.c index 5862c89a4971..d11c9d1ce6b1 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.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_sm8650.h" #include "iris_platform_sm8750.h" @@ -931,6 +932,104 @@ static const u32 sm8550_enc_op_int_buf_tbl[] =3D { BUF_SCRATCH_2, }; =20 +const struct iris_platform_data glymur_data =3D { + .get_instance =3D iris_hfi_gen2_get_instance, + .init_hfi_command_ops =3D iris_hfi_gen2_command_ops_init, + .init_hfi_response_ops =3D iris_hfi_gen2_response_ops_init, + .get_vpu_buffer_size =3D iris_vpu_buf_size, + .vpu_ops =3D &iris_vpu36_ops, + .set_preset_registers =3D iris_set_sm8550_preset_registers, + .init_cb_devs =3D iris_glymur_init_cb_devs, + .deinit_cb_devs =3D iris_glymur_deinit_cb_devs, + .icc_tbl =3D sm8550_icc_table, + .icc_tbl_size =3D ARRAY_SIZE(sm8550_icc_table), + .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 sm8550_bw_table_dec, + .bw_tbl_dec_size =3D ARRAY_SIZE(sm8550_bw_table_dec), + .pmdomain_tbl =3D &iris_glymur_pmdomain_table, + .opp_pd_tbl =3D sm8550_opp_pd_table, + .opp_pd_tbl_size =3D ARRAY_SIZE(sm8550_opp_pd_table), + .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, + .fwname =3D "qcom/vpu/vpu36_p4_s7.mbn", + .pas_id =3D IRIS_PAS_ID, + .dual_core =3D true, + .inst_iris_fmts =3D platform_fmts_sm8550_dec, + .inst_iris_fmts_size =3D ARRAY_SIZE(platform_fmts_sm8550_dec), + .inst_caps =3D &platform_inst_cap_sm8550, + .inst_fw_caps_dec =3D inst_fw_cap_sm8550_dec, + .inst_fw_caps_dec_size =3D ARRAY_SIZE(inst_fw_cap_sm8550_dec), + .inst_fw_caps_enc =3D inst_fw_cap_sm8550_enc, + .inst_fw_caps_enc_size =3D ARRAY_SIZE(inst_fw_cap_sm8550_enc), + .tz_cp_config_data =3D iris_glymur_tz_cp_config, + .tz_cp_config_data_size =3D ARRAY_SIZE(iris_glymur_tz_cp_config), + .core_arch =3D VIDEO_ARCH_LX, + .hw_response_timeout =3D HW_RESPONSE_TIMEOUT_VALUE, + .ubwc_config =3D &ubwc_config_sm8550, + .num_vpp_pipe =3D 4, + .max_session_count =3D 16, + .max_core_mbpf =3D NUM_MBS_8K * 2, + .max_core_mbps =3D ((8192 * 4320) / 256) * 60, + .dec_input_config_params_default =3D + sm8550_vdec_input_config_params_default, + .dec_input_config_params_default_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_params_default), + .dec_input_config_params_hevc =3D + sm8550_vdec_input_config_param_hevc, + .dec_input_config_params_hevc_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_param_hevc), + .dec_input_config_params_vp9 =3D + sm8550_vdec_input_config_param_vp9, + .dec_input_config_params_vp9_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_param_vp9), + .dec_input_config_params_av1 =3D + sm8550_vdec_input_config_param_av1, + .dec_input_config_params_av1_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_param_av1), + .dec_output_config_params =3D + sm8550_vdec_output_config_params, + .dec_output_config_params_size =3D + ARRAY_SIZE(sm8550_vdec_output_config_params), + + .enc_input_config_params =3D + sm8550_venc_input_config_params, + .enc_input_config_params_size =3D + ARRAY_SIZE(sm8550_venc_input_config_params), + .enc_output_config_params =3D + sm8550_venc_output_config_params, + .enc_output_config_params_size =3D + ARRAY_SIZE(sm8550_venc_output_config_params), + + .dec_input_prop =3D sm8550_vdec_subscribe_input_properties, + .dec_input_prop_size =3D ARRAY_SIZE(sm8550_vdec_subscribe_input_propertie= s), + .dec_output_prop_avc =3D sm8550_vdec_subscribe_output_properties_avc, + .dec_output_prop_avc_size =3D + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_avc), + .dec_output_prop_hevc =3D sm8550_vdec_subscribe_output_properties_hevc, + .dec_output_prop_hevc_size =3D + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_hevc), + .dec_output_prop_vp9 =3D sm8550_vdec_subscribe_output_properties_vp9, + .dec_output_prop_vp9_size =3D + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_vp9), + .dec_output_prop_av1 =3D sm8550_vdec_subscribe_output_properties_av1, + .dec_output_prop_av1_size =3D + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_av1), + + .dec_ip_int_buf_tbl =3D sm8550_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl =3D sm8550_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl =3D sm8550_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_enc_ip_int_buf_tbl), + .enc_op_int_buf_tbl =3D sm8550_enc_op_int_buf_tbl, + .enc_op_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_enc_op_int_buf_tbl), +}; + const struct iris_platform_data sm8550_data =3D { .get_instance =3D iris_hfi_gen2_get_instance, .init_hfi_command_ops =3D iris_hfi_gen2_command_ops_init, 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..59fa752916a4 --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_platform_glymur.c @@ -0,0 +1,97 @@ +// 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 f_id =3D IOMMU_FID_IRIS_FIRMWARE; + struct device *dev; + + dev =3D create_dma_context_bus_device(core->dev, NULL, dma_mask, &f_id); + 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_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index 34c981be9bc1..78e3627557e9 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -369,6 +369,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 Wed Jun 17 06:04:46 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 1C9A92DAFAF for ; Thu, 23 Apr 2026 13:31:59 +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=1776951121; cv=none; b=kP0yXGxohv4a3AMb/1/hfVCHaZx5J2NT8IgOVkn0AWqe6xyO2fqiZT4Caz34jSJAe9Yd3YYETA7sNcTO3jzYcJB1QsGeJlt/iTJvuSUHuq9UYRAzkE0pX0Q5CEl1E+tO9k58oBxV3fbwtJCw6NusMkk+RPYYr2lcDqJt/vAiSsc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951121; c=relaxed/simple; bh=AXNNMUqpUBkT37jqrWXRRraxt0+yVQz0nuc5i48FDy0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=p0KsDXWIkdaJW/umKANZ5sDh7tAulnE099/jatnLjyz+qpQAQSS6WDgdM4dwCNJZqd9Y9wFZcpxzaXb8e2mMHRsBzY7ob2bC18fpQ7HpHOKb+/ReqmSXkHHfGjkNstTBoTWa/F943Y8MaAXPzfgF4XT9/Y7pNfxRLSo6/l+evQw= 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=hRV084kD; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=j419/WKG; 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="hRV084kD"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="j419/WKG" 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 63N8uP2o3769521 for ; Thu, 23 Apr 2026 13:31: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= MZLUyV0TSMl/0FUp0kbCXsS7r5z0r4oRuVSRhSVL+wo=; b=hRV084kDb/l3CPAO ioO4Uid2AHYJ/jGspacZ3gbf9sXPjEVs2vOZb5mcY+bCIYBVX3xonqPm6Q6NxlJ7 7sGw4FYqSEYafmsaznQ5CsBvSJ7QenxXQwKy4hWW27+Duf5gUjXY7A2lJfb+rHvM zrIgSFlW6BOpe6H7S/rV4LKLG2nKmUcUPmdPujGslIJeHmsP074furtEDriEqwRJ Gy4AcbTyhEF6LX75yiHkiY8wRLN7fov5HnL/BLkm20GgdA34giRdV1QXarkhlfNv oJse3hcfkZiSU2qgu146VUqnsfBrczOz1Ndke30cillPK1+VhLeZxsgnUR2sKCZa fbVorg== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1hq42k6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:31:58 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2b2ead99f5dso84237235ad.0 for ; Thu, 23 Apr 2026 06:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951118; x=1777555918; 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=MZLUyV0TSMl/0FUp0kbCXsS7r5z0r4oRuVSRhSVL+wo=; b=j419/WKGOlKpf8dLSjT1IBVDmtXNC5tO7soGmVFOg7o5cSAQH2AaIR3ee7fqws7jIY HUcnFu9JF/ryLgo9WTnjvBOQest1cjNV5TVJ78Q4nH41RXXfd1td72WNdWekvPyK3yfd 8nonxYfCEeeIwRx9lATZNMSDd2zY9ulmfvBN3wpKg835mkjgXub0EoiUtneY79pzHezk LJ8/dxumjUCGDW0noMZpPz1jjTB6j1zORv/WuADxT73IldbsKh0RT2OUYEuO+pwu3mH7 qCdD4QkDrFHLAqgUaZ1wxWULQNLStMMAM9CKAQPRO03KpGNJr1nJ081rdATRw/2QkyDm xD3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951118; x=1777555918; 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=MZLUyV0TSMl/0FUp0kbCXsS7r5z0r4oRuVSRhSVL+wo=; b=VGVw2EKOpAcxpdoQS0Mbpb6Zs7DDDJEfIlKmRT6fr7yQOlVZEAuOQIG0LNrszO8pCe wd3mCwFS3iUQFn0ykhLMr3TJY5IpNvUfeeLooHVp5iVPx/HwCfCDlo7Hb+EnvOPTssFU Rq+8/WMZr8RlUjP/ar/On8jru5APHx3dYNWaOoV/UCcyEdr235T4KQIpXL5H470KjhaY gCjvqrPK28TOSdQ2V5pR1NfdbGkwIvoBooTqxQ4nskkgfErpv/vzTajWkbVWOgjnysKz 48ZG1spOs5muStDZV62DYMItLc/NlcJlPlC2gnkNmoQvVdzMTFAJY7w/zV5RkFxiwQy7 L2oA== X-Forwarded-Encrypted: i=1; AFNElJ9OZf43de3Zqw1Q6COKzstLeMFCaal6LoQqvcuXuPeHEGJvpLRWXMUM90zTKqq4mzEXu5DHX19zOF0OLAg=@vger.kernel.org X-Gm-Message-State: AOJu0YxzMRecXv1gOFGDcRIBbSYcwcFgFqe59uhme1apLszqxAmZY+UT O71TFxd1j7ZZOBtIn0kU5SkzTmJ00DjUEZDFoisTmK9xPikvGH8ouGXZdL5EgSOhUgDtdwMKd2Y vouK+1sP5S0KRK/drWIQ//iTtHmC6wpjJQNBAVhh7iXfuHb9i0Ck+fMm9Y5RzGc/L2uo= X-Gm-Gg: AeBDiet2LQEP+iWhRsFCZQ380Lv7njXT2FZ08dHLCbiN7jF1KSKenRsZ4Wv2Ju4U+t0 M3bEtSZqq592fTRcLfaeSeEudMLXxiGktSsgQOJIOG3Ic6/5it+P1Z+YqhRhMcQ28nogpcuX0Yh dLpP3Op9jWiuq9rR1MAapNm3zRJy2w627prgqipHpX//FwzyskLzEvlqvPyYpIBOxZkCN70UAjB 3/loxYbHcFut+XO89W/Jzery/NV3AeRQXGYSQO8X7PjJq2xshkp1Yzr8hUwBqsuLa8xuZHv15Yi q5rrViJJ+2hFkC57qw4vX37l8O1uCnOHHwnktDWngu50Bq9mycx8+3aQUqJBlJZTraNWECtq9GT xg0hj10dkec48l+nJyTD7shPjzu3xxU47SGOpbHBETiICmwmBCCDbY3zO/TQBJN2HDw== X-Received: by 2002:a17:902:d58e:b0:2b2:5c31:24bf with SMTP id d9443c01a7336-2b5f9f1b8d7mr278407675ad.19.1776951117787; Thu, 23 Apr 2026 06:31:57 -0700 (PDT) X-Received: by 2002:a17:902:d58e:b0:2b2:5c31:24bf with SMTP id d9443c01a7336-2b5f9f1b8d7mr278407055ad.19.1776951117167; Thu, 23 Apr 2026 06:31:57 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:31:56 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:42 +0530 Subject: [PATCH v2 13/13] 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: <20260423-glymur-v2-13-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=5015; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=AXNNMUqpUBkT37jqrWXRRraxt0+yVQz0nuc5i48FDy0=; b=58IIjTBkuro7ooQIqHd8rr+cIx2L6Qfg+MBWKSjyofmOnqBfOWoWDP6sWuTHFW4fv3rgaFy25 7AjrheiHUn0AtDglqLzBB1eaCIXV8cS+5nxXGa6iHZFn8/zeMMRA7d1 X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfX7Gfp4k1yqMWq rl9S4406Ce5swsSPsRth0GXskErn+IsL++207pjZ7WV9rP+3txhDemMkTirxeSSQKsXDxO3eFCP 9DjAsePjxQ6wQyanOdgtG49hoSbhth9CwSRSdJ54u7qlVixTJrgVLgsETSxeXuL8LAoK/oCvPha nu0dxpXNJfxCiMhj0Yj1qhBGaKJQ7sxAhRD+OI9548eavdRS2SOKfybGThL39YrBHllS973mW9K c9/EUeXeVJ01iGPXwfeLPYr8cQw7D5AKYeyXt9PjXg1sISQK2wdJklANUcqqo6LMMWkXvLxPouy GCsO6qmWSvubNJ8hQuJvq5QYrqKlyFLDrzZ7d/PXk8jdn4ngbTkAopZxkcMVyLa6K/Savq55ZXt HshEKn8SxDW5kEqc7Qz5RpKjBBr0M+/sLijbkLMYkdF0NVtZmVxFa8TMbaKZ0LrzIvitO6d/xD7 G4u0BIZAW0dqI7ETHBg== X-Proofpoint-ORIG-GUID: rgrzcwA9rjF4DCb2uNqkS4zrlGvfcPPX X-Proofpoint-GUID: rgrzcwA9rjF4DCb2uNqkS4zrlGvfcPPX X-Authority-Analysis: v=2.4 cv=TJt1jVla c=1 sm=1 tr=0 ts=69ea1f4e cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=VYrRtalYO0MCCBblpesA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC: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-04-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 clxscore=1015 malwarescore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 Add iris video codec to glymur SoC, which comes with significantly different powering up sequence than previous platforms, thus different clocks and resets. Signed-off-by: Vishnu Reddy --- arch/arm64/boot/dts/qcom/glymur-crd.dts | 4 ++ arch/arm64/boot/dts/qcom/glymur.dtsi | 118 ++++++++++++++++++++++++++++= ++++ 2 files changed, 122 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/glymur-crd.dts b/arch/arm64/boot/dts/= qcom/glymur-crd.dts index 35aaf09e4e2b..cbc9856956ff 100644 --- a/arch/arm64/boot/dts/qcom/glymur-crd.dts +++ b/arch/arm64/boot/dts/qcom/glymur-crd.dts @@ -255,6 +255,10 @@ &mdss_dp3_phy { status =3D "okay"; }; =20 +&iris { + status =3D "okay"; +}; + &pmh0110_f_e0_gpios { misc_3p3_reg_en: misc-3p3-reg-en-state { pins =3D "gpio6"; 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