From nobody Sat Jun 13 07:49:53 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 A178E3FCB3D for ; Fri, 8 May 2026 19:01: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=1778266865; cv=none; b=taGd4R3ghETtG+TL+8XDEuRyiXTOOT0lAKipkvLNRiyiiFmwszeK+GF3Md229lG2X6OnfFZOPSrPMuM//xycndtTMJF44NFgFUJuVDN1fqgm9hYGwsoamTsFKeQm7R+H4+3LaUtLWYJ3sQ0x/rsiQNWXpfak28MFTbI5LV8CqQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266865; c=relaxed/simple; bh=KiXuVUk8f5ROMtDUgjaTz7+prNR9bmBTgAeAT+6V4KA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LjoajWWakwduRyU2CGsFIPFgOm9ezWjbC841odHcY3p3b9hm+I3MvKwm7aetixAtmLb2wI11MQee8RpPy8mb4TLBljjZmMiUeW0qHA6ojCTsjvjxs3VuhGQ5Cj5H7wPfDFk0nhr4D3/AW8JkYI/sJMr/ltysYhlroZppoGVXndI= 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=H30PgFuI; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WRAx2i6V; 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="H30PgFuI"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WRAx2i6V" 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 648G35sC725031 for ; Fri, 8 May 2026 19:01: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= nSH30GGE8av6HezR9dT6kdpTEbioXtP5Ir1fDXax7/U=; b=H30PgFuIOWFar7PT rgcH6ReOZdJ/nusVsZIu95k087ZykWalSLacMrjPmXk/pu7srtTEFu426vARX/9t HVwJEHDATJmo4wxGOf8pGPIEcrxHcRMNv9HLIApfe7+HFioPLiGug2eyK9CH5DI2 kSLPus2tRm4esB7Uka81cGuHX1VHa3LAEpKev/37/AEiLOf4tW1lzqIbAFHohuo0 sKIV90kmoieQHaDakQu40Vcd88RCeeChYnwhJpxbJoXhpwAhYYYpEpcYX4+OQJn+ Fi1fjCpe6tmgF++ZHzqKa9KoBFKMCDvWbpS8EVf7bBQCIGffz6wgs7MwJ7yZi78O m9PTDA== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1k0ugmh4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:02 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-82f6b984b3aso1269308b3a.3 for ; Fri, 08 May 2026 12:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266862; x=1778871662; 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=nSH30GGE8av6HezR9dT6kdpTEbioXtP5Ir1fDXax7/U=; b=WRAx2i6VnkRIEeMXwE4tFtNH0oX9WaLparKXoBbzifjRGU2Fp3s3uU5bhWTZwX35iw HXpze9Dzkg3gwfrkFoJEbgBVfrcOiZlt3c9cNXzKtmi9lDxriI0zQ2P9HU/rpcvOS2Mv IG1yulgTHLLWnk61NP6SHa9CopWpuxOoU0IDZ8N+gf9AHR0TKTStfSJ9u6tB3kgL4F3g dxCEb3zgCyuBfd5scs9CGX6NCGNcLdQg92KpPK9dLw9g2KYRcjJyOiouhhawuK0NvGsN +/qmbY+SXZFHcJ9owTmss5gb7A81JZ1fwnwP8kwK2o2kpVvFIQFAcs9y8+Uu1MX9rgsK jBjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266862; x=1778871662; 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=nSH30GGE8av6HezR9dT6kdpTEbioXtP5Ir1fDXax7/U=; b=sBwXJAoR5I8aMYPnTJuoT5AGiNXOq3veRXM4KujxSiy5dVOvcsKUdG3xoxZs58OV7g doq/XgZlkQYen2wSq4VHexwANf1v4DFy384jsqJ4XLHb+OIJStGSxciVTPY7BKN/9HQi ntaf3K93mQlM6Zook21Oegralsw7xgXTsDBC/RwQHT39uESrggSIe00Zy1n4OOisSKUP hkSrNICZNjmyWXb92BCpT2kyaY7Tp/zvonMQt/0lOeXK7ul/lq0GZR80Q+/1dfr6RhV/ 5KFfAKQKUZhVuFlnAFnFe8IBRWfWpq51dBmYvH+lh0N5w4FpTqO0iNf29F29l2vUlUdk /bng== X-Gm-Message-State: AOJu0YxjsvZF9ez7lAH7nXwAczp29iij538qG7LpAnA94sxDcIRRUGoV Ivmc32SsgbC57T3+SLVZEL+R9Q+SMM59c/QJvpIsyw0daKOCec1nZau71hUM26YsfkN3MOAWzsu rrt64CSBYbCXte8jKFBcSy27ZFMV57TuxMHFen4YEKfzmIXcUaN/Tnh7QOq2ac2xqhlU= X-Gm-Gg: AeBDietTSCW0f3CjqTBJiVnZNLjfVBAACapJYvR3CHt5oLzwqmJUAnM/hrD+y8UiYEt LQbTjBVll4yI5qgg6pEFhSsctcDEFZcpJlejHe72Rt9/F7buDxylZwN8lzPLlBZdHRJj1bs+iNU 6+oDdKbXV8EuY2yj6tUqV5wV2FRCPllCJjKRylfE9FTytwSUZWo+ylNkEuaTWIP5vYIhsBoKyL3 ZbK01+rBsQC1NpJ8Dvqruqe7/GARAjOR6XjQ9S5drR8pQ7xjXLKeP8CD/xsb5WgrXNcoFTWEqda gDwV4akKfsdTVcAJXrMXly9kR12ZdnJIE5leLkYOHLbwk1voxmyJ6Z48sK3+eUjYLfYnxCE70z2 BWwLw3x9hHV+fJDlXCYGBW7I2b5rrNwLzfxnN8/1f9dm/x0FSh7nfHTo= X-Received: by 2002:a05:6a00:1248:b0:82c:d9d0:f482 with SMTP id d2e1a72fcca58-83a5e34c689mr14024575b3a.46.1778266861488; Fri, 08 May 2026 12:01:01 -0700 (PDT) X-Received: by 2002:a05:6a00:1248:b0:82c:d9d0:f482 with SMTP id d2e1a72fcca58-83a5e34c689mr14024480b3a.46.1778266860675; Fri, 08 May 2026 12:01:00 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:00 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:50 +0530 Subject: [PATCH v5 01/14] media: iris: Add iris vpu bus support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-1-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=5067; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=52EKURZCx0iONFkZ6Gam+KM/I7Qv+TkHOEbMgjnm0ZY=; b=xwNOosr4zZSY/kkC5jN4RuFPftj3txidBOZKTYPPLpEYuELOnegY0moCnT47NsBKdFtrRqbmG duF8LGNX3JWAZZl4vn4aGwr69PnXTk0XzamqgquN1CLNXLrLMafUxSg X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=dIqWXuZb c=1 sm=1 tr=0 ts=69fe32ee cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=ZVWlKI4yLptaSbO15nIA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-ORIG-GUID: dlNZpU_18YkpD5tYkpBJB2o_WQWnyLu9 X-Proofpoint-GUID: dlNZpU_18YkpD5tYkpBJB2o_WQWnyLu9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX0gBBq+UTyKCP 4ZVXCZmFoPPNEsIuXy5FANDhfcnSBKfwuKBeQp91L7fjU7Jo5wDi6bjnTpjuUXA0eHq48ufVyWB mPui2r0kn0HKCSK7gILc3uO0ZOsnWp/4aaOi1tufbWN0VsQgthlegLIQL1SSDyOi9PMP44srXkP QEvzv5ydYpoAeQfNdx+xc8y2KzFVRxCg8KkykOOXvqU21aEZ1nTknPeLMF6W1pmqfcplsFaEyHW jQXOJmaE3LwEbZmC4sW0si8md5QqaeSI9opMiy4cGkK3D4tqfW974mCOwTJ4QCA4QfqedXFzOsT n9+DGNCD8voAC28BFflakFGuvfh4Jg2gYl5yr3zUp/cNOr6dMPRPmOlREIdWl56jHkn63Gfyo4T UZGwMw/QiZBuk7fhtNHatLODXkQzVc2s6cDaw682zI1TgSOJRRQCSKBV/hrIMQx9ULgkOr9ylHb N0A50rSqzunucvOOdxg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 From: Vikash Garodia On glymur platform, firmware loading needs a separate IOMMU mapping with its own stream ID. This stream ID is defined in the device tree with the assosiated firmware function ID in the iommu-map property. To create this mapping, a separate child device is needed so the firmware memory can be isolated in its own IOMMU context. Introduced a new bus called iris-vpu-bus. This creates a dynamic device, and its dma_configure() callback calls of_dma_configure_id() with the function ID provided by the client to map the corresponding stream ID. This sets up a dedicated IOMMU context for the child device. Reviewed-by: Vishnu Reddy Signed-off-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/Kconfig | 4 ++ drivers/media/platform/qcom/iris/Makefile | 1 + drivers/media/platform/qcom/iris/iris_vpu_bus.c | 69 +++++++++++++++++++++= ++++ include/linux/iris_vpu_bus.h | 25 +++++++++ 4 files changed, 99 insertions(+) diff --git a/drivers/media/platform/qcom/iris/Kconfig b/drivers/media/platf= orm/qcom/iris/Kconfig index 5498f48362d1..025280ef1221 100644 --- a/drivers/media/platform/qcom/iris/Kconfig +++ b/drivers/media/platform/qcom/iris/Kconfig @@ -1,3 +1,6 @@ +config QCOM_IRIS_VPU_BUS + bool + config VIDEO_QCOM_IRIS tristate "Qualcomm iris V4L2 decoder driver" depends on VIDEO_DEV @@ -6,6 +9,7 @@ config VIDEO_QCOM_IRIS select QCOM_MDT_LOADER select QCOM_SCM select VIDEOBUF2_DMA_CONTIG + select QCOM_IRIS_VPU_BUS help This is a V4L2 driver for Qualcomm iris video accelerator hardware. It accelerates decoding operations on various diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/plat= form/qcom/iris/Makefile index 2abbd3aeb4af..79bc67980339 100644 --- a/drivers/media/platform/qcom/iris/Makefile +++ b/drivers/media/platform/qcom/iris/Makefile @@ -31,3 +31,4 @@ qcom-iris-objs +=3D iris_platform_gen1.o endif =20 obj-$(CONFIG_VIDEO_QCOM_IRIS) +=3D qcom-iris.o +obj-$(CONFIG_QCOM_IRIS_VPU_BUS) +=3D iris_vpu_bus.o diff --git a/drivers/media/platform/qcom/iris/iris_vpu_bus.c b/drivers/medi= a/platform/qcom/iris/iris_vpu_bus.c new file mode 100644 index 000000000000..15ba4d9c563e --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_vpu_bus.c @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include + +static int iris_vpu_bus_dma_configure(struct device *dev) +{ + const u32 *iommu_fid =3D dev_get_drvdata(dev); + + return of_dma_configure_id(dev, dev->parent->of_node, true, iommu_fid); +} + +const struct bus_type iris_vpu_bus_type =3D { + .name =3D "iris-vpu-bus", + .dma_configure =3D iris_vpu_bus_dma_configure, +}; +EXPORT_SYMBOL_GPL(iris_vpu_bus_type); + +static void release_iris_vpu_bus_device(struct device *dev) +{ + kfree(dev); +} + +struct device *create_iris_vpu_bus_device(struct device *parent_device, co= nst char *name, + u64 dma_mask, const u32 *iommu_fid) +{ + struct device *dev; + int ret; + + dev =3D kzalloc_obj(*dev); + if (!dev) + return ERR_PTR(-ENOMEM); + + dev->release =3D release_iris_vpu_bus_device; + dev->bus =3D &iris_vpu_bus_type; + dev->parent =3D parent_device; + dev->coherent_dma_mask =3D dma_mask; + dev->dma_mask =3D &dev->coherent_dma_mask; + + dev_set_name(dev, "%s", name); + 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_iris_vpu_bus_device); + +static int __init iris_vpu_bus_init(void) +{ + int ret; + + ret =3D bus_register(&iris_vpu_bus_type); + if (ret) { + pr_err("iris-vpu-bus registration failed: %d\n", ret); + return ret; + } + + return 0; +} +postcore_initcall(iris_vpu_bus_init); diff --git a/include/linux/iris_vpu_bus.h b/include/linux/iris_vpu_bus.h new file mode 100644 index 000000000000..7437a2ba411c --- /dev/null +++ b/include/linux/iris_vpu_bus.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef _LINUX_IRIS_VPU_BUS_H +#define _LINUX_IRIS_VPU_BUS_H + +#include + +#ifdef CONFIG_QCOM_IRIS_VPU_BUS +extern const struct bus_type iris_vpu_bus_type; + +struct device *create_iris_vpu_bus_device(struct device *parent_device, co= nst char *name, + u64 dma_mask, const u32 *iommu_fid); +#else +static inline struct device *create_iris_vpu_bus_device(struct device *par= ent_device, + const char *name, u64 dma_mask, + const u32 *iommu_fid) +{ + return ERR_PTR(-ENODEV); +} +#endif + +#endif /* _LINUX_IRIS_VPU_BUS_H */ --=20 2.34.1 From nobody Sat Jun 13 07:49:53 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 2B0F73D902D for ; Fri, 8 May 2026 19:01:09 +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=1778266871; cv=none; b=fhEl9kJPDw8bTM2gvCsJ3mPNUuQ/+omFrGeyBQUGTjeqFwXsQ/vLJGkAghAbqypngGQOf0TsVdXzlNS+GZBQqTfA0NPpHLzsBaV+MgjSGjWKuYvRvQSz221/9nFUDzHgAYykng+3NiBObFWSY3zYFD9eoVLOxUIkTav8Fo+JJPQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266871; c=relaxed/simple; bh=ECsH5Gs45CqpRqX5C/jNn1QZ5iDd0NScn6UK3/KsjCA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d0OAxqadXfe2tMLPxFhlePpSGLXI93dOGSE5Mg8YHMa3L+SrPz7GtvfIeWWXPZjF+cBtf7kYfUQ9SDzaz9FcydI7bXIoenirhMaIlQ9taqJGS4oGfpmWxjiOv96vrlqVXFCXm10IiS6a16UptmGJwpCB7LOl4zRwyPhiFOTKobc= 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=iel1ax2r; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=OAZhpWSI; 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="iel1ax2r"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="OAZhpWSI" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 648G4Grv1093734 for ; Fri, 8 May 2026 19:01:09 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= fVj1LCoNAbiYzDIsSvQ2jgFnqlAo1QVaSmbijliR4Pw=; b=iel1ax2rWwLeO8uZ D6yJn+0z+XjVZA72k9D5bRPJhMSmXyjx8TszMpMcdCpmpefZ0FzZeaA6yZULSurC o1J0PfV1r7xBL5qNUabH7LmldPwb4rGDwOBOIFZ7mbYrE80r+OR8f4OioX2NyPnD eJ6dRM5lLpW9U8HeNOOe4UTKye7tcOoeqA4STQAtNluiEXMwnaE9Ja7VykIQlR/R j7qX5dpXrAZHdRYH82Js+uYqks4Us7YJasAvcZsNvkCkaC3YxdYSDQRIv5r8BKml UR5akM1jgReQtOFpbJD8vdr/jbKuIzpnpU9Ltmbgw40UngID18yUIBEbnpoArlBi iO4yog== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1k1d0mg4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:09 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-c8252a49ffcso2778630a12.1 for ; Fri, 08 May 2026 12:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266869; x=1778871669; 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=fVj1LCoNAbiYzDIsSvQ2jgFnqlAo1QVaSmbijliR4Pw=; b=OAZhpWSInhZKhJoUdF5LckMdDUK5aU0jSjXgq0xlSQDw5vK2qw54LjIGh9OHchfsSP mhRtauH+ReyStG1KK/4o4Zexflaj0meY63ZJG1mRSMulNzYwwawIJYBpN5xiHkJeWXS/ LDCRU3DNWlDKufv77M74ZTC0pXyoM6UdNsdqm5+SgWSf/I+kPtSu1g4NmZTPjditkKaj VA/M63vp2LOFRLofjKPL4KovR9iXogo1n8+e8U3ZOH3U7FyVrFwYNMhJuUllnXp7wPSz bZrXLmS9cF7TnQT7Xyz3PjzmvrmLbeHAzHLOb4JKQyUFsS7u+xgYRyslSjUnP2snQZf4 EE8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266869; x=1778871669; 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=fVj1LCoNAbiYzDIsSvQ2jgFnqlAo1QVaSmbijliR4Pw=; b=U8rykAF379dgrdrdF2gAvPB3iAi3b7H9NiylGRmT5CuSkfSGVABzlC7rvKq9NEjFK0 cBrYovtZSiObrxyiDZC9/JIPmLfv0xr9ZcN63+H5DVS5Hfc4yiXCMEBJzQqQKh9nyvrp xd6Iqk3MAukAt8Z8pUlf0wV5kmEUxdoGyMWSlJ4SA6F43GlEaRYX5QbVPH1teF6WAmAl tLeBjzZ6v6BLswI04nLxweE9B0woGeSHUyI3Y0e25Ew5OKgtr36+XsF3XfXPREEOk2F6 buviDy+3VAZbXo+raHb+t37peVrWiM6SfJ1ZAuPF0F7s7Jfm6ImOO1qZKtLLUuJToKZd KNCA== X-Gm-Message-State: AOJu0YyYiUpbgXmEpTrwIyF2EEVciF2g+ALZR7sS3MH+jj1DMg4C1H7U ehLFZOBQafZ4FaIyQ/I/j4ieE9eMgnTB3MCtmAiLYq/O5KS5qVhhoUfY7F9ObXahn+3kvxqrijL HzXa58ASTbL3fexpTKE2wKk1oTNsa18Ra2qUFn1+0RHlYLNrUqY4cPrKpM0mpIeS5Lxc= X-Gm-Gg: Acq92OFqU6xNK69j55cKfLIPZRYC4LNK4hsMyRJMczCsmwm0Qupi8osonZJO3mKE7ci lQw7HRxhbIzbpeuR+kL9UD1TSbrWK/Cfe07XhI6ByZ3RrtoK733rzT/+vaSn+bFf1q8XTWo6b8F f1+KbsMHkjUGgSJKAY+TNobQORsHFJjvluFktYVcKB6NqbSNZE1p4ag1VuWdsfLajL1SNTO9gDQ oRKSjsUBnZRCLn87OtBxT1rsqqZOZMoipmt4elAPJ3uaU+QwTNBpzU/JSqYbyf+iMkgy3vGehaL NG8s4pPb6gLYTbwcAzKcVQJVTZdThoRXGrksGa6WXmPFJX8jTPTKswKIITGOFFgEo9jXTY2R4/c /cxygrM3fDJCaRakqlOdOGiZlbSiHhCYgeTjlz+IWo7xax3DW4FTq+9c= X-Received: by 2002:a05:6a00:2386:b0:82f:390a:69c7 with SMTP id d2e1a72fcca58-83a5e347c04mr14043028b3a.33.1778266868613; Fri, 08 May 2026 12:01:08 -0700 (PDT) X-Received: by 2002:a05:6a00:2386:b0:82f:390a:69c7 with SMTP id d2e1a72fcca58-83a5e347c04mr14042970b3a.33.1778266868032; Fri, 08 May 2026 12:01:08 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:07 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:51 +0530 Subject: [PATCH v5 02/14] iommu: Add iris-vpu-bus to iommu_buses Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-2-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=1118; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=WbVuGY0YNDSgJ/NUQMQmGYDqgQRedyuwh2xVr1Rt3qk=; b=g4ip/Dem418f0yjnajSGGs74S3S3o+EBtTgU2gWCC0Y8pQtMZowyDugB0vnAvvkDMUhHColtn EHdVoMJlf9gBkirrywja/++JGIhsXzm42t+xad8qNcttOjkBs2PFyVN X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX8oVRQ/aZT/sj eR6oUCnxEtXJ7yH1E8U09Tp1gVl/JckPkPs6IvUJdA7IH6omf6cX1mK+k9A1itZL4yvXTVlG1xS OufbnndhyDf+Utp1DAk4wHFI2i6PU7vbzAASMFNa/HmyZ9X69vFnhwauQnUVF2cQxjLDzJPMZKB 5l45x+2adt5wan2fwsZSUq9I9nmDvAuaczHXZWnfnT+r0s7IBr9/LdDnFompTOQ0N73p/BUSM0p aViPpEoSQceFx+743jN1UWfsBb0tMxiWy5G+tS2Ff8uA8UqztgKzffMXQp7iMT5ZmiwC/4KF3dY YVkogKkmEnJZ2tPSmpd191omLpzyYPciLwg6jbJQOe7x5GqIB7IK7PmXB02ZoMEs6GZ3cJrsOne 9U/cnxYtYdny8TMHz6xG8s+BxNwGNcEanDXxEKFmUAy6aynWh9TPW/d75dRILSgHGc6CqY/WQEF g3pel17om+8kpWJNOvw== X-Authority-Analysis: v=2.4 cv=GLU41ONK c=1 sm=1 tr=0 ts=69fe32f5 cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=ZGoT60Gb6PEvP4nDRaMA:9 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-ORIG-GUID: zgODzWbAiX_IuwvfYElbV6u2v3L7GwUD X-Proofpoint-GUID: zgODzWbAiX_IuwvfYElbV6u2v3L7GwUD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 adultscore=0 malwarescore=0 phishscore=0 clxscore=1015 impostorscore=0 spamscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 From: Vikash Garodia Add iris-vpu-bus to iommu_buses[] to register the bus notifier callbacks for device add and removal events. This ensures that when a device is registered on iris-vpu-bus, the notifier triggers dma_configure(), which sets up the IOMMU context for that device. Reviewed-by: Vishnu Reddy Signed-off-by: Vikash Garodia Signed-off-by: Vishnu Reddy Reviewed-by: Dmitry Baryshkov --- drivers/iommu/iommu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index fccdbaf6dbd5..903a8bd118be 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -179,6 +180,9 @@ static const struct bus_type * const iommu_buses[] =3D { #ifdef CONFIG_CDX_BUS &cdx_bus_type, #endif +#ifdef CONFIG_QCOM_IRIS_VPU_BUS + &iris_vpu_bus_type, +#endif }; =20 /* --=20 2.34.1 From nobody Sat Jun 13 07:49:53 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 D656A3FD146 for ; Fri, 8 May 2026 19:01:17 +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=1778266879; cv=none; b=YklZ6vjEhLGH+Y0fL7YCWb+5jp3uOEc9mcR1DzgUSk1Wq6InEw+uTWtERS8JHD2c3lCaBlsgqbhOeYyZysE+zQvJfMSa9xPmrbpmspaUtZTaOIsZ70IiNGBzhU2YIj5eOTykQvbbCOHHkWjgZQeiNQg1s3L1QVXF67HEjn2zkZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266879; c=relaxed/simple; bh=+CwAWBT56Jm+jcj2Q4UQDmpUtoIH5fpiVgKBMPwi0cA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pZ+tnk5nftD2d4QmHpyDpSnxfU4a7rMvUiUuBhEgH+X+bWIMH5pylMs1vNbPLjnycHjbXJflWYCCt510VSsk7wV+mVf9AncxNnf25ZsLrLXk86dHa/PZ9FpUhN57scaWHVMMTlWYg5Gk5EDZeh3616ifAqhTaKUEGVxY/LzAJGk= 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=AsQqT+jJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PjHj7C/r; 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="AsQqT+jJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PjHj7C/r" 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 648GWRnM2335782 for ; Fri, 8 May 2026 19:01:17 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= p/AT+OqvsZEGAlm5HKdKcAksd7hTIew5HyAoZ5502Tc=; b=AsQqT+jJK7OarVWi ZhySwme7r59hDAWJcia8xqZu71PeYYkKLhiWLwB9iPEMnF/ZFHaRVI4twNgu4SyA amYtJjue/VI/DZ0JvSTX2WZqKrj/i/w3cRT7iO6umaUPa/e0Eg1YAO0d6lhvomlI I+KfGWGTqTSWQCoQuqiDKa47huf/lwtPSGmB8sj2pXb9u6fFjayKAnmj/s/Z9iyJ YNqXLMj0WQgloWGtFGOz/QYnbWhwx2yALtyrpzaDwwK8PyBzbZz24FZjE/6D1q8l UuknzV7/IRXcLNTdAMxtf8suuC1wqhwkiTPYLWP3mjZGTHqgw8eJJsWuGdOluEn/ 5YliUg== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1keh8gj6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:16 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-82f85179263so2374738b3a.3 for ; Fri, 08 May 2026 12:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266876; x=1778871676; 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=p/AT+OqvsZEGAlm5HKdKcAksd7hTIew5HyAoZ5502Tc=; b=PjHj7C/r7j8uBfGdhvkR+ZcT7lNrQULOPcqZ1SMVGoBbH3xqnVpRv6m5VuQwzfYayb 8NK5M5vsDAtSw9Y1ezxjjy9/YGR+zTlD6r1KJYUcll5TSKs9o/T9mnIX6ZGZBLJfm6O/ +oxTZL0LcJozNgc6JPl27krVbJau18N1vauTRcb+tTLWnoRj3z1oFBn+c6Rsc5sZtagh s81lFSI+SXwa1NOrsffwPN5J+6UlNkYMTxza8e0Zdbue37oXIFd/rpK7QRtOOuUtM5LE gOSLfhxoE7HxOZepNPL2v9kwpxNxcmt7Hh5BOJavs8jYA6aoCcH8TNL4cZ44EeyQgKrV zFtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266876; x=1778871676; 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=p/AT+OqvsZEGAlm5HKdKcAksd7hTIew5HyAoZ5502Tc=; b=s9giArOp+I69hWgKWAVqHx2BBwrMQRbzmpzXIhGDILJbjXVs2pEMzxdHdl8cCHuhlv liyTKmGwL7Eee8AyNDfG307mC2X3Doe4O4WmJC86tgGSk5SkTOyED80PEN29qzj0qXvG saXI7asXQ9fjl1w8OzZLgw+J3CuPKlyeTZ62dDkTSEi3vCsfgB7FYPHQGI6KfBVDyXyB pRgLclA1Wxx+BW4wVKqbgQ6tagjbs6zYLvfk15KcKndWW0ewlb58iuGgRhBtLcHDYbbO 8nAQJ4msCqI780b24aQYxDc4X1ByYfk7zh90DI5P2RGiYOqe9QYKVcrAVfMul1JogpW8 g+Rg== X-Gm-Message-State: AOJu0YyJppEYOtTibgDcXoUqvlShgTiJWpNX7T8lwEcRAxLRW8rK6i2p XU2sxzJwGKWP3Sp1AJH/9Z/B41ChvEle1JZHmLXVprMH07kedbP0wmlubEdASdTg5MDQ2Xg2/j7 quPVhM8Nvwl7kCnJMP8c6x2Bs5v+jbqnJlKTXFUkkeaKF3mOv7qjL/lGMAVfdWfwqtB8= X-Gm-Gg: AeBDievDmmMbFv6QzPEXL2+XocSQEOWHEpN/25mQkHazVVVp+FM04KwzQ6Hi8blcaMU 2DsnpyBlIJTbI3sjmXG1t0Q4M/xn6vKGaybSa5fskzc5feNfRIG0HU71i5fnLx5f5AWVc+CreYT wGp3qYEi7E9A8Eu/RoV/yPdtNlgWpIkCQqaA672Q3E2hNvNNamNbluP6CzojSDu2tvYeiLICAKz BN5LAw/Hok3FsknRVyEowZocajuXij8QtX7uTC8MuZohJ/BPNyxc4rzAdSom8w5hBdGNIk+fA/I xFrJN2k13Pv3vs0L0eucdlP1R4M1P0m+Et/DXDUtXqy77kfDRAWVLtuYPICavblsBsSSM/1/CxK 8FJjOhgVNpwYvacluiuI87PvLl1yq/WjFwHx51iRYZrY+e4BKJzQOb0c= X-Received: by 2002:a05:6a00:2411:b0:82c:e0d7:2682 with SMTP id d2e1a72fcca58-83a5df487e9mr13628372b3a.25.1778266876143; Fri, 08 May 2026 12:01:16 -0700 (PDT) X-Received: by 2002:a05:6a00:2411:b0:82c:e0d7:2682 with SMTP id d2e1a72fcca58-83a5df487e9mr13628308b3a.25.1778266875588; Fri, 08 May 2026 12:01:15 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:15 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:52 +0530 Subject: [PATCH v5 03/14] media: iris: Fix VM count passed to firmware Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-3-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=1360; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=+CwAWBT56Jm+jcj2Q4UQDmpUtoIH5fpiVgKBMPwi0cA=; b=kW/HQT/jSDBpkCUfRBqp0A5Yj4nOp80+ZwEGYSAUFspkAjZt561MKLpQwFXZzmu/dKkzVWx+9 B7Tjefd1OYNBH8QV/X9SfxHeKATLIdHunm8LdBeO6zpdPfvRF4/MdRn X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=CJIamxrD c=1 sm=1 tr=0 ts=69fe32fc cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=nrYi3PkkErC94SPB-twA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-GUID: NRlAhSqn35J-9CRjJLMMaZLZ40JL-isf X-Proofpoint-ORIG-GUID: NRlAhSqn35J-9CRjJLMMaZLZ40JL-isf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX8CEgUwBCMlQe VeIUJEqIq+xeZ88DBXVtIHHf+imMksYUC8pqDJZMlLJ69O8KVmk47PQbJ6OkW7TF6tgVu1HTP1i POEwB/hBcwA8lwOT/PY1k2joGOaYbOAMx6GTC0bZPIQKRHM8o+R9ypina9aRUFy3BuPttucE1rT MIJHZIdBHPnYkG/+sbqMog6xErBIxoRDWG8FmlajdK1/AwV88Eg90m4Blf+PtynqvT+IdPGpGm8 32OsWofU8sPkzYppOnuk8UVTv+cJefYIKmeFAfzhCpXoFuxwMrMSzovymUNIJeSQsXQulm1uwFm SToz9bs8QEkqgfJYw+psPUcs80+kjmopjBRU3ITsPJ3PPqZjFCNcNmE+ktBIFTlzdkMXCuzFwIP oA/6WN0kxO5+YbvyGiyNbODh4NaKzzUJOdFUVapYL4IQjYUkjPrFIcJXxo/Q1X6aSX3uHapE7hw SVCIA2Q5OMI729Uv5EA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 spamscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 On Glymur, firmware interprets the value written to CPU_CS_SCIACMDARG3 as the number of virtual machines (VMs) and internally adds 1 to it. Writing 1 causes firmware to treat it as 2 VMs. Since only one VM is required, remove this write to leave the register at its reset value of 0. This does not affect other platforms as only Glymur firmware uses this register, earlier platform firmwares ignore it. Fixes: abf5bac63f68 ("media: iris: implement the boot sequence of the firmw= are") Cc: stable@vger.kernel.org Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_vpu_common.c | 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 69e6126dc4d9..f1f9e04b7c31 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 Sat Jun 13 07:49:53 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 C94EE410D14 for ; Fri, 8 May 2026 19:01:25 +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=1778266887; cv=none; b=m8Byxyj1KzZfQI6W/El7FThR/keww3Hx8y7YYF+KnkFMIJSXFq82cG054g4C1ai1WjrEOtQ/LUjpf9TVA+6nU0+hu3bdIZbeTXlSFXLpVZP0t1s3jC4coUe5i2yVXy5TC+PHPWnMp1LTaqTVYayohJyAfF+LdlM0+yQg2KnORBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266887; c=relaxed/simple; bh=0dWJdTDAwn0TkLi9oQbbPaM4nI+PhW9C76C69+j4eJE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uWbGcB+BwFF73So3WN680mby7lv16U4CESocodjMmrcRl1SjT869bFgmcxIwL2iIQEECa51l/uBW/YOQJdPaGWVxEy491NtpAmk9hFtcUmJK88JI8cRkw0iyWyF9o7GUJSWIDThhCc37naMtWxSkZsyoUi2WA3W5Axv6PXRmcnM= 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=hYXzWdtw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KiBOGcOD; 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="hYXzWdtw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KiBOGcOD" 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 648G3Pel725477 for ; Fri, 8 May 2026 19:01: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= Za4FY71bjLDkMnLupG5mzx1Qmfy9AGS6QDY9irb9sDY=; b=hYXzWdtw1pLIDNgI bQneaH821UuAVth2yqQHREe2JJNj4VRjSI9uqTzlMCflolwz3JxKVCg0s0gVbeHY 18/Xmi2tT9UqD0Fz2Hsbfe98NDVFdt10h428ysXHYdLt4wUGY2ZoTM3SJ+tIoFvA ycG7YkamZ3dKDIE63sT372+BWiW3yND4O/gotYH6OmeQ5BtWx1W4M+AYf2Urz6iX 2F8mjognmrxHolgMJ8AZhCVGGKWiCVsXIpFtjDoAEH21PNxihfuN3E+kdSCggdTU mfVvXZYEVGmXkIp/kr3gaMOYRXXEecQQPOY8vm7hc1MJuz876pz7vNnv8aufvpdN n/sHnA== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1k0ugmk8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:24 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-835444b6ce1so1755570b3a.1 for ; Fri, 08 May 2026 12:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266884; x=1778871684; 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=Za4FY71bjLDkMnLupG5mzx1Qmfy9AGS6QDY9irb9sDY=; b=KiBOGcODM/bQOTDVFrLmYehYc3J1PVw6fbBsG/AYfLvYXyTjinx+vDl32kCYVFs5mi /OfI+1Ys5vvYwtJ+JPz6VllF4XMpzONMSx3WvEhTcW4sHhR+vYtsNHP5HOAywAHLKN7y QbH6zdkKMXFfmsre5ggAlpXDVJSJg0iSz3IwAu8QAezFab4s9SGdBWnCPn7O4yyDeunA U2L9C+DwAdex6UysUObeskCXwVSdXf9OmIFK2q7x00epE1BwHmTo4UPrIZqRCSFyr1a8 h44AK9Y/FtO240O0g0sMmye91/zrXrjTT+1RjPlBj+JcTDTTS3EzgcSAHqV9v501nkv3 EwaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266884; x=1778871684; 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=Za4FY71bjLDkMnLupG5mzx1Qmfy9AGS6QDY9irb9sDY=; b=pJQbk7ScF2gSr8xrz7Tw/qbuVjt5EfJPoYLc6LU94BgzuSRzHX1RMqLnDyt5lLxwI9 MPrc2wEcECIxgobcW3SV7QPd30G8BkwrKWvDMJg38ZH8e7QTHGJhqSHFNLUGLN67Mtma EnNprjL/nR26bdhISrccrohZqrj2hRRq4XNoHLNIZBDm6tOwbkM2beJdDbeND9tjFPkH 3NcI+mlb3xfsMvWmFv9CoD2+7NYGsx/4SM2eSxaTLxFRC4aBJeaeLGUWQhLsbi/87orS iT7z+Vm4FtdGS+G3KY34zgHGUHzla+Goinhb00CwI3Zw78EnT7uUlzqrYjHDfOjdXZsb 2LZg== X-Gm-Message-State: AOJu0Yx+k72VlE9Ri9cMwOeYjibV1g9xb4VhhbPaWO8dVXnIFkQovbG0 S7UhMeVEDRyMZ987KAvDJK1mfbYOgaE+vrrshkMGVveFoBd4h8KNnFcRjCNxM/KdeLFYdWeIJh1 7bh7bQJYDBU4mFSEr4Qa2wh40qecdaVtQj3H4D1hE1aiXtkmBo9FYI0FPWLndwZfptowV5qGxgE k= X-Gm-Gg: Acq92OH0CWL8xgJR6i8u9r3Y/5VqGq1ONh5DB0taA7pzFRwBOFaoT0aqK2g9fEmSz9h v5tRL60ZzLg2KhmCVcxALPZz1nO6M2JMQ/x2lUOg8j3kqsF7Db7MVJAYysP+xmOiHQI7yukQX08 MWRJjEeQ7nFzXrNd8HyEZFelNVTebg/89PqwY/Yz4h/hdTNMIyOjcPaFY4lVEp7Z5oT0mH0DZc3 wdzwLwBC4qUcGwoEANSKHuOlQsBOaCwxyGw0vFBOQ9CPYUi/BaPcIjhOzqBLbrRJ2tWauIKYPhg m/GtS4+ayAYOwzzC5j8c14AHk4Q0euEqw3VdjL4VFhN+fqJlMlLdGKE+gcznjmutpIeX+LduUQV 7vQPdPMfijPdqeCuMSyREoCoeXX8+VmvW4WuZs35NbYzJNzQklqZcyW0= X-Received: by 2002:a05:6a00:12d2:b0:82c:d7c4:4c57 with SMTP id d2e1a72fcca58-83a5badef24mr13109488b3a.19.1778266883513; Fri, 08 May 2026 12:01:23 -0700 (PDT) X-Received: by 2002:a05:6a00:12d2:b0:82c:d7c4:4c57 with SMTP id d2e1a72fcca58-83a5badef24mr13109425b3a.19.1778266882880; Fri, 08 May 2026 12:01:22 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:22 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:53 +0530 Subject: [PATCH v5 04/14] dt-bindings: media: qcom,venus: Remove clock, power-domain, and iommus from common schema 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: <20260509-glymur-v5-4-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=7695; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=0dWJdTDAwn0TkLi9oQbbPaM4nI+PhW9C76C69+j4eJE=; b=/KHg6Fbbyp7bMxmwvQxCz0VYHfgfzQIE0Gbe+gRd72nMi4t1mZGyk/6fiUKwFB2BFzcEI1AQE k8lpBJaG1E2Cqc/ETPS7EMuueKsNCNqKuYCTExfokLgTurZiylNk4IR X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=dIqWXuZb c=1 sm=1 tr=0 ts=69fe3304 cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=w3dAq1wZhxS8m1Mzo3IA:9 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv:22 X-Proofpoint-ORIG-GUID: k-TnHmp9KtwZyGsrhOBXPHnEtJjvHyhd X-Proofpoint-GUID: k-TnHmp9KtwZyGsrhOBXPHnEtJjvHyhd X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfXytb2jMXAew9f QlBqJ1gJQShy3Qvr65zCYZ0pDyzn6Uyy4dLDesr4YWtQPLQxDejzEMqqIKQT2cO7L1DdOJo3OIk 77nHT8DrRSCatdpuIrpAifpfSs2oiaSk/N18N+NaLfAAvprRSo3mjHlRj2Zz3LgaAfw4Qpqr4S1 yMsV1MoO9L327A6eJIS9eiVhavZJUiD/FotXvkgVmww99uYQIfsgwCm4zyYgpuV7SKOZvWAwXOf HfBkTaIlljQUdpDcGZcLvQvPV0R4Pdy1v1TwglTcRtYRdkMdVtqE+OXKveQr7/plPJYsiWtXH48 JAqxDajDm+DxoXZc1YUO3BPqGevtBJK0okQ5vxsPEHMO1NhQpSVF+O1Bs5XsYezF7v8LSS8ufeQ z4O7wHfc8QxgEgti6mbLZG3L5CcDjQ6IHl1CBFDDIGENn8y/mGxK1/qvi54F9t/zpjqBBemkCd7 d8pOg/ON3I4znRd2mhw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 The common schema defines minItems and maxItems for clocks, power-domains, and iommus. This suggests that the number of these resources can vary, while in reality they are fixed constraints per platform. Remove these constraints from the common schema. Each platform specific schema already defines its own exact fixed constraints for these properties. Additionally, remove these from the required list and update all schemas that reference this common schema. Signed-off-by: Vishnu Reddy --- .../bindings/media/qcom,msm8916-venus.yaml | 3 +++ .../bindings/media/qcom,msm8996-venus.yaml | 3 +++ .../bindings/media/qcom,qcm2290-venus.yaml | 3 +++ .../bindings/media/qcom,sc7180-venus.yaml | 3 +++ .../bindings/media/qcom,sc7280-venus.yaml | 3 +++ .../bindings/media/qcom,sdm660-venus.yaml | 3 +++ .../bindings/media/qcom,sdm845-venus-v2.yaml | 3 +++ .../bindings/media/qcom,sdm845-venus.yaml | 3 +++ .../bindings/media/qcom,sm8250-venus.yaml | 3 +++ .../bindings/media/qcom,sm8750-iris.yaml | 3 +++ .../bindings/media/qcom,venus-common.yaml | 23 ------------------= ---- 11 files changed, 30 insertions(+), 23 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yam= l b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml index da140c2e3d3f..b1046a112e17 100644 --- a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml @@ -62,8 +62,11 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible - iommus + - power-domains =20 unevaluatedProperties: false =20 diff --git a/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yam= l b/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml index 56c16458e3bb..3664d5447ccb 100644 --- a/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml @@ -97,8 +97,11 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible - iommus + - power-domains - video-decoder - video-encoder =20 diff --git a/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yam= l b/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml index 7e6dc410c2d2..9c90e16679df 100644 --- a/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml @@ -57,7 +57,10 @@ properties: type: object =20 required: + - clocks + - clock-names - compatible + - power-domains - power-domain-names - iommus =20 diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml index bfd8b1ad4731..1017e522b4b7 100644 --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml @@ -92,7 +92,10 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible + - power-domains - power-domain-names - iommus =20 diff --git a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml index 413c5b4ee650..120c9300789d 100644 --- a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml @@ -85,7 +85,10 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible + - power-domains - power-domain-names - iommus =20 diff --git a/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml index a51835b22045..c4103a0452a9 100644 --- a/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sdm660-venus.yaml @@ -96,8 +96,11 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible - iommus + - power-domains - video-decoder - video-encoder =20 diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.y= aml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml index c839cb1ebc09..5943a0411fc7 100644 --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml @@ -87,7 +87,10 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible + - power-domains - power-domain-names - iommus =20 diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sdm845-venus.yaml index eabc0957b241..a5b45f95ad2e 100644 --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus.yaml @@ -88,8 +88,11 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible - iommus + - power-domains - video-core0 - video-core1 =20 diff --git a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml index da54493220c9..1fd46ee8a9c5 100644 --- a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml @@ -90,11 +90,14 @@ properties: additionalProperties: false =20 required: + - clocks + - clock-names - compatible - power-domain-names - interconnects - interconnect-names - iommus + - power-domains - resets - reset-names =20 diff --git a/Documentation/devicetree/bindings/media/qcom,sm8750-iris.yaml = b/Documentation/devicetree/bindings/media/qcom,sm8750-iris.yaml index c42d3470bdac..46aa5743d672 100644 --- a/Documentation/devicetree/bindings/media/qcom,sm8750-iris.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sm8750-iris.yaml @@ -68,11 +68,14 @@ properties: - const: vcodec0_core =20 required: + - clocks + - clock-names - compatible - dma-coherent - interconnects - interconnect-names - iommus + - power-domains - power-domain-names - resets - reset-names diff --git a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml= b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml index 3153d91f9d18..060be67574c7 100644 --- a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml +++ b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml @@ -18,35 +18,15 @@ properties: reg: maxItems: 1 =20 - clocks: - minItems: 3 - maxItems: 7 - - clock-names: - minItems: 3 - maxItems: 7 - firmware-name: maxItems: 1 =20 interrupts: maxItems: 1 =20 - iommus: - minItems: 1 - maxItems: 20 - memory-region: maxItems: 1 =20 - power-domains: - minItems: 1 - maxItems: 4 - - power-domain-names: - minItems: 1 - maxItems: 4 - video-firmware: type: object additionalProperties: false @@ -64,10 +44,7 @@ properties: =20 required: - reg - - clocks - - clock-names - interrupts - memory-region - - power-domains =20 additionalProperties: true --=20 2.34.1 From nobody Sat Jun 13 07:49:53 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 C054541324B for ; Fri, 8 May 2026 19:01:32 +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=1778266894; cv=none; b=isnnjejYiNaK40Kq7lu6vBSlKN16uzNg/WxbYIisAYsOQ5IlwJSQnNCdOs3+Ephxyk7OPRxu/j3p06XK16WZ/Z/6bUnBa8Rf71hIsFc9oOxydmfwuPcPff6PlIIW37oYz95l+yhZ9PvEe9tLAreqIKLKZAEZUL5z38giI+b0s+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266894; c=relaxed/simple; bh=EeIAZMRmgVmSK/Y4l2hVRqTqYGOuHpZ+loERcUpLJ1g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WMzia+OhgBXBvg+9m3hwgdgGYdMpOHhnn8thm/W0+CbycUKkwcs08Kn0m5vckbH0bbbL/Z5zjAzzFCLtEVirjENJsrybYxKoolsm8PMPEJnUCoqG8UCX1oDfS9ErataX12s4HzB6ndtRjpHoBRjq+UT1Zrko5mvr+lGGkW42mr8= 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=o1MfV9po; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZKxrp5ez; 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="o1MfV9po"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZKxrp5ez" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 648G4J8l1094018 for ; Fri, 8 May 2026 19:01:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= B2KaNJ7wQbTV8z+VB/6ohB5R61JdVKBpxz4P1XelljE=; b=o1MfV9po/5AzGvQY XRXWnINt7kvqpcJcJLIhSS2Mx9pzpvPNTFBz/b+bwohPPql8a6xS0mR1ihkAoCwN 2wtQRkwaeZ9ALJJ9HGERVsu04aUf20TQ4Ll+gv1E3JIwHY0HfYAWRkrhgleRbg/I OnGwqVHBLTEqBVBKycZI/oUZ4AWK7h2qb6QWFwj8nmgHWVbMnGTrieQKQRKTklhW LZgq1PdSB8i9DIX2ozRwSFNEPIBhh0CrvD2zia2Rk1ilP26DsK6/utwWb9VpOPcz MD5qwshwJdw1hFB5joCDz7PkFMqbamm78RrxcZf6Ih86ZRikiLZg142LsrdlnNjr AWoBfg== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1k1d0mjt-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:32 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-82fd55bf6cdso1647645b3a.3 for ; Fri, 08 May 2026 12:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266891; x=1778871691; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=B2KaNJ7wQbTV8z+VB/6ohB5R61JdVKBpxz4P1XelljE=; b=ZKxrp5ezeeTAhgSneler++XXKbNRo7BxjdClttF4BR/NVNjQ4QzxT7yMadjQbHWQtF OS9D646LkaUH5tRSu8L7FmaR700q0nrklpoBrHkG0eA/JJA7a+5Aa0OLBXCfP9sxBkRC aTkMk1LvXThgzezUh/Fejfca+dNuWqzrzDZZKA87PHS3LsDGkQZG3Ctgk5FmRciKGS1+ tZRXIEikyvaHF1EYgUubbDS5kpktpxD8lM36du2kg2PmkA64rDrEuYRjaFV+IIiYMiH+ 0atZEpK5DGhF4PjVY4HG+MaaQg6o6nZ5Pcu/chmAzhy+C6J3vnCxc5GauhWNiKk9OGt6 ZOag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266891; x=1778871691; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=B2KaNJ7wQbTV8z+VB/6ohB5R61JdVKBpxz4P1XelljE=; b=CauMzudiWeNESV9bbotE2vsal6Wcgee+qwd/GAn5s07vo5MIGbNGjTnuFAMzcnx43d nLCbAKjv4XznBJ+9XIYmaqhaKPRj/bTKoFxxAyEPko2sHd6lpTsM7NzuTTIkcVpu77p+ WuFWhXavkZYcPKl8f3R301zonNzcSi+DEM31g65TbD5DiKg0TYRczLz1lHr+hhj7EoeV Att7vTR4EkzBrQtCLAefmgPf0Tu6UiwHhuYxg8I6S+ktrVuKV9XzARcbXR+lV1TDgvZR 2SGzNaY8+6qTTpZZtacUL129g0auNlxTk7rbtOilhz09wg5Yi5Qv/GdCTMZvwCsUNsyv qRGw== X-Gm-Message-State: AOJu0Yzw1qcFerFeTH8M6tEiJJ8ImvJoYh9GyWNUCEzTeo0yXGKU39rH 0WhyIxPCsxr+PK/uAbISeA/x659kZkNNSWpP1CyIsKRC4yXTIlrfu8czlEJnG0RhWZfDG66HrWJ 8nF9uSOb3hgOjDO6ZnDICQurLCHEqAksTgId7jqCggy8e/HfOtGASRzYHiTi1IEg9HYE= X-Gm-Gg: Acq92OEiZ+HA4LoFzH/DyxCzS19A3VUUk6PckH0MV9FKE8y12bTzOZpHUbv1AivZS3B 82vuM3xyZORtSOCwxrsXoNWX/74qsC9Ih9sGE4FBqbPx42r7l6QYW47B789SD2dQJV0HsUCSAFi 0VttozZnNNiG36LU+20u3BTYlnzZSEUce30xZHlvid0ATQaZzMiDBeus55l4IicQCZ0fcgPkaFi TfEUtuN5QMt4qOriJRmZ+xMB59GrSCnbfeU7odjz8SdfSk+ZOV6tzKUuNOo7ulEkuNVOD04E02I OIKczGXczeBaveBuOyjbExA6MR+DqQC5JhwM9G9MYaPw5euQuTDEF/XnhB9E3oV7Y2QvjP73P57 tgMXNYvAXZz1ApwPJZbuZbgxmuHifQ9y3S4M6fKRr6q47B+4UPbKhcZI= X-Received: by 2002:a05:6a00:c95:b0:82f:74dc:5f48 with SMTP id d2e1a72fcca58-83a5b2d34ffmr13292292b3a.2.1778266891152; Fri, 08 May 2026 12:01:31 -0700 (PDT) X-Received: by 2002:a05:6a00:c95:b0:82f:74dc:5f48 with SMTP id d2e1a72fcca58-83a5b2d34ffmr13292226b3a.2.1778266890551; Fri, 08 May 2026 12:01:30 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:30 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:54 +0530 Subject: [PATCH v5 05/14] dt-bindings: media: qcom,glymur-iris: Add glymur video codec Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-5-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=7497; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=EeIAZMRmgVmSK/Y4l2hVRqTqYGOuHpZ+loERcUpLJ1g=; b=0Li8hjN7gXO/t9mp5SMARAExK1BNGbI/HrJEE88yo4eydEDe6qKlPbQEz2JaLJXTMT7zvjgbB Nz+L6IlbMXaB8F/et9ZAfkga+riQMV0cwbQnn9bXTYxtmUfnIsxph8t X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX4zlwpJrdiwNM DrqgzzztjM/jhqhvUIncSLlw1/IbOAWfkRFKr0o440QkIG+phZNloiuehHFJ7NU+UxH+QJb+du7 BLxrM3RVGixRX7ang2X5vc6zyXQplpjIm5j+mesXHdIo7vj/XDWZJlnU2RgXxESbmdwh77Emnn8 CIaGtm20xZrXRh8BxgTUVfFRri4nDvTjl8KyrnvFH6xTBs9Z5GjRs8a5pwaDZy5Xrg97p7MXp9z Zph0PCND/CnCZFlvroG3TncPpUGiKkeg6mRlP4yJJwJZfmTqy5VdLiSvNAK31mkZyCEj5vpnSA9 7bJK5o2XLaMetLM4NVJMayAK5dGra29eBhiADTW76DwRcGHb1GUbIGr2ucJY46q7VCdmKvbdK/j u9VO1Z3B6/x9W5KWTAsxJfR0L75QAqKx4yQMYSOh4c/JqVl04xqNOomkA3Dq+uiZ4OkS+DlGnp+ W/NST3bHodr2E26UtiA== X-Authority-Analysis: v=2.4 cv=GLU41ONK c=1 sm=1 tr=0 ts=69fe330c cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=1OCxxfDL7RIz13hN0lYA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-ORIG-GUID: 1XzGUgqsB0eHQBNpiYsAEbzurFsFg4xQ X-Proofpoint-GUID: 1XzGUgqsB0eHQBNpiYsAEbzurFsFg4xQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 adultscore=0 malwarescore=0 phishscore=0 clxscore=1015 impostorscore=0 spamscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 Add device tree binding for the Qualcomm Glymur Iris video codec. Glymur is a new generation of video IP that introduces a dual-core architecture. The second core brings its own power domain, clocks, and reset lines, requiring additional power domains and clocks in the power sequence. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vishnu Reddy --- .../bindings/media/qcom,glymur-iris.yaml | 208 +++++++++++++++++= ++++ include/dt-bindings/media/qcom,glymur-iris.h | 11 ++ 2 files changed, 219 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml = b/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml new file mode 100644 index 000000000000..7b0bb001de85 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml @@ -0,0 +1,208 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,glymur-iris.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Glymur SoC Iris video encoder and decoder + +maintainers: + - Vishnu Reddy + +description: + The Iris video processing unit on Qualcomm Glymur SoC is a video encode = and + decode accelerator. + +properties: + compatible: + const: qcom,glymur-iris + + clocks: + maxItems: 9 + + clock-names: + items: + - const: iface + - const: core + - const: vcodec0_core + - const: iface1 + - const: core_freerun + - const: vcodec0_core_freerun + - const: iface2 + - const: vcodec1_core + - const: vcodec1_core_freerun + + dma-coherent: true + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: cpu-cfg + - const: video-mem + + iommus: + maxItems: 4 + + iommu-map: + maxItems: 1 + + operating-points-v2: true + opp-table: + type: object + + power-domains: + maxItems: 5 + + power-domain-names: + items: + - const: venus + - const: vcodec0 + - const: mxc + - const: mmcx + - const: vcodec1 + + resets: + maxItems: 6 + + reset-names: + items: + - const: bus0 + - const: bus1 + - const: core + - const: vcodec0_core + - const: bus2 + - const: vcodec1_core + +required: + - clocks + - clock-names + - compatible + - dma-coherent + - interconnects + - interconnect-names + - iommus + - power-domains + - power-domain-names + - resets + - reset-names + +allOf: + - $ref: qcom,venus-common.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + video-codec@aa00000 { + compatible =3D "qcom,glymur-iris"; + reg =3D <0x0aa00000 0xf0000>; + + clocks =3D <&gcc_video_axi0_clk>, + <&videocc_mvs0c_clk>, + <&videocc_mvs0_clk>, + <&gcc_video_axi0c_clk>, + <&videocc_mvs0c_freerun_clk>, + <&videocc_mvs0_freerun_clk>, + <&gcc_video_axi1_clk>, + <&videocc_mvs1_clk>, + <&videocc_mvs1_freerun_clk>; + clock-names =3D "iface", + "core", + "vcodec0_core", + "iface1", + "core_freerun", + "vcodec0_core_freerun", + "iface2", + "vcodec1_core", + "vcodec1_core_freerun"; + + dma-coherent; + + interconnects =3D <&hsc_noc_master_appss_proc &config_noc_slave_ve= nus_cfg>, + <&mmss_noc_master_video &mc_virt_slave_ebi1>; + interconnect-names =3D "cpu-cfg", + "video-mem"; + + interrupts =3D ; + + iommus =3D <&apps_smmu 0x1940 0x0>, + <&apps_smmu 0x1943 0x0>, + <&apps_smmu 0x1944 0x0>, + <&apps_smmu 0x19e0 0x0>; + + iommu-map =3D ; + + memory-region =3D <&video_mem>; + + operating-points-v2 =3D <&iris_opp_table>; + + power-domains =3D <&videocc_mvs0c_gdsc>, + <&videocc_mvs0_gdsc>, + <&rpmhpd RPMHPD_MXC>, + <&rpmhpd RPMHPD_MMCX>, + <&videocc_mvs1_gdsc>; + power-domain-names =3D "venus", + "vcodec0", + "mxc", + "mmcx", + "vcodec1"; + + resets =3D <&gcc_video_axi0_clk_ares>, + <&gcc_video_axi0c_clk_ares>, + <&videocc_mvs0c_freerun_clk_ares>, + <&videocc_mvs0_freerun_clk_ares>, + <&gcc_video_axi1_clk_ares>, + <&videocc_mvs1_freerun_clk_ares>; + reset-names =3D "bus0", + "bus1", + "core", + "vcodec0_core", + "bus2", + "vcodec1_core"; + + iris_opp_table: opp-table { + compatible =3D "operating-points-v2"; + + opp-240000000 { + opp-hz =3D /bits/ 64 <240000000 240000000 360000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_low_svs>; + }; + + opp-338000000 { + opp-hz =3D /bits/ 64 <338000000 338000000 507000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_svs>; + }; + + opp-366000000 { + opp-hz =3D /bits/ 64 <366000000 366000000 549000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_svs_l1>; + }; + + opp-444000000 { + opp-hz =3D /bits/ 64 <444000000 444000000 666000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_nom>; + }; + + opp-533333334 { + opp-hz =3D /bits/ 64 <533333334 533333334 800000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_turbo>; + }; + + opp-655000000 { + opp-hz =3D /bits/ 64 <655000000 655000000 982000000>; + required-opps =3D <&rpmhpd_opp_nom>, + <&rpmhpd_opp_turbo_l1>; + }; + }; + }; diff --git a/include/dt-bindings/media/qcom,glymur-iris.h b/include/dt-bind= ings/media/qcom,glymur-iris.h new file mode 100644 index 000000000000..dcaa2bc21db5 --- /dev/null +++ b/include/dt-bindings/media/qcom,glymur-iris.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef _DT_BINDINGS_MEDIA_QCOM_GLYMUR_IRIS_H_ +#define _DT_BINDINGS_MEDIA_QCOM_GLYMUR_IRIS_H_ + +#define IOMMU_FID_IRIS_FIRMWARE 0 + +#endif --=20 2.34.1 From nobody Sat Jun 13 07:49:53 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 92C5B41322C for ; Fri, 8 May 2026 19:01:41 +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=1778266903; cv=none; b=T27iak9lfbTcpwnxHhFR4Ojvgc2ISSYikfN+FXbzVF2gBwbV7j/U36iDrnKEERagHW3+vPdeFxD5qNSsS9HB739RkFoessnTPP1ZP0kwJ7qtdksdgFVnNZ87tjgw1+yHNtzeSQ+kY4kEw2wrFlNkg73TUqsgS9N7U1AbA645Nx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266903; c=relaxed/simple; bh=2FrychMIG3LHR9amZA9Bhyd149/t+cV8/TYXT9nsgoY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DyPDlhql++RvmU17C06SEVy0tsMXM1Z7gOriiyEaq3PNvo/IQdZt+fMou1VzBraSxt54TBZoV68TqPyiayunL5F7W0G4xYlIJNJwLhFghf+f+k1Md6yGlwYNd9MZjjY6IO7FHmftmuKjxjyrMt/OpV20mwcA3FxTfm7d6GzJXUk= 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=J+CjV61q; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CXgdiFHh; 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="J+CjV61q"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CXgdiFHh" 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 648ClUWQ257892 for ; Fri, 8 May 2026 19:01:40 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= dn3CzzlpHtBN1CICIkLhbSzmIcgQM8PPO9ueTKjRmq4=; b=J+CjV61qhcCvq2DY nZd2eo9lQeK/2x/HQzhpBteFjbsmnCSj6r/z2ddHQXrCKtSg2CQ25bsH8ZskXc+2 SLPCNB7ki11GN7K3g8Ul+ow9ZaaFbZw0JHIS9c2IUBZSGoPXIQb0yvDN6vARn4Wa 9qkY6h0Q9wJEzy5+N3Kgkq7+7UXK//+s7znAdf/E7ZBQtJrxR6Vvbsfvz0ZaWWqj BsyyXLoCQQO5cHue7ovuf5D4UbfIjhI+R1/cEoD9ASQ+2Q8y5QRyWKRaTu2Rap6t CZrpvmbrTU2j5PfsioLBAVHWwXdzmeG/ni7aWc7zUW9B6PwK+4vMgODzmLWa258W rO1+aA== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1auejsfs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:40 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-835423c69ffso1545808b3a.1 for ; Fri, 08 May 2026 12:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266899; x=1778871699; 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=dn3CzzlpHtBN1CICIkLhbSzmIcgQM8PPO9ueTKjRmq4=; b=CXgdiFHhy2+5mfsURa8EwWIixhh6oAchO/xAMyFDFnLwtFX8D/oXNhe00iSHVsygSO sXAj88n1JX4kM3Qooj5tPkjSBqFHMrlGRNW/9G0+dCUxL1T8ABA1NOLC752rpTyVQPLZ oDdbX9R3eR6uiuBRjFDN4lfukr5K6AM5TeAs4n1aWvgnmQ/y4eOt+AgN9g4r42z0FJHC fqiBrwONBunZ4wSS/d0GkfzmT99cTbqjxOxTORTZehrMUl2Mlt2fSRSUiv9X4RlghIGr 81vrhHz3g+RF7bJOWnVkEyQJCYvmpnTk+d71G88FDiEtjRyOIdGlvOnWZt2VMk7xenfy ofmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266899; x=1778871699; 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=dn3CzzlpHtBN1CICIkLhbSzmIcgQM8PPO9ueTKjRmq4=; b=fNi+MjN03yhMFlyQGgfgP5uiKgj+A3tvS7WTpzDakg4DFEYfB8VF1ZmlE3aeCntERr VYjXIM32IQJUGMa/HPEP960TnMND9v9POFUhiC89sRQ2ZR0jxtPgBlbYx+LUhAUI0RyT Zh46/gGVyeXT3C9rPBff34nDnD9fh2FMG7yzIlu3M0usIZLuoBiNBaayaf06hYpJI+PL UEYzjQlLB6UmSf47Mk34qv3Vc1j6p/Yt5FT3SdvvKR+wNLO/sWNunrAPjpfKLNhzt4wV QN7fTx7BCG54FwXG6ZD6Am4bXA14heVoxOV7wa8I59e2oULNU6PGQ1ADLF0QDTthw8Ju qHDw== X-Gm-Message-State: AOJu0YxryYtUsdHDQyuUjjluvHOO31mVYzNQPnszjcbesQPAwJBn4/k4 oRsRBOuXszYa/bBZmaWlHjAqMxU/zM85dIppNLvsdJ+8EqshQertQamwqiLToYJYNKjvSUdjF9Y Wtw7V9tQStuMQGDCRd1ZQaRZAgEGS4D2JBQvDyFNO4WJLMZUICCMYTFExdFxapDi0BP8= X-Gm-Gg: Acq92OHUsCxhTqHMCYR+sD2ikeq8j3qhJ/AoD4CEr1vtFZC5/NzeSw4H5aF9yHu2uKq WktCtukhe17SLLL0zfxXeFI9WDP/Q5XGe2wQ+VzOnG8QnA5wgjScgm+y+dR4W4AA9PWCMInO8SF ZNZp/RzcViVhfocqulDvie+Z+2NN5K8FbnuBbGlyRf+D6kawuP4+x/pLy7RDyT3MxQBv23kZBBM yYEmIZ3X4Cv1cWIQy2YyO1QnfL4YaHquQDHXyVo32yxq6BbUt2YMH2GPdVGYaxr5LhdfD826cbS ANIZyh4Ac9cFEUk0xBJ0otkkTF2xkvBBzjPXdl9wM7AKTKOFOu1llOw53lgqKskprwGdQm8W5vb 2FwOJ9mOR54RE8kWcSpNa/5xWbtyrh7JWWErMpY54q3TcL0m472nacyQ= X-Received: by 2002:a05:6a00:2e90:b0:82f:b0:28f0 with SMTP id d2e1a72fcca58-83a5d96f560mr14458723b3a.34.1778266899416; Fri, 08 May 2026 12:01:39 -0700 (PDT) X-Received: by 2002:a05:6a00:2e90:b0:82f:b0:28f0 with SMTP id d2e1a72fcca58-83a5d96f560mr14458559b3a.34.1778266897986; Fri, 08 May 2026 12:01:37 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:37 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:55 +0530 Subject: [PATCH v5 06/14] media: iris: Add context bank hooks for platform specific initialization Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-6-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=3079; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=2FrychMIG3LHR9amZA9Bhyd149/t+cV8/TYXT9nsgoY=; b=7wLjzMkpFTKevjusI3lfqR/03jJoonRzKWGH2n3/qQquIs5JISQIbUxn1gQV/9+NlOhlNPlUM CoUC+yZXZRqAfcrViDbh13LB5NZx+epsQfEZJfy9HGOr6KrF+Gec1T+ X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX/Z2LwHaXNjeF aJL50yA9Gi+s2n5hzKuMuQ19+jnZC2R2elXAUESjqdehNk8LRrwfSySINni/+spPkLQ0TkQIg0N RVP5cD2o3zmLCaqDabhrp2N6t7mBqLYkSRi13b+oGjRxYibZvaBmCp0W8H9nS638RBqKW3a7p+K ZIP18gCWAdNwwCMbd8rQoFw6siOWB/XXApNC+zhHw/g/pdDBuP6qIttlu5OpV/sO2i5xOHRLbX1 Y3900aHqFthEKY0KvI/mM/1x8duHXxsJbodmEBjOCYGHbcqy2UPizNJYZOJYPKVsZLFftxndUHN L9pydY4fuzSEWbRWbl2zfuWWyHUwwBfzjHSpYLYutrtebCG0upzFZmQZ91Oh2P3twEpPSQrutWW sS8LnBNCZyP2t5pItTq7+ZQGtVGBojGjlg9uXFPcP4QH7qQy0PaF7Ce4+Bc9/vjLc58Vkv6iZvy I/63a0KGye2HUfwnsFA== X-Proofpoint-GUID: WZJiE6uPTjxlHpfJvBNMR4BoZvaEek8P X-Proofpoint-ORIG-GUID: WZJiE6uPTjxlHpfJvBNMR4BoZvaEek8P X-Authority-Analysis: v=2.4 cv=fcydDUQF c=1 sm=1 tr=0 ts=69fe3314 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=hn6c7xJugPWrWid5T_cA:9 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 impostorscore=0 adultscore=0 clxscore=1015 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 The Glymur platform requires a dedicated firmware context bank device which is mapped to the firmware stream ID to load the firmware. Add init and deinit hooks in the platform data for context bank setup. These hooks allow platform specific code to initialize and tear down context banks. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 2 ++ drivers/media/platform/qcom/iris/iris_probe.c | 23 ++++++++++++++++++= +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 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 Sat Jun 13 07:49:53 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 083E741B36A for ; Fri, 8 May 2026 19:01:48 +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=1778266910; cv=none; b=GQS53vGEOfxQ++isBXIVawOs9BQfwQq1ypIkQY9p6Xn4DhC93Vq4DYKaknwLSfvRAU45DjpwDao9xswnk9KPOeeFTskbkk4eay+d6hLDeIXWvJGP3L1pusb36gVpXFNL1RMtkjhFUvbATKPlTQnDwvAcH0sH6Dybun4q9ZjP4+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266910; c=relaxed/simple; bh=kiHl1lLYV4nKXfICCZXuAhM4nH0bXvbb/KB+ab5VHpE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UP/4kuIB6GL3kjZaWLJqhwu6ik7zWuozf+DzPFf4l+g0+8ZLn2FwDosBiTOx++F3hCgSojH9qFrkdZfW/MFU/sRleeJjyTc2/PkKLffFbJcTTQh81dcySs+lDkUWYS1tO8TJowvWiOic4kz0nfByFUznDmMcuM/YjKYl2QmLEYE= 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=Uu1roemS; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KsgxmGqR; 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="Uu1roemS"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KsgxmGqR" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 648HdqvZ874113 for ; Fri, 8 May 2026 19:01:48 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= RYPsAM9GyVf9eOjiRO6hKDynS22g8zyxVf3Jn1km8YU=; b=Uu1roemSq+rFj4Ml ihM70tTc6X/TIgMny2WrqMeePGk4go51ipl/8XU41N+WRi1VEUgA0qWF6JRtVRnE J1y27sblqHiFD7WZ2AReowo5YO0ZLZQuiiNwQ8zuzqVbYgeFLQqt9Lr83I3ewEqr 6eyxFoGDFCMKtkhhkr0X5UAdkwqDvpXmd45AEWyUtE1I7KfdmTr/c4sKQ8u+W0OB 0FE7LQdUN/EheV/eJE9rqk4ejPhqcGcDamjxu+SR1D93OBl9nweu/A1x+lSZ7oyL 2JALS+ZTTafwG37gERKXetAX10Ksdgz0tYPCKo6SOu7hJ3ceR1yGlwOKMp+H5Ads SMTWPA== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1me808h0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:47 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8354503d9acso2679075b3a.1 for ; Fri, 08 May 2026 12:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266907; x=1778871707; 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=RYPsAM9GyVf9eOjiRO6hKDynS22g8zyxVf3Jn1km8YU=; b=KsgxmGqRIng/S0Aa9lL7994BcMXw0JeF/X+Od+D2DvmvK5+r3O2pfL5o58K4bgHIwy ytcX4OTwVsQdGArIKU3ZF+8tozqI8QK9ojHm94GQ7SxuOGhXeC0IWyCx9stLvW3aNyiO Ynzoysx9xObi/a8V+zw2bvEWv9qiaqtRPmLWc8x32VXLCM6SHfyF3ymbv+NWi9jLPsuc gFiNBJusXUd+72lZ4trkONirprr3Wgmuh4KlGBD3jxTCCjcr/L2acc5UuCuPDWTpHt7P fujKQH+Q3jT3TgpAwnlEDbN8RtAqdy+xfZ3/Oq9MAAJPwCLw5XRmH1SXn7TKb7isb/b9 60AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266907; x=1778871707; 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=RYPsAM9GyVf9eOjiRO6hKDynS22g8zyxVf3Jn1km8YU=; b=m/6BO4XI9i9ejvhnNz/r8R2YGOLaidEv8GCnVwJM+XH+mdBPeT6CDNTC3Wxx6KM5J9 aEzhRiT2N29JFC54PDvw2UGjJNlBYT4ioeQ57eXLjnQ3g8GArFE34roj+l7kLbguedio 7XGv2ujrIfk/E2op/o04fN0LRaERh7xaWjPCnG54JfW/I3/ZR8/TSIk+G3Ahr+mzRO/p mGgahRJB5TobBlYjR1OGlkeZznpRzx9CyIYLBBOoyCDJlrKSvWYAtDvVJ1DZyi2IzUL8 bxJu7i7m0qcfGSXaefN6+MsIXK/mkN/kwhC+WjUClGx5IN42TdHv36zafu3sQT0SX4Eb AR0A== X-Gm-Message-State: AOJu0YzDwkcOm+c7GhQuWEeKObiIpZktoG8uvBUUI8Zn2dAOaTaDd14k j/wrcDxAxbe+2fGE48/kIkkh3kP7DpkK1Sf6xRW/ZgOqODn5oCvTckW0ByAvY7kHHwL3g4UA1v8 O7nLwCA64sXrn2Vq9bPoW0Ph33YHRtHQZYn2Gfh0UlSiVOLuguNI8K68rcTHq47FjYrA= X-Gm-Gg: Acq92OHAWH3xN7PCK5pPaa4vqpJvzpLDhRQEzZ0dStehEjfacqgsnNOtNTcPnKZp+kY FawytImjob39/bMRjQRL3Va62T36CHlvu/0OiijrpqsLNZG0QM/otmLseR61NhDI+wZaC+PY+y3 g36V/OfSwZQONKEtYGKArh2lzeWtgsd5bDflBm11dRNIkIkIp8fAKEOxJTRR0vvWf6EYYS5nglL oIVc106Npk7MGMKYyCT0ko63LXWfykTuaZcTIj+hZz2C3bUNiwsFJKksKlL/4/IeTL4rJFvI3GT b/eysbbBeLoTzVxlhV3rQt6rnzc6xAyS83F54PhH+AQf4QRd/PlWWl5PAr2qIkxHv5Kinjub37v npUE3gX8FUqJcZPkci4iBFjBFtSAPcJ4vMsEmrUCZ40m98CZm/knCnyQ= X-Received: by 2002:a05:6a00:1d8c:b0:834:ea1a:4b25 with SMTP id d2e1a72fcca58-83a5c0c170bmr13964809b3a.12.1778266906782; Fri, 08 May 2026 12:01:46 -0700 (PDT) X-Received: by 2002:a05:6a00:1d8c:b0:834:ea1a:4b25 with SMTP id d2e1a72fcca58-83a5c0c170bmr13964762b3a.12.1778266906217; Fri, 08 May 2026 12:01:46 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:45 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:56 +0530 Subject: [PATCH v5 07/14] media: iris: Enable Secure PAS support with IOMMU managed by Linux Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-7-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy , Mukesh Ojha X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=6647; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=UaR2dTIxtzS/tNKuFtSFzOFmr6sz1nG53anx21+ucME=; b=ksbDBtsaICiCigSCrJueomIT4etgGvpPl4AHZ9fo7TnEzQZabzy2Qc2SiaSQsPHJHoFsiTsF8 iR5CCyMyX72BoruM0Pe+FJu6oa8abHugW0rRs7eEHYy4bEic0pOsNke X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfXzfJ3508B9+gj z1Ch34LxML4LDAPF9DwRhZKoKfZSKRAXL/cT0a0HeR0GSQ1d2ydoRDbPGqvm3P0ISphPhyKS/z7 IxM3eT/1NsbJ1QESF2gjTea+EZY+DZ2IvRYS40sY+trM2shzkypjRUDPHOodoPfqza7uuhisrUZ qjiPC+dBZCwxMzhJEfXsos0BAYO7eBmrRWvS6ImAkoS9ddTX9O/mPh48I2qv+a7/4nwOguMc8n4 p91Y0sNgf08EdDxHfofvfG55zrSRt6NwN2WoI+svrwHzshEde8w1ixOCOHFZphoJ9LITtOVJDE4 amLrv7P9MIHac39fydDZMrpeLdAEkSoKWYrSLNGvABJ58JqikZe2xq5pC6yyCBIvvchXha0o1fV Rz0INGZPs0WxkXXWOHHDD8ht+dyziXeXPgntyfQleHD8oBdqvZQhQojtBIcyi3xY6wvBsQ2oWPs 7gQ4D0VTYLQezqyPE5w== X-Authority-Analysis: v=2.4 cv=BsKtB4X5 c=1 sm=1 tr=0 ts=69fe331b cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=gbwaY6mYjfx-u0ET_fsA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-GUID: 0Z-dVgVH_85x3c492Wzq7xmvL34nBpga X-Proofpoint-ORIG-GUID: 0Z-dVgVH_85x3c492Wzq7xmvL34nBpga X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 phishscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 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. Reviewed-by: Vishnu Reddy Co-developed-by: Vikash Garodia Signed-off-by: Vikash Garodia Signed-off-by: Mukesh Ojha Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_core.h | 4 ++ drivers/media/platform/qcom/iris/iris_firmware.c | 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 Sat Jun 13 07:49:53 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 D32442857EE for ; Fri, 8 May 2026 19:01:56 +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=1778266919; cv=none; b=TMxr+fGnFi7T0MjG4DYaobmtMijcpf2vrS+NYFbFu+WW5oXKVkG/G3i3d1aHa3nmErCLLCY+Z2MhhunNRfnM8vZ2aiBZ4nnQpJZhceQlZzj4WW1uoTMq32z+VxYAUmFaI0Ssi4xDab3zwsRmg3bz05ubl5aUQAYZ7ajXAnI+jg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266919; c=relaxed/simple; bh=ux+zeWRBhddLhnBGHemrQlVM1aszu52nKexIEt0TseA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bjLx+3KnhfATg7URCL3hwit4ZCt/KIUhucMpXNBuIqKruYFBiN5Kd8H/FYU/+fOCVko0kIDqaxOIYXnQZpJhW2/zTX6/pKRXpyLeNNnc+2OPXbH4AzSpImNN+w+2cQCB3Zm1F4E54gd2Jm6/zOmExRpyiI4SVXgcYao3xKVi1S8= 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=O97kTX4R; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RdSwN3S9; 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="O97kTX4R"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RdSwN3S9" 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 648G3Pen725477 for ; Fri, 8 May 2026 19:01:56 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= lS4CJUeGpaVVdZ0zw50m5stpBIi0OC6WbodIOUVsWfY=; b=O97kTX4RHEWQ9DxQ O/GzXymSn5CLbIGWIKHV4FqwsLS+bhPTkBx2Ei7YTobjU/1T8ZQnP8ydIDmkImNg htjqqKq+z1fOHZoo9u0EqbbtYGPX+Qw43pJwdPQkmeVIv+noAIA60tcsgQ0aJIsZ 4JMi5pDCzan4Teil0eZT+7enLe3uXb7OULH/ptkZ74myaGdVa5G22pz7/kCN+Mki TetO7FILWbvumUwPIzJM17OTADQw7qghOGjucgW5eLfT5NsEMd0hyrbg0yyLmRKJ zCQbUvPf29PlFnbmkn8cVxnPXoWAlqinQRl1y8/+Di5HOG2+Taknnbja2cI0rhv3 1VXPsA== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1k0ugmnf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:55 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c8252a49ffcso2779558a12.1 for ; Fri, 08 May 2026 12:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266914; x=1778871714; 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=lS4CJUeGpaVVdZ0zw50m5stpBIi0OC6WbodIOUVsWfY=; b=RdSwN3S9iV018B79PkA6R9F5sUtGc855EfOXPGd5cdxffm2izQwF9YZsegZswLU5H5 11r2CP+e91doEovo2lSC/q9DE6iVOVMc8TPWvy5MgjD56wz99bBhUDQ11agqfbuYAZ6M ruhqPf9FC6WeHYXdm4rI1x+co3PbjIow2nfwrTwjLKxyKmWBny7OBze+OeezvKVxjxVu 0cHfZ7ga+gYkhZrFdeebfElK0RwiI+kKjs/mY+XqVMTF2ERyAIYLPRb15GA62I9RAlbe BM8z0vXuCy2hw4fTDnDPwfCCrYFcSIaqxqhnHdbX3d6kDnLvbYo/F9FOob99tt3rm71S nyGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266914; x=1778871714; 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=lS4CJUeGpaVVdZ0zw50m5stpBIi0OC6WbodIOUVsWfY=; b=L5Tq+a0UEcrBpRftl3LfcGlm75/3EmK47QKxIe5jJv7W56NPPFYqv+YnjcKUFHI5xH TficFi6j2np26gg4fdIe5iiAJIvG1vYR8uP0ssMVY3fpISn8Es22/TK1H8eA39KcLB5m 4AYsopU52tqzGDOGc0FKgTByMG0hGrQbEy+BJasIcS6373R2xEW2j5n9YvN/B/WO70eF 43JGvLq8CxufuxLTNP3oiS6rIqnOvtGcLjcGtwtCjEoEvoJflqcOFpT+nW3BAu5JHRIA ArH1m3+PaJ0/d/suD15QpUqzdyQJOGRER70ef8GakPx5D9WFlVxGBm3hVohjYmctHapm bHQg== X-Gm-Message-State: AOJu0YwERZbjxR4koysx9tVbW/g0IjCC2eFjeUwYWUvbfCyjYdtCZULR xBsi2Cr6GNDK9BgISzj/xFjxvdqrVyaWWbg819Cp+NI+8TcpwqPNc11UG9qCD0siRL3n0/p5cHu 3ovbVYgVhlzBjCR1iCnEj6oCAeBDILqV2rbkpfoHmIZ+Wk1vgymxiUlEB+CILzO6lRS0= X-Gm-Gg: AeBDievMWxmotE8o0t++gPUKTGm6veBgQvTa+T//1RPvgpQUjFqmiApp+ItXOgIxHve T7dfAe7yHK3IZTLJ+Ag+bfTEa4BcNRaQTqRgvunx7LPLUPbNkAt/dT1+AUIA8sEHvGgZxnPEBTu rtvZlwaNtJgYnMC9gvcmd2AUuUQo/8K4UUTZ/OulUR9EG9hPaUN/Pj8LMdB69m7FIEBd0q+sprT FBlG/8aAxykeG8nf7qNJc408CSFvCU70yeuQXkp42i7vD/bRC7jR4EJoL4v4YkI6MLqaxOybQZd 7BgbFefdzlaGpLKYrlOc0nHrVvPTRgOkwKEhEAUPDGTETiRoh+uLu0GPDw8rBr01DTsv/Ydnzl7 4qLzXg7qe5kBgHihO/qpSwYwTR5nlqiD88WmDM9M+pXXa+/J/fdagSng= X-Received: by 2002:a05:6a00:39a5:b0:837:e9cc:d458 with SMTP id d2e1a72fcca58-83a5b9d8236mr13694383b3a.10.1778266914307; Fri, 08 May 2026 12:01:54 -0700 (PDT) X-Received: by 2002:a05:6a00:39a5:b0:837:e9cc:d458 with SMTP id d2e1a72fcca58-83a5b9d8236mr13694326b3a.10.1778266913643; Fri, 08 May 2026 12:01:53 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:53 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:57 +0530 Subject: [PATCH v5 08/14] 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: <20260509-glymur-v5-8-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=16741; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=ux+zeWRBhddLhnBGHemrQlVM1aszu52nKexIEt0TseA=; b=Azu0Nw/E2Jz/tTkUoHj9IpF0nYEFYha7SRYs6fU7pujkmRgC/rrAashvtDeCvUoAfV24pqdN4 cVDsZHMLKfKAgDGFaoTbE5/fAzmBL2tx39ytllns/6xVr2b7eVXo0nB X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=dIqWXuZb c=1 sm=1 tr=0 ts=69fe3323 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=kpNcZxiqwdVgWfiEekEA:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 X-Proofpoint-ORIG-GUID: V3SzKTSN0HcBIvMvXbiFf9CtCyany4W3 X-Proofpoint-GUID: V3SzKTSN0HcBIvMvXbiFf9CtCyany4W3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX1rkpNNPPGdC3 RpE25AL54QhIeeqJUj9hyXj11bXLODbYTS+EXq8eUxKi++c+RYcgTAIbH7mxA7XhjdOKfJVPPeI 0KT//BN1q878WRKEVzGikekab4awt1SAU/lzkVATmhW7Cu6pdbEVkPw5+3nODKLRqowx4PhYRw3 NpZJwjILdfGL3yzdRwf8QAYNPz+vZ7NfoGOeHvIjFskSNiefJKwdFfQsXJDSFbdX9RCB33BNqc7 rBzWJc+j68JteSjMdyC9RkpkP2U4v4YI2cPCE8YhErwny31WEJhc9JsJmhE3QAbpx5d918nbbeb w4XqwYPI2hezCu5XK3krU1xqIpX3vgw+x9E+L2YXxgWXJcwdP54Nb53MIG1xRL+xHrI1UFmHGRK 6q02cWrqg66QrRSQVpfBoWAJsrrnl4Ql/5XIWCLTy+fiChijhRCYW9V+UJRsEqRhbf0MgPZEEF8 VXoxUCoc3Ugnwrp1v8w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 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. Reviewed-by: Vikash Garodia 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 | 21 +++++++------- drivers/media/platform/qcom/iris/iris_vpu4x.c | 30 +++++++++++-------= -- drivers/media/platform/qcom/iris/iris_vpu_common.c | 33 +++++++++++-------= ---- 8 files changed, 67 insertions(+), 63 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 3dad47be78b5..834194cb5513 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -209,7 +209,7 @@ static int iris_vpu33_power_off_controller(struct iris_= core *core) =20 disable_power: iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); =20 return 0; } @@ -218,30 +218,31 @@ static int iris_vpu35_power_on_hw(struct iris_core *c= ore) { int ret; =20 - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_= HW_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, + core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); if (ret) return ret; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_AXI_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_AXI_VCODEC_CLK); if (ret) goto err_disable_power; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_FREERUN_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_FREERUN_CLK); if (ret) goto err_disable_axi_clk; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_CLK); if (ret) goto err_disable_hw_free_clk; =20 return 0; =20 err_disable_hw_free_clk: - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); + 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; } @@ -250,8 +251,8 @@ static void iris_vpu35_power_off_hw(struct iris_core *c= ore) { iris_vpu33_power_off_hardware(core); =20 - iris_disable_unprepare_clock(core, IRIS_HW_FREERUN_CLK); - iris_disable_unprepare_clock(core, IRIS_AXI_CLK); + iris_disable_unprepare_clock(core, IRIS_VCODEC_FREERUN_CLK); + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); } =20 const struct vpu_ops iris_vpu3_ops =3D { diff --git a/drivers/media/platform/qcom/iris/iris_vpu4x.c b/drivers/media/= platform/qcom/iris/iris_vpu4x.c index 02e100a4045f..92c0b06bbbff 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 @@ -267,7 +269,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; } @@ -345,7 +347,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 static int iris_vpu4x_set_hwmode(struct iris_core *core) diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index f1f9e04b7c31..73c094bc4311 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,31 +279,32 @@ int iris_vpu_power_on_hw(struct iris_core *core) { int ret; =20 - ret =3D iris_enable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_= HW_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, + core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); if (ret) return ret; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_CLK); if (ret) goto err_disable_power; =20 - ret =3D iris_prepare_enable_clock(core, IRIS_HW_AHB_CLK); + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC_AHB_CLK); if (ret && ret !=3D -ENOENT) goto err_disable_hw_clock; =20 return 0; =20 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; } =20 int iris_vpu_set_hwmode(struct iris_core *core) { - return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_= DOMAIN], true); + return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_PO= WER_DOMAIN], true); } =20 int iris_vpu_switch_to_hwmode(struct iris_core *core) @@ -366,7 +367,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 @@ -383,7 +384,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 @@ -400,7 +401,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 Sat Jun 13 07:49:53 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 A0C0D421F0B for ; Fri, 8 May 2026 19:02:04 +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=1778266927; cv=none; b=LsLlhxVsvpzF/vglJcRwDhX2HAL/LmkhtVX1kj5fQ6nwJSrMEVjsWsBnJOuRzEZslSLDRLlLZVRkcFBxFm7xrZjz5hHBaBrFxgE2rzbqdRPe+w+aO6n8qBXIcvTp04/FByYxjuE+ScxVlIW/VfgiHAkykImp44TJ2YaML5dEGBg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266927; c=relaxed/simple; bh=W9Ix7Ay7sehDP2rYdpnB465FhAdMjeBA+KBoV5qJU0c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BvM48GB/kwj6fUc5wdm8JJLLFC4RT1A17nzTTps8vWsEYz17dqzGP8Rr5/pzKnESCZklA4JzMQMixvjIobL82+OmeJ+Xk+HrRzyI4XHsNCxo6ywJXzHnbw1zGQVsjGKlLptEJvf4LZlSkdbHF8QMzTiDqSbtVobsdXtbZ4+6Qyo= 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=fkoqQ7dh; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=inG7ceaK; 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="fkoqQ7dh"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="inG7ceaK" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 648CH2PB852412 for ; Fri, 8 May 2026 19:02:03 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= A6tjJBY2qe/8oRx8dGtbVjSnp/6G7Y3aN/zptKx1O7g=; b=fkoqQ7dh8ViA9ZjW 43klaOsj9HgI1mUUvLxT3qMIILCEGRQdPS8Na0p5pCiwTaPgpxMEpHx3jpgxoaWx ZDecb6Sd8AfLoV4ADv1v43sUNIRZlp8TxeJnaDjs3SWeaS5auTZk9O+wtC5NnAYj lw6eGUtMmCW+uyIEqHYUA6pphLBklsLFhgRxuODWmT/ocx8cmJnejB5DhDSU3Mgm q0EMhG6AbVN4rL8l7ueozWSQnVr2mQKJHatvrunYowDdL/M/1MjsrMA1+OEzauPf XtdHvk3NhNwjJLkWa3G7CBKE335Y7JcqGuEVhyQFH4NYKY5ygyj6kgAzN/btkXbE yhOpDg== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1fpthk55-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:02:03 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-835417ba8c8so1314406b3a.0 for ; Fri, 08 May 2026 12:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266922; x=1778871722; 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=A6tjJBY2qe/8oRx8dGtbVjSnp/6G7Y3aN/zptKx1O7g=; b=inG7ceaKr3tjlgHb2JKhJ88CHnFJrcI+19Du7L+oFJUMCXFP5ZcOp4FjN3K7vvb+qK XTfSnklKYePDC9Q8Uf3DNUiorIIPL76xdQbWB2IiJxm6WoNo+2Rld1Yrt3CXWVjcTn8m BvNj8pXnKB5R3O+v6G10Dah8GN4eQ7R8Eq/Foo3v2zNDHFcDHawTi7uaaefv+DyIOkUd E3Dthm/mL8smoqSbPMo5L6u7R4kpTR12cQZDi4WkeR1wn2PYa0kalBRiTc2A2CLjFh30 MjaNKDFcXYk1n7QPI0qK8onz2y668m1nakSTM6CZ2+Ua1h5AZVwRhmuO1/1KlDIojcUR fFYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266922; x=1778871722; 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=A6tjJBY2qe/8oRx8dGtbVjSnp/6G7Y3aN/zptKx1O7g=; b=TrMKiNgSrEosEMf7ZZCgfKtXft0qw/qivb+cLz2dJGXw2duMKKB2QQpqfUPLxzBuPL pvW5K5p1HJdpQ8ZhzS+Ldzc+OtiJK2dxt6NtzE74VmwBKmOnu2LMwt/dP6KKbDsUudFz pybe3N7gse7Lc/bOyNyQl7GkmbnUy0p0nv7zkk/yXTAe0yQ+lZGH0ppsFD7CeFNIAfQ7 K+3sqly2GN7MJdZk3n4xU7GXJLbZy6M6HqqqECzg6/V+hDGxaEmMp3Upb9EfvT25PgSn lZY0r6CGTfDdhfKmPgOdJzInjUD/Qo+ngSTPADYZu8u3Yx2lMW9e8G0LRmzPUJeXGRoX z89w== X-Gm-Message-State: AOJu0YzN6Ka8nR0xbPF+jTQrWvDmKIXeeuUFBwhY5/T2WFStei1W/b7j dYQTk1VAaHJrmh2VamXRzGirWNUqwoVHOORXpIc/UswIhm2wayOQe4mhYsJ0yzBcK3TXZF8nIYF KCuFCeKuzLXSwmN71b4la8BV8cHtAiwbsLRQ/QLMqSi6liZFSfPGJg9AeWgLGvjMmbZU= X-Gm-Gg: Acq92OFgxMDEeYiYYnM4gyNye+fYwDRSnfyBi7FASjlBSuOtVvUu4PVMu+IKSDtYUmV otkZoQ7AaM8v21mTcZdRgL/5ec2azEVxSKPqUxWh8o6pvS5olKoFGU8+fVXDu4p+yVSYyRVATe2 l7emLo84yhyah/Hm/F/lvhAKAUWB8ePJFiJlHgqVq/tor0fkA291cmEwYDVE30/d2Y0y8PJOT7z vgpoTW6IeiW50Zfif/PBL8RlqkKA018epxZZ6UrnMezvaQjMitOL2tq/ItSn8sSBLSlw03hO5qU LyEkwYkKvsLU/upWCBrxAReKx0BBEHaSr3bZA5uZsinBJD5XKwG+Rf2qhmY8JCCUbSOhMD8eKzL stuxMTbD3bKw3gA++ONI7SO5/LqS0xQXifYYSVlCMFmaroX2gNFkI1Us= X-Received: by 2002:a05:6a00:9096:b0:81d:dd3a:b8f5 with SMTP id d2e1a72fcca58-83a5dc5ed7dmr14193761b3a.38.1778266921823; Fri, 08 May 2026 12:02:01 -0700 (PDT) X-Received: by 2002:a05:6a00:9096:b0:81d:dd3a:b8f5 with SMTP id d2e1a72fcca58-83a5dc5ed7dmr14193698b3a.38.1778266921169; Fri, 08 May 2026 12:02:01 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:02:00 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:58 +0530 Subject: [PATCH v5 09/14] media: iris: Use power domain type to look up pd_devs index Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-9-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=22661; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=W9Ix7Ay7sehDP2rYdpnB465FhAdMjeBA+KBoV5qJU0c=; b=Lr30jEdIkSBXoPp1shOQpIn7Qq790/42ktEkOfrjS/aRXLFVAz/wj3oBONRDnY67U5gQiNMLM Fz+vEUQS3NRCple38DcjhbtZb3fmONq63+hy4oyCpHcsEouhoXKAoLJ X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: NzElBVZxwZaSDkgMi_2Vmw7j-mNlB5bG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX06dAI0OP1NPK NEge76Hnq/hy92EEvQ4xS9TLNUb4pL2bSPmqR/gKbSv248hBNxS+UtLT0FIZRH2j158r8/r6rqf BhjuEOPe4vB0jHTlWPzwOP65m0xkU44iFw29TvslunFnvNb+LIzDB59WlgN0XwzZsCUcI1ix23m G6qHQ1oziRzV5c8zAhMBYm17Tc/Z8D8GUJsbeLNZma4vJUk40yOuUlgUc0q0aE6l2Gxpqvy3i/T 6DZEN1hsduYOrTcmiosKAM2Ggs5zigywzEPkkSf0/qRzhlF7AMpNwTxU16QFnsjIDjTCnQIFnok TnTjGhwbgwqSaZGXCzbVoDr06jlg8M3j1fLHs9rTMj1NJr0zOTp7Cs5gE7DMaf+d0Qy65VdSP17 ny9mv8Qxz5tLq6qCkieseSY3OVtRXyJxveUC1XTRGtYTaUwGuOmrfF0crIAvoEdy28Ee93PTya0 q7XmtLJmumSlrmiUdnw== X-Proofpoint-GUID: NzElBVZxwZaSDkgMi_2Vmw7j-mNlB5bG X-Authority-Analysis: v=2.4 cv=IYi3n2qa c=1 sm=1 tr=0 ts=69fe332b cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=3jpyDGP9Yv0p6WhxEk8A:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 malwarescore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 The pmdomain_tbl was a array of strings holding only the power domain names. Callers had to pass a pd_devs[] pointer indexed directly by the platform_pm_domain_type enum value to iris_enable_power_domains() and iris_disable_power_domains(). A future platform may need to introduce a new enum value that aliases an existing one (e.g. IRIS_VCODEC1_POWER_DOMAIN aliasing the IRIS_VPP0_HW_POWER_DOMAIN on Glymur), which would break the assumption that enum values map 1:1 to pd_devs[] indices. To fix this, replace the string array with a new struct platform_pd_data that pairs each power domain name with its platform_pm_domain_type. Add a helper iris_get_pd_index_by_type() that walks this table and returns the correct pd_devs[] index for a given type. Update iris_enable_power_domains() and iris_disable_power_domains() to accept a platform_pm_domain_type instead of a struct device pointer. They now call the helper internally to resolve the index, removing the need for callers to do the index lookup themselves. This prepares the driver for adding new platforms where power domain enum values cannot be used directly as pd_devs[] indices. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 9 +++- .../media/platform/qcom/iris/iris_platform_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 | 43 +++++++++++++++++- drivers/media/platform/qcom/iris/iris_resources.h | 6 ++- drivers/media/platform/qcom/iris/iris_vpu3x.c | 7 ++- drivers/media/platform/qcom/iris/iris_vpu4x.c | 52 ++++++++----------= ---- drivers/media/platform/qcom/iris/iris_vpu_common.c | 23 +++++----- 9 files changed, 115 insertions(+), 71 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 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..cc61dc038598 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.c +++ b/drivers/media/platform/qcom/iris/iris_resources.c @@ -70,10 +70,42 @@ int iris_opp_set_rate(struct device *dev, unsigned long= freq) return dev_pm_opp_set_opp(dev, opp); } =20 -int iris_enable_power_domains(struct iris_core *core, struct device *pd_de= v) +static int iris_get_pd_index_by_type(struct iris_core *core, enum platform= _pm_domain_type pd_type) { + const struct platform_pd_data *pd_tbl; + u32 i; + + pd_tbl =3D core->iris_platform_data->pmdomain_tbl; + + for (i =3D 0; i < pd_tbl->pd_count; i++) { + if (pd_tbl->pd_types[i] =3D=3D pd_type) + return i; + } + + return -EINVAL; +} + +int iris_genpd_set_hwmode(struct iris_core *core, enum platform_pm_domain_= type pd_type, bool hwmode) +{ + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + + if (pd_index < 0) + return pd_index; + + return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[pd_index], hwm= ode); +} + +int iris_enable_power_domains(struct iris_core *core, enum platform_pm_dom= ain_type pd_type) +{ + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + struct device *pd_dev; int ret; =20 + if (pd_index < 0) + return pd_index; + + pd_dev =3D core->pmdomain_tbl->pd_devs[pd_index]; + ret =3D iris_opp_set_rate(core->dev, ULONG_MAX); if (ret) return ret; @@ -85,10 +117,17 @@ int iris_enable_power_domains(struct iris_core *core, = struct device *pd_dev) return ret; } =20 -int iris_disable_power_domains(struct iris_core *core, struct device *pd_d= ev) +int iris_disable_power_domains(struct iris_core *core, enum platform_pm_do= main_type pd_type) { + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + struct device *pd_dev; int ret; =20 + if (pd_index < 0) + return pd_index; + + pd_dev =3D core->pmdomain_tbl->pd_devs[pd_index]; + ret =3D iris_opp_set_rate(core->dev, 0); if (ret) return ret; diff --git a/drivers/media/platform/qcom/iris/iris_resources.h b/drivers/me= dia/platform/qcom/iris/iris_resources.h index 6bfbd2dc6db0..d5692e4694b1 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.h +++ b/drivers/media/platform/qcom/iris/iris_resources.h @@ -9,11 +9,13 @@ struct iris_core; =20 int iris_opp_set_rate(struct device *dev, unsigned long freq); -int iris_enable_power_domains(struct iris_core *core, struct device *pd_de= v); -int iris_disable_power_domains(struct iris_core *core, struct device *pd_d= ev); +int iris_enable_power_domains(struct iris_core *core, enum platform_pm_dom= ain_type pd_type); +int iris_disable_power_domains(struct iris_core *core, enum platform_pm_do= main_type pd_type); int iris_unset_icc_bw(struct iris_core *core); int iris_set_icc_bw(struct iris_core *core, unsigned long icc_bw); int iris_disable_unprepare_clock(struct iris_core *core, enum platform_clk= _type clk_type); int iris_prepare_enable_clock(struct iris_core *core, enum platform_clk_ty= pe clk_type); +int iris_genpd_set_hwmode(struct iris_core *core, enum platform_pm_domain_= type pd_type, + bool hwmode); =20 #endif diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index 834194cb5513..13fbb21c2182 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -208,7 +208,7 @@ static int iris_vpu33_power_off_controller(struct iris_= core *core) iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); =20 disable_power: - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); + iris_disable_power_domains(core, IRIS_CTRL_POWER_DOMAIN); iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); =20 return 0; @@ -218,8 +218,7 @@ static int iris_vpu35_power_on_hw(struct iris_core *cor= e) { int ret; =20 - ret =3D iris_enable_power_domains(core, - core->pmdomain_tbl->pd_devs[IRIS_VCODEC_POWER_DOMAIN]); + ret =3D iris_enable_power_domains(core, IRIS_VCODEC_POWER_DOMAIN); if (ret) return ret; =20 @@ -242,7 +241,7 @@ static int iris_vpu35_power_on_hw(struct iris_core *cor= e) err_disable_axi_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 92c0b06bbbff..bf7ad4e7cb8a 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; } @@ -262,14 +252,12 @@ static int iris_vpu4x_power_on_hardware(struct iris_c= ore *core) iris_vpu4x_disable_hardware_clocks(core, efuse_value); disable_vpp1_power_domain: if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_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; } @@ -340,14 +328,12 @@ static void iris_vpu4x_power_off_hardware(struct iris= _core *core) iris_vpu4x_disable_hardware_clocks(core, efuse_value); =20 if (!(efuse_value & DISABLE_VIDEO_VPP1_BIT)) - iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs - [IRIS_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 static int iris_vpu4x_set_hwmode(struct iris_core *core) diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 73c094bc4311..2593c04decb0 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 @@ -297,14 +296,14 @@ 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; } =20 int iris_vpu_set_hwmode(struct iris_core *core) { - return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_VCODEC_PO= WER_DOMAIN], true); + return iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, true); } =20 int iris_vpu_switch_to_hwmode(struct iris_core *core) @@ -369,7 +368,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 @@ -380,7 +379,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 @@ -403,7 +402,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 Sat Jun 13 07:49:53 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 D9D6E421EEB for ; Fri, 8 May 2026 19:02:11 +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=1778266937; cv=none; b=EGcL7dVUpslpgmkt/Cut580VS5ztEzfhwLLqFkdN74myj1z5pBZ+V/SCC/eCBHHrtuOLZbC0bOPsagDDx1J0Ax6AtQ7CSwEzUjeR9ocoFOsXVfUfBTfBGAyUjsHDAydjmpWFxti0wPnz6hTVGT9gThP0YfhkP5gz2VnSWV4vElY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266937; c=relaxed/simple; bh=n4a2tW695t0t/CvpOqMfCwEfmwTX9fOF5Byhdyp+BT8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tEye4xAjtgjfsvrpvfMDNb3XP3n+u8ls2+ZRqCwmjE5zXMrfo59vKJPKpduhwK/mK05Vq8u0Zi8stT8AmrYXxF8cw9fpYiKye18y14OoI0B7dXNgd6BfnoxAq9qskmaZ+ijT79lvIN/7w4xEnrA1BJ1aBjHaSLKdh0kUHywPyTk= 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=I80FktRJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WSLwbXe6; 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="I80FktRJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WSLwbXe6" 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 648G3Peq725477 for ; Fri, 8 May 2026 19:02:11 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= NUaGFY4uG/wsAI2XS7PoFgE9KxBgKk/nbUMH4o35YtI=; b=I80FktRJMYnq/xY8 eZJmFgzGwW5nTmpA5Jbil1Xm2/AYl4lKUNamjOaOO43SsilSOQXGHoFbjwmmbZey wTfiGag/QvEu0NSvOmHKFKBtT99qk/A5jZjDqAISvsutmfv/9e1V0xXSGrqK7Ifv pdfDByKQLLc8M+7M+1cA3dWf+jV8m1NHMV2L3+xQxm9lsROSD5sqCSQU1tk6R+V9 zCwjWE1rN5QlgOxZPtoulro3eIDpcwSk26CmZXOa8bDkxFWoTqhMKJYpHlN9NY2A 9ta6nY1HhiltfuSqU/A2ayuuSiQ5iIMZm8rOKNZvklXxPgxvK+uViCztDAzUrM9e L+rlOQ== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1k0ugmq1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:02:10 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-c8156e30b6fso2677220a12.0 for ; Fri, 08 May 2026 12:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266930; x=1778871730; 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=NUaGFY4uG/wsAI2XS7PoFgE9KxBgKk/nbUMH4o35YtI=; b=WSLwbXe6S/dMutWQl3KsUEuhKcRm9hK0fJHtQ4UFxgtLbUJKytw55SIWdsIj5XklRG ne0Ifq1+h4tNuxOHNIRWVYpArX4wzlZjizwqC05RIz1ye+AsF1tOSxhORltIxzyk2hc5 ZX+NjVsNkm61sO7mqYQdgCr0E7bkYcqp8lDCgkGzh1AZyzOgdGjcmJessgroKQSHLAoH goOPKQJ1VPC6EwPb5lHBGwUKt9jfG+yCbvNOufv7zow5o9mgtkiGv8WdEPCcjn5EzTEN OhnYZ+GsB8rT2hQVMhTEWd8w9w10zYpKXKmJMQXzppzlLkFWyGBpfr7q/CgtpTawnIzj Z2yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266930; x=1778871730; 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=NUaGFY4uG/wsAI2XS7PoFgE9KxBgKk/nbUMH4o35YtI=; b=ZK8lXvfEgVmuHjnIISWMxr8m7JRDZ+lCH3CoFVBqcKOw3tI6gxNu2XaXHQkcLKkfeg ZEVyUesEyUrGt1XmJb1Z4/Dc9+RpeUQy2dSve+qW33NAPE+tuWVfUSuqvbLr7BvkJLMh oLQy0RNCziJa+vHyT7tU+YsVwXxwh7eECLCiyCcDggxZcUwcolAJ//s0pwTDnWq31txU J8LqvdvalvUCDL5e8dkeI2Smm7xL/JrLQXaBkOML9uM2kknq40c3XlA+xvp9pGplE4aY 8HKk0QWbW/tAfYPefnFIkjs5V/9fmzXItJM+dl1QDeyugMUx0/+yMm1+jifULG35Ue2D iiig== X-Gm-Message-State: AOJu0YxxJgUf2QDcmfUZLFLzBKNTf4agxi+rHkPsiWrQTooEz3aMLziw KeUvI5/kg1SzaE4XVrqCOvHcqQ4kAKt6QQuqFzru1BGjrEWPaf/rrOmWEEEBiv6TVa64le77ZH5 LHT9OZRtVISe8t9oHNnBXmIfARxPRsIzGQcfO8hnUv7+CcUNMwSuN9MbAb8Sig0m7kUjFqMUMBw o= X-Gm-Gg: AeBDievr0piP+mhbKHeIpwgppbk+Ls4l0E1WbrZ1NC20as2VJq7OKqTEWw2XCq755jo FWrgSx9uRNRVWgg156aooetlTp5Bgkf7gXbwfthLI2YxmV/ppA3/jvUk1C5Fsvtsd93QrkN+OiB Il/tRilvYBDmebijQll+kqHy4/+XBLSFoX+bX0T/oafkZmXVL8IBsKUxTqRg5MQiaXfO6Tn9Cw6 e07LU3sgdnUoa6x8bQIeuSt8wmZD0qdrEv4YuNhhwo5cp5AbOaiTCiZQ/isPQCNtyJJXaBn+8M+ 9NxGx9WCf44+LmmiaiYwAbbHpuWSRNK42GluQhZ2PDWiywuDBEE6Yhs79oNKa4A9BEukigj0Ke/ cLTrgBfDeFU9en15kHIiXHhGBpCAxc+0h9p3dt+ogGLiSnBZ2eJCZWGc= X-Received: by 2002:a05:6a00:198f:b0:838:1ece:9716 with SMTP id d2e1a72fcca58-83a5c5bd45cmr14044575b3a.22.1778266929612; Fri, 08 May 2026 12:02:09 -0700 (PDT) X-Received: by 2002:a05:6a00:198f:b0:838:1ece:9716 with SMTP id d2e1a72fcca58-83a5c5bd45cmr14044515b3a.22.1778266928888; Fri, 08 May 2026 12:02:08 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:02:08 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:59 +0530 Subject: [PATCH v5 10/14] media: iris: Add power sequence for Glymur Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-10-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=9169; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=n4a2tW695t0t/CvpOqMfCwEfmwTX9fOF5Byhdyp+BT8=; b=pdCsMjG8JB+x1H4U5sQymr7L5UhTkyQFXmEbaXlzJUDUHUopxaz0m4Iro+KUODR9riHz3cl/0 vCS9tECQd+EDp+N6DBMfuaw/A5DPpEpA2VOslSzj0JbjwLhytc5h9l2 X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=dIqWXuZb c=1 sm=1 tr=0 ts=69fe3332 cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=on-tpLi9NVdX0ogc7TgA:9 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-ORIG-GUID: bNTWGzeCRSqUQZHDe-jkKExmAKXJ8GuH X-Proofpoint-GUID: bNTWGzeCRSqUQZHDe-jkKExmAKXJ8GuH X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX0oCBsrKbfnTa j3uaqjpJhiHc+XfNVwZRTY258lqNx+PKXkOT/snzeZwicL2+aWGUFu2grnuIW2J+DYrGYnj45aq 393UdZojkI9B+Fl1WowyToxVUjtX5iUhGjyoBUX42GVkVdIziDifOX8+DdqJEivw6tT8UJXB4aI 3/dUkhoNmFNn+erfgDVWFDhh15Unb7qI/oN4Dxph4s2g/baaTpEiJx8++S7gLMzul6nzXd1Y0Ct /P+MxwMr2O1FGFcsW6N6McCkMbSx3ONDYL/cq6RO3zmcRCqWzluhigMa4VMkluLapFE2AzNX6+p pRsz60BDIFVpS2MR2cGUmuyS12s9zQMAhUV3pNd1bzEMwC8E7IBD/wDmZ3/TqwfWddl5/GSvTxn 2XH6lfs8AGoEbq+FVTwBb7dDpqIOrPFEdqlGfTtF66TLTG4UeSZL1ezDRAJEWa3sB0FMNazUJnP xURS8uPNDamK6LHT0jw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 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. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 4 + drivers/media/platform/qcom/iris/iris_vpu3x.c | 141 +++++++++++++++++= +++- drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 + .../platform/qcom/iris/iris_vpu_register_defines.h | 10 ++ 4 files changed, 154 insertions(+), 2 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 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 13fbb21c2182..ff90c375e805 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -22,9 +22,19 @@ static bool iris_vpu3x_hw_power_collapsed(struct iris_co= re *core) u32 value, pwr_status; =20 value =3D readl(core->reg_base + WRAPPER_CORE_POWER_STATUS); - pwr_status =3D value & BIT(1); + pwr_status =3D value & VCODEC0_POWER_STATUS; =20 - return pwr_status ? false : true; + return !pwr_status; +} + +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 & VCODEC1_POWER_STATUS; + + return !pwr_status; } =20 static void iris_vpu3_power_off_hardware(struct iris_core *core) @@ -254,6 +264,124 @@ static void iris_vpu35_power_off_hw(struct iris_core = *core) iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC_CLK); } =20 +static int iris_vpu36_power_on_hw1(struct iris_core *core) +{ + int ret; + + ret =3D iris_enable_power_domains(core, IRIS_VCODEC1_POWER_DOMAIN); + if (ret) + return ret; + + ret =3D iris_prepare_enable_clock(core, IRIS_AXI_VCODEC1_CLK); + if (ret) + goto err_disable_hw1_power; + + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC1_FREERUN_CLK); + if (ret) + goto err_disable_axi1_clk; + + ret =3D iris_prepare_enable_clock(core, IRIS_VCODEC1_CLK); + if (ret) + goto err_disable_hw1_free_clk; + + return 0; + +err_disable_hw1_free_clk: + iris_disable_unprepare_clock(core, IRIS_VCODEC1_FREERUN_CLK); +err_disable_axi1_clk: + iris_disable_unprepare_clock(core, IRIS_AXI_VCODEC1_CLK); +err_disable_hw1_power: + iris_disable_power_domains(core, IRIS_VCODEC1_POWER_DOMAIN); + + return ret; +} + +static int iris_vpu36_power_on_hw(struct iris_core *core) +{ + int ret; + + ret =3D iris_vpu35_power_on_hw(core); + if (ret) + return ret; + + ret =3D iris_vpu36_power_on_hw1(core); + if (ret) + goto err_power_off_hw; + + return 0; + +err_power_off_hw: + iris_vpu35_power_off_hw(core); + + return ret; +} + +static void iris_vpu36_power_off_hw1(struct iris_core *core) +{ + u32 value, i; + int ret; + + if (iris_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); +} + +static int iris_vpu36_set_hwmode(struct iris_core *core) +{ + int ret; + + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, true); + if (ret) + return ret; + + ret =3D iris_genpd_set_hwmode(core, IRIS_VCODEC1_POWER_DOMAIN, true); + if (ret) + goto error_disable_vcodec_hwmode; + + return 0; + +error_disable_vcodec_hwmode: + iris_genpd_set_hwmode(core, IRIS_VCODEC_POWER_DOMAIN, false); + + return ret; +} + const struct vpu_ops iris_vpu3_ops =3D { .power_off_hw =3D iris_vpu3_power_off_hardware, .power_on_hw =3D iris_vpu_power_on_hw, @@ -281,3 +409,12 @@ const struct vpu_ops iris_vpu35_ops =3D { .calc_freq =3D iris_vpu3x_vpu4x_calculate_frequency, .set_hwmode =3D iris_vpu_set_hwmode, }; + +const struct vpu_ops iris_vpu36_ops =3D { + .power_off_hw =3D iris_vpu36_power_off_hw, + .power_on_hw =3D iris_vpu36_power_on_hw, + .power_off_controller =3D iris_vpu35_vpu4x_power_off_controller, + .power_on_controller =3D iris_vpu35_vpu4x_power_on_controller, + .calc_freq =3D iris_vpu3x_vpu4x_calculate_frequency, + .set_hwmode =3D iris_vpu36_set_hwmode, +}; diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.h index dee3b1349c5e..bee8ae9b4308 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h @@ -12,6 +12,7 @@ extern const struct vpu_ops iris_vpu2_ops; extern const struct vpu_ops iris_vpu3_ops; extern const struct vpu_ops iris_vpu33_ops; extern const struct vpu_ops iris_vpu35_ops; +extern const struct vpu_ops iris_vpu36_ops; extern const struct vpu_ops iris_vpu4x_ops; =20 struct vpu_ops { diff --git a/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h b= /drivers/media/platform/qcom/iris/iris_vpu_register_defines.h index 72168b9ffa73..e67d98b8c91e 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h @@ -7,6 +7,7 @@ #define __IRIS_VPU_REGISTER_DEFINES_H__ =20 #define VCODEC_BASE_OFFS 0x00000000 +#define VCODEC1_BASE_OFFS 0x00040000 #define AON_MVP_NOC_RESET 0x0001F000 #define CPU_BASE_OFFS 0x000A0000 #define WRAPPER_BASE_OFFS 0x000B0000 @@ -14,6 +15,8 @@ #define AON_BASE_OFFS 0x000E0000 =20 #define VCODEC_SS_IDLE_STATUSN (VCODEC_BASE_OFFS + 0x70) +#define VCODEC1_SS_IDLE_STATUSN (VCODEC1_BASE_OFFS + 0x70) +#define DMA_NOC_IDLE BIT(22) =20 #define AON_WRAPPER_MVP_NOC_RESET_REQ (AON_MVP_NOC_RESET + 0x000) #define VIDEO_NOC_RESET_REQ (BIT(0) | BIT(1)) @@ -35,6 +38,8 @@ #define CPU_CS_AHB_BRIDGE_SYNC_RESET (CPU_CS_BASE_OFFS + 0x160) #define CORE_BRIDGE_SW_RESET BIT(0) #define CORE_BRIDGE_HW_RESET_DISABLE BIT(1) +#define VCODEC1_BRIDGE_SW_RESET BIT(2) +#define VCODEC1_BRIDGE_HW_RESET_DISABLE BIT(3) =20 #define CPU_CS_X2RPMH (CPU_CS_BASE_OFFS + 0x168) #define MSK_SIGNAL_FROM_TENSILICA BIT(0) @@ -52,14 +57,19 @@ #define WRAPPER_DEBUG_BRIDGE_LPI_STATUS (WRAPPER_BASE_OFFS + 0x58) #define WRAPPER_IRIS_CPU_NOC_LPI_CONTROL (WRAPPER_BASE_OFFS + 0x5C) #define REQ_POWER_DOWN_PREP BIT(0) +#define REQ_VCODEC1_POWER_DOWN_PREP BIT(1) =20 #define WRAPPER_IRIS_CPU_NOC_LPI_STATUS (WRAPPER_BASE_OFFS + 0x60) #define NOC_LPI_STATUS_DONE BIT(0) /* Indicates the NOC handshake is com= plete */ #define NOC_LPI_STATUS_DENY BIT(1) /* Indicates the NOC handshake is den= ied */ #define NOC_LPI_STATUS_ACTIVE BIT(2) /* Indicates the NOC is active */ +#define NOC_LPI_VCODEC1_STATUS_DONE BIT(8) =20 #define WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0 (WRAPPER_BASE_OFFS + 0x78) #define WRAPPER_CORE_POWER_STATUS (WRAPPER_BASE_OFFS + 0x80) +#define VCODEC0_POWER_STATUS BIT(1) +#define VCODEC1_POWER_STATUS BIT(4) + #define WRAPPER_CORE_CLOCK_CONFIG (WRAPPER_BASE_OFFS + 0x88) #define CORE_CLK_RUN 0x0 =20 --=20 2.34.1 From nobody Sat Jun 13 07:49:53 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 796D3421A1E for ; Fri, 8 May 2026 19:02:19 +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=1778266941; cv=none; b=Mer/usgbUSYqnI+AGQUGj57yJu3E9TCCQ87Xo9MwRtx+Tlo9CTAUq5OtW8SE5SF2Dh12RfjIBo9bAPLgNAjbWa6EK3WsFMQfLa0nOMttMSG4KyUJq2exO3eYUAte40wsQJWfr2m5D7g1ELfk86cw3dY1rq+QnZnzcdHIXa+0BOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266941; c=relaxed/simple; bh=xSTCuduleCdTS3ksmwRYWM8cOaNbocIn1Ie2DQQi3e8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JUSgw2QSCMIlI2FjWg1caW/yG2U22cEZoLMcsSQ/Csz8jLZKDD5UgLp6bbWqdmuUXXSQe+tRIB7xixaaZEI4VC40vg/1Wf0m3NVV7YqFFlJ0ksDBVU9RBw9qMvVGiHMU/MgId7YIhxp3M1/dn2b7g0VV0PsI5d6PdssrRTUVMYM= 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=WyYuZ52H; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=T7qViXSM; 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="WyYuZ52H"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="T7qViXSM" 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 648DE6uo258436 for ; Fri, 8 May 2026 19:02:18 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= CX/mLQxL0XM122mOD78xRebannrP0Pl/tNL9f8AVJkY=; b=WyYuZ52HjufpGIos +yiGavtnaKFdJEsWGHuMjHU4fSai5vk2WY+LarwyeWYJPuii8uIer4OkNnekvx13 ut+2/SR2NMAlUUYtYC7Zaenra6m7rMIfOKuH02wIYWYNqulsM1exILeKrEIKabOu 5iEduw3ygAqC13auVux0LhLKzwChbaLUYWqfHVxasTq+3CMN46sBBAOkVmromFw9 xX6Zae6TravoAE4T7AUUc74C3L0qsUBAuus/HYVZ3AvTJxz/dua0qtTD3sL31bO4 bTIRAHigzfd28hv81UzHgQiKXxJXhFv6xMoaENUZYuCyxZfJB9xKKiweyPtj8cs7 Fi6p1A== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1auejsk3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:02:18 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-82f85179263so2375998b3a.3 for ; Fri, 08 May 2026 12:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266937; x=1778871737; 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=CX/mLQxL0XM122mOD78xRebannrP0Pl/tNL9f8AVJkY=; b=T7qViXSMOBZ4SGdAFUgqRYRuy+NwvQr0IduO2nn7I7sOzGMpLsXJtGsmcw+DvjaUCP 0kqBP3BLVkDJgiUHfHSqeWFBVTmQAOHYKEbI39pjyhpr7/mgwQS3PGS2vnccHmBnyEnx Jz7Vu4ZHAvnvr26GHhn0MgZuyXAdq9RexhgpXojtwGX8kQvs/EeseMFn3Zb3eFRhSWmO jSTU3waIJgmFhc4CuoyesShToDtRNSapyzoxRbEJL3IkB9AzZlbdcaT6cJUnNhmQVbrU KkD08HywmgSWNfBO1kFRlJBQiUNqu7rtfMysICuTiDtW32C1Ka5X3DriSpLf4lyLbdu2 EfpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266937; x=1778871737; 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=CX/mLQxL0XM122mOD78xRebannrP0Pl/tNL9f8AVJkY=; b=rlL5Q60oOZ9TkxZocRyfK+3M8+KPWOoEunlqjGy167EEDFtZc8+p0HkOIZochznxC1 WJUF0W+y7dZ799JBgEbIhSH9KNbzbjcsWn56uGyIpfLrfN0MAYonxBJtZjXXesKUW5u4 XR+0SyO/+wmU4Tfvrvpvr1Zuv13entN+ovDIKjAxmy57U1nnaj0ljst2K2nr8ZTPqdmC y90FiWRillGkfHTBbcqHiLlRRuFT4oDO9YaxpxW+m/8qxcxS/ihgjUO9Q3uMgQFo8ej/ q8WWB/uv9qnIm3yGujBxbRZrmZGnHfN1hPsMEOF0Mr9oyvUvAAXhpmMuEfq6q7GqryWA uUOQ== X-Gm-Message-State: AOJu0Yxne1PGdC1VeRB9od5aWI6FXr1TKw3sTs+0yDXSWbRji8aVBiii k42LL7dM9Sr61ZxNgPs+vAo9POc5hJ4IKXaV+/bF0LCjgM7HhM4DkGsLKL2AZssORqJketLD2JR zCnwbm82hQMPy3gsLuYMX818AL8Q1CzAKEdeMz/y6NpjusRbvFShIBcLvJMck/nXNylQ= X-Gm-Gg: AeBDieuS+TLfSsItVitRh9s6fmLaR+kKOi4FGP3kKE/vHrsW+Alh5ej7k15bXtinUw+ UBWAfyuV+4OOo+jsh4sjKeZ671wL9+jijpnCnYFSZPB7PZjd1r6IUQM8Iv5L/qt+6Ms+Q4FGxsB VH46fy6hARPDyOH0tZVDtwiohV3O8XKcOtKoRxwwyGVkkyyRE8mKh7dbilYMP8Q14M1H50i41tJ R2bo73jFOUqTBEScxvl4P/J8pW25p5Cos7qNvNx8iKrClP4rpCVU/Y3GSDaFdqJiZq+hV6d7ZhB /zks5Ha0e3j4ZlWsJIMUkbdxJhQ/gFVLIPqHAUTI27aeqmJTdiUdP6DHXJSOk23XEX7HH0WNdN3 +hMlfvDnANHP3/xodpkwTyVTCymV4wE2SP1BgBiyzoO00R8m8/s4/sKk= X-Received: by 2002:a05:6a00:2411:b0:82c:e0d7:2682 with SMTP id d2e1a72fcca58-83a5df487e9mr13633864b3a.25.1778266937012; Fri, 08 May 2026 12:02:17 -0700 (PDT) X-Received: by 2002:a05:6a00:2411:b0:82c:e0d7:2682 with SMTP id d2e1a72fcca58-83a5df487e9mr13633803b3a.25.1778266936365; Fri, 08 May 2026 12:02:16 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:02:15 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:30:00 +0530 Subject: [PATCH v5 11/14] media: iris: Add support to select core for dual core platforms Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-11-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=13228; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=xSTCuduleCdTS3ksmwRYWM8cOaNbocIn1Ie2DQQi3e8=; b=Ch8yJ0r7/VA/fvTdggbVVY033Dd8GshfLUvSqE5JorukITqbv6j6Zol6oOvHHxrGusVJYJvpP XlV45BZTORxDOKDKHpf3OHok3nfZEADEgb4AEhyOAgcAuLVsMqS0Dbz X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX2KXhl38+fbCo bsV4ryLtHQEt2QTNVBI1jAuPU8yUo5Ka+BKD7fM4ZgnitA0q9m1F5gyxjypswCeBWIIWvYYXDfj BL4XlZegSi8oATodV0Dvpo4G7uJaf6SAns+4WV7dkQaF4sOmd4ysS459D/eEjxEJskpx7bhwKmq v6RoOPMLAaKx/9pJGYoe3XWuXTIJ9lyAg7XccBrzfQZejfV2672BAy/AdIPvYs3I+2y2OGMyZs/ GdBHBLX6jQNs68ve2inQ1dVAtfOiv4iXdROYWSL4yMn2L7b4/ACRsQyiQQt48jFZ1CJW7tvZ1xj pr0uvilbF9VtD2dYxeL3W/Ba+pDMEmrxWCwbtIl6IEE5PK9284YUQJbmZM6ceZuWbVP9VdTfGz0 RNkf163mzbh3mW14JyJnctc0JkzeTS+Fq/wp6oil3OEgU6e/sLSOaOW1t21t9recCig4ztj6EsF 2QvaE9+0KWKlvZ1vUiA== X-Proofpoint-GUID: WoPvKFEbt_eJWVixdV5rFs2NZCoi49yj X-Proofpoint-ORIG-GUID: WoPvKFEbt_eJWVixdV5rFs2NZCoi49yj X-Authority-Analysis: v=2.4 cv=fcydDUQF c=1 sm=1 tr=0 ts=69fe333a cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=bXJvY2iSGLnMjMWPEVkA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 impostorscore=0 adultscore=0 clxscore=1015 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 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 | 75 ++++++++++++++++--= ---- drivers/media/platform/qcom/iris/iris_vb2.c | 4 ++ drivers/media/platform/qcom/iris/iris_vidc.c | 6 +- 12 files changed, 113 insertions(+), 23 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..b72ce5b596b8 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 + 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 max(vcodec0_freq, vcodec1_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..da8a89d3dd41 100644 --- a/drivers/media/platform/qcom/iris/iris_utils.c +++ b/drivers/media/platform/qcom/iris/iris_utils.c @@ -90,40 +90,79 @@ 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; + u32 fps =3D max(inst->frame_rate, inst->operating_rate); + + return iris_get_mbpf(inst) * fps; +} + +static int iris_check_and_assign_core(struct iris_inst *inst, bool mbpf) +{ + const struct iris_platform_data *platform_data =3D inst->core->iris_platf= orm_data; + u32 max_load =3D mbpf ? platform_data->max_core_mbpf : platform_data->max= _core_mbps; + u32 max_session_cnt =3D platform_data->max_session_count; + u32 core0_session_cnt =3D 0, core1_session_cnt =3D 0; + bool dual_core =3D platform_data->dual_core; + u32 core0_load =3D 0, core1_load =3D 0; + bool select_core0, select_core1; struct iris_inst *instance; - u32 total_mbpf =3D 0; + u32 load, new_load; =20 - mutex_lock(&core->lock); - list_for_each_entry(instance, &core->instances, list) - total_mbpf +=3D iris_get_mbpf(instance); - mutex_unlock(&core->lock); + inst->core_id =3D 0; =20 - if (total_mbpf > core->iris_platform_data->max_core_mbpf) + list_for_each_entry(instance, &inst->core->instances, list) { + load =3D mbpf ? iris_get_mbpf(instance) : iris_get_mbps(instance); + + if (instance->core_id =3D=3D IRIS_VCODEC0) { + core0_load +=3D load; + core0_session_cnt++; + } else if (instance->core_id =3D=3D IRIS_VCODEC1) { + core1_load +=3D load; + core1_session_cnt++; + } + } + + new_load =3D mbpf ? iris_get_mbpf(inst) : iris_get_mbps(inst); + + select_core0 =3D core0_load + new_load <=3D max_load && core0_session_cnt= < max_session_cnt; + select_core1 =3D dual_core && core1_load + new_load <=3D max_load && + core1_session_cnt < max_session_cnt; + + if (select_core0 && select_core1) + inst->core_id =3D (core0_load <=3D core1_load) ? IRIS_VCODEC0 : IRIS_VCO= DEC1; + else if (select_core0) + inst->core_id =3D IRIS_VCODEC0; + else if (select_core1) + inst->core_id =3D IRIS_VCODEC1; + else return -ENOMEM; =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; + int ret; =20 mutex_lock(&core->lock); - list_for_each_entry(instance, &core->instances, list) { - fps =3D max(instance->frame_rate, instance->operating_rate); - total_mbps +=3D iris_get_mbpf(instance) * fps; - } + ret =3D iris_check_and_assign_core(inst, true); mutex_unlock(&core->lock); =20 - if (total_mbps > core->iris_platform_data->max_core_mbps) - return -ENOMEM; + return ret; +} =20 - return 0; +int iris_check_core_mbps(struct iris_inst *inst) +{ + struct iris_core *core =3D inst->core; + int ret; + + mutex_lock(&core->lock); + ret =3D iris_check_and_assign_core(inst, false); + mutex_unlock(&core->lock); + + return ret; } =20 bool is_rotation_90_or_270(struct iris_inst *inst) diff --git a/drivers/media/platform/qcom/iris/iris_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 5eb1786b0737..a1ce3cd524a3 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 Sat Jun 13 07:49:53 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 3EE7B41B370 for ; Fri, 8 May 2026 19:02:26 +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=1778266948; cv=none; b=XkUCaNw5qAc4wt2joREjINraLRcjqLjWTV0Vfs2s4GQkLXbEEfsUbGkiZKVRT5MIAfVUZZ1rD32bG8+yO8vaNUai2jHGNSGh5v+uQCaOr35/Tvz/ICvfXQXQDE097z0nfDHwCB0sFd4D1WG9S54KuN3jhhOPwNMVQjsIhdeWWqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266948; c=relaxed/simple; bh=NJSdAXZkHYGiL5IiO5nzpmf3dRQxwMwMQ2OLeMaz0HA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FZ7GcHif5qrlqhGOJT7rEO8TV0AdTvseyO6iPZmd/ia/luMGrbPAd0dQd5Hns6BYSDhrb/muNzv5dDveI2deAG1lLOM+o61GVFKYtRnj7J29fQIFh/lPJhkAFewPrRl6zdPbGF/0Zv+Irq2EPWqHJC3eSG9xwk2DGZPsQn8hnJM= 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=LItmtSTD; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RY7jwmw9; 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="LItmtSTD"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RY7jwmw9" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 648CGxkR852376 for ; Fri, 8 May 2026 19:02: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= 9pLZcDc9inyNXkLcuhRnBSRa/7qynd2vanhOczFldBY=; b=LItmtSTDH+0pLeAu eKp7DqSIyfDN7oRyt4uFmIlZ5iF+inM+UQtcrCJ8rI3DB+AmP9qVPzLndaw6mjfa eyxrxzr0S7qx5wr9JM2k+XNVsSV3MY8zyTIEEbe2epgwueePxbWBA286+sQD3HRp qoX/IC0uILHBMmpySK3mgmjlQTeZFKUs1NhXbkDWuS51sO9k+jEoWWooKvEZuR04 da9YyPYiR4JhWLKwDYgWRf88h9zw1kJgAYq6kyLLC1gLbmNa5IYj5RzaQW8EpDMT UO3TkFAut9eSvrcaJrH9r8ZXIHDJ0vgB38MAsrtlY9RZ4yxVbYD64cluPzFGT6zx MH/jVw== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1fpthk71-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:02:25 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-c7989b7cdd0so2514866a12.1 for ; Fri, 08 May 2026 12:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266944; x=1778871744; 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=9pLZcDc9inyNXkLcuhRnBSRa/7qynd2vanhOczFldBY=; b=RY7jwmw9O0Dpfk8ytW723V6zTw568cdYT5C7FepMgxSDkrJ5XSI0a80/Rfk1w0etvk evz2fYRywoHXwnSigu521OQvkuaLC8LCISdV+a9vmp00MKj2dGlI8rHcEHE/klKyw8Zj 49ITr1UdGmuNIrCUpNIfdOTFKKSJN0ByVaZky1aasjDOVcpdu89jI3vJ7Q+XCibTMYo3 M4NPkXbNroom5Ig6p1/9VYTjjORiOFBadrdrT4Zm2Jvw9lPKTAvT2nBL2XxEJGii4jcD zT4xmB5OsYUOrPjUt1+yMNtRCGvcgIMq0zdbqGAeW7fwMK4RA/zIZX5gF4QdbMwh2dNx QaLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266944; x=1778871744; 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=9pLZcDc9inyNXkLcuhRnBSRa/7qynd2vanhOczFldBY=; b=lh3KV80y5+xd241ocqQU4u+8orBvlaoOqaHd8IUuC87MsbZ8DFwRIoKxfY0HgTyYUD GmgeXTseC5R4qA37LuifXyBy0gb0yZc1t5iarBpx17jic4HmrMH4506sjjlsdBAyx1L3 03rkRv/VijtQwfzLczp30Zn+qg9JJD7TVo3yfpA9qwIp9uQvN6gOmazM6YHMPViEn+fj z2Yr6PMuLZaxogWEXxR15oRD25tHIz1RkCuBuZ2ZyqsSCrqK4S88jhf1Ij+Xw6F/625X xvVf8O6g8OKg1HV77Q+q3K8NBM48Uu4gH0GdhQf4hR0waN39Gs2DcS/GYJu7BdZ7rFSQ szNw== X-Gm-Message-State: AOJu0Yw3+FYvvrThiVkDpCaASKs1de2Ac+9G33rkdO7MXdXes5Pt5vQ2 4Nad6q8EymgyweoYUbTkO+ZA8lPj960TDEPcAp2XctN3lXZtEAsXC6wIw+F4QulqXkhHX+7cI+x mWU0AK8R7VEc85goTjtUMsJxjoOVxFHMw2RPiGi7sMkXOZxlkL+0nQ4yXrRxo/+YiTdc= X-Gm-Gg: AeBDietx62/WSPfQ0vqlsdBMT1slJ4uzf9PtlChjZNRMRcs/xEaxtdeuWDkfro2M3JY ECeqyvFaPvmXyHWE1VXY4SJp4nWHyU5i2jfAmQ55VOw9bKkWpbXQbPRp642GS+RWItmobtkzdLl C6RI/nMvZxUYN1NcqJ+M0t+2r3kTAMl0Y4ZgGChxGjihIY+IAei6S1iDfRqojDWvS+38e6eF2Y0 7MeO4AVJQII6681A0JoM8tpiP/Tm0CZ/DXKNMtSO0o9CkBHfOufa0rW5FKMnoiKFtz+hOWd+C1G MQbPmSmAi8ePBMi2ogIyj1SyDSyH4fhlwSYIkynL+vqcIwKfXyrJ8iHFK6egGHD2t8BWXTHtBkF dMB0/EkUYH+F49ko5VtrYRM5miqlC0U9uIO8n17e83nFJ8BEsJBe0uIM= X-Received: by 2002:a05:6a00:b48:b0:82f:280a:d888 with SMTP id d2e1a72fcca58-83a5bbd5fd8mr13717612b3a.12.1778266944219; Fri, 08 May 2026 12:02:24 -0700 (PDT) X-Received: by 2002:a05:6a00:b48:b0:82f:280a:d888 with SMTP id d2e1a72fcca58-83a5bbd5fd8mr13717578b3a.12.1778266943701; Fri, 08 May 2026 12:02:23 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.02.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:02:23 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:30:01 +0530 Subject: [PATCH v5 12/14] media: iris: Add platform data for glymur Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-12-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=11630; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=NJSdAXZkHYGiL5IiO5nzpmf3dRQxwMwMQ2OLeMaz0HA=; b=jYiEBswm/zLDEuiuajMGOj0+AOrnhnYJqk0fB1LIUJs7h+ydYyzSfHmSHFQHSslUF5WaHBQiB p8TNPmkexdGBs1d52jbMpnTdEwRFU8GWRqzHSkFTNBwiV42ZiCeS3in X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: vyTDCTeDIBVyh9R6bQ8tPXqYo8nwDuvW X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX81ouf2DVOy9a vQPx9bObLV9C1W+wzhqKSwPa43JsIG/163r7CBm3beE+KwL+ZXS+DqsBojfyD2jizhYkD5ibRyr cmv36LXDDOy7B6OxwV5qyj5/Vl3vbh+KDRV9Uuzd/OW1MckvjNOO6U7MIWkrfCRtTgzNwjZYO7h WtYOd216hr2ip5wArsNaijd9mGtbWj1Zxpess7m6js8snXd5MOgoD/TQNjvj90lJ9cS/880bAUq OPNgASBboz1X6xcvsOU6/4yUsuIiNs1spEAJNaVDJQHIDIKjsBznKxvRTHLbvE3Y8MO2W+5dQk8 sI52u44/4Sbd8PaTbgjOhqtETHGj0D1l5MH4Yi7t+jIL83IhwMGsDGIw5xJcmfFV17dZ8s8S7yf bN1ZFDRc4KA7y3mzZMv4eIFb0MBNttfCoG09wyMFtaXG/jv9XAzQUdF27lneSfZaSyyE6HMpzUD +lmalDfs9fjCUr3hRBA== X-Proofpoint-GUID: vyTDCTeDIBVyh9R6bQ8tPXqYo8nwDuvW X-Authority-Analysis: v=2.4 cv=IYi3n2qa c=1 sm=1 tr=0 ts=69fe3341 cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=syK4oCsQgbaUnHKzOKsA:9 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 malwarescore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 On glymur platform, the iris core shares most properties with the iris core on the SM8550 platform. The major difference is that glymur integrates two codec cores (vcodec0 and vcodec1), while SM8550 has only one. Add glymur specific platform data, reusing SM8550 definitions wherever applicable. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/Makefile | 1 + .../platform/qcom/iris/iris_platform_common.h | 5 ++ .../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 79bc67980339..adb970b3a3af 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..f16155b7dc99 --- /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 fw_fid =3D IOMMU_FID_IRIS_FIRMWARE; + struct device *dev; + + dev =3D create_iris_vpu_bus_device(core->dev, "iris-firmware", dma_mask, = &fw_fid); + if (IS_ERR(dev)) + return PTR_ERR(dev); + + if (device_iommu_mapped(dev)) + core->fw_dev =3D dev; + else + device_unregister(dev); + + return 0; +} + +void iris_glymur_deinit_cb_devs(struct iris_core *core) +{ + if (core->fw_dev) + device_unregister(core->fw_dev); +} diff --git a/drivers/media/platform/qcom/iris/iris_platform_glymur.h b/driv= ers/media/platform/qcom/iris/iris_platform_glymur.h new file mode 100644 index 000000000000..e0d07ccf658c --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_platform_glymur.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef __IRIS_PLATFORM_GLYMUR_H__ +#define __IRIS_PLATFORM_GLYMUR_H__ + +extern const struct platform_clk_data iris_glymur_clk_table[9]; +extern const char * const iris_glymur_clk_reset_table[6]; +extern const char * const iris_glymur_opp_clk_table[4]; +extern const struct platform_pd_data iris_glymur_pmdomain_table; +extern const struct tz_cp_config iris_glymur_tz_cp_config[3]; +int iris_glymur_init_cb_devs(struct iris_core *core); +void iris_glymur_deinit_cb_devs(struct iris_core *core); + +#endif /* __IRIS_PLATFORM_GLYMUR_H__ */ diff --git a/drivers/media/platform/qcom/iris/iris_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 Sat Jun 13 07:49:53 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 2A908410D3D for ; Fri, 8 May 2026 19:02:33 +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=1778266954; cv=none; b=iiheg3huezSQ1kUDYfLJy9qBt8tXnYLPFMvTUs2XvpjqriU93ekkMzaAedGrXB0j6Zow8XoIBEm1uXkrqnTWahL/MNo9o+Tz/z/wdHUSqUW4jMi8LfWEBTsA97sbTuYcdAax+BU9fNCl+dklfClK2oWMB5hknifOUVmSRUa4L5s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266954; c=relaxed/simple; bh=PD1gpoX4LAukVY7c9h2PcdOHpE6W9WE7RaExHqCiq04=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KjV0YF+KaPyW8Tss2nKdZRnebf3wiEYyyvF6rEQaaovqy5JcAXKp5D+RRUGBJ7E0B2GTKLkniKKBumkn3eQXMHLdyCOltD3+3IU4TgsWwsclOwHJ2O1ZEkUihsMEYXGD2LxXLEFH+OEgY1ciJFOAk/gwJm1VKRQtsz72TjZRsq8= 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=MU1m029N; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=F2Y53Q6K; 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="MU1m029N"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="F2Y53Q6K" 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 648GWIrI2335407 for ; Fri, 8 May 2026 19:02:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= geJxq8Fym74xZf3sPrd/0n2hwRmsRBx/QMPFY1ao6wk=; b=MU1m029NCzcq8bud 1rBJry2xZkVvtjCxyCQGvWF1WaXKGKl3DH6KGsdRLS7EmylQxpgXUBKWH8UxZwa6 JKfp5WuLhT3Eq5Z4K3Jef2+JV7IowyiapQFaIOkgmPv3wPjUucBnWF8VYIFRQndH RSW4PFMzht7K4hF4aFrwrf8y3SDvdvYPWH120bij44xJE+aF3POzp0lh5O1OwkdX +NP4XI7ZaNuBNzNDaiQYGsLyVIZ1kk1tG6rSfSmIt9g/mFMj5Lfvb8m6kii6omxw beK1thm4apr11BYp7bxlQlYr6AbGEzHFp1pnCmVCkZdRtHdyOlfxz4CgV2/Xh/04 aLlmbQ== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1keh8gr0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:02:32 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-c797efdaa9cso1198655a12.3 for ; Fri, 08 May 2026 12:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266952; x=1778871752; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=geJxq8Fym74xZf3sPrd/0n2hwRmsRBx/QMPFY1ao6wk=; b=F2Y53Q6KkR+EWYnQUiYwp6Gjr7giLhdcPOWu7+N/lfPQmM8BnE83sCkBcJf8zA6qvd /0wHGGr2Fdh5XAiG1J9VMCv5E7YaazTl6Q4f0cWBFA7S7xxXw0d2M3js5VffddNQC2Hz zOiIa9v4qsEODrPVA1t8a+5UuNmjiDc2SBLhwdTZcUA1IUnmS9LgNK8IrpTuOgBsmjPV P+9xR34dN1VNq/K2c9Ibhkgl4UsLR/ez08Mf6YDUTj/v15Ts0/F6napb3zDklb77bc3M UjC51IIstogaB2oV+XDyEa5QVEKkKS0ftDChY+eS1zaKCVkL+doxvZTfitLl0CYIciuT 87BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266952; x=1778871752; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=geJxq8Fym74xZf3sPrd/0n2hwRmsRBx/QMPFY1ao6wk=; b=Jqi/z3lHfRVbgDOXaN0GDXGcHGe2gdGf+SL/W6RbpaZgNq3jI6jeEP30aN2Yg3loMp QNK74CKLoOReUivNUIhqQElvM5YopNVzpNM30csbPL4kgDKKCdFT27rFA6hX2ATDnDO0 xx2T1+qsAIDgX7NXKdZJjBskrN3I+ykSsOr3Mn7r5cj4qJ6EH1ycSM5IpXNF+7GjmYTI yhR1T1wAIyMJkwiQBHMqZ5wUrEhEUewGcKzUKDAQrU4QzPspo8sYrF6fY0twXlJIcVjH HveWfZQncwgPg0DoKgNH3WFJpPLjmq4ltt7uv31c05l8GUs42t9/gf7sy3v00CjhpZ0V TEdA== X-Gm-Message-State: AOJu0YzqXpg8WowqQ/DRNoXIQyPa1djN4A/1Afj4Fb1jZQ+2sxPY5GuH DQ1Kn7TEFAmsJqZHnEmKm8eFontOzlE0rB48kZfjox78OS4qPX0F7jtiD0vTNfvGsEQmyZbI9mw Dgdlu3ahN+tmsGocB7pYNEkcfrDnN89QDOu6cz8JozDLt7HiVcKd0T1iO4HYb/TRFg+s= X-Gm-Gg: AeBDieupkTfdVkckaFNYtjJCCuyWjepL5yvQqPcqLVRE709XUZqeWDA8R8ZkBG6XbwX iBn4m8+JLQ7DLlC1gSk76TaL2SLLUrFUwgQVYAKQ7fn97f1DFGVtIxi2nU1PZiBgTockKbITz1e uM4yQIiM7vnbiYNqif/2nFPqPjT/lu/TUj86TyAyNoGO+K+S89WprHoAHqG2Mo+0zJm3qDPlhvn txnczS+aGD+wlqegYEObuwHlCvTuJsYACHgvQXWp+0wFDd+JFT8afmIQkyBMCZ25aKBIPtbdYW3 KnjK/jBrjYDFkLGDq1SO6TauPZBLM+Kz2vbQRsjorugiBRc2ZFs43bjxj6BmpXCrpvfTDPhc35n WMEiNpmqRjQUeSmzLtYF2osyeQF+Bbg0uao2bC3OrJlONCY98UHKRx07FLm0jfoq87A== X-Received: by 2002:a05:6a20:728c:b0:3a0:b781:4c8b with SMTP id adf61e73a8af0-3aa5a3b4ae5mr15654086637.2.1778266951537; Fri, 08 May 2026 12:02:31 -0700 (PDT) X-Received: by 2002:a05:6a20:728c:b0:3a0:b781:4c8b with SMTP id adf61e73a8af0-3aa5a3b4ae5mr15654007637.2.1778266950964; Fri, 08 May 2026 12:02:30 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.02.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:02:30 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:30:02 +0530 Subject: [PATCH v5 13/14] arm64: dts: qcom: glymur: Add iris video node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-13-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=4603; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=PD1gpoX4LAukVY7c9h2PcdOHpE6W9WE7RaExHqCiq04=; b=htiCnMycUhTW/Y5vw5fcLiYicxLdxT/NNaRRSIKx18osZwk43fBMd9KncaKgqZw8SRXyJSlIT SHtVHVWIXhdDFgd/k5ijxLMYZoehFPiEUM8psXH7JzaT9//S1R1QqJG X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=CJIamxrD c=1 sm=1 tr=0 ts=69fe3348 cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=VYrRtalYO0MCCBblpesA:9 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-GUID: XWURWWwGqXzoamzEBoGrtTf98Nk9Q9le X-Proofpoint-ORIG-GUID: XWURWWwGqXzoamzEBoGrtTf98Nk9Q9le X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfXzgkIg2DYm7ZM DROtiNfEwIuLKK06TA6wyguvJBN/vTZOGRl7rpxr54UoQg3G097Iu1f3J7OOSa6b3A9AjrkoHqs UNJ1FemYcuxRw5UTEu4UwXKXSM9I74wqiH+gLnlHtZBWe4orH3mX5S/0fc01d6ipnSSqgKVHLv3 DQZkMXYG0BeBou7xgMSgGuyuZfs1ymYN0IUX1d3ImSYqsoLCSp9VMX9Ji00OvYg2OJL8lXWXAzg /i+mtKbWV5TtiQ08gjoRmm5IhMdcZitCzK1piEL96X39YEpyizbONWIDlaTdyG2bKyuzHIwDEdD z2yf6LgLgYq8ZRlS0dLLe+HD46gRKwdh1dfunL2KQmrd10/U2BisIQf7skloHTG2S1q0O4fRTiI zYsMFhblLnc00mTcXHxTC1XygZuKFGNKm5z02LfUXS0uD+W53j61VWv90iBY6tYJNnAIiEMhs0C VJ7RzeMKNmKvuPoATkA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 spamscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 Add iris video codec to glymur SoC, which comes with significantly different powering up sequence than previous platforms, thus different clocks and resets. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- arch/arm64/boot/dts/qcom/glymur.dtsi | 118 +++++++++++++++++++++++++++++++= ++++ 1 file changed, 118 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/glymur.dtsi b/arch/arm64/boot/dts/qco= m/glymur.dtsi index f23cf81ddb77..c47443174f97 100644 --- a/arch/arm64/boot/dts/qcom/glymur.dtsi +++ b/arch/arm64/boot/dts/qcom/glymur.dtsi @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -4163,6 +4164,123 @@ usb_mp: usb@a400000 { status =3D "disabled"; }; =20 + iris: video-codec@aa00000 { + compatible =3D "qcom,glymur-iris"; + reg =3D <0x0 0xaa00000 0x0 0xf0000>; + + clocks =3D <&gcc GCC_VIDEO_AXI0_CLK>, + <&videocc VIDEO_CC_MVS0C_CLK>, + <&videocc VIDEO_CC_MVS0_CLK>, + <&gcc GCC_VIDEO_AXI0C_CLK>, + <&videocc VIDEO_CC_MVS0C_FREERUN_CLK>, + <&videocc VIDEO_CC_MVS0_FREERUN_CLK>, + <&gcc GCC_VIDEO_AXI1_CLK>, + <&videocc VIDEO_CC_MVS1_CLK>, + <&videocc VIDEO_CC_MVS1_FREERUN_CLK>; + clock-names =3D "iface", + "core", + "vcodec0_core", + "iface1", + "core_freerun", + "vcodec0_core_freerun", + "iface2", + "vcodec1_core", + "vcodec1_core_freerun"; + + dma-coherent; + + interconnects =3D <&hsc_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>, + <&mmss_noc MASTER_VIDEO QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names =3D "cpu-cfg", + "video-mem"; + + interrupts =3D ; + + iommus =3D <&apps_smmu 0x1940 0x0>, + <&apps_smmu 0x1943 0x0>, + <&apps_smmu 0x1944 0x0>, + <&apps_smmu 0x19e0 0x0>; + + iommu-map =3D ; + + memory-region =3D <&video_mem>; + + operating-points-v2 =3D <&iris_opp_table>; + + power-domains =3D <&videocc VIDEO_CC_MVS0C_GDSC>, + <&videocc VIDEO_CC_MVS0_GDSC>, + <&rpmhpd RPMHPD_MXC>, + <&rpmhpd RPMHPD_MMCX>, + <&videocc VIDEO_CC_MVS1_GDSC>; + power-domain-names =3D "venus", + "vcodec0", + "mxc", + "mmcx", + "vcodec1"; + + resets =3D <&gcc GCC_VIDEO_AXI0_CLK_ARES>, + <&gcc GCC_VIDEO_AXI0C_CLK_ARES>, + <&videocc VIDEO_CC_MVS0C_FREERUN_CLK_ARES>, + <&videocc VIDEO_CC_MVS0_FREERUN_CLK_ARES>, + <&gcc GCC_VIDEO_AXI1_CLK_ARES>, + <&videocc VIDEO_CC_MVS1_FREERUN_CLK_ARES>; + reset-names =3D "bus0", + "bus1", + "core", + "vcodec0_core", + "bus2", + "vcodec1_core"; + + /* + * IRIS firmware is signed by vendors, only + * enable on boards where the proper signed firmware + * is available. + */ + status =3D "disabled"; + + iris_opp_table: opp-table { + compatible =3D "operating-points-v2"; + + opp-240000000 { + opp-hz =3D /bits/ 64 <240000000 240000000 360000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_low_svs>; + }; + + opp-338000000 { + opp-hz =3D /bits/ 64 <338000000 338000000 507000000>; + required-opps =3D <&rpmhpd_opp_svs>, + <&rpmhpd_opp_svs>; + }; + + opp-366000000 { + opp-hz =3D /bits/ 64 <366000000 366000000 549000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_svs_l1>; + }; + + opp-444000000 { + opp-hz =3D /bits/ 64 <444000000 444000000 666000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_nom>; + }; + + opp-533333334 { + opp-hz =3D /bits/ 64 <533333334 533333334 800000000>; + required-opps =3D <&rpmhpd_opp_svs_l1>, + <&rpmhpd_opp_turbo>; + }; + + opp-655000000 { + opp-hz =3D /bits/ 64 <655000000 655000000 982000000>; + required-opps =3D <&rpmhpd_opp_nom>, + <&rpmhpd_opp_turbo_l1>; + }; + }; + }; + mdss: display-subsystem@ae00000 { compatible =3D "qcom,glymur-mdss"; reg =3D <0x0 0x0ae00000 0x0 0x1000>; --=20 2.34.1 From nobody Sat Jun 13 07:49:53 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 AD68E421F16 for ; Fri, 8 May 2026 19:02: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=1778266962; cv=none; b=tTV/Kcik+WyIZVMPCNNz5nvXJlfyO1dACFX2Sc03pHKDuq7HuiNnbbd7bExck80WAeoA47Wfe3y1YZ/RbiMWurgsCjeIOPLbI4eKvQvDEYQ98WENSwH3ozIja5MT2rShIM6EC9JTBsg3DG758clzJ+iMOE6NwxRlpMj/1VReMhU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266962; c=relaxed/simple; bh=DDN57pej0y3Ltf0ub6QCqNvBebv6aWZer0W3ArGFCCk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O444wrqKYGT+bVXkHlC1l3264RSEUZHxx3fdb7Q3LdGWD63ENzAJrs0pgzUbwKMZmqQB3k6bgD/x9tfg9a9PyR2qr7LooArsAvdZPyDcG4aqJqsAsJ/9eWSYO0tSYnfbsfWXQ6SC8+zTl1/bmvAs4rAU2ShVvA9ES4yeIJvQ9c4= 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=ZoiccdI/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=in/Xikor; 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="ZoiccdI/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="in/Xikor" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 648Hdqvl874113 for ; Fri, 8 May 2026 19:02:40 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= VUfpAIf6lAkbIZyifhFThrqlqNv+nw276Cn0YLBJZDc=; b=ZoiccdI/+SBIEzg9 A2Az9oCQElFc7yNejZdEsCIJ00/VCbC7tpKnJV0Iph/neJL79RUcIET/iB/z1FFC ryIiON5IuNMqTQZe3IOdbdtZeuZ1pxS1I7edrAyL/ltzeUrtXcrfvX8iBJGOIvsI XbHA9tbvoCTcZbjPjYEEsc5YtkbhaALxMmqeefIiRNNEttS0lFHY6UlsMX/Aoo27 rwBMj/u9a0RhVm0wFO98NckbhQfOYEShTpKQCh8wJH5UQTHfRCODU9rwhCc7O7o0 J1JbuBNuEKNxXepUA0CPJgqQf+c3TheZw8YTSDpOig/F7/Q3swqji/aYYwv4W/D3 NZRmUw== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e1me808mx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:02:39 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-82f85179263so2376703b3a.3 for ; Fri, 08 May 2026 12:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266959; x=1778871759; 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=VUfpAIf6lAkbIZyifhFThrqlqNv+nw276Cn0YLBJZDc=; b=in/XikorPuEIbIwV7jJuXpYHMVykYDCJO10aZCs3pehZtuXYavWgA52epmMgNxgsvo cNduCpsKMKPJaXhbntrcl/psrvoWE0rFjTaLw+iIgFyd35Cz26oB00P348owCic3xadp U/x1azZlow8VWmRuMdz3IhefmjbkjFXAI1zxqq21R0Oq6ta45HGB1gCA3XQGSbd9rChT j3HAXzkIN6B8ydjm/mHoii1QtUVRzvMLADZE3QfYJert4URKhcSQUpzU/SP2OSuTvBkL MLAvDTg15d//JXrmhckTsuDlyiFIOSIGW+ldeDnHrh14QWAR6Sn1MlWMX9jUGgdQ0fTO vyYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266959; x=1778871759; 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=VUfpAIf6lAkbIZyifhFThrqlqNv+nw276Cn0YLBJZDc=; b=oqXEqlA70dwjo2/Ly91nYt/wMrhyaPEKdSwbLL1B1EcnBkAMoJaYlq3cyptWw2kTkq htjKAMa3ZSgGaOdc7r1xdHQmVxmLb88qZEgS/pRrInSoHERPTqa5n5/pj6m+9QPM5X5T +L9D3/8dFJbHnPMScO9rJTLFcfvv393HnXGWvZKlnAwGgOI2/K2tkw7TUmMn6CQfTjgK gNgnzlHJ2Le++9Qz+qhtwKuxaiUdwAJ7ONR6pg4hCyCtLB13A6iay2oxZqgWS4YrD02d k2IMuEITbk2aKuldCZ7yUbPwAw94Kv42WJ8cp3Zmp4gea7pQmlqUP+MSRowXMfm3kKBm Krnw== X-Gm-Message-State: AOJu0YxXGd08MU15ON+vdPAzvdPmPRXbIXlQfIOq/JV01kmoecPhljna UDl2BR2xJQhziJGOhaD0bWU9QLpCbIhYHZCRBLR975tFO0gV//4j9IsiyKQ5W7ejqyNFklgv3S2 fEm4jRtIyd7hxRJDB+9nCmQ8OyAVP4buy8BTyTIhm+oz+MUp7QCNF6rtn9EVszMPz6QM= X-Gm-Gg: AeBDieseyxndC0ulD7j6AQq0rj6MyzP66TOxdgK2ZNS0Lldnpb6KRqeUxe8wtTfI+/R fC4qyQvAVB/GMxp6aQuFT9vVCwCn08MYj3EVUWPUBk0Io3u3FnS9ps6tXU9ESUp8MLYRWiEbUsJ Cozx8a0hCeSV/y+FfkhtQpH4Fv7/PgMmpqboeU6Xt69DdE/GDgnX/aS/XcDdLuxyhe83nD8ZQIP 40Das1b3RlOHrOOuN6DIQc3zqVBCumdDT4g+ZfdwW7BGCIMO8XDrQu6fTtg6Tg4BTd+19ng9ooc t5r2/hkohlkCki/uQNYSxwZ3MusRHpaf3+WWs0GYV3AkYDu4VQ6yHSsoPITtbYNrymqLbc3SqIy e9wC0KsymOxwMn9bK0cTTfJ8KfaP9zCicXKiNC5XHw4xAAnBIE7Y9bl0= X-Received: by 2002:a05:6a00:4b05:b0:838:af72:fb2f with SMTP id d2e1a72fcca58-83a5badbd3emr13466861b3a.6.1778266958764; Fri, 08 May 2026 12:02:38 -0700 (PDT) X-Received: by 2002:a05:6a00:4b05:b0:838:af72:fb2f with SMTP id d2e1a72fcca58-83a5badbd3emr13466823b3a.6.1778266958288; Fri, 08 May 2026 12:02:38 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:02:37 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:30:03 +0530 Subject: [PATCH v5 14/14] arm64: dts: qcom: glymur-crd: Enable iris video codec node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260509-glymur-v5-14-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=761; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=DDN57pej0y3Ltf0ub6QCqNvBebv6aWZer0W3ArGFCCk=; b=43GoEfeonHscvF5G4ZYHZZNfYPeq/aygoPj0v3/hqMHX2/+nPmJQ3WoIzvOBrug9x+yhhPKtc JFr/KTQrnkQACNGBhNoUj3l1N0rXNSwZa/klt7wlr+TtOon2nDNgQDS X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX9N2dmw2D8HNG gCSYDb+jaGO9Wpd/hZHrpsM2y7QJOnxm6H13GaJFguBbGwSHPfn0yzZK19t2Aq8lFzitHQcoih5 dBxXpYNfGmAhY0wFsMIhCXiLIj7hxDR4fiLg/39gxRV8jGVpAV78hoGJfd8lisnKXBhjWt+mbPL qboGzDcHKSzk0jKIuKiU7HmIytH91DONlvwOsdbAcYDIFqTBK3h0gHNcw4f04SC5cu5V4TYwnu8 a5c1eYeEUKzSpKFPDWz6jj99sUbRRQDuzTHFQu53udViUh+PJQsjkr2kFnd98W5Ptl4MPTSkn5l F2l+c4ensBA0pfE10nbXawxjzzgN69lyryvIcz8MBuU0hF8O8xP9BI1VRu25LKN0ehQj6dFSc0/ wkE+ympYWUMdafbsa3lrquRwfpGLpS72wi01su4sM3PQ8QEIxbDdAcWhdT6cdK9//1KSyfeOMw9 /rxJPAW+WFpRk92rq9g== X-Authority-Analysis: v=2.4 cv=BsKtB4X5 c=1 sm=1 tr=0 ts=69fe334f cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=Dn0IJEph4XI5J7oltBAA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-GUID: 91_Ntitu5NY6uGMHxzjif1EK_aNoIHvM X-Proofpoint-ORIG-GUID: 91_Ntitu5NY6uGMHxzjif1EK_aNoIHvM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 phishscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 The iris hardware block is described in the glymur SoC DTSI, and enabling it here allows the media iris driver to probe and use the video codec functionality. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/glymur-crd.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/glymur-crd.dts b/arch/arm64/boot/dts/= qcom/glymur-crd.dts index 35aaf09e4e2b..8d6ea857634b 100644 --- a/arch/arm64/boot/dts/qcom/glymur-crd.dts +++ b/arch/arm64/boot/dts/qcom/glymur-crd.dts @@ -198,6 +198,10 @@ ptn3222_1: redriver@47 { }; }; =20 +&iris { + status =3D "okay"; +}; + &mdss { status =3D "okay"; }; --=20 2.34.1