From nobody Sun Jun 14 00:15:00 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 C7F3D3D170E for ; Tue, 5 May 2026 07:00:41 +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=1777964443; cv=none; b=XcD9kaq/3MfXF02Kep1tA9LkkHhKms9j5S1vPdr3H1BDKRCD8l+XQYbhr/4hUUYBgXxXeWtYZfpdYBym+rQFjAHKCRW/8cxRXadWwZ7Yh/d0moa76EnMrnReAivjfx59oqAmz+U2vwfR6flDiLD5gUVj9MgjLFafla9uoQu6Uj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964443; c=relaxed/simple; bh=XCLAciwoGLa2sJvy/DDGRqny4ifzNwzjaeJeVzt0PYg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cF4WkLx4Flxkdw53/CmdZZFtts+IyhFbJ8st1b8ARj8Bhy24AogFWEm8g1KlVrkYYcvtXSYVDQk/LHxCsROqflzQy0jJN3pqiIArX3c/Czi3s0bPkZI8L90XLOUU3IWBUk2HEvo2Z3nIKpIIruS7UzcW+Arr4gL4T3Geot6MDkA= 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=XIYAc0wF; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=FzB5dxSr; 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="XIYAc0wF"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FzB5dxSr" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6450skND1346361 for ; Tue, 5 May 2026 07:00:41 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= mCM0+/uGCzj/hM4vy1/xEsxuxsqzm+PtmpUe54/lVkk=; b=XIYAc0wFJxzEGvc/ aUOolG4rOkBmutVXUNU8SM1/TVb6OL9iXDBL+kom2dgZnmX9RYWvTs4JOoOd2wvC D34o3YbCKlu+k/Oxen181/BNCJSusv0IsA/XC05XKLQb+6CBJQjARnClpb+GLt3Y im6Q8ddCxXFEF1vA3rO8rNa55ygB8vNsYQt34QxjrwVxjvAKSh9YNOvRAwc5vjk4 B7wuy8MOacnb9VRXE1vIyXYDDQomFu8BmtVjoMcLoXnFrSpsqCHFf95bSFgEY73A 8hfeTRsHWcGWCij8E2bBZc0+KKcHV4aVy3hA9aiWoSdUkO1bdACZK9YNPzeKiBj0 /XrNyQ== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxx2xaum8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:00:40 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-365312a27a8so2012071a91.0 for ; Tue, 05 May 2026 00:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964440; x=1778569240; 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=mCM0+/uGCzj/hM4vy1/xEsxuxsqzm+PtmpUe54/lVkk=; b=FzB5dxSrjnUru1qrgWGOAuHMuLY06ElEVEiI9g4M52svqHIOLtMdCrLZE21XLdzcKU 1GwLRKIw7k9tYks2+p8NJV8IjNBblqUhgPHUKouSeMaOu72EP6oe675F2EJgIwyfpF0j TgyexYcxjt9EOH+84lWza9/VuoBOzpCFSA6zAmCVWiYpD68ZFpD0TV4dkNUCz9HP+heb 2Xw/8gXr1HEYDdmFZCURW3j7ayaj71S0Q6nLQ6e4X/9lK0LmIswHtYxW2vMbxjyi4xVe 9+RqVu1B8LBAnRq+OeqUWmU0e5uFOwHNZ83fqeNqCc5A2HiEQd8hdrFFmJFW7+7AKPh3 CGRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964440; x=1778569240; 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=mCM0+/uGCzj/hM4vy1/xEsxuxsqzm+PtmpUe54/lVkk=; b=bXyTh0GQgi5YAkH+Da7AZ9hjSVHAQ+F4De7XyrMoGyO/2LW/GC0kvpFy+I8/dy9zr5 LAr9YFgcMWNk2NRNXqBJMk/4vrznN/mMyaH78bwTFjRZONyw0G9xN2HUvGra/CoCmUBk IpSXTmgNxPDjYRFk5//quXhPgrhIfGSxmyOwWZ4GSCJLgSKOJZ7UZ630J4QTTji3n8zI gQlm8U03YGfsiL4vbbNFFaVQBwxjdsPrszbwMolN8kQriUk9AsZjDlqbbPx0OXZHJ+oV dTdGzyu1af6qPMqEPxt9Ra6//hpJZTOy+rBL7YOapmypOkGg+WeEK2OQMzli4dTr6YJk jXJw== X-Forwarded-Encrypted: i=1; AFNElJ9don6Nhho+cdZ/4/03Y7Z/M4B4GrhQ5V7xmNS7kmdCL5E9QR8rfYiwxKkx8EsfwJrBWVrlcuonMG1koKE=@vger.kernel.org X-Gm-Message-State: AOJu0YxFHG4BwFSr0+Bfz0+mcpwraVyUhJObXZb58B54y+uiuLB6yhAs 9w5zv/e5o3T8Vb8hwKx9WFikHIIGLUBE1vaqE8Kv137PY1mj8ycHrvCV/IpIixM+X+uSkrYWs82 hOfcsqyOCZp6SOIhhaDidkBHFA/0Ej9AfvmlrSMqwFr4AMdUwZiawAytr56+YRAZ+dtk= X-Gm-Gg: AeBDiev8i5Ba5SziXesnQalpSaWU5z8TMZZe8CozevqeI95GQfT+kGFGzYvaGxl0u2w Bnn2wQGt029JHT5TrQD+kKFgWQbgy9jJisv62o3XqB+ykeUk1+dOg0E/6GfSKumEmqo/R1JVNW7 aPCjrTen2YuG12kBq0WmP9goWqNBOVs2d1iQmS8dOPT15ymJcjhWu+XaCzZovyYOsIm2Z8+fuqT SKq7XJsnw5DK62wfhr00Fr7E63+2i/6wIR3pXS//2Td8tEG/9L+pIaUtFVYshG5iF2CTK57d85+ V+jBddft7RN1ZT4l0TWreavLFtmWzz226V31vsBhPEJR4jRAEGkEv3N6sh5y7M8XFyQ8j+9mwIg jkbcYtag/9EV2JMQb4PtR1f14We9N80dv4/fXAE/DOAToL8ljrwLWALrFbhxE7NLrPw== X-Received: by 2002:a17:90b:3c85:b0:361:45df:103 with SMTP id 98e67ed59e1d1-365773ba9b6mr1998779a91.12.1777964435339; Tue, 05 May 2026 00:00:35 -0700 (PDT) X-Received: by 2002:a17:90b:3c85:b0:361:45df:103 with SMTP id 98e67ed59e1d1-365773ba9b6mr1998752a91.12.1777964434865; Tue, 05 May 2026 00:00:34 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:00:34 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:22 +0530 Subject: [PATCH v4 01/13] media: iris: Fix VM count passed to firmware Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-1-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=1361; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=XCLAciwoGLa2sJvy/DDGRqny4ifzNwzjaeJeVzt0PYg=; b=ktXf49S5sgx6u8kMejEzA6UiVMOHVQS4joL+4BEKP49XKZ4vQFp65+/vb+24gDkEP4GS3Qp+Z Jr0woULZO/2CoeWozlpPFfxeMfe4S8Akw5yLupWJ66leYOiL915/QLW X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=U9eiy+ru c=1 sm=1 tr=0 ts=69f99598 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=nrYi3PkkErC94SPB-twA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-ORIG-GUID: dy7ZqLttNHUq-_2DPOOJBgamwj1ExY7w X-Proofpoint-GUID: dy7ZqLttNHUq-_2DPOOJBgamwj1ExY7w X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MiBTYWx0ZWRfXyAvL8Nc32RpR zsmdVLG8ZIW/ASdjoktYjzpoGBkDScUfkMp/dbBQEbcoOG/sGI3zyijXWxk2tgm6q6ZPktkklxy lQUWE1sN21mGQhV1BtnqNHLeYyRkbWYntrJEVKx8b8+6tgPdwJKoGzr52eDfDMA06hQLGxaJ2Ug BRKT6rO/3iDavfi1s3Xzy/Ju725w8hQZ4zwGGcNzOba8HasE8j6EE0JJcN9EyOBUZubLcB0RzTa x1DVkiqAafzGfpBzjwHBy9zPCsHlINUvviI9SvAhaMa+LFEQGgcJMGI5x9cyBLJGO6/G9ImLCt/ EhsutRb6bbmhhW+JARnDeqG/eYvMInxnJn6gt66+pYxwK21ErDuNsDxzwFxFmz2AHc1LvCo/17U K2nDOzcUUJMgnGXkjuwSc3aF5TD9wFQdeD9bwDsmnYRel1LtvuuGL2XuI0QBrtl/yAfXcIZ9vuf z+iyhlA2791k/WicL6A== 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 priorityscore=1501 impostorscore=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-2605050062 On Glymur, firmware interprets the value written to CPU_CS_SCIACMDARG3 as the number of virtual machines (VMs) and internally adds 1 to it. Writing 1 causes firmware to treat it as 2 VMs. Since only one VM is required, remove this write to leave the register at its reset value of 0. This does not affect other platforms as only Glymur firmware uses this register, earlier platform firmwares ignore it. Fixes: abf5bac63f68a ("media: iris: implement the boot sequence of the firm= ware") Cc: stable@vger.kernel.org Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_vpu_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 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 Sun Jun 14 00:15:00 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 AD3903D9DBB for ; Tue, 5 May 2026 07:00:43 +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=1777964445; cv=none; b=EGhtNGTNbZKltIrh00stOv6KB5uwAHF/Be0Zqr0cSZra1W4orczYLLZUlyDJVncLnIgjEvR/lwcHdNUUrl3HAy2honkaUolxGM0iFhANVpKTkLl0QmefomcXIfu/9T3GhF3XsyXbLhuxD0ztbSoLFa18l4M6OpGcaQo3mHgx0dI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964445; c=relaxed/simple; bh=YXK+1kgquuMBIXjQrVSRCBE4q5ESQLclNWvU0QR64sE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=htyo8B8EXml7ZIzwrn2gUDnFcRUVL5jDYHeaFuZ6udWDgssgYATBviH/Snf6cger+Jq39qJ4wVeehJPmPiCa2qF+gFTZPyZOGnFWxbg5jOzgRtlTSP9ChrAEJop4lVSDwjhRZdIxXy1J1vnNCfwDTQSEbqnVLMeO+Odm6jt0/Xs= 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=PDDxS1pD; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=bSWqMsw2; 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="PDDxS1pD"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="bSWqMsw2" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6456pPGX331251 for ; Tue, 5 May 2026 07:00:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3FtecQ4utCQQhYZ1lQ2laqIkmzIbFQvnTmfCWCJD5gc=; b=PDDxS1pD8LTZlUzF WRykcGdhCXhawKasfeSjVCkLIlNMhm5jqbVk0D/cLGHx9hkHF95P9xmvKSUTVLJf A2nVGzSLgpBJxPcHlJMIRX4aw49M3kkyut/N7iY/U9LEqYA0HOt/lfXT9kbPAUHL VJTjx9o3vzAORfYg1uCdDYO4gROTB5ShpsEgGgl1Uk7dfclsiZxCXOIRNTlqWv1T q+tuDnIx+MSNPD6qLEEjFXB147mEkujX6KtBs0hgv/oodf0B/DRZhjW6vb9WDrn6 ISdjmB72L/725wVhT5+GvNe38DtTx0ljgZnCKeI/qZGkJNI9NKWJyyx/gpLqnOS+ f+fb9Q== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxvr1b876-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:00:42 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-364c0e269e5so5613362a91.2 for ; Tue, 05 May 2026 00:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964442; x=1778569242; 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=3FtecQ4utCQQhYZ1lQ2laqIkmzIbFQvnTmfCWCJD5gc=; b=bSWqMsw2EJ7E9ptWTQ0wwD++cgl6QMk1KDOBPXlDnx2i6c9DOP9WsmDFGs9dFvn583 dyn5R6IPAZbgZfW61f24ibXb5ZYIYrUbxUinfjBJQDooyJHh7AHv9xWG56LtC5XCS8vO AwAhfBKTjyoP+njK+wmuZ1UnMZvLDGDIh9tlZVQlu8yMvOQtxbPflMiUtxjFYGwEeVAU 3V355rsNKDFH6FlgREqPbdnFZon33/VXCJhsm2DG6vCkr6eJe3GLPVVFqXHSulncBGx2 tB8EelrruaxhijDka1eRz4fWLTgLkLxn3yMab3FwbcGU0f/Ffgc+i3IZ5I1U4m2MD1bH bEAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964442; x=1778569242; 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=3FtecQ4utCQQhYZ1lQ2laqIkmzIbFQvnTmfCWCJD5gc=; b=QFRHwTIqkNwXxU7uzKLgbjf3Ou16KH+nHbbFI2Lbx4K+X1gj7rDBbpqePvFAgSfzu/ iQY+kgMm6wt4V54D3V9KraZhQxeJFnGfIi6iU941ffa/o3omAqupCxiuPYqNBQnrG3jm PygLHar9gkncEQr15CC0/boa8TsoCes33ymZtmqNTs7NBnmadab2jxucraa+Oz8Xg8r7 r1tx1R61E4Eq2XCNXDIhr/g4oUf0YPK9stAok0H9Lg/39yxiao6HrQCKvXeTjzsUnvkt 5/pAbOQFDUpuqXEj2fFkYnJzs1wp/OzHm7eEu08I2oltWBYTc+7hkFv4O4/QxDyVujJ/ AHXg== X-Forwarded-Encrypted: i=1; AFNElJ9z5vk3foDEUOgRPgySbmqMBUnqKEY7m39oh2YIXnQjNjYfvElnQLXBy9j9yU7hzPjEoSJys9ur8rS+kTY=@vger.kernel.org X-Gm-Message-State: AOJu0Yxxhr35ZlZdK0496qYNXwl9+md88I7ero0zmx4oqMYOHa3wbOjI AglrUZURwiEgdGJlaR5dS4Zz8XVUvnNwYLfH7t8LQ8/DYKczUNWi5sR07VG15m9d0jodBgc2Trj Q4FaiqohJDhrJNgmvLTfu7pYySyL6cUwy0IDw0/IvJwIgNghusgxoZ8t61D/zANYj0ww= X-Gm-Gg: AeBDiesXV5Xssz+y34RU0DlsTthhqJEJWwO+8nVNPzM6Fy7aoing2cpFHFhLYXw81xS P6OiEXo21P54vhAKug5mEnvd4fLUBSqWZCgbwJPzg6k0BNv2gvClp0zGxAdgAZZSowE1uSOQD3m YBCrXZoDUojHpyuGhLNY1KXYDdH3TIv6a28rhSjKnNe6uUhPAHTIpKAPD1bcQ6nj78Uepw20l57 xJ9SZavxcB1TKVHdJsupWqRpeJikZtq4ftjWYrJdT5WKfCipyZQaF3myUyh5o/cQ9LFgS9QEdWG nyZWOxtMYRJiDycy3U4XFnuNDZPpfvr8froJSm++R1es3X3iQDGIQIvVjtLMpwrdeu9X+euPQM5 QZ1PN1wmkIGdbkAoEmT2hz+NOVwIKx9hQHA2ZOPbb0Vm5W1ZkVNK4HBbw+RxyeRFf8w== X-Received: by 2002:a17:90b:5112:b0:35f:bcc2:c351 with SMTP id 98e67ed59e1d1-3650cd70549mr13312184a91.6.1777964442132; Tue, 05 May 2026 00:00:42 -0700 (PDT) X-Received: by 2002:a17:90b:5112:b0:35f:bcc2:c351 with SMTP id 98e67ed59e1d1-3650cd70549mr13312139a91.6.1777964441588; Tue, 05 May 2026 00:00:41 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:00:40 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:23 +0530 Subject: [PATCH v4 02/13] 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: <20260505-glymur-v4-2-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=1505; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=YXK+1kgquuMBIXjQrVSRCBE4q5ESQLclNWvU0QR64sE=; b=REQWCbQT538q2OfZtlZ8zIjExLWixsiRImG7cUZ40McZz5JR0uUkATzy47T0Xgrc//JP5rRzN Gzye7WurnQfC4PYei3rXmcB5CVGYRoloioAa7TSJTJN4AmwWU+cfWXg X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: wTHTQ8rPBe7825fBYWRbkjO8KzH3skju X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MiBTYWx0ZWRfX7H5rFKTFPtpW RYZaz6Uqh89kra8lXXgBcLkS+F5HTod+Gsd6QroSj7W21rjtWDS9Z4tafeXa9EUvIagzgY9M+Ap XlJUO785LvfbfH7QpwvSZZG4C/NPNGL6ojqzR5GjecZVgVkPeIQj6txUXhn6JajbhMklG4jc/Uo Nsr3i+ZlakQc+oJpwps6hNYj3X9OcoKVh0k+9qS8lCeXUDiY8rZK6UKliLxdtSa/nkLg1nwoZVP 6qQY6vJP94vU8gDyQ9NH6GacHIFVslsUvIk1rTpF1IaGCsY78DIC53eIuME3JeYNqGhomqHwFns rA5QaW1crSoEYxwewHo9FabmOeOkxoogNFolzDA+r3Glbgph9tU8ZjXjnKLJYFpsoEdo4HBXrbs WHY9QqNxkV+a8z6KxN5g8UwqmDBpfLwLXvkwKzltPblOU7LhRve48ZGQwvZDFmaw+r4RvsVKCZB XSfpJ6Qn7Gecz7LdC1w== X-Proofpoint-GUID: wTHTQ8rPBe7825fBYWRbkjO8KzH3skju X-Authority-Analysis: v=2.4 cv=RvL16imK c=1 sm=1 tr=0 ts=69f9959a cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=oAqX9iOIqteJqTbqMNEA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf: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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050062 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, so this change does not affect for any existing platforms that use the common schema. Signed-off-by: Vishnu Reddy --- .../devicetree/bindings/media/qcom,venus-common.yaml | 20 ----------------= ---- 1 file changed, 20 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,venus-common.yaml= b/Documentation/devicetree/bindings/media/qcom,venus-common.yaml index 3153d91f9d18..5d310783720c 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 --=20 2.34.1 From nobody Sun Jun 14 00:15:00 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 E7DF73DD520 for ; Tue, 5 May 2026 07:00:50 +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=1777964452; cv=none; b=K7qVnH0qEA+GNnE+TUvMJlLDG8NhiywJW9ktFuHS+v5E6woK8lVJ9b+bwenGU7zFp0YCXErC1Dcqtr3m6ewcMfcODbn3lSOPMGcstdZjzhyhxHj0Xv8nA/Kprcs7qjU2iZ3PrwdNJ10ozpdLsHqi8+nJGNAqOktL0ujMKECkMd0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964452; c=relaxed/simple; bh=haVptpgq27xoiy5H+ghFCWo2lm0Cu97MuoRlma08mjU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rkwz033OOuTR/fP+xYb33UPxNyL9YoiILGghnKphlqH55b7nM9ZRqxKwD46USUodtTMNSTW/79cVNqVzKrZPksu3mfRlEb3A1HBaIfp7fF5gKS0WxpOY9n0+hySX5i77GgR5fz4eXyJzhNlIbbbR0lesadEJAXjTs5NDaCDDFvA= 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=hMGiYZgV; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZwJ0R1m3; 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="hMGiYZgV"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZwJ0R1m3" 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 6455nxVK299492 for ; Tue, 5 May 2026 07:00:50 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= RTrt52egNPme2cgLBNhr7G7/5o5IRugC+NSDZDNUkq0=; b=hMGiYZgVRzlLM5re EWl1vOVARYnltt3r26HnMW1xGYcNJ1XUKURvFr10miEPXmjDieegVRFp2qVkZadn 9f0/DoXHJ1AiwJ/h6XbZ3aHFvIrBEvLDHbs9UEu3vLY3P2ybtSJ/ZAFFBUMzPD1y +F1sKGusrTjwCnAgcg8O021nKdPhpSEwuS8csbWPFNxdTSMqJIYw6vrKdBnQOM93 lzebNuBHIlRok8m+x93X4cl+2Oy9JMDM2GW9937UYZzNKbO8LGiHzx2adskZzaQg 2BSaPrZ0ak15pQd291keStRGp5jKZjYq2K3A1kKiyDk6lMCaId+PnK5Bk7ahq0Fy A7XgyA== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxvndb8vs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:00:50 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3594620fe97so11847379a91.1 for ; Tue, 05 May 2026 00:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964449; x=1778569249; 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=RTrt52egNPme2cgLBNhr7G7/5o5IRugC+NSDZDNUkq0=; b=ZwJ0R1m3MSV9guI+1nuasZsZ3CnCRfPi/nktt558/ZyHfIDujNZKMih5jMcJsuw6mr lIFj+HpgnzA7WeFKqIxNDcS+OUv+3cse+KIGbmftNzV7qD6CGY/B+RBPpiQ53j8ARnN0 4CLGVUAhXTezLKgo6H/rvHx0ulpiMqjU68eMXrXSkbjDLEAaRbW/0MAERgOEtEs8/gGg I1OJPpiI89XAlDg78vqe+19ZeE+qw2YOCKOgRP60BZrXEUEwBj90qc/I+qvB+7qrwfUf kqjusU5/Upt1LZFJDkEo1n6bHfXEadssa1Rf0e4X/f0JShzskX3NYOGksICF8rjCmoxp MRag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964449; x=1778569249; 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=RTrt52egNPme2cgLBNhr7G7/5o5IRugC+NSDZDNUkq0=; b=ZkruHaHtMHoFv2pxifImvsO9r1TkK5fxP2mSoFoSyQJWQEUP9pVFStVF2VVaXGu1ug yCCSMUrLUUC/2G0TDaoQ2oTNohKMpm9/mwdDYsGplZK66hQBw1km0gLYHU2/kuAysjeH xtbrWExP6WwASicJ2Mjom/58EFyYqZn4nc3aD5kGuE3K7Hzd8ugc1iZG43Qd/V0RzEpB BLxBsoKPSmsLkEFQEJwnvz2KVijSWRTogh977ExMHIKBPmCFyeV9cDQN6PLbzWWOFSDX ULP2Flkwtid2HTr7C3d+1u+kWNcQnrphdkmsLG//0dEz+R4CTLpDyopO8bRj/BDoIdZF I3DQ== X-Forwarded-Encrypted: i=1; AFNElJ8BHRXIcKDU702/VfBP9OSkxtjliNPhn+CnkRwt9kBF1LMdP2lFNKQFEGsIgmcA6hUp1s+8nq95qJxxL24=@vger.kernel.org X-Gm-Message-State: AOJu0YwIP+Pgn7p/By7YqgllhuKBBBYAI2Crf4odXcRpKOd82ngPpmU8 5kdvyG97MRpepNkWvvWl5WOUJUuYokViAMEy9u3pOGDBkZBVUYU6xqTE07FNWDFVuAxd9JuJ1ax rsbSewPJfEBumD6W+7CzkQxjXyHCXFImqOfbc6npkuZR9nx3YwhyKWi2ETpu/zmSQbwU= X-Gm-Gg: AeBDiev6jsbDB1g6ptvlkpeJ/hwNu9cgkYEhlOoTsqBVdOS+CkRkZe4IyQpYv9O13Z+ jDJr4EKtB7PeziLloQcoDZU2TA88200teFIWs2NtkEjW+z3NREQvkNVv/vCgHxH92bmUt4ocMc/ BpRKuMUPFdwzTdBQ5/BgJlPi3+tEmoybL59h77jGmQTHeYpVSFn3OEkj+h7v8MEXwplHWe03g8O +L9W2/nqY6KrofWCpA57tbzMkKqxI9YHBozltUOR0/EPuYb8EUsTT5DsAMcc1EcEq7E5IgMVUyn 4NEg364my/roYuVeAKOw6Yk46WIePGLfqK4KAIVrZ4O32OX8ZfKA6G/5R2GP4iEgiVOGceon6vX 4EeDVpCDZcMrTE07XW9gPbP/3T0IiPcFGzNr7rf6PYS1KZegDYcIpgyCwMazVtZTQLQ== X-Received: by 2002:a17:90b:2f86:b0:35b:e593:b1d7 with SMTP id 98e67ed59e1d1-3650cdda08emr12089689a91.12.1777964448565; Tue, 05 May 2026 00:00:48 -0700 (PDT) X-Received: by 2002:a17:90b:2f86:b0:35b:e593:b1d7 with SMTP id 98e67ed59e1d1-3650cdda08emr12089665a91.12.1777964447971; Tue, 05 May 2026 00:00:47 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:00:47 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:24 +0530 Subject: [PATCH v4 03/13] dt-bindings: media: qcom,glymur-iris: Add glymur video codec Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-3-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=7373; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=haVptpgq27xoiy5H+ghFCWo2lm0Cu97MuoRlma08mjU=; b=bZy3G0h1U+GGLGRzzqWucm2z2f4HazszlWBN8ifukLxO6srlCJmuuKKlud7HiHRbUW3vCoKeB 6QRPnOjseFnAEcNajLkVD/Oh6Okei1pzRlxEE2V7Fmqrb8Iuh0FLYUL X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: eNKWVJlxwt4GPSEGAaR3Rzamh6VaqM7A X-Authority-Analysis: v=2.4 cv=d9jFDxjE c=1 sm=1 tr=0 ts=69f995a2 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=UwTKh30HLDACofytdwoA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-GUID: eNKWVJlxwt4GPSEGAaR3Rzamh6VaqM7A X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX7GFDpU0p4Psr n/NgM1jy9IIDNHX+AFLJGjHHj5x6f5Qc2wyUicjksvRRwTaf3atZjLiuMtXNsNUP6Ga7RjHBcRn bbh1jHU0BIV1nvYZpt1gd7L4KxnbENM4MVvaX1KOQK+MYb8Q3z514joUTj+Yn01V61eVXLTX2jL mBNmveOELUIxxwJJweOP6OZXMoh9NMNnj+xB8PVem08C6vIYkZr+OQpI7B9qCOenH+QEAeQ812q aeWtwzLDS2G0VdutfQGQmxoDb+hMjuKGVN5dIW7U3A/MurlpnrtC2PEc7ZxpjUH0H+KKADcb23v yHhaw3vqir3So0/IGbra6UTVpGT+/iolJ02cdJPsuZdoWV24NVyt7Qh2vaSJRqU40t1IysKfxb0 OYPzS+2tH4IV10Jfvf9BMuq4sRvND+yccWx0HqQUemevGEdZoRz8SGK8wgWqsOJyJp92kFa+rMY /ktgiqXWwbJXB9R8x8w== 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 spamscore=0 clxscore=1015 phishscore=0 malwarescore=0 bulkscore=0 adultscore=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-2605050063 Add device tree binding for the Qualcomm Glymur Iris video codec. Glymur is a new generation of video IP that introduces a dual-core architecture. The second core brings its own power domain, clocks, and reset lines, requiring additional power domains and clocks in the power sequence. Signed-off-by: Vishnu Reddy Reviewed-by: Krzysztof Kozlowski --- .../bindings/media/qcom,glymur-iris.yaml | 205 +++++++++++++++++= ++++ include/dt-bindings/media/qcom,glymur-iris.h | 11 ++ 2 files changed, 216 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..8ff02c302b07 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,glymur-iris.yaml @@ -0,0 +1,205 @@ +# 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: + - compatible + - dma-coherent + - interconnects + - interconnect-names + - iommus + - 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 Sun Jun 14 00:15:00 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 903223D16EA for ; Tue, 5 May 2026 07:00:57 +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=1777964458; cv=none; b=dtMFAQp0v70kkYbxYuS4RFmTIvve+B1SP+aUzAcqOT6iV9xpDA2Q3ANC98JQQMCrfTP1N2A6Iv6fChUX+jKUb1GVaJnTOHJ3G4SD7KPthc4Gnt+YTFUEwWdiwt+s6lD0MA5LCwantBlzKSACBLu4iBcJ0WWC+HOOdAe68TNtK18= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964458; c=relaxed/simple; bh=GBsVTS4l4F18YjaJ/58wFmxWqzuYLY1cBZgZWMYpxjk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bCGEgZgxoxVoitdsIzFRyJNfgr6nhZ/0C2fF3QcNxRQe8rlRhURgT9YKDlwrPiydUhf1B9HFAR6S1TfxzEvv6u5CKZU55Wy3qTqyLYk+rtSFY0ykPh650Qkq0V/yVR/K3AFTQL/kwtzqENgE1X9S4NMBBEL/0gFvwSEkJJypARk= 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=fAGChe7U; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Xw6eUOi+; 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="fAGChe7U"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Xw6eUOi+" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64554wcJ1151167 for ; Tue, 5 May 2026 07:00:57 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= 4907GskeGPyGqTJtsNAB5xkShzE2fjp5lObjsv/s6Gg=; b=fAGChe7UVOMBRufp kgDdxbQCI6hbedldr9OdcJd2uYM0KMIBGgf2C+CTPePrGRAsm22D77DrE+XsE/0L DE9Ut5d5g7Uv7wi/L9/HkHQe07KGazcR5oDX99CiyeP9INItMmjj9EkswtiLLFyc ++8wrdLl6r77RUa77anB7HrwgJpTHW2Qyet694PLHjS7TaTrMISX2VPSXQmDhvYx yRb8j9YdKnMJbThgd6Wxv3sYpeBnWn5OiptWHrxSZMHV9NI5vbOON1Nst11bjLA/ 7s9F7dsA5IarmKXXwkOVLVcz4Tco2OKO7QEhHGaGA1MUo9Fq3IPnanuFvlJXW4gv YP6lQw== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxscybukq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:00:56 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-35fbaada0caso4543186a91.3 for ; Tue, 05 May 2026 00:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964456; x=1778569256; 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=4907GskeGPyGqTJtsNAB5xkShzE2fjp5lObjsv/s6Gg=; b=Xw6eUOi+mKOV79uD91gL+dUeqhlmK1WuriSAPUnbvnkZnWe1wts56jN/gSLHB4tTcC 6ZAgZVHHGcpnih5bdJsaW1xmZMlueib2Z+X2Bs+E7stsmTtIYvTuXrHRNbtlo3HiQR43 +o7C2ZpytQ6+tSbH6ZF+XYKt7PUP+qb75bppW9o9y/UlWQ3Df533d58k00K5WH07OFGz 76qbwI9ymDg9ySIJwDwEoMf44kR6J1Avn0NjDA+T9U1hxvXjx6qDmFbhd3thJ1qk3MqH 18EsqOn1qDqD34iAN26b10Ose0A3t5ZGo4C+p9l1VQ+b1wNrnS1hini2Xql+3SXDZdvL A9wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964456; x=1778569256; 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=4907GskeGPyGqTJtsNAB5xkShzE2fjp5lObjsv/s6Gg=; b=PC9g3Uec4V/aUHnDb6ZSiGeJxhuK4VQvk1Ws8t2q/gGrYMyNGsgmXAUcxu42m8yZjC 8dUFX25bQ/NJXuV6TWrTlNMgCr05ziHh6eOOZRuQU8sqss90hWudI9amaGUijHMSb+NN EZpTHmAIGwvtZEGJp9+b5+CcqIRsraJ4rmviivQWrR/4/S7JHAr7NZZ1uC9yZdZb6sTX vIgBcerwzica6R71/cmVmCZx+YQk+hW+mk92wM0NKfJI+c+RGwyggNWQq4U8WUuYgfba bnWfIDKntLdU52b0wDZNNvkJttxM1b/cAbO79Sv4Ee/HUxpsHZjATA4HOve+qV4bhgi4 149Q== X-Forwarded-Encrypted: i=1; AFNElJ+cBUAMvj+0FzbaWZORqodMbbeUp8Ez1Jv62WJbiyz//qtf1PLo4fSYv5aKFK0WbgT8qvhWs9d20ZiQPEI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy1xZQ2DLTipz02ZzyRPwfOBoggZrEIirO2/k7XgZD4+Bml2pOy Q7TPxTL3I96ocLQ2VAZmmLo7wI9t4gaf9twKS+gKwV6eXfwSHd+yu/+cq2Bpn+34Ju/PmOkbO+6 tCMSa1NMh6X4AENb5v0apq69sq7rrFyvPYEzsEeRjZoSIf8Sjdx6fq/aYLDcevQtO+L0= X-Gm-Gg: AeBDieuqS/tQqTTT5nOWG2t8MVtPx3IZxttBZDx6jV/zng3SYxq9tVUnt0jY/JQI3CC N2wmYQBAJ20KrGbWGuRNyQxZ3mAuJYH6a2miblRPsZ3F1fzb6xBVCX0iAKb9CnU9GIRFjAPK46z VUp0ShkIg1okFuDOn0EDwwsL4Z+OqeXxiWfOcfw8AugWoHaYKxevF05K/MxYJXarqqs8P8ooL+C KTkWqAqguHgoEtl5v0qQhZBNDbwP+S2PnhyWGGv4nMHe5vhatMoQ4J64kcIAIbNDgPrlEMolA+M p8Um65SG/cgUt0zKTo3y0/VR+OQs0HypjSx4hsyEHP8Wbh5eeSEvDuhn7KcXB6MPo2p9z2WMCAt cB1oYDZLG481A1h8UeDGRl/AlM2gc5W3Y/ZzigEvLrHxzyymTN2O4ncHTr9m/Fxs6Sg== X-Received: by 2002:a17:90b:3852:b0:35c:b02:b5c1 with SMTP id 98e67ed59e1d1-3650cd4b20bmr12478806a91.2.1777964455912; Tue, 05 May 2026 00:00:55 -0700 (PDT) X-Received: by 2002:a17:90b:3852:b0:35c:b02:b5c1 with SMTP id 98e67ed59e1d1-3650cd4b20bmr12478736a91.2.1777964455015; Tue, 05 May 2026 00:00:55 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:00:54 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:25 +0530 Subject: [PATCH v4 04/13] 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: <20260505-glymur-v4-4-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=4228; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=cziP+P95lYoSiLg+5MW5xEwescL6vgvBBGLLAvVvoEY=; b=z+TxP8+TZXII4YxwxLPEEiwyjbixnGpOF1iRrVP5dnfHNH7GveE3tEOR8baGkU0hjom6PxRZM XT2scITxFhZBiRhXAqziGcNG6vqtiYPOORJHYpuj9ehNh/ilSBrOQny X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX6T3S04u8PE0E BoiEqX48Oo5gskl/PoBMQb1+U5WpJQrkSbMHhUHAqfIO0qbY/Q0HU4q7yjd1uk9lSsEGB165dHO B474U6TENM9fh67H99n8pTt83Hi0wCOjF7eI40Ea6HeYt5ZEh7vP7Yj8nqdw4S6My2WzZvcKkDq zjInT59BWmfgh8W2054bUaTdv6sTb2TRTE9t0Zs6jdMWCNXQwu4VMScRjQDAHrXihJcNxGcR41I njwk0NLmX0gKwLg9kmR6Oc/j7RUG3zJzx7FIWXX9U7Qx/qHaUrDn+VdSaMor5OAqHc6Tb40nl4X anirEC32K3pavRxIFn/Isph0BPHLOk4K6ZKSVewDTkDuePPa7ySYMimV+/KmIn5doKRhQML+eGU 8JVFbI74Pzz1H8aT7U070oEep4lRNdLd+CnqZqZ+826zR22s5Cg3WaHrDFWWZe0t2XHMptzkRsp 66xz9K7UWd8AvncA7cA== X-Proofpoint-ORIG-GUID: UZPaMJfDlyrx4rMm46Mwf120PMK0SJmQ X-Proofpoint-GUID: UZPaMJfDlyrx4rMm46Mwf120PMK0SJmQ X-Authority-Analysis: v=2.4 cv=C47ZDwP+ c=1 sm=1 tr=0 ts=69f995a8 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=rZQGDrx4aKZhb0zF23kA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 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. Signed-off-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/Makefile | 4 ++ drivers/media/platform/qcom/iris/iris_vpu_bus.c | 69 +++++++++++++++++++++= ++++ include/linux/iris_vpu_bus.h | 25 +++++++++ 3 files changed, 98 insertions(+) diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/plat= form/qcom/iris/Makefile index 2abbd3aeb4af..6f4052b98491 100644 --- a/drivers/media/platform/qcom/iris/Makefile +++ b/drivers/media/platform/qcom/iris/Makefile @@ -31,3 +31,7 @@ qcom-iris-objs +=3D iris_platform_gen1.o endif =20 obj-$(CONFIG_VIDEO_QCOM_IRIS) +=3D qcom-iris.o + +ifdef CONFIG_VIDEO_QCOM_IRIS +obj-y +=3D iris_vpu_bus.o +endif diff --git a/drivers/media/platform/qcom/iris/iris_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..750e878e489f --- /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 + +#if IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS) +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 NULL; +} +#endif + +#endif /* _LINUX_IRIS_VPU_BUS_H */ --=20 2.34.1 From nobody Sun Jun 14 00:15:00 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 765DE3D47B2 for ; Tue, 5 May 2026 07:01: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=1777964465; cv=none; b=gbPay09IRMXcvAoLZdoI9g3AsGnhfz3VYttI2yLPKpn3FBUW+2BjXwh/1n6idTicHRrLhcRlj4QfkbC+kW4qFYSnylsXoW5ZSqKsVWQ80yOKy17jSK0dCEIqWaS7+eWuP49GVw3rqHOI4NzrcVOfNEirh5xc1+nE+KxPLF7lCMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964465; c=relaxed/simple; bh=lQ3z4JfxRQCYgSubX6j1hfl+h6PxkcR07VzhxVTyjGc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cAPr0JZLyMggeQEpjoCZqQfzWDHNoQR7Xhhd5F7cY8lTWig5OUnEuiyH1642emsMS8zDnf/mFE7L2lfWsScLI9GMObiZutD9c0IfZqZPymEmivGZG0Y9VaDU4CQabPDFmAZYmEKvlazE938CRWsf+jDrXbhVsCAzuI9y3C+0B1g= 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=UGaMBaT2; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=f81VGRDh; 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="UGaMBaT2"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="f81VGRDh" 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 6456tihw366547 for ; Tue, 5 May 2026 07:01: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= kIHJ7/jlM1Et6nXCMTws30svegX3oTdpHgtcyGwoCNo=; b=UGaMBaT2lL8loyJA pPx+8SZOnlTskN0iINLrj23dpF4ZJqr3QmYUuKI2v5bt6zH6jCUMHD3DViYiAFID 5SZvQAa1rzvXRksYp+Z9tS1w/fq91soWCNUVjVZrC+uVsVGWBao6oRY7YPLF/IUM PDaHHz7UQtawsXDq1KS1nCNEqeWMM116OObzcK7aMtf6vpXEC4qMznfFQvjthjw2 4PlaTf95kO/sr6xBqa0tT9FeSgwaZPaYxy1eruBMgY+SsISceYNnaJ/iFxW51RsD cdUAKjngmbe9Njen5tXKlnsF/eLPgL8DztwbHBqeIBNgJk/1G8oWhVblPPJ1K/Xd eYKg0Q== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxvn6u6tn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:03 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-35fbaada2f3so9333855a91.0 for ; Tue, 05 May 2026 00:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964462; x=1778569262; 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=kIHJ7/jlM1Et6nXCMTws30svegX3oTdpHgtcyGwoCNo=; b=f81VGRDhRovyxB3gNABNrTMRWQ/onyRfNaLWxG8Q07iHDxwBq6ZvrcyB4QMAD+t25z xVtn3CeW9W6FMd5pBF0n7/uZEZfT1pBiFkVCAL34M4wSEbmEpplshvfv2ocgb0CUkpCH PDw4nJozp7GrV1wBPbkOkl9mQUUgYG2KcEEl7YVLcXsiE4bqa6JMJdKQywlYvT7DWAKr RU8Cg9tYHeMuFzvpXN3jos7w9Hf2vHhZM0Nw4tswAA9s8bRDDVU9rsgvrQp8VvhXrdmd qJ49mPqWUfvcuGMWToDhBBwLSwFTJJYyz42MONryQ3U+uOwgf8DE/hXEkSAErY6Js2gY wtUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964462; x=1778569262; 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=kIHJ7/jlM1Et6nXCMTws30svegX3oTdpHgtcyGwoCNo=; b=mNqn6gBQScAAiVfGnzf8eJ6KsAcQP053an9dq1+Sf7f42JjywEomIT24NFL6+e6DQz csv1mRm/mkl1vt+IhceswTDv6A1iEsDvhxj0wwcrdJ25zPv5UG5F944AdwMsNnmJYHKU xod9snHev0X6P7r+ssNl0+fMSbM0EQLQD0v5vx2LPFjWN5vl65r6W2lgr85Tk1Is7Q+v d055hwnltyikht95YkZtbsEcUYVsU1VIsjgUEoOLDQAi7c/TK5FcGuuaIfK5j37KzbJU mLnGoKFhwf57wvasdwRxkquoMCXqwWIz6RleZV34cLkwD9G8RhgZ+YVBMEwIbwwBHDAu KIZQ== X-Forwarded-Encrypted: i=1; AFNElJ9n6UhHJJ9LTXkp8DTIZ3mlw6ScQgvNa5fqegh7R29FlbzYlNd1vSUxGu4TCQfHymUM68YVc2jaYb5gdi0=@vger.kernel.org X-Gm-Message-State: AOJu0Yw2zcHAErFhEuobtEd6/c14kqhVZ9yQTZRfllxk+EYgCjEPLVuj C/Q1PAgK+ddp8P4fuw7xjucyI0DI7+GmpCSaiEGdfsWgc54Kf9YTaJjjzFNFemxD1ndqwdv4viY FXPAV3q5WlcHnyb4unfWtrhab+Co4kWWO+WcEgTDCNS00WcME7UHbq3Snw+zWgpab9NE= X-Gm-Gg: AeBDietdAHE8WEpn1dOPAGQSollrp8+pUZXExkZGtRJNbjZETX1t223RLpuhEF+Vu4K 64fQrVhlmGSXBfiDsPELPWePIlgwpawAq4s6SqlEX1zY6J+LAs8DtIjETknO+UZOaipb1gCmS/L bueaXmJ2J0OkIUFwGsNY9zQSrgpE/2FtjRmJYejqD2o9EY0LYMtMx66e1vWVul7UhJXXOTrjrnT UZmiXzHQgEg4TUnWkTcw7NqdKbbtbkrl86Gcu36oxqqdshm1G8v94g/4DN3C3EoB31o1m30oR8T zmnD9ry4UtpKUEQqy/m2IuMZ5H6znll8auWeW/J0dgRFor2kbfjyCI2Knu4DxNhB3KxPG0Xh6C2 nDUqmYxAz6A0PsmOSKhhQb5Bd32WjEXNfgS9Sy8cWXFJba04OTxeFWrt2Ug3CES0Ldw== X-Received: by 2002:a17:90b:35cc:b0:35f:b6d3:da7d with SMTP id 98e67ed59e1d1-36577485fabmr2034556a91.17.1777964462165; Tue, 05 May 2026 00:01:02 -0700 (PDT) X-Received: by 2002:a17:90b:35cc:b0:35f:b6d3:da7d with SMTP id 98e67ed59e1d1-36577485fabmr2034510a91.17.1777964461663; Tue, 05 May 2026 00:01:01 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:01 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:26 +0530 Subject: [PATCH v4 05/13] 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: <20260505-glymur-v4-5-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=1065; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=MN1sEQpm2XgufXMnfyVogm/WAu43GbiaX89w8VaFbuU=; b=yU4wGk5gMcNMl/YgYaMOseMuBSUH5Ol/F51wnfm/FMqe+aaL+AG8wYAK8NCO34c4/5rM4xA8j frn4+vcXcSNBHatelFfO3ExHrA/OmP6y3dlyfsQmh+rCumYZTZflQuL X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: zheLU3jPeqlIRRDW7dt4PdNHgYXMk21y X-Authority-Analysis: v=2.4 cv=Z+vc2nRA c=1 sm=1 tr=0 ts=69f995af cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=ADq-ahcSnVbbDow3-dgA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: zheLU3jPeqlIRRDW7dt4PdNHgYXMk21y X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX7hsCWv+Iy5G6 QVaBCZEzczYbw5otaacN5WddUdPsR/owifC3od2BKu62tDHEt5aD+YDvy4nxnbjhfuh6uqEPsT2 PWFvfehgZuiZlTcW6Jwle6qUdwEg9405alWIVzZnR+WYApZJJ7CtjY9p8jln11T2JKGXu8fmZ9q fr2XeVWBmN9oqvfKP4aWoc0RTJzQvP2x5Z0ax4444ACxKLHpNwG/Mb8IcEuhPosW71/NNnW9fBh Wn6c8YpCSJEkXiVXUdrEeyefgytzMlKepyI8ITngLkhE/2/4LPPpf5/8iN5DG+rCudsvySUGoPV u1OPizp+KAKS24xa9pX7OLoHDnmAyKkBXm2IPR4xOUThUmJ8g1s4J0oGN+UGhMiVEpBHNi2RJnT 1MXh6cGaJGXlY6jLtlKRQ7xPBGOWPc/uuDpruMjlBzOlQvSYWLEYH0xiKbR5CiPaYjXEnst9E5d XmhuKcXkhVlEkPmFDnA== 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 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. Signed-off-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/iommu/iommu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index fccdbaf6dbd5..3b65df247e52 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 +#if IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS) + &iris_vpu_bus_type, +#endif }; =20 /* --=20 2.34.1 From nobody Sun Jun 14 00:15:00 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 403F33D171E for ; Tue, 5 May 2026 07:01:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964473; cv=none; b=Ln+cGfF0391SuuUG3l9tJlz/7QHsHqp5Qka4J8KAila+ydvzIVtbb7KE2H6L2hIlVE1zl5lEo27YBCDE+7GyBIbWvn2xBoukKk5k3YErrbkPD9/V/6+h+6O3yQyHqI8mRMk34TN2fVcX5Fx0IYkbAsHycwA3SFrmjfnHq9uo7oY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964473; c=relaxed/simple; bh=HB+2dN7dauUgdrMwzh7J5kQuRahuzqqEHBqE2I7xdDA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X9esC/7+Sy0zDJNliuR0i5UDcdq2EvaCIHk0s2GVLte6VZlMd4V5Ca+xa6Wxm5HPTpIu3Q9SMh2mJnYHklSj3LyId/ud+Fa67GE8GPlGvc31lMYAkNFfNK0LqcgOMRVuuAr48UrQFiwT5DbRtPTHgFuNxzatMx+/r+yDky3pinU= 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=LdjCu4P/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EqpzhLuW; 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="LdjCu4P/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EqpzhLuW" 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 644L5V9b1186937 for ; Tue, 5 May 2026 07:01: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= yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=LdjCu4P/8xtim++H 11ySw/8csdxm7YeaptSggci7OMVSaCGBF4xeVOyXcx7gVzCfzBNHiJdGV7lZFoMK ezw57U65lW9LW99UC/Kt102lan8RhFEYhpp1v3c0UJI20DYN5DjN3wyRD5HQecKO CYh98HbTIHRetymrNc/kmpCWqvgscUZH7w+fAFntRaxaeIm0IvRiVc1o89rvlMa6 fvyes115G99cxv6SAmOmj1qHKPqa97JxkTfEVOw+EpgZteOB6MC2S5MIoxgrSl+P zcSWZsidybdF7FzUEec60YwoTU2xNjGO6RbRHkKIPg1XGNFhVV5wvnrF0q+oUahv jXB8lg== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxvvgb4a3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:11 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-365312a27a8so2012855a91.0 for ; Tue, 05 May 2026 00:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964470; x=1778569270; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=EqpzhLuW1gaAp3Q0wECBVrNLeXejdGGRggNIjjZYHGY4ilqjwAjt85sTacBVSdtUdR OkVMXtmovLzDGMXmvffshbGcDtSlYL0b5EGT4+zWhd1dcYtVhvbq14wf8cFUnFwW0xrK zuA7wOYn3R3Toty9SIuKbn6T7UsAf5zhf8jQPgQy2cOD82BzOKpXIs0XkZbRuq3Yi/xT LrAnpNZyFmRITclQRcYvuBA5cMjT4gitL6uhuL4Vh2YtZYdEnteB/paZu6qBY8JBm6Qm lsJ0oG/f1cFXY9zttjqCQ6G2A8tghUIfzFzsJWq341n+HSL0nSRXJyTj+c1yqO9TDbCJ EUrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964470; x=1778569270; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=dZ6pavLs/2ygx1s8XGn7Q4JqVjW5BxFMlpVvlPsFXEJXfjNX7kUZUTRaO1KVidCtJl 4g94+Qxq/oCShTqVypXrlWZP3Cy7ha8/KWIAfW4kZ/xDfOpzZaopdEhp4uDWUwpHuQhq m7VrVBeWxKkJEy3bfTRobEx8dReqrAcuQK22uiYdKOXu56PtMPWJyowvfwcKxQ3N1D1b 3k7gCEyzhVoca4El9XUUKdiHNNyA0PB2LCNfWzHbwPi3lfwPppwEzn/Acym8yEDTvfY/ PAujZjEvyU/dareaeuiXJERZrE0BWA+SuIHbB05ISC9K4qSwM4dao08w1/JnD/Y6ILAE P4Ng== X-Forwarded-Encrypted: i=1; AFNElJ/t2OmxKydPNnc/rU/wd7RnT80q/qZuH8dIie5OSrbKjzcASlM3LHB4J7mZFFB+fRpjBJp5J8+KyYHrrkE=@vger.kernel.org X-Gm-Message-State: AOJu0YxuaHVQZlrUARRGmqwm9nWMKV7bSQjz81/1uI2raGzNydMGVovd cQfcTBTAHtK4MBra0ZyiGYw8gOKD1UgbLaiP/Ni+OVuCmTIbbwd2RxsNtdbxwkyaTReuxF8MThX Lg4flGY41ObAe/78n9LL+923sPmU4Gkkh9z0pHLBsD6e8er5q6OF3yaI3iNNLXR/QP0g= X-Gm-Gg: AeBDietAp/D7T8mkZhDw79qnRxEBp0eLxqzdhoxV32nts3RPfW5hszNfJnbLF3JkyWW yE4Sz14uU/O+yU9t43GNDJDYlMPxeX/7TbaO4wAMcTSWP/dUWOoFOXAZZASzgvLQ26ft6PzJCc+ FHEMBI5Fnxd0KAHli7z0O8YsSe4r0TSh+CLKX+1lmVhT3Yy7/GbJZ32Smbhi0MgSrG15/5xBEIn ptr8ehLDWdDe6B6n3vEn2/jPKwh7sC/q19Kt8HvCaj7C7nrY1aADHWOfTUMLzhIUKW0dwJuYJGp aQ1akvBE2d20KpnnbGG6t0S+6IRj2uBiYVWOl95it8n7YepAwnyOg+xVgboNTiMGN5BeBKPQjbD dw9IUB/my/wNHSCSWBq76NXFY8UXranVMxVsa9xh0GJOG0QShzNNJUWlyCyQOaTFgeqM6hg7Kaw Qv X-Received: by 2002:a17:90b:4a:b0:362:bfd6:a875 with SMTP id 98e67ed59e1d1-36577369c85mr1965034a91.1.1777964470257; Tue, 05 May 2026 00:01:10 -0700 (PDT) X-Received: by 2002:a17:90b:4a:b0:362:bfd6:a875 with SMTP id 98e67ed59e1d1-36577369c85mr1964891a91.1.1777964468052; Tue, 05 May 2026 00:01:08 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:07 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:27 +0530 Subject: [PATCH v4 06/13] media: iris: Add context bank hooks for platform specific initialization Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-6-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=3016; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=HB+2dN7dauUgdrMwzh7J5kQuRahuzqqEHBqE2I7xdDA=; b=gsq9OxYUHQTzG9WaiC2/lfHisQcvobFOu9F3SM0jPXdGrbQ3ToFwtcC7nTt2I2lSoKXnT3nkO Ac2QeRNg2mbAez7nZcKlVIZXGff1VBznkJqWiAmryQnRSp7Q6fkMsYh X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: UnqdhW0pKYe2wlehp-G7D2HUqjftTJlj X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfXzQlUgIf9h98n gXbwVZ3hSvXuC5FFUZuto6AkI4oVdrFIbQ+f45sKsl/Zjws/GAWJgRb8bsDALNFQ9kLxqJVFVT8 Hg6UK1kQeyU2sjyFjT+LOhpsSE4jdzW2JjCnOvk5D0ZDY3fn6YNuCmeEE0XdKiAKzjAgL4env8G GEwS/qHvVyL8AteFgZ13zjhtAg64kKnkSQL9jXRgSSpEDBehh4EbZSJlrVlX4dwzWR3/SpNivVJ Gso7eNflCct4Qoo68FJ6c7nDKO5Yu/W+C+4+2OSZKoes9IVQpms69tCSWtotByoUhKnkhvqnp+R FPA2uYBRZ3RLQ9Cg3UdrjIJlSY4oa8BZpRSN/oOt87GNFPzNGtS+HzE7EsriiuAL8gFzwSGoFln cxn77tFIs/W0W+LtJ+wFXbOMp7I0FLQeLQtXjaTRPQnb0U0Pf9jByP8txr84cJsIJYvL5uVnyA6 7xX8d4HyhtNWrSGhj3Q== X-Authority-Analysis: v=2.4 cv=K+AS2SWI c=1 sm=1 tr=0 ts=69f995b7 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=hn6c7xJugPWrWid5T_cA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-GUID: UnqdhW0pKYe2wlehp-G7D2HUqjftTJlj 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 spamscore=0 adultscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 The Glymur platform requires a dedicated firmware context bank device which is mapped to the firmware stream ID to load the firmware. Add init and deinit hooks in the platform data for context bank setup. These hooks allow platform specific code to initialize and tear down context banks. Signed-off-by: Vishnu Reddy Reviewed-by: Vikash Garodia --- .../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 Sun Jun 14 00:15:00 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 E7AFB3D88FC for ; Tue, 5 May 2026 07:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964478; cv=none; b=ivYCoTwTGjxDRcZTQxa6iKVBzlAxi59FE2WBH8Gsr4BSNg6aQDaUVpNDB0ar0eqf7WAm2GPUK2fWkQi33k0rL0cN+zu9ZleBKjc035BOFUj90XvAL4/eiP0A5JHtdk/HT/LJ+275HWPkhOhTVylD5FA93uGkE2xDvEeddE/1LC0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964478; c=relaxed/simple; bh=5XMD1PTwD/LTxgA60yhE1YYtYnYGkszZwhjmWff2fnQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iKBVXhMjQWYCKsZ+dATdUAMCyGCBht+kNzso52/Q3sv7Y0U3qsqhsYuN2qyEScma1sbnB99mKY4kS2ESnaFPNjM8P3dXu5DWWGQEX7lXQrD5rWsAALK2d3c7LnTdPTyMRCHU/SDCNiRmnsybrRqzwf67xK7JXZlCVxkbHFHQqZk= 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=J3FHkjV5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CuCXAl6K; 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="J3FHkjV5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CuCXAl6K" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64547H3R1151327 for ; Tue, 5 May 2026 07:01:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= bTy4Bkwh+gr6ISqDQC1YSZGoQJgQwg2cLAvk32oAfkI=; b=J3FHkjV5BQraMdqC kAD9aZxpOLLVPgmuABNr/GrGm41LSrvBL9i6omnAjZTK7Pjg109VdyzAAFuiN06/ 7cSzvRTXofMHnE++Q8pNv5QfojH6erN/3BXTOQIXVfpMQQsOHjjijVZaoVe+7S8O a+rWx2pnAP4x0KbiK0uTkmHD0BjDB/GzzHUAcVw64nLSOI7MtqatHDVmXisIVMvV ShIWpoAyIktLu56dw97yeGVAsdwPJoI5+r2LgQ3Ix1dkDJNjyCvqqxD47urXwHcx muqO6B5gDg5zaWHSlDrxLaYJlNAITu+iHknkrxCFmq8PMns/3CqcsgN9HXS0Daeg qLFREA== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxscybun0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:16 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-35e56ed5d5bso6628944a91.0 for ; Tue, 05 May 2026 00:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964476; x=1778569276; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bTy4Bkwh+gr6ISqDQC1YSZGoQJgQwg2cLAvk32oAfkI=; b=CuCXAl6KZXIAltE80aXmGvAi7i5sPxzNMHxqSgJSAK6zO9yqQ3wGH/uglMDkc6G80n WNl8AZKefG7I3UBeeDwy73nZjSijoEu4Y1LmbDeO2xtpVQeZfwikme4xj/cLNmLRWJhm kl0x/F6d2mSjYAHmvvsVquDL7AgVjXAFwYMGy5r48o99jh91U5FJU3HBokGJ/+Mngyz/ 7Q0Jn2XiQBIKzCrzj0hw3EN19lhxI8ndQJ+UZCMPreg4OsGYFXbdHQ13Zw5yjkqWnWGb 7npl90GSQGbT9hWYCA8AnQ1B+vxnOLiTYo2aFRwXq3dljzn4cHAmn7MzoPSrenIGkBWT YG+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964476; x=1778569276; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=bTy4Bkwh+gr6ISqDQC1YSZGoQJgQwg2cLAvk32oAfkI=; b=FElC/vfZyZFvInImQCz6qSlhExOR7hciJ/1EFxCClA2T0SbWJqt//6tikqcdedUVkP bq9+XPSe3Kq1KIxm83K7oYjEw6XmUp9fjbtys7KSPK8uwLc6tQmUCmIf/WoLyglqLyk+ ekZxTxNR3PzitIG0x0QVdCIdeyJ+PxOwns3p9IvKt7pSI6feuSTMAAT8Wsos40bzu2cU ZmAF7JdnW5n/390EXfNx/YbMG5HZ3svnoud6TvjwkFXmXrb4WvoeJZ1jG7HNtnSfkQsc PcESgAj1dOT3FKzdJF/1rsFUukQUSym80G3wYdkUlDmOQvVXoy5JDYd9EJDe2nsNU0zc oVRA== X-Forwarded-Encrypted: i=1; AFNElJ/FzIJnzOQzHDKFRokNQPEnngaKk0xvngd9vPUxyYbv3LCnFP3/r7Krf2wnZ6ub/adlKZEojlSMXdmC7TA=@vger.kernel.org X-Gm-Message-State: AOJu0YzmuJ/oZqQterqicne0PPW5J5A4K8WvEQVmk9JyQLCH26VRv9i3 TlbYNfGdnqS5IjawnWdNAXugI66SCN353jajuuIDMSj+6ioJoHZRdpQkRzNLneGf0VrrgDyVWLJ AL0exf86E4VQKxeqdTBA3KZXxByoFoQufiHkDByE2ZwkdiDTgk1sFy9pjFTHx11kJ3Cc= X-Gm-Gg: AeBDieucCizP4+WX5ZpiMBQRmh7ADfdDQgIVAwoq8M9x4C9BUUeiR3jX0EqI2crGvuA xvvJFKAgOCKx2NrQGrzgeh+WM6TMODeEgFeuRXcS0ymduswjgIucJ60AOyT/1G90Tg0AhwFSvJa tkjWZiD5e2MBhU7gTuNXvd3bzTAyqGwQRyJpoVhZRrS4I/a+jDgtlr14A1z6hHbe2txbQm7a2gy WnaF3XJWe/dWDSLr9aw9PoE3iEY92QIWM0KUpW1Uq/X8RRmbJ0RqBdoYXVmiMFVieOErmdkACtn v+ps+VsnpYI8NIzE4gbGHaSi4FyRtgMuiqvUXw2CfzwMYAbdGdKgF/gmUhLUR6VJT+CvnCtMbdm pSLAmsAHFMM7tbGMInofTVn+8OqLJDW5UFsVF1OSev3fmVJHWkWu0CcFX+DkIGwOCzA== X-Received: by 2002:a17:90b:17cf:b0:35f:bc9f:e1b6 with SMTP id 98e67ed59e1d1-36572255b88mr1898108a91.1.1777964475585; Tue, 05 May 2026 00:01:15 -0700 (PDT) X-Received: by 2002:a17:90b:17cf:b0:35f:bc9f:e1b6 with SMTP id 98e67ed59e1d1-36572255b88mr1898074a91.1.1777964475032; Tue, 05 May 2026 00:01:15 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:14 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:28 +0530 Subject: [PATCH v4 07/13] media: iris: Enable Secure PAS support with IOMMU managed by Linux Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-7-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy , Mukesh Ojha X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=6587; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=+wQbHvxygQq1aTrGxrx3UsURZ3ABehuwxnmcohM5NBw=; b=WK87IIKqHhNQTBnHiTr/VGjkaSzt7Spi/HEsDwkgLA5pdII9e20G79MnQQxJYv0n1Ou7txiJM ElYBBpq6C4pDYoegAU9CGNSsNEA7Swj1oGFnz3FadtXfP0EsDusw/Au X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfXzD2VydNl7t2l cLmP8ITor/IjLQ6D5SDVe+Qk3AQ0AW9OKiyZO62I5CgQbpzpCdKMH4Mqh2VdgoN6OpAfAxG7e0F XmAY6Q5+NWKxXH9MxQMQLNneDtmhv071u3xU6a+AxvUnpLG5aTo0vB7TZSX1o1fOezfUQADJVd2 4fLkEXzmPWuUsM1YifP3TeAsPMdqMSqyF0lfpwQlpaaH3rge8WU6Qo17WeTJeTDwt5k4M5NFewY 1g7LYarPOHhqFADKaJLKySUVfwp3EQcwSJzbpZD4m7KvoZSKWzyUXBcdsCDUCrlm5Y9iaOfLAFZ QWfck9M7pmHr4NjKnuaSB/6OpMxQ9ETW7YUFQ/ooCewESazyFKQrua5h4ibiVWkQWkuHoiwVhnR 5SxL0pr4gO/jqaVRGJJESiAsNYg6p5UdPFR1yyGu2YuYIPIX+viqWrA+g/cG40IWxADcB7qKjbV h8tdKYbFA2T2CIu87CA== X-Proofpoint-ORIG-GUID: u1Nm5o4q-Yoyn5EqfGQq-pFCTGLVFft0 X-Proofpoint-GUID: u1Nm5o4q-Yoyn5EqfGQq-pFCTGLVFft0 X-Authority-Analysis: v=2.4 cv=C47ZDwP+ c=1 sm=1 tr=0 ts=69f995bc cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=gbwaY6mYjfx-u0ET_fsA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9: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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 From: Mukesh Ojha Most Qualcomm platforms feature a proprietary hypervisor (such as Gunyah or QHEE), which typically handles IOMMU configuration. This includes mapping memory regions and device memory resources for remote processors by intercepting qcom_scm_pas_auth_and_reset() calls. These mappings are later removed during teardown. Additionally, SHM bridge setup is required to enable memory protection for both remoteproc metadata and its memory regions. When the hypervisor is absent, the operating system must perform these configurations instead. Support for handling IOMMU and SHM setup in the absence of a hypervisor is now in place. Extend the Iris driver to enable this functionality on platforms where IOMMU is managed by Linux (i.e., non-Gunyah, non-QHEE). Additionally, the Iris driver must map the firmware and its required resources to the firmware SID, which is now specified via iommu-map in the device tree. Co-developed-by: Vikash Garodia Signed-off-by: Vikash Garodia Signed-off-by: Mukesh Ojha Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_core.h | 4 ++ drivers/media/platform/qcom/iris/iris_firmware.c | 72 ++++++++++++++++++++= ---- 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_core.h b/drivers/media/p= latform/qcom/iris/iris_core.h index fb194c967ad4..b396c8cf595e 100644 --- a/drivers/media/platform/qcom/iris/iris_core.h +++ b/drivers/media/platform/qcom/iris/iris_core.h @@ -34,6 +34,8 @@ enum domain_type { * struct iris_core - holds core parameters valid for all instances * * @dev: reference to device structure + * @fw_dev: reference to the context bank device used for firmware load + * @pas_ctx: SCM PAS context for authenticated firmware load and shutdown * @reg_base: IO memory base address * @irq: iris irq * @v4l2_dev: a holder for v4l2 device structure @@ -77,6 +79,8 @@ enum domain_type { =20 struct iris_core { struct device *dev; + struct device *fw_dev; + struct qcom_scm_pas_context *pas_ctx; void __iomem *reg_base; int irq; struct v4l2_device v4l2_dev; diff --git a/drivers/media/platform/qcom/iris/iris_firmware.c b/drivers/med= ia/platform/qcom/iris/iris_firmware.c index 5f408024e967..0085dd7ec052 100644 --- a/drivers/media/platform/qcom/iris/iris_firmware.c +++ b/drivers/media/platform/qcom/iris/iris_firmware.c @@ -5,6 +5,7 @@ =20 #include #include +#include #include #include #include @@ -13,12 +14,15 @@ #include "iris_firmware.h" =20 #define MAX_FIRMWARE_NAME_SIZE 128 +#define IRIS_FW_START_ADDR 0 =20 static int iris_load_fw_to_memory(struct iris_core *core, const char *fw_n= ame) { + struct device *fw_dev =3D core->fw_dev ? core->fw_dev : core->dev; u32 pas_id =3D core->iris_platform_data->pas_id; const struct firmware *firmware =3D NULL; - struct device *dev =3D core->dev; + struct qcom_scm_pas_context *pas_ctx; + struct iommu_domain *domain; struct resource res; phys_addr_t mem_phys; size_t res_size; @@ -29,14 +33,18 @@ static int iris_load_fw_to_memory(struct iris_core *cor= e, const char *fw_name) if (strlen(fw_name) >=3D MAX_FIRMWARE_NAME_SIZE - 4) return -EINVAL; =20 - ret =3D of_reserved_mem_region_to_resource(dev->of_node, 0, &res); + ret =3D of_reserved_mem_region_to_resource(core->dev->of_node, 0, &res); if (ret) return ret; =20 mem_phys =3D res.start; res_size =3D resource_size(&res); =20 - ret =3D request_firmware(&firmware, fw_name, dev); + pas_ctx =3D devm_qcom_scm_pas_context_alloc(fw_dev, pas_id, mem_phys, res= _size); + if (IS_ERR(pas_ctx)) + return PTR_ERR(pas_ctx); + + ret =3D request_firmware(&firmware, fw_name, fw_dev); if (ret) return ret; =20 @@ -52,9 +60,27 @@ static int iris_load_fw_to_memory(struct iris_core *core= , const char *fw_name) goto err_release_fw; } =20 - ret =3D qcom_mdt_load(dev, firmware, fw_name, - pas_id, mem_virt, mem_phys, res_size, NULL); + pas_ctx->use_tzmem =3D !!core->fw_dev; + ret =3D qcom_mdt_pas_load(pas_ctx, firmware, fw_name, mem_virt, NULL); + if (ret) + goto err_mem_unmap; + + if (pas_ctx->use_tzmem) { + domain =3D iommu_get_domain_for_dev(fw_dev); + if (!domain) { + ret =3D -ENODEV; + goto err_mem_unmap; + } + + ret =3D iommu_map(domain, IRIS_FW_START_ADDR, mem_phys, res_size, + IOMMU_READ | IOMMU_WRITE | IOMMU_PRIV, GFP_KERNEL); + if (ret) + goto err_mem_unmap; + } =20 + core->pas_ctx =3D pas_ctx; + +err_mem_unmap: memunmap(mem_virt); err_release_fw: release_firmware(firmware); @@ -62,6 +88,18 @@ static int iris_load_fw_to_memory(struct iris_core *core= , const char *fw_name) return ret; } =20 +static void iris_fw_iommu_unmap(struct iris_core *core) +{ + struct iommu_domain *domain; + + if (!core->pas_ctx->use_tzmem) + return; + + domain =3D iommu_get_domain_for_dev(core->fw_dev); + if (domain) + iommu_unmap(domain, IRIS_FW_START_ADDR, core->pas_ctx->mem_size); +} + int iris_fw_load(struct iris_core *core) { const struct tz_cp_config *cp_config; @@ -79,10 +117,10 @@ int iris_fw_load(struct iris_core *core) return -ENOMEM; } =20 - ret =3D qcom_scm_pas_auth_and_reset(core->iris_platform_data->pas_id); + ret =3D qcom_scm_pas_prepare_and_auth_reset(core->pas_ctx); if (ret) { dev_err(core->dev, "auth and reset failed: %d\n", ret); - return ret; + goto err_unmap; } =20 for (i =3D 0; i < core->iris_platform_data->tz_cp_config_data_size; i++) { @@ -93,17 +131,31 @@ int iris_fw_load(struct iris_core *core) cp_config->cp_nonpixel_size); if (ret) { dev_err(core->dev, "qcom_scm_mem_protect_video_var failed: %d\n", ret); - qcom_scm_pas_shutdown(core->iris_platform_data->pas_id); - return ret; + goto err_pas_shutdown; } } =20 + return 0; + +err_pas_shutdown: + qcom_scm_pas_shutdown(core->pas_ctx->pas_id); +err_unmap: + iris_fw_iommu_unmap(core); + return ret; } =20 int iris_fw_unload(struct iris_core *core) { - return qcom_scm_pas_shutdown(core->iris_platform_data->pas_id); + int ret; + + ret =3D qcom_scm_pas_shutdown(core->pas_ctx->pas_id); + if (ret) + return ret; + + iris_fw_iommu_unmap(core); + + return ret; } =20 int iris_set_hw_state(struct iris_core *core, bool resume) --=20 2.34.1 From nobody Sun Jun 14 00:15:00 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 58C2E3DA5B1 for ; Tue, 5 May 2026 07:01:24 +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=1777964486; cv=none; b=NWLNUSQnDF5U7Zsl7IzRGV4uGVrYwpKFlLQ35tLlzVv1KhDGGSKh0BUDHfvKme0Um99GJXtUDiQonwEPhjQrDyVYJBr8z2eRFot1nwXMBxkU4JeDSQsE6Id/Jy09UWY2iaQC39+4Udopl586jATAag2GA8EDE5ZuL+hvasnQQP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964486; c=relaxed/simple; bh=70xFrnhgQm5w7ycFVlFn4+YpXwENh5y/BrI0x6UYWi4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NhYVttouu9gkeJsyOzrrRaFeZuTek5ZPgi8cUYIHF4rwN1irF6qkYyifueJTgRijob7pHr3dD1kx671EUNSC4eA69PrW09NokUVOgzSaOX1X7z0Ty1SfgBgdEaOXU4ag8+JKqJoxZXihMr/TYgoeEAGBEXkjTZ7Bq2Z67WfnB8U= 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=GB+Fp1CK; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MDFGm67r; 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="GB+Fp1CK"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MDFGm67r" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 644NVjGN3409260 for ; Tue, 5 May 2026 07:01:23 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= kfW5uTXNcQiD+zRKKbRk7ZRairYKuRP1etGcVg/k4f4=; b=GB+Fp1CKJN6tG3Ks rF2DqPXJY6Dq/tg+CgGX30ut1aa86Rj2iFiuQr1u9Aixr5waEh/GrJLR882kBhxL D3Yfg6AUy0zDnDhVAVGH/psLztE3RQzTSL5SHOyEt/JD2HVTFfUCo2n1E8lR11KP sAV8ysuZtyYXH8iYUy8jRTjCK4SYLi+0IfemWO8lWk6RIQATdI8QqkiLPwM39gEg 2ponL4KGzFkWjR2EFhMiDEb/zUDpyLpkrTHfl4ShFcwpsKiPcAUw3Ux9EJEa5atp d+z2jhNR+htZF2jgrmC2bfW/St3xzaMueJa+usAqxKmbSIFVnQn6RJHlMM25zOIm ClS2AA== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxx00tt05-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:23 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-36531a0f95bso2144424a91.0 for ; Tue, 05 May 2026 00:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964482; x=1778569282; 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=kfW5uTXNcQiD+zRKKbRk7ZRairYKuRP1etGcVg/k4f4=; b=MDFGm67rpx15479PSxGeaXYo74k2SbBpce/Azs4kFogHAEyage7/VPu8AVl1AorqGN ZjOYgAZT4NIsx4G2Nu6Wgr46DckxoMjfLgPBRA/eHCsCEpUA9Uxn5aFCt5PbWhI4xlN3 6rMnk2W9q8F8Rd0piZtTPHqW3NQXRTw+48Vc2KG4QlCF/Yec2jPRLmUptTcXat6JOg2U AV58PFLW1Mn7YOXMR7Iuo2iWlAQCa1XVsb69W+ZOcBSLYFZ6oeEFt3IC/wne/b/Q5prz xsjlnLDXuKdxcPUvaHGZSuz8rQaewMJSlA93XiWNlRx94UwvFsKVM5EHFEJn32Bq5+r+ yEzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964482; x=1778569282; 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=kfW5uTXNcQiD+zRKKbRk7ZRairYKuRP1etGcVg/k4f4=; b=R+kDnZ/Zv3KiXJXioidHHtjl4J5UV1sbLxDcGu3J9xxhb6eh2LlDRfUNIAHDvPEa16 b7Sk2QphCWdyU/Wb/hEwTgGVYsbpvKWaM7cmcqKmvH1oEhptUDAwV8BbBYZWM7NGwdRl 5UH01Tzp5GpN02+fiGsepcgvEI/9Ht/DyiyLgOX3xVtvHznfLpXszy+QtNurrs3UG2KG Y2JktcYYsxZMDyc/jwWv8HwhnE4s4oOxGR6/O6wRdpSvTU+S2piTMY40uxJZhOYjsYVa BoWzpiAPKm13XErsXhboVAdIm92nTgZRUqBfodonTLv5HZUH3C8ijwR/kCTx5/qCbha7 P+Pw== X-Forwarded-Encrypted: i=1; AFNElJ/Km4d6SnvXPKiyxyQXt4HCqj0yRFKck3tfOVOMW4TsRi5TP1USB5lQMnw+Toy6zxN39O2+NLdghPt2Oq0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz0izpdfquTpnyZ69j+AbpTrKDF6hrraSfSssvADByaDq+k93Ww YHkpDhg/zxPgGdrOzyFeHphluNMqDUwnrho263taqLYXqx7YhkI5WonlsAjDBvBf+iMtrN5MsjG K88ZeMbDV5d8dGnAg0x0dh/JqlBTvmEuW419ND8gMCTptICVFH/S6Rrq4tKOVZ+wipB0= X-Gm-Gg: AeBDiesBN08U8xz+m93yCfVRF6jo10CMiDh8HWheObp493DRsz5AsPbgo9FLfMbc4/E 2gNlwBULU3OnllT+ptdllPel0X3YdbBDSWi4fDOeOfiAZGgn1K5yk9AU9o+ai8r9g4f8JyQBN5p w99wVMyxOqL1EYdZlbXA6wyrIIZFdH13Z9TzP23f5nOS3jkjDDzfICm087jEaqAgvgop845y82e W8J5Y9BWwUINXgpIUrxn9ZcKWvgn0P4I6S1ugire5vkpR79Cwyo44IVhfMU4WF/uyvliIYLBvPK ndwzBZip4x79taa3FWoQSOEr+KnnQZ9pelmm/aPQzVWin91dBkbKFpuUPFf42soKvkPOzyK+Iek 74r8l9n6nrKDwzv9U3JZ5Uh7KpkUP/Yvt2DZmh+rmnG4tfxYNYzfMMH8F3qDgQbGrcg== X-Received: by 2002:a17:90b:278f:b0:35d:a542:2dcb with SMTP id 98e67ed59e1d1-3650cdffacemr12905269a91.16.1777964482089; Tue, 05 May 2026 00:01:22 -0700 (PDT) X-Received: by 2002:a17:90b:278f:b0:35d:a542:2dcb with SMTP id 98e67ed59e1d1-3650cdffacemr12905224a91.16.1777964481507; Tue, 05 May 2026 00:01:21 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:21 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:29 +0530 Subject: [PATCH v4 08/13] media: iris: Rename clock and power domain macros to use vcodec prefix Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-8-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=16678; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=70xFrnhgQm5w7ycFVlFn4+YpXwENh5y/BrI0x6UYWi4=; b=yHOQ0N/ThPssYi9PHbCCRgWWT4F7VXwIBmYiayUppl/N2GmnfpAThSMg97ZaFAaCzQRbQ3oxE yE9BdCRbFVACw0gsX8FDoDKXrHoj+RnqRQEUOJCL3Kr6JPUpBrXyH3e X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=APflyhIR c=1 sm=1 tr=0 ts=69f995c3 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=kpNcZxiqwdVgWfiEekEA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX24N5wsncyag2 OP2MOpAzjnbE8lOHBJ5YTZT8WHoVGppHkUXtkimqPRrX2lyU/+CbuHy9ZmDOwSMGxpfY2aCSwr/ 5fQmhF/KpXObMlgjgHEo6HEj6PrWrVO5eXB6QW7vd5nzwQJqJaDpKEyLuHo/REU0UcOGR7j3uRL 5KoQPeDO3UkgdfGZmckBnhOzv0WnVmGq5P/Uoyj/rJRFYwDo89Dj0VAKW6Zt6ORw6TMHeegDuMe UyBSarHhT19x+RH9bmjHW7sh+sjgUwEQgI1jREMMM+ADpEMWYxVgMJY1uKNWZELwkt3eGgceNAf 7HgMQfE0ufmUdk072nGFj11B9S6iE87Ms5wMLcAqiyhGwrS8Vg+v4+LrINy27G+9GTT8ZuetNg5 BTio7TAQq0Lwle84G2xVdau2Fp27G/1oTGR57N9EqT6oFS+3Hc6QOfVUl/WnpqOgDrkV3AL2BKD ZbDyeENAlFrmL3hD7+Q== X-Proofpoint-GUID: BzkYizhfBG5pSl0MSWLOdAgPX7kzppcE X-Proofpoint-ORIG-GUID: BzkYizhfBG5pSl0MSWLOdAgPX7kzppcE 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 impostorscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 suspectscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 The current clock and power domain enum names are too generic. Rename them with a vcodec prefix to make the names more meaningful and to easily accommodate vcodec1 enums for the secondary core for glymur platform. No functional changes intended. Signed-off-by: Vishnu Reddy Reviewed-by: Vikash Garodia --- .../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 Sun Jun 14 00:15:00 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 35E383FB05A for ; Tue, 5 May 2026 07:01:32 +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=1777964494; cv=none; b=PRYiWqFw63CcVUuZO2CNT3+rvMRF/dIO69+xeNPph1Yji4K8LxW3XkpXvjOPmULaBeSRo7wk+DPCMjevYuf9jOh0iDpoPDvQH8zjLDx5opRNqoGay1xLWLaCBB5RiMKXGcLmWqinpnFbkxr1skBjm0nnJYN8f0wqucre/jnuzZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964494; c=relaxed/simple; bh=jNjZAZiQFF7xQOA0ExmeL9uJE+LCJCQU8imR5sq9Yw8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZPsG30lHVLhzdus7c2bTyFtiP9zsUEAzUQO2xr6Lvk/uRs/QYCjybXOrxGh2Zmm5eFSchNE2y0ZGSJzfd4lg0kCtmY/3m10eYKlxCA5TzhpDriVCKGcAciiTYyF9opncA/YwHwHgSX29VzoxQzoEi/jmi5820BeBXHNm3ktbY7Q= 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=cYQAEKxd; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=duDheCMz; 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="cYQAEKxd"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="duDheCMz" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64559cDP748927 for ; Tue, 5 May 2026 07:01:31 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= AyFy6Eg/1l/ALrrdXeArv0NcOTcllEzAF/yzKF4ySpE=; b=cYQAEKxdT3D4pYLG nlai0Ha68QvGFy/RbwQE+2B4QMmSsRC73fziRCOaPf0EZa/h83uLOST+B7JoXDJD iESlfGLv6BxQalLvcucceVSAfHkFJAPKTknP4oypKcLxUgqCQi8z4vBaBC7J4nkv 7MwASxH1aZux4GjgWYzZU4r4CBE8muTwxYnjd9Z2Q7WRGfGybKfuEymTopn9ggej 3hoUiXsnJSxRC+6D3AXF49QYS4iWh0j59alco55awbOKWphcFN8uEL+xRs990RWD 3k2iSJJti5bLxXPZvhFNitybCfLoXtUwbrab9uz22E8W0Unzhwt7Hz3zJDy7y0hP 6jiu7Q== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxscf3th7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:30 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-365312a27a8so2013497a91.0 for ; Tue, 05 May 2026 00:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964489; x=1778569289; 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=AyFy6Eg/1l/ALrrdXeArv0NcOTcllEzAF/yzKF4ySpE=; b=duDheCMzxx1yUNJWdEFJiHH23RPP1k+LLV2IpDbjzBrUZgqp60s4d1wU5NxPiaBe5Y ZXkBQWideQhz29FxWnvUviTmQeQO/eXDsgqrKIsBl5VTuJSZaEmMCv7jjv9xkVrrUjr0 LWOihn94q99BmI03sCkTZtn4AdyeUIrKM8uzbZOczsruK7FJ4KA16L/FU7De4DlWZQPr 8YkDICSmb15giNC8O13NmLjcHGKO8Zs98NnRTYogNZicsCyRvwSMA8c3udjcSANP4NNA 9PAWgckTc6ufsBt9Fe2RqAlTPyJFrr9K//Q5ynLMTYwPRZtnx1rxVgjZdeuFCVvxdz0u dPPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964489; x=1778569289; 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=AyFy6Eg/1l/ALrrdXeArv0NcOTcllEzAF/yzKF4ySpE=; b=cidsADlF3N+iFaRTzmWIibBvLvkME0WrFIGixIM7CebL6g9d5whA4kbrdrQvA9t0YE ODZNksjiHmHgPluW8401GB58y3FzQ6FGJOAMHl76gpI1JGizGCq0Lcarwz3atHQKKJ3y o8Ft9Kpbet3dicX9KDhdDWzWiiTi62f0rQIzDd3WxwSopp6+e+kpgTvFIT78MBUBNYGj FdaOaBdWiV0nB4VvNLSwQIC3XwgyG0qeXZ+tDLXihexgZZnH0jC7UlSvm2EFSiEvIMjG 0mnxq0gAxhaHVX/zORTgUCSpY0634DojbB9ornFj4YTLA6tVOU5XrFC0Z35ZBXTap+7E xEgA== X-Forwarded-Encrypted: i=1; AFNElJ+ww64T9ccRcdtrnp87u1MhbdDV3ag2MtHKaFLxfH/bAcmbNy4wYLcVkO6qo/LYfHUrL45JrZWC7AgSvKE=@vger.kernel.org X-Gm-Message-State: AOJu0YySJO4lAwMyq8Ma2emGMDbex2XzOVzCPe1IoH3oWSXpI4QC/vl7 Nc9Ve7OkITlRmCnZByG7fWL7zem5D0RMdGrQCrAwmJYeGl/Q9fIOSMVr/wNOZOgbfUZYpMDJio8 DKaEBEudy+hbmXeTTtdPAi4/Wm4t6T6iP3Buy6SLASRNRy6nWvqZBM7JjqMzbgyHg++s= X-Gm-Gg: AeBDieviS7z7ghmSMRmSEGOB9waaH21JIM3nhGPN/70do3J+BrS/o3Zh6dra4mA1m/k Z1b+xPlQHifH8g6fXNOBqBeS0nLYcgu0rkIl2VlVnKfLcxFhPKaFb32AldAXkOi81mt8bNHr/5/ rOT2fLsVaocVB6N8/Kydr3zT93d3a1dkOUcAd1uhxYx7GssBUbBeOXw8UNKpbABUDwFb5cFjE0U SleSRMSGnuFPGpcb8zGfv5/neTTC5w40z4ByeL9DKz3SZSagAMhHE5GiySGcwwi47GccyCznCzN m2cGIW7NeWem25AwSCNcFiNo1P107yRfIisB/fpP0qXttocddaqKPV00Ews51y81oa7MtSUc8/t Z3iytk5wHSgg81H0djaKdohckh0x2CvZqlj0ruL99Of68GWaiGirOPgYlkvKEXkfGmQ== X-Received: by 2002:a17:90b:2892:b0:35e:27ec:de0 with SMTP id 98e67ed59e1d1-3657747c4f2mr2008268a91.13.1777964489074; Tue, 05 May 2026 00:01:29 -0700 (PDT) X-Received: by 2002:a17:90b:2892:b0:35e:27ec:de0 with SMTP id 98e67ed59e1d1-3657747c4f2mr2008221a91.13.1777964488403; Tue, 05 May 2026 00:01:28 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:27 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:30 +0530 Subject: [PATCH v4 09/13] media: iris: Use power domain type to look up pd_devs index Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-9-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=22664; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=jNjZAZiQFF7xQOA0ExmeL9uJE+LCJCQU8imR5sq9Yw8=; b=x8ZK+7rjoOJHym/dq5i0ld/Put39teoGZehcJ1Bo83MWMeMCyzI7+QLLIlNH7Pis9O6VPqZGL PFOadtIqtQWDWtv8sZHKgisW2RzwX05rbGZ7OA5TKy0+YrrCNepYvvC X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=BcvoFLt2 c=1 sm=1 tr=0 ts=69f995ca cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=3jpyDGP9Yv0p6WhxEk8A:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX0uezD+6jN8zf hVPAZ+O+dVQKiaC8cguhP5oLhCDhV34xe2apx4jBvxA/N1Hb8tPLsWpMKLMFnYUePyTFGvzsl3D TP90bzzRpP07LY6+xdp/izbyapY8aDNj/QoFG03tf8OCboqzFOTsDhLXZAsZofiDBudjfdirchS Cj+8b0gwsYTh3T1edsL56fiohFlIKnLbm66PDGlK99ZtZBWusvtKqFwCYicsZMrwtj8tonWT9xf O7lKjaKilYgMw7praSI05MzReSq0KeKau0aYAIfrM3lmlYoD7bBIlm83b+b60WVnLqhJt540TzN 0jPYnpvs2FDAyH63w4xUomr+81W7o9iin93Am8ZUiRShMnVTw0prQ4ulSiqKveXIWCN02gop/SK /US+lHCck4ETNRg1MB9ZNLZLjRhd89MKm3HfRnX1lqIiqY6PzTDtyJdxCSOcl+2kJthWUrbccer hglqP8y/55+Nmom4k2g== X-Proofpoint-ORIG-GUID: h3TCgf-PaS2u3z2k3pWIFRnPFOaFnYzv X-Proofpoint-GUID: h3TCgf-PaS2u3z2k3pWIFRnPFOaFnYzv 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 spamscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 The pmdomain_tbl was a array of strings holding only the power domain names. Callers had to pass a pd_devs[] pointer indexed directly by the platform_pm_domain_type enum value to iris_enable_power_domains() and iris_disable_power_domains(). A future platform may need to introduce a new enum value that aliases an existing one (e.g. IRIS_VCODEC1_POWER_DOMAIN aliasing the IRIS_VPP0_HW_POWER_DOMAIN on Glymur), which would break the assumption that enum values map 1:1 to pd_devs[] indices. To fix this, replace the string array with a new struct platform_pd_data that pairs each power domain name with its platform_pm_domain_type. Add a helper iris_get_pd_index_by_type() that walks this table and returns the correct pd_devs[] index for a given type. Update iris_enable_power_domains() and iris_disable_power_domains() to accept a platform_pm_domain_type instead of a struct device pointer. They now call the helper internally to resolve the index, removing the need for callers to do the index lookup themselves. This prepares the driver for adding new platforms where power domain enum values cannot be used directly as pd_devs[] indices. Signed-off-by: Vishnu Reddy Reviewed-by: Vikash Garodia --- .../platform/qcom/iris/iris_platform_common.h | 9 +++- .../media/platform/qcom/iris/iris_platform_gen1.c | 18 +++++--- .../media/platform/qcom/iris/iris_platform_gen2.c | 24 ++++++---- drivers/media/platform/qcom/iris/iris_probe.c | 4 +- drivers/media/platform/qcom/iris/iris_resources.c | 44 +++++++++++++++++- drivers/media/platform/qcom/iris/iris_resources.h | 6 ++- drivers/media/platform/qcom/iris/iris_vpu3x.c | 7 ++- drivers/media/platform/qcom/iris/iris_vpu4x.c | 52 ++++++++----------= ---- drivers/media/platform/qcom/iris/iris_vpu_common.c | 23 +++++----- 9 files changed, 116 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..ae27488579d7 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.c +++ b/drivers/media/platform/qcom/iris/iris_resources.c @@ -70,10 +70,43 @@ int iris_opp_set_rate(struct device *dev, unsigned long= freq) return dev_pm_opp_set_opp(dev, opp); } =20 -int iris_enable_power_domains(struct iris_core *core, struct device *pd_de= v) +static int iris_get_pd_index_by_type(struct iris_core *core, enum platform= _pm_domain_type pd_type) { + const struct platform_pd_data *pd_tbl; + u32 pd_count, i; + + pd_tbl =3D core->iris_platform_data->pmdomain_tbl; + pd_count =3D core->iris_platform_data->pmdomain_tbl->pd_count; + + for (i =3D 0; i < pd_count; i++) { + if (pd_tbl->pd_types[i] =3D=3D pd_type) + return i; + } + + return -EINVAL; +} + +int iris_genpd_set_hwmode(struct iris_core *core, enum platform_pm_domain_= type pd_type, bool hwmode) +{ + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + + if (pd_index < 0) + return pd_index; + + return dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[pd_index], hwm= ode); +} + +int iris_enable_power_domains(struct iris_core *core, enum platform_pm_dom= ain_type pd_type) +{ + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + struct device *pd_dev; int ret; =20 + if (pd_index < 0) + return pd_index; + + pd_dev =3D core->pmdomain_tbl->pd_devs[pd_index]; + ret =3D iris_opp_set_rate(core->dev, ULONG_MAX); if (ret) return ret; @@ -85,10 +118,17 @@ int iris_enable_power_domains(struct iris_core *core, = struct device *pd_dev) return ret; } =20 -int iris_disable_power_domains(struct iris_core *core, struct device *pd_d= ev) +int iris_disable_power_domains(struct iris_core *core, enum platform_pm_do= main_type pd_type) { + int pd_index =3D iris_get_pd_index_by_type(core, pd_type); + struct device *pd_dev; int ret; =20 + if (pd_index < 0) + return pd_index; + + pd_dev =3D core->pmdomain_tbl->pd_devs[pd_index]; + ret =3D iris_opp_set_rate(core->dev, 0); if (ret) return ret; diff --git a/drivers/media/platform/qcom/iris/iris_resources.h b/drivers/me= dia/platform/qcom/iris/iris_resources.h index 6bfbd2dc6db0..d5692e4694b1 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.h +++ b/drivers/media/platform/qcom/iris/iris_resources.h @@ -9,11 +9,13 @@ struct iris_core; =20 int iris_opp_set_rate(struct device *dev, unsigned long freq); -int iris_enable_power_domains(struct iris_core *core, struct device *pd_de= v); -int iris_disable_power_domains(struct iris_core *core, struct device *pd_d= ev); +int iris_enable_power_domains(struct iris_core *core, enum platform_pm_dom= ain_type pd_type); +int iris_disable_power_domains(struct iris_core *core, enum platform_pm_do= main_type pd_type); int iris_unset_icc_bw(struct iris_core *core); int iris_set_icc_bw(struct iris_core *core, unsigned long icc_bw); int iris_disable_unprepare_clock(struct iris_core *core, enum platform_clk= _type clk_type); int iris_prepare_enable_clock(struct iris_core *core, enum platform_clk_ty= pe clk_type); +int iris_genpd_set_hwmode(struct iris_core *core, enum platform_pm_domain_= type pd_type, + bool hwmode); =20 #endif diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index 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 Sun Jun 14 00:15:00 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 8992B3DC4A2 for ; Tue, 5 May 2026 07:01:40 +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=1777964502; cv=none; b=I6LXx6TNc+uuxloQ2ZXqUsbwlgEl2QnGYqCpGhNr9tseROJze6tLBfXnMFfRUgvjJzT+OenYeo7ZQuNjmkPmI4kxAeQFUCm7y5d4+fnDO2ewkZ3UiX5+moqeWKvUkP3WDRlKFqSLD4b7W2fidmdRZj44yTBaVPFK9H+2TA0OTbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964502; c=relaxed/simple; bh=QmfjfyfIcqmz4sKwVyX6rZm27KmIiOULTa2kxbZm8w4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Iclg0LShq2Tkw0MHhRv5hh1cvGXXvd4HH03UZ3Pxs1yKviBvaEwK+c/9Ebo1dpJsRxK1DCL3u+x587YiIPh8tJdlpGKmKy5cVwBdBubbVEWFMS93yOFka6z+7cLu86HkrEpXc3ihMR5MaLSC7ZcTYsdPzETJ9LHts6E6es8inDo= 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=d7Hh7xk8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PzE8rr3k; 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="d7Hh7xk8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PzE8rr3k" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6456FkUh331165 for ; Tue, 5 May 2026 07: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= Ez8F2EeZusDnjQ0n7xRXDcR27Ei/i8R9t+oIeMstcEQ=; b=d7Hh7xk87kDgcFZp czsbjAX6epGvP5rUKku88gIBNR8MlweIa9KnGGN8Nd3hGsx47d/DDtGMH+two3UO rUmrlNaaJ6I6zMO9p3l7kBa+MOqtCf/PTP3uqIKQ0QzIIzrfO6ZUd/WoOAKzOGz1 uP6na25EezDt/XDJR6q95jAXTDWDa0C5ZfcOb2oY17qM/wdDxCkGUXeDdkV0z0Ct 3dzBqfAxQGAP2V/AltGj2QOHKeMaqp259UBMInnV4Mv1etlM2R753p6xSslvTCId kaL1zBhanSu7GXl7aqbsk5d4QqbKHyXsRRc3U3VMu0391qZPOHaMtyPUNMdbl4t0 LsZlYw== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxvr1b8at-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:39 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-3651991d0bcso5069816a91.0 for ; Tue, 05 May 2026 00:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964499; x=1778569299; 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=Ez8F2EeZusDnjQ0n7xRXDcR27Ei/i8R9t+oIeMstcEQ=; b=PzE8rr3kSvJpkqypOhzhgp8+/0/yfCk5fhMsQwnqQ9no0b0Bq7TUo1pcNnjZQn/0iw 3SDbLxpOhDQrYGARHN1yf36kgeKj21oz5DOlUszdYidLv5Okfg/UbwBQMR/hS2seQITL mWhwQy1bWHPB9UWC92J/B+wQrZ/bX12FOaAZ2jLVl5u3/ZLI2wR5fxwdbG1+DcmxBzvb UT/lL2lzt+0KIGnD425zSc++To+6RgSeWNrGMJsEBHKIIWIjHvXh3k3EeNjkFO0UwI/9 FuD5RzbXl0YHsyChKr21u8PfvzkpXTGCiCr7ejm9aTG+HC79b6P3smHtr4tBgIR8kwxh 3Yjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964499; x=1778569299; 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=Ez8F2EeZusDnjQ0n7xRXDcR27Ei/i8R9t+oIeMstcEQ=; b=Im8xzu1jkmAyQtazfSxMhdfGGGgrnKxdVwaJLEpCzfh02TRgvX1wYNP+GfDwhf1Cww tLt1vtJecl5J2m3YVhQEHNLlMoFy3JGrV6iqUfMwyLcgrWpHS5bded5MyWR4CnhrH/5i 1m9iAkItEQtHGu6Fbd5HV4ls6VOp9ysapYTnp6IPqRI29i5Vr417xCBRRge+He9oKAfC 4fsfGuEmnfK5D/27xwrvKaQnMFfgKz7jqsDekmfKWzWLzAIWPMwX/MLSLe+uI//+TY9a U5iidASykOb1Cl52RCX12wmD9Y4bHSHavmsA5k1jJ0hjM7O4XSx09wFPION7CQ29QNa4 zHGQ== X-Forwarded-Encrypted: i=1; AFNElJ/bYk1b3MQdYNuQ8R5c/VxsRpgkDH8ottx3Nf2BZAfe3lVh16Q/PRTLnBhNtNOhATi+3/31UTLXWyAgPGw=@vger.kernel.org X-Gm-Message-State: AOJu0Ywh1R1irkdWdiaFTUgK6U5E4bbIGuUWrK5PPNMnrAlKYedJwH5U eEVJkJfIhkyefl0FIKFIAMXA5JpovIuXII2J4mzvP+thjq6/+ZbdriZoe+zs0c7AVUgL+RsuUwC fEIMmCB6j+YpRy/UKhPZtHS2b06II2B19bXUeSXi7ryONOe1EisgqzqvCQJ9uoLMW+X4= X-Gm-Gg: AeBDieva0XTJkEsOTjhV/h/vgF09Ts3pNSQL0ZqM3G6XLn8hJU8vHwksOGMuHCQfiZ5 QTutXuR77eCjGcJNY2HaCdLJPrzXMjVTH+WeL27sgxSojWHIxhl8fl32NrRIgoeP9qM41UtjH3t +V4j2udmVXaCaRi9oyHfd6js/ZN2PPDZdMirEt/MCXuitmXgSc5kwuMED8hukrPha+FvTB7zdQv YdfR9eO1skzfvQ+HpYQ0GWldmsDQtUPL4ttaOXhOMZBpqxTXT7cDJDlqmxDaj60scIGFv9Kquvo 35gIyCdmNTbv/gjAhsdCI6PRKimKSEQskOyTtI2n89XY1pEcU6JOvOcrA5TbFVRbhlJcxxH9QX7 Hlp9sNCbTiKkEOUN+bALdX5Zf4fi9hcPW2yb0nXyYKiOK+NkMjFVxLOAmZGg/f9qGaA== X-Received: by 2002:a17:90b:2b45:b0:35f:c729:de9b with SMTP id 98e67ed59e1d1-3650cec909cmr12880581a91.20.1777964499124; Tue, 05 May 2026 00:01:39 -0700 (PDT) X-Received: by 2002:a17:90b:2b45:b0:35f:c729:de9b with SMTP id 98e67ed59e1d1-3650cec909cmr12880538a91.20.1777964498589; Tue, 05 May 2026 00:01:38 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:38 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:31 +0530 Subject: [PATCH v4 10/13] media: iris: Add power sequence for Glymur Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-10-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=8735; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=QmfjfyfIcqmz4sKwVyX6rZm27KmIiOULTa2kxbZm8w4=; b=oC1MH/mS5+mmH1J/6tD/KE07iwxh9YWLZrezYJGjm8M63hrrWnF2F9VIGgRndVoXQU1XI62Cb lLdleeGMgnSAadIYsMOmmDcPyozeJV1KCjPpkWADISqIDbd6XODxpdG X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: suCcjHQmbyOndiR5q9rC03St9Dz3pm5B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX2LB1pZY4OWQf G//5qo900pI5vIUrznuzSc+XksKKaeJkqZ31l6hzvDS+J2qKhuxJN/Y5IJoSGqa9Tw3DBoISTCG iH1cDI8rMh1Uwx3Z3rKWmv907sHczJRpv/E4A1+ePGMgmFrZdVbd6LscPeXpzLsIhDdQtCzUmiu SxhkwE6F5LdMWO8K0JiJwIG01GzC7dujJMWkh5VoSOQdWJhqP9xFZenrXX1/d8EmHpivB3LoJMi JK5gvuDUJgEeLg1aoqbnS3WzG58yvyif1bbpi3LYYY/jAFktEOCIeEql7L2YkW/cewIebn9GT6b ueG+aGaS4QCkNHiwK4+DTPjOyh0XyXUheuh9boabBHK+JQ3z/5mccwJHFATKxoHp5y+tp/eqWMj EvPfhuIf5DjhTmx4sNfDiqXrb+N1zeDW4fpUzTzOzr19/lch+9Lo2xMPH84mKway0ZQD31ek/Vm WC5rWCzmP5ryaSAtnlA== X-Proofpoint-GUID: suCcjHQmbyOndiR5q9rC03St9Dz3pm5B X-Authority-Analysis: v=2.4 cv=RvL16imK c=1 sm=1 tr=0 ts=69f995d3 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=nctFMNgZG0MEUW-6EVsA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw: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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 Glymur has a secondary video codec core (vcodec1), equivalent to the primary core (vcodec0), but with independent power domains, clocks, and reset lines. Reuse the existing code wherever possible and add power sequence for vcodec1. Signed-off-by: Vishnu Reddy Reviewed-by: Vikash Garodia --- .../platform/qcom/iris/iris_platform_common.h | 4 + drivers/media/platform/qcom/iris/iris_vpu3x.c | 137 +++++++++++++++++= ++++ drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 + .../platform/qcom/iris/iris_vpu_register_defines.h | 7 ++ 4 files changed, 149 insertions(+) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 7d59e6364e9d..8995136ad29e 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -61,6 +61,9 @@ enum platform_clk_type { IRIS_VPP0_HW_CLK, IRIS_VPP1_HW_CLK, IRIS_APV_HW_CLK, + IRIS_AXI_VCODEC1_CLK, + IRIS_VCODEC1_CLK, + IRIS_VCODEC1_FREERUN_CLK, }; =20 struct platform_clk_data { @@ -210,6 +213,7 @@ enum platform_pm_domain_type { IRIS_VPP0_HW_POWER_DOMAIN, IRIS_VPP1_HW_POWER_DOMAIN, IRIS_APV_HW_POWER_DOMAIN, + IRIS_VCODEC1_POWER_DOMAIN, }; =20 struct platform_pd_data { diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/= platform/qcom/iris/iris_vpu3x.c index 13fbb21c2182..0d0a239f9feb 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -27,6 +27,16 @@ static bool iris_vpu3x_hw_power_collapsed(struct iris_co= re *core) return pwr_status ? false : true; } =20 +static bool iris_vpu36_hw1_power_collapsed(struct iris_core *core) +{ + u32 value, pwr_status; + + value =3D readl(core->reg_base + WRAPPER_CORE_POWER_STATUS); + pwr_status =3D value & BIT(4); + + return !pwr_status; +} + static void iris_vpu3_power_off_hardware(struct iris_core *core) { u32 reg_val =3D 0, value, i; @@ -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..37f234484f1b 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h @@ -7,6 +7,7 @@ #define __IRIS_VPU_REGISTER_DEFINES_H__ =20 #define VCODEC_BASE_OFFS 0x00000000 +#define VCODEC1_BASE_OFFS 0x00040000 #define AON_MVP_NOC_RESET 0x0001F000 #define CPU_BASE_OFFS 0x000A0000 #define WRAPPER_BASE_OFFS 0x000B0000 @@ -14,6 +15,8 @@ #define AON_BASE_OFFS 0x000E0000 =20 #define VCODEC_SS_IDLE_STATUSN (VCODEC_BASE_OFFS + 0x70) +#define VCODEC1_SS_IDLE_STATUSN (VCODEC1_BASE_OFFS + 0x70) +#define DMA_NOC_IDLE BIT(22) =20 #define AON_WRAPPER_MVP_NOC_RESET_REQ (AON_MVP_NOC_RESET + 0x000) #define VIDEO_NOC_RESET_REQ (BIT(0) | BIT(1)) @@ -35,6 +38,8 @@ #define CPU_CS_AHB_BRIDGE_SYNC_RESET (CPU_CS_BASE_OFFS + 0x160) #define CORE_BRIDGE_SW_RESET BIT(0) #define CORE_BRIDGE_HW_RESET_DISABLE BIT(1) +#define VCODEC1_BRIDGE_SW_RESET BIT(2) +#define VCODEC1_BRIDGE_HW_RESET_DISABLE BIT(3) =20 #define CPU_CS_X2RPMH (CPU_CS_BASE_OFFS + 0x168) #define MSK_SIGNAL_FROM_TENSILICA BIT(0) @@ -52,11 +57,13 @@ #define WRAPPER_DEBUG_BRIDGE_LPI_STATUS (WRAPPER_BASE_OFFS + 0x58) #define WRAPPER_IRIS_CPU_NOC_LPI_CONTROL (WRAPPER_BASE_OFFS + 0x5C) #define REQ_POWER_DOWN_PREP BIT(0) +#define REQ_VCODEC1_POWER_DOWN_PREP BIT(1) =20 #define WRAPPER_IRIS_CPU_NOC_LPI_STATUS (WRAPPER_BASE_OFFS + 0x60) #define NOC_LPI_STATUS_DONE BIT(0) /* Indicates the NOC handshake is com= plete */ #define NOC_LPI_STATUS_DENY BIT(1) /* Indicates the NOC handshake is den= ied */ #define NOC_LPI_STATUS_ACTIVE BIT(2) /* Indicates the NOC is active */ +#define NOC_LPI_VCODEC1_STATUS_DONE BIT(8) =20 #define WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0 (WRAPPER_BASE_OFFS + 0x78) #define WRAPPER_CORE_POWER_STATUS (WRAPPER_BASE_OFFS + 0x80) --=20 2.34.1 From nobody Sun Jun 14 00:15:00 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 97FD53DDDAC for ; Tue, 5 May 2026 07: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=1777964510; cv=none; b=sGOVhIHxN4E0BhvrwU/8+Wg3gn8UpnMBCtF8aG9cyjgCHnam5xljrY8JA0l+H73cO9wIY/Bla59AOKCgqnNcqaV3U6mt/cZAv7I1Lpqi3B9uxBitYHnxjJLTS9BlAMPBp5OzA/jpHywovOCIAhq50ifcm6g5PQG0LdAR+J5EY1E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964510; c=relaxed/simple; bh=NOPB3XpAm+5j2yfPgMnvKYScysXVCwjJAj6kI31cias=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=icJ83oNIh62/y/veMDhCECn9PzYZndLStr0a49DGzi6q1vSI7iS0UgaxPQsnWRgRr0qC3LeZoh8qmzv/aMtmjRXG1nSUBDkHTlT8ee1pkfU75BgS076o85hDXV51dodQFsugnitPaHjuX3AQwlSIdzYbshmfWEwLDTIPOtvXtx4= 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=jeW4DLWw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cAnHpRlJ; 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="jeW4DLWw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cAnHpRlJ" 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 6454Z8HQ4128828 for ; Tue, 5 May 2026 07:01:47 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= h4SKtKv2SO1ymMAm+VFJrUss4ilTgRuLHVvZfHEsH6U=; b=jeW4DLWw3gPtNfu2 Ly5zHqZhHF6nM64aYiFGYb1mVhfS6gJ4jN5Zz37r4fDG7pKpQagknokWdqhEbI6h 2aaszTsAeKYY9/8KtiCHCUf1l8I39dDcqSrjcLs/KIoSiDeR40LJlcXipzaKnLYL 7L+AC8CnNYxkBLA7lNocr+fqd8KsAhecjiiZwm8CCq0Q0IZpV88FduopS/gx5x6P fvQJPGYracESxpIQeS4jKSY1+LN1Io2Vi6x0kqB60PcYjFRukHTMe6ZxvCcwuhDr /2nT00gLr7NEDYvENmNScwPkDGscM9RXPAjal1ScL8AkznRp8RgkjG8iRWlM6gXB ogpsiA== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxsdw3uru-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:47 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-36514eb1194so5290940a91.2 for ; Tue, 05 May 2026 00:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964506; x=1778569306; 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=h4SKtKv2SO1ymMAm+VFJrUss4ilTgRuLHVvZfHEsH6U=; b=cAnHpRlJ0z9u7YISvh5wG7iECJ2PGVkXYNId89s6npg3t7yhnuRqhRew+CAM+IG6V3 xWYefHosmDOm/kKUqO6KHsz6vIsrmbxijZ+x3in5+mO8b/Rlvx+cFF71O/NNZaFEKkNZ JQtcBL1mUD2RMfdceqI/p0WvlXgcyJtOLBAl1nSuUPPgUvzG7Zd0MA1hruewrhJ5QW3/ nlE22+OuaIuUYK9ZQAYMMNCK1ODeW4GuPUBzLpSxeqFXYxbT1PgPt/Yig/KwGXGIgnpP akLc9rehPdpIhIEbVCqWmjLSO/aeAlWbAWJYi+aFQAA3qfTzLnBQdOfMZmOh7jFteogx yjuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964506; x=1778569306; 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=h4SKtKv2SO1ymMAm+VFJrUss4ilTgRuLHVvZfHEsH6U=; b=QZA9e6QKbKJtHdSjU6t9kA9VC2q/i4F8eunGfBZzpfi99Xyshz5669s7dly2H168xl gMug42sr0jchllrWPmWYJ08OcwI4qqkueTaF/yjphmf9QLfcoM//6YCeF0er6lmHSLp5 +VVVppKJP0A3mAXSgj5fb+GONxubMqWtvTV+hdCs3zzrhy5JhwXs1Nx56YW+bjKfwS+p LshFdDLrauoDpx2AGaJbEh059tE/dnpvqJZtohjK+UPlnRuvtKDHEo5ny88BKGG/kHcB iI8daVTyxzJSmyLIugYmzVdM0iLXvGDOhVGA6OA6hG2EXb2u1AHSxXqIHlNXBzNRkAX4 Wc4A== X-Forwarded-Encrypted: i=1; AFNElJ9u2nG4NwHqOk78yF36em3STzePCv0ANMJqtKI9WCn8y96yOXUA9twEE7043aA5myVA+3fRlONwicA65tM=@vger.kernel.org X-Gm-Message-State: AOJu0YzPVZdZmWt1vmtxViDR4Jr04yc24dmLtdbdF7n2p2FRoyK06xBt rD8INs0NAMlP3ziJSo6jYi+6MvJDLmjDLqNNuqA8BbWhS/MAW9xyoF3KoJvcsWqsVTQ2ZHowA9q L2SYQxJBHUVV5QcgYXHtal/obqyLjrZ0lh9NcRn0gaoe4o/CEVghHDA6AMzQhnGn+oGs= X-Gm-Gg: AeBDies3U6TxU4cxeWGPmYzD9iQXYJVObHRZX/r2B2vAFiT1qFMcgSZsMScZMitZClS vD+xTFEzA3JrKcZNdcgbWPLeT1Dw/QGyDWxuiy+lGnLubKb7RNih6eWjJxs6Mpb79fLV3aYzMJh 1UeaY2nyl1xjUZmxt5yqdqu6rNN4LXp2H1/uOxn/iko0/waVAKhQ13QAI5uEGVMSNi6y60cc8sq eLKm4Ejd1Ry7iuRTgXI3wlnbTjots7TerhNWDhP1yTb2r+cl+yPnc29yG1S0QVHzi2E67qlZ9S+ LldZ7Gg1YZPBh+bsJV4zjsUwHOA4EAspxnx7CL83Lw2poBXkmYSquhei4H0rahFlG4WljcmhsM1 j4ESKJSx05QU1hjgNKHibx6ENzPqPfjNfoFk4E1PIAXHYbTjPA/4ACz8Z48c3B7M2Tw== X-Received: by 2002:a17:90b:588b:b0:35d:8f3d:c554 with SMTP id 98e67ed59e1d1-3650ce8ebb8mr11535297a91.13.1777964506179; Tue, 05 May 2026 00:01:46 -0700 (PDT) X-Received: by 2002:a17:90b:588b:b0:35d:8f3d:c554 with SMTP id 98e67ed59e1d1-3650ce8ebb8mr11535219a91.13.1777964505392; Tue, 05 May 2026 00:01:45 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:44 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:32 +0530 Subject: [PATCH v4 11/13] media: iris: Add support to select core for dual core platforms Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-11-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=13630; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=NOPB3XpAm+5j2yfPgMnvKYScysXVCwjJAj6kI31cias=; b=ggE+Y6RARb6LGmukpStF0UqyMbeMCpUtEeHPP/Y32TXroQDRmwHnCuXsQvex+ky8sK6VNUL/t CNxERNbu0P/AYS8GVW/0rgkdI3G9IiMRXLsN2YapPMuvZrv09oAqOJ/ X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=a7AAM0SF c=1 sm=1 tr=0 ts=69f995db cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=SR9mA3E-jA3Ceylw1tAA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-GUID: YyMkvNAjKV9BAtaerxQyrJZv7-BHfHsu X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX7MMSbQ9ChEqC DAq+S+/qpB2wjnWI3rRNup9OufTRAwRz9coie/WTKVk7ydCpNMdBoj1Q1QAXkzt6nwenHT+/zxd GuxElqFdOJWSp+S6EYURTI6j4Pysdxw5NvVtsoiEvZ/lw+JwDcSf+UnUi2dMnaDcsGPua2mhzym j7kNcQxNNDJGUuGRBySVbiOVGk9mzsRArXDeV0inZt53jvPu5sQ0qYBpMaGy3AfUO4LHPiVKX0v HnaVExn0FHoQbMxlh1LJHb/v5rmdPS9PA9dqtnFw5yjINc+6bg9uZ5TSy/I/Ww+814zbRRduO2O L/+sFRx2PUPDhSmwSBtarsd+RadAnwc8u4vI/uFayzY4BKrpiysiKDFy3Ifl6BIDv+5ev5U+w4Z SJxHT0DfudEcgaAXY1BooaSjZZfylXv9UYRc77ApbsZl0vuU6XGW65qWC3AcLPV0dtKP1xPZR9r ns4lcBGGj4AEWnWI7SA== X-Proofpoint-ORIG-GUID: YyMkvNAjKV9BAtaerxQyrJZv7-BHfHsu 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 adultscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 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 | 91 +++++++++++++++++-= ---- drivers/media/platform/qcom/iris/iris_vb2.c | 4 + drivers/media/platform/qcom/iris/iris_vidc.c | 6 +- 12 files changed, 129 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..0e116c63f529 100644 --- a/drivers/media/platform/qcom/iris/iris_power.c +++ b/drivers/media/platform/qcom/iris/iris_power.c @@ -77,9 +77,9 @@ static int iris_vote_interconnects(struct iris_inst *inst) =20 static int iris_set_clocks(struct iris_inst *inst) { + u64 vcodec0_freq =3D 0, vcodec1_freq =3D 0; struct iris_core *core =3D inst->core; struct iris_inst *instance; - u64 freq =3D 0; int ret; =20 mutex_lock(&core->lock); @@ -87,11 +87,14 @@ static int iris_set_clocks(struct iris_inst *inst) if (!instance->max_input_data_size) continue; =20 - freq +=3D instance->power.min_freq; + if (instance->core_id =3D=3D IRIS_VCODEC0) + vcodec0_freq +=3D instance->power.min_freq; + else if (instance->core_id =3D=3D IRIS_VCODEC1) + vcodec1_freq +=3D instance->power.min_freq; } =20 - core->power.clk_freq =3D freq; - ret =3D iris_opp_set_rate(core->dev, freq); + core->power.clk_freq =3D vcodec0_freq > vcodec1_freq ? vcodec0_freq : vco= dec1_freq; + ret =3D iris_opp_set_rate(core->dev, core->power.clk_freq); mutex_unlock(&core->lock); =20 return ret; diff --git a/drivers/media/platform/qcom/iris/iris_utils.c b/drivers/media/= platform/qcom/iris/iris_utils.c index cfc5b576ec56..add57632fdbf 100644 --- a/drivers/media/platform/qcom/iris/iris_utils.c +++ b/drivers/media/platform/qcom/iris/iris_utils.c @@ -90,40 +90,95 @@ struct iris_inst *iris_get_instance(struct iris_core *c= ore, u32 session_id) return NULL; } =20 +static u32 iris_get_mbps(struct iris_inst *inst) +{ + u32 fps =3D max(inst->frame_rate, inst->operating_rate); + + return iris_get_mbpf(inst) * fps; +} + +static void iris_get_core_load(struct iris_core *core, u32 *core_load, u32= *core_session, bool mbpf) +{ + bool dual_core =3D core->iris_platform_data->dual_core; + struct iris_inst *inst; + u32 load; + + core_load[0] =3D 0; + core_load[1] =3D 0; + core_session[0] =3D 0; + core_session[1] =3D 0; + + list_for_each_entry(inst, &core->instances, list) { + if (mbpf) + load =3D iris_get_mbpf(inst); + else + load =3D iris_get_mbps(inst); + + if (inst->core_id =3D=3D IRIS_VCODEC0) { + core_load[0] +=3D load; + core_session[0]++; + } else if (dual_core && inst->core_id =3D=3D IRIS_VCODEC1) { + core_load[1] +=3D load; + core_session[1]++; + } + } +} + +static int iris_select_core_id(struct iris_inst *inst, u32 *core_load, u32= *core_session, + u32 max_load, u32 new_load) +{ + u32 max_session =3D inst->core->iris_platform_data->max_session_count; + bool dual_core =3D inst->core->iris_platform_data->dual_core; + u32 core_index; + + core_index =3D (core_load[0] > core_load[1] && dual_core) ? 1 : 0; + + if (core_session[core_index] >=3D max_session) + core_index =3D core_index =3D=3D 0 && dual_core ? 1 : 0; + + if (core_session[core_index] >=3D max_session) + return -ENOMEM; + + if (core_load[core_index] + new_load <=3D max_load) + inst->core_id =3D core_index =3D=3D 0 ? IRIS_VCODEC0 : IRIS_VCODEC1; + else + return -ENOMEM; + + return 0; +} + int iris_check_core_mbpf(struct iris_inst *inst) { + u32 max_core_mbpf =3D inst->core->iris_platform_data->max_core_mbpf; + u32 core_mbpf[2], core_session[2], new_mbpf; struct iris_core *core =3D inst->core; - struct iris_inst *instance; - u32 total_mbpf =3D 0; + int ret; =20 mutex_lock(&core->lock); - list_for_each_entry(instance, &core->instances, list) - total_mbpf +=3D iris_get_mbpf(instance); + inst->core_id =3D 0; + iris_get_core_load(inst->core, core_mbpf, core_session, true); + new_mbpf =3D iris_get_mbpf(inst); + ret =3D iris_select_core_id(inst, core_mbpf, core_session, max_core_mbpf,= new_mbpf); mutex_unlock(&core->lock); =20 - if (total_mbpf > core->iris_platform_data->max_core_mbpf) - return -ENOMEM; - - return 0; + return ret; } =20 int iris_check_core_mbps(struct iris_inst *inst) { + u32 max_core_mbps =3D inst->core->iris_platform_data->max_core_mbps; + u32 core_mbps[2] =3D {0, 0}, core_session[2], new_mbps; 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; - } + inst->core_id =3D 0; + iris_get_core_load(inst->core, core_mbps, core_session, false); + new_mbps =3D iris_get_mbps(inst); + ret =3D iris_select_core_id(inst, core_mbps, core_session, max_core_mbps,= new_mbps); mutex_unlock(&core->lock); =20 - if (total_mbps > core->iris_platform_data->max_core_mbps) - return -ENOMEM; - - return 0; + 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 Sun Jun 14 00:15:00 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 EF6D640629A for ; Tue, 5 May 2026 07:01:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964516; cv=none; b=qZpTeXOWXuiNOQZIB0Z4uBlCrqynGJdRJRofVSXzPnEk5w/kAbcYTI3A137gKiErjdOYpaBMOSStpeBbIO6E50EG/drlGzxQgVGVZuSOhRx3eyqH8VwXUyRPZo8VqTWiQYd6UFkJ5DPDv5RmwteC1ZjEH6ozKNMkx5ewsVpDb/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964516; c=relaxed/simple; bh=GxPcM3D6fcOBB3Z1Td+dY6rhZmNKqLALfdcwQqF+Y6E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dfvh2EDrOOMVhl9tk/vBUSMsTnbtbutdmFju3CUIrLz2cYwF7b1zy0Tm1VzOq+5xYrpKbWIDBpqjNS3RvWSZW4rZsusysgNWTmxX0IBe7jRxkzTqj8/KlT5+/qQ5Bxb7i8jjaOxjxTJzPaR4QUMO8skbfMzzs1k/e63VRzzKknI= 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=c6EjMZj1; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JxLLNKHL; 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="c6EjMZj1"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JxLLNKHL" 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 6456llqv3187611 for ; Tue, 5 May 2026 07:01:54 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= ncTxOLmgEHRNxr9Ra/M7hKec3vLSGGKsocfqCJZ4FKQ=; b=c6EjMZj11urnTpN+ gJnvzh5d2UxNaM+w0CpimIzwFMWIJelcW5WfAtOCRCnqcAwTM+DZ4mMIsgoueTFh jOYkoP11Chbvc/yOo71diE9FaLR87vwvGEFRNEMIpKerAi8B8N4z3qtsk0Mk4kgR Ua7hRnalaqxzTCHZSGut1FyVyEawrBZ8GV+TQZX+DMAp0gmPRjXEms6wHr5Y0qXY FBUTeFoXaopJx/vlBWu4SKJAt4YIBdi6wuKvk1JTI+SZLD1usn3AdgzU2TjoaD+Y I7rlDKcxrLqcPqvkzE24e82NJclVZLHx48YL9+2NDB5uflrjuXuQhzYfEI5hStd0 XayzwQ== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dybkk81ev-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:53 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3594620fe97so11848275a91.1 for ; Tue, 05 May 2026 00:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964513; x=1778569313; 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=ncTxOLmgEHRNxr9Ra/M7hKec3vLSGGKsocfqCJZ4FKQ=; b=JxLLNKHLNwC5a7zQ8A0YqZ/UVDbc9KcqFrRBjeDIBvEHasbjeE2ESUQ2pzt5G69Myb 54MQt5fkhi+SGH1jgQJKZmu+NsXcw/oDv0Xp9vqBrqcmRwquffII3KPsHC/OYvmboCa3 EmG3yyKNBepoWr3MvcasMrKAOivFC7x0ka3m/Bk3KxxJ+Apu6lUvvsOp8ec2hJ0xW2bt VdwagMgWNeBJfTksM3xg6Ag5CeTBzHgb8xKA4qZuD648YwsNAECMj8R0F7GRh+FRBS3a PaG5ogQIua8CyGcZxn1rOnuENO4rJFRBwS5AoyO1V1K6otqCUUuZ1SIpuspedRFQ8Clw 31Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964513; x=1778569313; 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=ncTxOLmgEHRNxr9Ra/M7hKec3vLSGGKsocfqCJZ4FKQ=; b=BIu3GuPSB+6D035xAptXe6Rlafb2Z/JLjFFbVvrYtLOMifxuHyW8FI87ZE74z+G7Cb dsq6VMomnLzkHBYFaekq4qncml7QDNYee6EF37uhlHcx5Pqe4Rk/NmGyd39FZLQO2IL5 e54CBg45NWC+CB0ch7nKAxnYAji8P3oMa0g/ihQPNsUabKKq8G3pS9yNNoGMc8Qvh/+e E0zM7Wlkjxc+WI6t+QhPA8Lx2GUBP8OrXvdZCLd4czTGxDikLlUU5+g6ek6qfLwtTrO7 NASeeXIBRMnKQm+XVAl/pcGYXARfkEKX6xpC9gRvCm212yEx0vA0TrDfFqDAdJeEWLW1 zJyQ== X-Forwarded-Encrypted: i=1; AFNElJ/AkBtIAanGxWa5gc7szKcIiJkY9wpKK1EcPs3zryEoOliiB9M7Vfdqk9P2kWu9uiqDSGXt+NE4VFys3BQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxDeWL9Kr+42C3e+NwMp/faY6BgAIlvfOUyx+jS220pzAtSrD4z Spj151zE8+Nu2Yxd+xWuQRDiYP6odmKXP0jUilld+qAcuNekOtsSQF4gPrKhtj95ugoTwrBfJhK r7Kt6YyWuK9dpCB0fXO+nzNFwse4KxG0Q8bUZ2T13tOJrSYEnmlN5zrPROu1KYHcLyFc= X-Gm-Gg: AeBDietSjfpASyeuBHjnH+X4RHYMx5d+2zvhkW3Vw4oP7ZPbtE8Sf31WVtnQK7gm32G ZQqV+F8nZtfqU5Iw4UsD4NBdtjGofDPUxzmmHFCqQZ3w/MQDza50cjfFotKVOjll2WR+8qPMZPq CCvWkFJg8Kg5iR4uhLNOTSsgYcl0E24A9U2k8rJKDi6/JXeAqKgaHN/3KwAeQYzOQBVR2GEXzMd iP5WFhJzv3SWbwEUmHSuXchR/JpOnQR+Zkmb76tSp11oWGaOS/WO3OsuztqppSFILGs88n4/0K1 Vn7CFwuJa63lKnZEWCSRNXJEpzdyFOGTe+cBcmIJhgwoys0BbofiSst1VfM30KE/Yw1PdD5bxa7 EdmRCvmxlDG9xH1rOn3ZJobW0PYUZSwNk52nEPXyxbq5XG4+7aGraEEdEYiUhV5GL2Q== X-Received: by 2002:a17:90b:2b45:b0:35b:e56e:a17e with SMTP id 98e67ed59e1d1-3650ce86ae0mr11909011a91.17.1777964512635; Tue, 05 May 2026 00:01:52 -0700 (PDT) X-Received: by 2002:a17:90b:2b45:b0:35b:e56e:a17e with SMTP id 98e67ed59e1d1-3650ce86ae0mr11908963a91.17.1777964511948; Tue, 05 May 2026 00:01:51 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:51 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:33 +0530 Subject: [PATCH v4 12/13] media: iris: Add platform data for glymur Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-12-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=11567; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=GxPcM3D6fcOBB3Z1Td+dY6rhZmNKqLALfdcwQqF+Y6E=; b=sYEFADXJ7Ibvb5q5Xm2hTg1/U1oQRmhbQ7H2gHMCgVPZpuLdY0qLkWNXAsq8uIS6emBHiKYPE iP2Sh4eSzkTCzocNNaGoBJuXYrDWmQv0ujcgyUdSboblzJmk9wy6LWa X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfXzu2fnj9VM71g S7O6C9XR+tNeJuoL+DV3oIYhMS75DrPmQQYjELUOW0PrKYcpgJLtF81eNOpvDPLQYnBbAkOt9G/ FV1I3aj7YHYhTvYmbrAf0VXTDYuMByXOIlabtVZTJpKxbflshICrMN4TBfm3Hhj0OCN//fgblVX Jy71gsVxnAl7gBk87i2QgHAoy9kytagLqXrGQq+X0wisrRKlJpRydYbFGqBatk232G2YcLzHfH2 2IIwjJvGjSX6SfNCF7YHanJSfWf7b7P2Y3qXTCxQxRFLs7vplMIGeNX5U2xSk/T9rwVWLXvtGSE 0RbD+QrLdtx12udBUevHPRJZhYJBOEbGjVPVici+Y5b7nVKVePdYrWyuUgE212a/B402CT8aks5 gIaPJDiucvEwm48nNUFizgLTTKaCjfMLn/LhHodWJv6Jr0G/a7Vlhb+V0nSJsInsqwvWDiKPn/3 yZWCC8CKBRLcaSEAPjg== X-Authority-Analysis: v=2.4 cv=SPBykuvH c=1 sm=1 tr=0 ts=69f995e1 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=syK4oCsQgbaUnHKzOKsA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: KK7oY_PjDB8N3C9Qp-K-t_W2-q0YhR7L X-Proofpoint-ORIG-GUID: KK7oY_PjDB8N3C9Qp-K-t_W2-q0YhR7L 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 bulkscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050063 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. Signed-off-by: Vishnu Reddy Reviewed-by: Vikash Garodia --- 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 6f4052b98491..677513c7c045 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 Sun Jun 14 00:15:00 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 C620A3D170B for ; Tue, 5 May 2026 07:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964522; cv=none; b=q7lqc4c7zH5sZP53zgghq1m2/TboFehnwnrPMYEw5vnnCUIme3cq66qkjnq7szbhGCfdhKtAAc4a5orIm+O5FzrkvH0AbMmZxf3fmniWl7LxDgOBQUiD32gaMVLYI+vqm0VximkKzIcFqK1ZmSLBBOAFpWActan9lqNNimXw8Vs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777964522; c=relaxed/simple; bh=RTc/vH0vt6hY/PLcGoh+fAhXOnRXNDvqwH0e2EW2IiA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XwQBYGxtZdFWggG3HyCvoJRwFnGeHW5R3o8wwscaeuQt6GFwDqYYZfkiHrERHUo+UfljPtulV9fKOIwOHcS7NvXvIeGZzgbpPVtpTe+p7np5ZWgkFbXCLIWSEw0Sqr1rTeE8/ZMGMT4t448q3HblR0R+GA/AgqNXzMWxHHtsNhQ= 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=aOUqkoS/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Ut2Az3A0; 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="aOUqkoS/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Ut2Az3A0" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 644NeZhV1346170 for ; Tue, 5 May 2026 07:02:00 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= zCm+mAfWcg0BGWf4HLB6gdhaUA9jwfO1VsKytcd9sLw=; b=aOUqkoS/py4oK1TI SbfE/nDLRbQEfYd+02eiTVJ4QI4xf5KAtXuNeDMvAMMGDHWYmSkIUgY224i2gwES Uk8E4LBjdiCxNxDAdku83IBgqB8fXQMeZl6Y8al70G7RmIrFPT4sZhA6UJnwN6nC iivw23ifmkQMSDTQD3rd0NVdUEgpNDvKdz5Xpc9azAOZFswSod64AS4Y9Vw9syRc oR15Q9Oc1ta/0Ds9ffxmRrdwNq4P+VHaLUn7LxAL9mRFSs8J4CA1PSbv5+hLMhYM DICQ1hF+a+oIXdMxTwzMTve3mdS5b1oUtXVEGE10DoaMpzS6FN+x/6qwJM7yQBTS nNJN0w== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dxx2xauru-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 05 May 2026 07:01:59 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-35e56ed5d5bso6629973a91.0 for ; Tue, 05 May 2026 00:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777964519; x=1778569319; 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=zCm+mAfWcg0BGWf4HLB6gdhaUA9jwfO1VsKytcd9sLw=; b=Ut2Az3A0fTF3/eKSV9WZ9nj4VLUO+yEZVFEAnmRPU7KKXLui808ne/DmscqIHO23YP T/yfT4vbVbO/4iKBHnYGJyelPdp0Sfar4R2GuNh3rNDbpqZrrOZyTgn5F8bb2wCtSMaR gg2xwJe2iPZ3cs1Xww0U7vU5c3tLLLOMI0swsU331yAIqziXqPGYZXLXJHodiJJe3yZW EmX/zsA0Hi2nyX8DUt5GpaRB8dTKa/jmVR0oSBgrIXaqbmadH6YEaHDF9MNHL8caXjjc qgtRp4lydKgK5eHdYdt5yPWPtQ7BMxkHY8m0/T0Mb74UGoBuQgaFC3CYZ7W8BW0ybyKx zZgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777964519; x=1778569319; 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=zCm+mAfWcg0BGWf4HLB6gdhaUA9jwfO1VsKytcd9sLw=; b=IqGokJonVBRt4WMxdZE/pxdFAjS4LHI/wxf3Vt6JlnJwHFJggSrk9GPZxLQnfq1kEa TAkiIj6e8hjRwHZOKW/YgjFyD1BX/bJcG5pyTnBzkImAfo7AprlGPGUHpWEpdHyxVQWv YrM+z0teVNtJM5CduF168F5yF85i+Sek8YifeYSOERqRqSbPLp1dadr1t9OHAe7F1Ui/ oVD5ltn6TFYhpy8yjxWyFN9tYjL/IhoXjoh00+kB4RIKA9g32mBAwNqe36lvqVvJcbI9 p4saxadYd7bd5sDLWc6EpLmGcE4v67eEX2DdaX+kTQIqmrCtMKmuCa/E5ToLBRMxTrPA AJgQ== X-Forwarded-Encrypted: i=1; AFNElJ8IAD/TJmAbBMJnLdcvXxUJq32EA5xzsZIdrfEYk5hu/vD656fJpu2mfRrlSmnPTYbAko2rYCmNTDDCUtk=@vger.kernel.org X-Gm-Message-State: AOJu0YxbqlGRGGrFIV3AgU70IJxEQSaBlOog/V9hQJh1a5UnJZdiMlYR J+WAkTXa2W1b7N1fn2rhq7Jhw1DFXGGuWWk0XMzKk0AsVA5W0HbvVbm2zfSV9L+uBNQSUsCP9Ls rf/OsMyG2trESAKDZQusDh24r8TtqkhLU7anHKi6y9xZfFphj0Z1FZZKjUtsQCK9CjoE= X-Gm-Gg: AeBDiesVsCD/9KJBxxkZvAxp1wyUiXmNdyDhPutHlocXUbci7ODQPDU6bhBUl9ZqpnG xHp//d1nW9hC+oD9G2TfxyvPJ82Mi/VtlPZSKXqgnClJHecxXR/5myLFVNt5efZESPxcBdvvXmC YI3WYtOWsg+Vp0mVDNRDCmfIAE0R+hCBpRNvipkcZyg1JuRso/WLtleNlGPr015EZYHL2+3pK1J B/+tC8PCMmXFAOcpF2R1S5DJfxQXYKFKeJBO7pLcLskYPtZQ6IICauIISNDMS81N8/g1EkoXwR2 vaCmQmFoLN+3R7FliGx6peux+mJS8kHW/xhX+N+EcPD2eFmADDTrXgyaRZWk5cc9fKT84voNTph u1vR/RKH2ZqDzvFMGKhU+GZPUN0KkMbTdfOzOb0nDgBmH8NOYV8j1fnPTZFwfF18X3A== X-Received: by 2002:a17:90b:4b0b:b0:35d:aa02:d776 with SMTP id 98e67ed59e1d1-365722540e7mr2033871a91.2.1777964519123; Tue, 05 May 2026 00:01:59 -0700 (PDT) X-Received: by 2002:a17:90b:4b0b:b0:35d:aa02:d776 with SMTP id 98e67ed59e1d1-365722540e7mr2033847a91.2.1777964518597; Tue, 05 May 2026 00:01:58 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-364ebec73aasm13840146a91.2.2026.05.05.00.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 00:01:58 -0700 (PDT) From: Vishnu Reddy Date: Tue, 05 May 2026 12:29:34 +0530 Subject: [PATCH v4 13/13] arm64: dts: qcom: glymur: Add iris video node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260505-glymur-v4-13-17571dbd1caa@oss.qualcomm.com> References: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> In-Reply-To: <20260505-glymur-v4-0-17571dbd1caa@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777964421; l=4957; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=RTc/vH0vt6hY/PLcGoh+fAhXOnRXNDvqwH0e2EW2IiA=; b=BkVRDogYbI1Vb4Nl6mFnz3VKv0fYSEXqpWs84WEDH4JCF6mdHPwbp5fcnLZuwI734JvWRCMWt xgPCBPTPldAAoyQNYTBTrO9L+ESdZqjeogcpooUC1f1SVOEr2kEPIxc X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Authority-Analysis: v=2.4 cv=U9eiy+ru c=1 sm=1 tr=0 ts=69f995e7 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=VYrRtalYO0MCCBblpesA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-ORIG-GUID: wxwLJrvPqLyD4BZTrRhb7omWIIfkucke X-Proofpoint-GUID: wxwLJrvPqLyD4BZTrRhb7omWIIfkucke X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA1MDA2MyBTYWx0ZWRfX8//MjsJEs26r j1/GXLn1KCHXuxuBV7H8Vou//Occ05LisEYPCB2je4wSZgb9xxS0rDQHvYlT9qNsLSL+Ss1aYns x0pJ49eDPBGmTgp1j+AOOO51WylRl7kSNLnDNqWT9E1/mlNwGgiw6qW4qqzEPCJUn8X8IeVpOmg JI4ekAeebfMBXYcyZ4qh/ToNslerBhGwFOVfy61ufYg5hALQ3uSWIuAp8H1b1joT9Yj3TW50Svm rGxH0HI9P1ep7vxpODMEPzpQShBSr+xN0bzhGJ9Seuq1OTtCBacO0L+4ymcrtc3BQXXkGvWFA6E Bi5H3+CouB6PRaMgolh9MgtBd7vzcKTZKzjzp1tMBXJlM31/kR6H3ikG/Qoj2/aKGzNphEsOsUA mFpPvGWeVrMwTOzuudzf8JYCS25YPLCohsPxqPdksNBpjaX6kFxERSzvegFGZxagc6vWEIea5+7 Li7yDosU1fHB4ZDwxGg== 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-05_02,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 adultscore=0 phishscore=0 spamscore=0 bulkscore=0 priorityscore=1501 impostorscore=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-2605050063 Add iris video codec to glymur SoC, which comes with significantly different powering up sequence than previous platforms, thus different clocks and resets. Signed-off-by: Vishnu Reddy Reviewed-by: Vikash Garodia --- arch/arm64/boot/dts/qcom/glymur-crd.dts | 4 ++ arch/arm64/boot/dts/qcom/glymur.dtsi | 118 ++++++++++++++++++++++++++++= ++++ 2 files changed, 122 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/glymur-crd.dts b/arch/arm64/boot/dts/= qcom/glymur-crd.dts index 35aaf09e4e2b..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"; }; 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