devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Adreno 643 + fixes
@ 2023-11-20 12:12 Konrad Dybcio
  2023-11-20 12:12 ` [PATCH v2 1/4] arm64: dts: qcom: sc7280: Add ZAP shader support Konrad Dybcio
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-11-20 12:12 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	David Airlie, Daniel Vetter, cros-qcom-dts-watchers, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Stephen Boyd, Akhil P Oommen
  Cc: Marijn Suijten, Luca Weiss, Rob Clark, linux-arm-msm, dri-devel,
	freedreno, linux-kernel, devicetree, Konrad Dybcio

as it says on the can

drm/msm patches for Rob
arm64 patches for linux-arm-msm

for use with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25408

tested on QCM6490 (SC7280-IOT) Fairphone FP5

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- Drop drm/msm patches (all applied)
- Make the commit message of "Fix up GPU SIDs" clearer (Abhinav)
- Drop unwanted firmware-name in "Add ZAP shader support" (self)
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20230926-topic-a643-v1-0-7af6937ac0a3@linaro.org

---
Konrad Dybcio (4):
      arm64: dts: qcom: sc7280: Add ZAP shader support
      arm64: dts: qcom: sc7280: Fix up GPU SIDs
      arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent
      arm64: dts: qcom: sc7280: Add 0xac Adreno speed bin

 arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi |  2 ++
 arch/arm64/boot/dts/qcom/sc7280.dtsi               | 25 ++++++++++++++++------
 2 files changed, 20 insertions(+), 7 deletions(-)
---
base-commit: 5a82d69d48c82e89aef44483d2a129f869f3506a
change-id: 20230926-topic-a643-a7ec9a08a3a1

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@linaro.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/4] arm64: dts: qcom: sc7280: Add ZAP shader support
  2023-11-20 12:12 [PATCH v2 0/4] Adreno 643 + fixes Konrad Dybcio
@ 2023-11-20 12:12 ` Konrad Dybcio
  2023-11-20 12:12 ` [PATCH v2 2/4] arm64: dts: qcom: sc7280: Fix up GPU SIDs Konrad Dybcio
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-11-20 12:12 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	David Airlie, Daniel Vetter, cros-qcom-dts-watchers, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Stephen Boyd, Akhil P Oommen
  Cc: Marijn Suijten, Luca Weiss, Rob Clark, linux-arm-msm, dri-devel,
	freedreno, linux-kernel, devicetree, Konrad Dybcio

Non-Chrome SC7280-family platforms ship a ZAP shader with the Adreno GPU.
Describe that and make sure it doesn't interfere with Chrome devices.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 2 ++
 arch/arm64/boot/dts/qcom/sc7280.dtsi               | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
index 5d462ae14ba1..88fc67c3646e 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi
@@ -17,6 +17,8 @@
  * required by the setup for Chrome boards.
  */
 
+/delete-node/ &gpu_zap_mem;
+/delete-node/ &gpu_zap_shader;
 /delete-node/ &hyp_mem;
 /delete-node/ &xbl_mem;
 /delete-node/ &reserved_xbl_uefi_log;
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 04bf85b0399a..58563f8fdc16 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -152,6 +152,11 @@ ipa_fw_mem: memory@8b700000 {
 			no-map;
 		};
 
+		gpu_zap_mem: zap@8b71a000 {
+			reg = <0 0x8b71a000 0 0x2000>;
+			no-map;
+		};
+
 		rmtfs_mem: memory@9c900000 {
 			compatible = "qcom,rmtfs-mem";
 			reg = <0x0 0x9c900000 0x0 0x280000>;
@@ -2613,6 +2618,10 @@ gpu: gpu@3d00000 {
 			nvmem-cells = <&gpu_speed_bin>;
 			nvmem-cell-names = "speed_bin";
 
+			gpu_zap_shader: zap-shader {
+				memory-region = <&gpu_zap_mem>;
+			};
+
 			gpu_opp_table: opp-table {
 				compatible = "operating-points-v2";
 

-- 
2.42.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/4] arm64: dts: qcom: sc7280: Fix up GPU SIDs
  2023-11-20 12:12 [PATCH v2 0/4] Adreno 643 + fixes Konrad Dybcio
  2023-11-20 12:12 ` [PATCH v2 1/4] arm64: dts: qcom: sc7280: Add ZAP shader support Konrad Dybcio
@ 2023-11-20 12:12 ` Konrad Dybcio
  2023-11-20 12:12 ` [PATCH v2 3/4] arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent Konrad Dybcio
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-11-20 12:12 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	David Airlie, Daniel Vetter, cros-qcom-dts-watchers, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Stephen Boyd, Akhil P Oommen
  Cc: Marijn Suijten, Luca Weiss, Rob Clark, linux-arm-msm, dri-devel,
	freedreno, linux-kernel, devicetree, Konrad Dybcio

GPU_SMMU SID 1 is meant for Adreno LPAC (Low Priority Async Compute).
On platforms that support it (in firmware), it is necessary to
describe that link, or Adreno register access will hang the board.

The current settings are functionally identical, *but* due to what is
likely hardcoded security policies, the secure firmware rejects them,
resulting in the board hanging. To avoid that, alter the settings such
that SID 0 and 1 are described separately.

Fixes: 96c471970b7b ("arm64: dts: qcom: sc7280: Add gpu support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 58563f8fdc16..db47af668232 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -2608,7 +2608,8 @@ gpu: gpu@3d00000 {
 				    "cx_mem",
 				    "cx_dbgc";
 			interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
-			iommus = <&adreno_smmu 0 0x401>;
+			iommus = <&adreno_smmu 0 0x400>,
+				 <&adreno_smmu 1 0x400>;
 			operating-points-v2 = <&gpu_opp_table>;
 			qcom,gmu = <&gmu>;
 			interconnects = <&gem_noc MASTER_GFX3D 0 &mc_virt SLAVE_EBI1 0>;

-- 
2.42.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/4] arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent
  2023-11-20 12:12 [PATCH v2 0/4] Adreno 643 + fixes Konrad Dybcio
  2023-11-20 12:12 ` [PATCH v2 1/4] arm64: dts: qcom: sc7280: Add ZAP shader support Konrad Dybcio
  2023-11-20 12:12 ` [PATCH v2 2/4] arm64: dts: qcom: sc7280: Fix up GPU SIDs Konrad Dybcio
@ 2023-11-20 12:12 ` Konrad Dybcio
  2023-11-20 12:12 ` [PATCH v2 4/4] arm64: dts: qcom: sc7280: Add 0xac Adreno speed bin Konrad Dybcio
  2023-12-08  2:57 ` [PATCH v2 0/4] Adreno 643 + fixes Bjorn Andersson
  4 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-11-20 12:12 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	David Airlie, Daniel Vetter, cros-qcom-dts-watchers, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Stephen Boyd, Akhil P Oommen
  Cc: Marijn Suijten, Luca Weiss, Rob Clark, linux-arm-msm, dri-devel,
	freedreno, linux-kernel, devicetree, Konrad Dybcio

The SMMUs on sc7280 are cache-coherent. APPS_SMMU is marked as such,
mark the GPU one as well.

Fixes: 96c471970b7b ("arm64: dts: qcom: sc7280: Add gpu support")
Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index db47af668232..6964c14ffce5 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -2787,6 +2787,7 @@ adreno_smmu: iommu@3da0000 {
 					"gpu_cc_hub_aon_clk";
 
 			power-domains = <&gpucc GPU_CC_CX_GDSC>;
+			dma-coherent;
 		};
 
 		remoteproc_mpss: remoteproc@4080000 {

-- 
2.42.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 4/4] arm64: dts: qcom: sc7280: Add 0xac Adreno speed bin
  2023-11-20 12:12 [PATCH v2 0/4] Adreno 643 + fixes Konrad Dybcio
                   ` (2 preceding siblings ...)
  2023-11-20 12:12 ` [PATCH v2 3/4] arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent Konrad Dybcio
@ 2023-11-20 12:12 ` Konrad Dybcio
  2023-12-08  2:57 ` [PATCH v2 0/4] Adreno 643 + fixes Bjorn Andersson
  4 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2023-11-20 12:12 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	David Airlie, Daniel Vetter, cros-qcom-dts-watchers, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Stephen Boyd, Akhil P Oommen
  Cc: Marijn Suijten, Luca Weiss, Rob Clark, linux-arm-msm, dri-devel,
	freedreno, linux-kernel, devicetree, Konrad Dybcio

A643 (A635 speedbin 0xac) tops out at 812 MHz. Fill in the
opp-supported-hw appropriately.

Note that fuseval 0xac is referred to as speedbin 1 downstream, but
that was already in use upstream, so 2 was chosen instead.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 6964c14ffce5..b4e6951d9359 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -2630,14 +2630,14 @@ opp-315000000 {
 					opp-hz = /bits/ 64 <315000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
 					opp-peak-kBps = <1804000>;
-					opp-supported-hw = <0x03>;
+					opp-supported-hw = <0x07>;
 				};
 
 				opp-450000000 {
 					opp-hz = /bits/ 64 <450000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
 					opp-peak-kBps = <4068000>;
-					opp-supported-hw = <0x03>;
+					opp-supported-hw = <0x07>;
 				};
 
 				/* Only applicable for SKUs which has 550Mhz as Fmax */
@@ -2652,28 +2652,28 @@ opp-550000000-1 {
 					opp-hz = /bits/ 64 <550000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
 					opp-peak-kBps = <6832000>;
-					opp-supported-hw = <0x02>;
+					opp-supported-hw = <0x06>;
 				};
 
 				opp-608000000 {
 					opp-hz = /bits/ 64 <608000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>;
 					opp-peak-kBps = <8368000>;
-					opp-supported-hw = <0x02>;
+					opp-supported-hw = <0x06>;
 				};
 
 				opp-700000000 {
 					opp-hz = /bits/ 64 <700000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
 					opp-peak-kBps = <8532000>;
-					opp-supported-hw = <0x02>;
+					opp-supported-hw = <0x06>;
 				};
 
 				opp-812000000 {
 					opp-hz = /bits/ 64 <812000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
 					opp-peak-kBps = <8532000>;
-					opp-supported-hw = <0x02>;
+					opp-supported-hw = <0x06>;
 				};
 
 				opp-840000000 {

-- 
2.42.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/4] Adreno 643 + fixes
  2023-11-20 12:12 [PATCH v2 0/4] Adreno 643 + fixes Konrad Dybcio
                   ` (3 preceding siblings ...)
  2023-11-20 12:12 ` [PATCH v2 4/4] arm64: dts: qcom: sc7280: Add 0xac Adreno speed bin Konrad Dybcio
@ 2023-12-08  2:57 ` Bjorn Andersson
  4 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2023-12-08  2:57 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	David Airlie, Daniel Vetter, cros-qcom-dts-watchers, Andy Gross,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Stephen Boyd,
	Akhil P Oommen, Konrad Dybcio
  Cc: Marijn Suijten, Luca Weiss, Rob Clark, linux-arm-msm, dri-devel,
	freedreno, linux-kernel, devicetree


On Mon, 20 Nov 2023 13:12:51 +0100, Konrad Dybcio wrote:
> as it says on the can
> 
> drm/msm patches for Rob
> arm64 patches for linux-arm-msm
> 
> for use with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25408
> 
> [...]

Applied, thanks!

[1/4] arm64: dts: qcom: sc7280: Add ZAP shader support
      commit: 0ab1bef0b7c359e672cc2b8d51f0179cefa369fc
[2/4] arm64: dts: qcom: sc7280: Fix up GPU SIDs
      commit: 94085049fdad7a36fe14dd55e72e712fe55d6bca
[3/4] arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent
      commit: 31edad478534186a2718be9206ce7b19f2735f6e
[4/4] arm64: dts: qcom: sc7280: Add 0xac Adreno speed bin
      commit: 6a7f8c635dab30233df93b5566d4169ed956b71b

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-08  2:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 12:12 [PATCH v2 0/4] Adreno 643 + fixes Konrad Dybcio
2023-11-20 12:12 ` [PATCH v2 1/4] arm64: dts: qcom: sc7280: Add ZAP shader support Konrad Dybcio
2023-11-20 12:12 ` [PATCH v2 2/4] arm64: dts: qcom: sc7280: Fix up GPU SIDs Konrad Dybcio
2023-11-20 12:12 ` [PATCH v2 3/4] arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent Konrad Dybcio
2023-11-20 12:12 ` [PATCH v2 4/4] arm64: dts: qcom: sc7280: Add 0xac Adreno speed bin Konrad Dybcio
2023-12-08  2:57 ` [PATCH v2 0/4] Adreno 643 + fixes Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).