Message ID | 20240125-msm8953-gpu-v1-0-f6493a5951f3@z3ntu.xyz |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-39341-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp160143dyb; Fri, 26 Jan 2024 13:30:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHseRbOWczx3RFRfyFYcLbAoOC8AKzBfUkly4aVd8Hwa9JjSuYbUOnAKqC0JpY3keJ+UHT3 X-Received: by 2002:a9d:6d09:0:b0:6e1:e23:a55c with SMTP id o9-20020a9d6d09000000b006e10e23a55cmr316410otp.56.1706304625777; Fri, 26 Jan 2024 13:30:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706304625; cv=pass; d=google.com; s=arc-20160816; b=CVVkh1xYndCpK8o++SN1fQjcMo2XCsB4ISjI2H4Cnw7lkt7wrcLCawMLrE25JHQYvK LgNfaeBSy41K4wNiCFa+iRiSPFsmFUxWqeNPVbS27avhTBHyC7k/Wc+esJ4HQE9NmwUk vrsNP9G01tG8kCXqE7ieGc2tfeWD2FmnIW+JICOq+ze3CD7kN+uQM2pWhROF9hjSQWge 8cv6cZz0SzpYzfzibOJf8JCUd93q/brajPvo2Vk9HCVPBjEhGJapE/an+hkTi88q/vj/ nGkChWMUU9+uIAvLh1r81tbZoiVOVmys2WRzYoyNCln2Zi/j2McM4tIKdfY24EaLRWq3 ECkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=tDpcqj0BIN2qdugSpTga9A2XK9LtkkfYmUF54arO8Yw=; fh=ytyuSPC52TUElrA/mZen9kyWaXz91Oh2mpXiN50EEhI=; b=gXJQgvnfYkNe8QJtmMgyvJX33q7WQj/2mWqc4YCnJnfZy6CXLIfqgeg6XjHgFGdQa/ gOmGnyqS/bgTq13t8n1WxsHuKipVxVhb50tyiWqpRjOKKMNRgZLJPU7g7KTPmpZt6mqW flFUX+FSPa8jzwnHMWYA269bJQLBGF+0HiQY9gkJy1w3WYTS5szZlvWMSwkBr6GGLycy Eg0q4JKV+x3JFTBlvtVeTNG1JKKjlLEqDrVw/Z3ShlGYMf1stIwFgBl9UeCarMrlh6nz vXyaI10ozZ+qSxR7PZJPD09BSHRCIxPIRPUn0eIQ70bjchO4WIa1dG/SymgtKVQ7iX0M NpdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=s1 header.b=gLTXPjoG; arc=pass (i=1 spf=pass spfdomain=z3ntu.xyz dkim=pass dkdomain=z3ntu.xyz dmarc=pass fromdomain=z3ntu.xyz); spf=pass (google.com: domain of linux-kernel+bounces-39341-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39341-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e19-20020a05622a111300b0042a642109basi2062171qty.498.2024.01.26.13.30.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 13:30:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39341-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=s1 header.b=gLTXPjoG; arc=pass (i=1 spf=pass spfdomain=z3ntu.xyz dkim=pass dkdomain=z3ntu.xyz dmarc=pass fromdomain=z3ntu.xyz); spf=pass (google.com: domain of linux-kernel+bounces-39341-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39341-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BDFBE1C25AD2 for <ouuuleilei@gmail.com>; Thu, 25 Jan 2024 21:57:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CC6A13BE9B; Thu, 25 Jan 2024 21:56:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=z3ntu.xyz header.i=@z3ntu.xyz header.b="gLTXPjoG" Received: from ahti.lucaweiss.eu (ahti.lucaweiss.eu [128.199.32.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25AF4131E4F; Thu, 25 Jan 2024 21:56:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=128.199.32.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706219793; cv=none; b=IJKtUxhSAQNYBnpM3mQJhvMo9YjcKge17AIZkl4pLz93nisxxIO/GRl4TH+AgOIlDYf7TsmIdbnH/9JbbK5IlPLP6S0Gkr9VFO4Rhe0xArpP8zDrxOfVvx1ZtntCAU720Ghj5KwCu1xNMZyYuG4/L+JJq7zmiJw2aKEmdXY/rAI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706219793; c=relaxed/simple; bh=b7Y6SDBxaY7d2ufdRgw40VrIGg/JPSikCPGoPt4otcU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=cZknTNSD1uopJqvhqSWanTBX52zvcXqXCT7iN9RJwXoHlIuCP59+fhRxavaKnjAAZdKYZ2/74P5Dy5YmKt5OnAkdQBtzxBukMpDFTcFt4lmPRxqVXY9321n/O8uu0Hk6t4akxfM4PuwurvJJ4gW2Ly7VVdtCw1Wcl6jKBp8kjlo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=z3ntu.xyz; spf=pass smtp.mailfrom=z3ntu.xyz; dkim=pass (1024-bit key) header.d=z3ntu.xyz header.i=@z3ntu.xyz header.b=gLTXPjoG; arc=none smtp.client-ip=128.199.32.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=z3ntu.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=z3ntu.xyz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=s1; t=1706219789; bh=b7Y6SDBxaY7d2ufdRgw40VrIGg/JPSikCPGoPt4otcU=; h=From:Subject:Date:To:Cc; b=gLTXPjoG2oB1f5FyD097277HHw1LhrAzecH/DRwqdnznSFUYLB/jWXlCs+9tyFxP6 c8KLTyK0Em76VnvEOCHMF9VPQ505ynf9hHHUIu3X5zp4tyZtVN44o5mpTWZRUIGRcc SXeJY70LFYKXJRMOnsqo/KrAd87ySr6+82+zxVns= From: Luca Weiss <luca@z3ntu.xyz> Subject: [PATCH RFC 0/2] Add GPU support to MSM8953 SoC Date: Thu, 25 Jan 2024 22:56:24 +0100 Message-Id: <20240125-msm8953-gpu-v1-0-f6493a5951f3@z3ntu.xyz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAjZsmUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2NDI0Mj3dziXAtLU2Pd9IJSXZNkAwtTYzPTNFNLEyWgjoKi1LTMCrBp0Up Bbs5KsbW1AFPUyvJiAAAA To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Vladimir Lypak <vladimir.lypak@gmail.com> Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss <luca@z3ntu.xyz> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2377; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=b7Y6SDBxaY7d2ufdRgw40VrIGg/JPSikCPGoPt4otcU=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBlstkJfc3l2laEi7sRN3lqVds6XpkA0MzjRBHOf nwFNvAq0lmJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZbLZCQAKCRBy2EO4nU3X VhAsEADDLcuQHxd9v+Kxexh0y3s9hvictSjNkBDZ5R/NiVYX6qa9VHKiAGjVfPKAyvipzhz1N5e pbko36jzoRLC4VFPzxVZLxidssu8v40pxBK37fqPph5SVAyNQKKelKoTl8ZKYk+P3drW1TJzc/y BjOg3TGhC5JIXrOUTHuwSrxb7NODZ+l+lUxc0+JC//VwbU8hCXCQAFrDRidFROPUlCwhZ+MKzEs cjJcnc/483dv3e8wgTHL8zgwZXKs62tmvKH68ptkw5iIZC2rwsDTjh+OU7+EjArzJwPZ84O5l54 A5ZOLTCy6qXqKT6TdGe1f1LzTw+7DEoFcZa7aOJpWBM5LbduUvyWQIwN1AXWbwEPigNaLcj/QsX IQS/6RS/tkoCzoGwzQl5w5aA1EyHq+pETY/46nx71sY0tagjDG5dbyeIkzJcItPwDTTFCExptmC 9w/q2Y1vRBUcphG8OpdRtZ94g/h2R6n+W2l+MRxmCYat0diWxN/ty4o6ttA4sctEBVf7euz1key Kvq+8pS6sUWIXqQTqpnDdCFfpWPaiavbbECTbXKTVk4xkZan9E9bcON4hVaS0x7tW2rBy39Rvj9 fX0mXT1NHsZLE/hqP/TTt14vU86R6QPgTsbuzX2HlNc06dcPXDQdA4afgqP+61MXILJs/nHH9Qk B8q1CsiS9LtX9iA== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789190079473199051 X-GMAIL-MSGID: 1789190079473199051 |
Series |
Add GPU support to MSM8953 SoC
|
|
Message
Luca Weiss
Jan. 25, 2024, 9:56 p.m. UTC
Add the GPU IOMMU and GPU nodes to the msm8953 dtsi so GPU can work.
First of all, functionally this series looks fine, tested on
sdm632-fairphone-fp3.
Secondly and the reason this is marked RFC for now is basically just dt
bindings check fail, and some questions regarding IOMMU compatible.
Basically I'm unsure what compatible (or even driver) IOMMU should use.
qcom,msm-iommu-v2 is now in the patchset which seems to be okay, and
also should handle the gfx3d_secure secure context correctly. Apart from
some special handling there qcom,msm-iommu-v1 compatible is equivalent
on the driver side.
Currently the dt bindings say qcom,msm8953-iommu should be followed by
qcom,msm-iommu-v1 which is the case for apps_iommu. But if we use
qcom,msm-iommu-v2 for gpu_iommu then we can't re-use the same
qcom,msm8953-iommu I think.
Possible solutions:
1. Switch apps_iommu to use qcom,msm-iommu-v2 in dts & bindings? Since
there's basically no special handling for either in the driver I
don't forsee any problems. Then we can also use -v2 for gpu_iommu no
problem.
2. Use qcom,msm-iommu-v1 for gpu_iommu? From some testing it also seems
to work, I guess because the secure context is never used?
3. Use arm_smmu driver for gpu_iommu? Vladimir Lypak has suggested that,
but that would at least need some more patching to work on msm8953.
I probably don't have the motivation to take this on myself. Also
what benefit would it bring?
Hope I haven't rambled too long here and it's somewhat understandable.
Please let me know what you think, which direction we can take to
resolve this.
(Also GPU clock-names dt-schema check fails but that seems to be the
case on more a5xx GPUs also)
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Vladimir Lypak (2):
arm64: dts: qcom: msm8953: Add GPU IOMMU
arm64: dts: qcom: msm8953: Add GPU
arch/arm64/boot/dts/qcom/msm8953.dtsi | 146 +++++++++++++++++++++++
arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts | 2 +-
arch/arm64/boot/dts/qcom/sdm450.dtsi | 14 +++
arch/arm64/boot/dts/qcom/sdm632.dtsi | 8 ++
4 files changed, 169 insertions(+), 1 deletion(-)
---
base-commit: 0e21aa976976d5fba8cd1f8f64bcce49beb5f895
change-id: 20231212-msm8953-gpu-4c085365f594
Best regards,
Comments
On Freitag, 26. Jänner 2024 00:49:55 CET Konrad Dybcio wrote: > On 1/25/24 23:24, Dmitry Baryshkov wrote: > > On 25/01/2024 23:56, Luca Weiss wrote: > >> From: Vladimir Lypak <vladimir.lypak@gmail.com> > >> > >> Add the IOMMU used for the GPU on MSM8953. > >> > >> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com> > >> --- > >> arch/arm64/boot/dts/qcom/msm8953.dtsi | 31 > >> +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) > >> > >> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi > >> b/arch/arm64/boot/dts/qcom/msm8953.dtsi index dcb5c98b793c..91d083871ab0 > >> 100644 > >> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi > >> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi > >> @@ -1046,6 +1046,37 @@ mdss_dsi1_phy: phy@1a96400 { > >> }; > >> }; > >> + gpu_iommu: iommu@1c48000 { > > > > Nit: most of the platforms use the adreno_smmu label. But maybe the > > msm-iommu vs arm-smmu makes difference here. > Not really :) > > Please keep the labels unified Ack, renaming to adreno_smmu > > > Nevertheless: > > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > > >> + compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2"; > >> + ranges = <0 0x01c48000 0x8000>; > >> + > >> + clocks = <&gcc GCC_OXILI_AHB_CLK>, > >> + <&gcc GCC_BIMC_GFX_CLK>; > > And align these They are? Also any comment about the issues listed in the cover letter? Regards Luca > > Konrad
On 27.01.2024 18:24, Luca Weiss wrote: > On Freitag, 26. Jänner 2024 00:49:55 CET Konrad Dybcio wrote: >> On 1/25/24 23:24, Dmitry Baryshkov wrote: >>> On 25/01/2024 23:56, Luca Weiss wrote: >>>> From: Vladimir Lypak <vladimir.lypak@gmail.com> >>>> >>>> Add the IOMMU used for the GPU on MSM8953. >>>> >>>> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com> >>>> --- >>>> arch/arm64/boot/dts/qcom/msm8953.dtsi | 31 >>>> +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) >>>> >>>> diff --git a/arch/arm64/boot/dts/qcom/msm8953.dtsi >>>> b/arch/arm64/boot/dts/qcom/msm8953.dtsi index dcb5c98b793c..91d083871ab0 >>>> 100644 >>>> --- a/arch/arm64/boot/dts/qcom/msm8953.dtsi >>>> +++ b/arch/arm64/boot/dts/qcom/msm8953.dtsi >>>> @@ -1046,6 +1046,37 @@ mdss_dsi1_phy: phy@1a96400 { >>>> }; >>>> }; >>>> + gpu_iommu: iommu@1c48000 { >>> >>> Nit: most of the platforms use the adreno_smmu label. But maybe the >>> msm-iommu vs arm-smmu makes difference here. >> Not really :) >> >> Please keep the labels unified > > Ack, renaming to adreno_smmu > >> >>> Nevertheless: >>> >>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> >>> >>>> + compatible = "qcom,msm8953-iommu", "qcom,msm-iommu-v2"; >>>> + ranges = <0 0x01c48000 0x8000>; >>>> + >>>> + clocks = <&gcc GCC_OXILI_AHB_CLK>, >>>> + <&gcc GCC_BIMC_GFX_CLK>; >> >> And align these > > They are? Not in my email client :P, anyway.. > > Also any comment about the issues listed in the cover letter? I think v2 on all smmus on this platform is right Konrad
On Thu, 25 Jan 2024 22:56:24 +0100, Luca Weiss wrote: > Add the GPU IOMMU and GPU nodes to the msm8953 dtsi so GPU can work. > > First of all, functionally this series looks fine, tested on > sdm632-fairphone-fp3. > > Secondly and the reason this is marked RFC for now is basically just dt > bindings check fail, and some questions regarding IOMMU compatible. > > [...] Applied, thanks! [1/2] arm64: dts: qcom: msm8953: Add GPU IOMMU commit: 1e48ad0d85f05fb4f383cba006525aa3f253472b [2/2] arm64: dts: qcom: msm8953: Add GPU commit: 655815649fcd9bf80b21bcac071633ce80c358c0 Best regards,