From a8c3e5c73839d353da0d21e8dd82b8beae552909 Mon Sep 17 00:00:00 2001 From: Anirudh Raghavendra Date: Mon, 26 Feb 2024 11:46:50 -0800 Subject: [PATCH 1/3] arm64: dts: msm: Propagate gerrits 5108976 and 5008443 to opensource branch Manually propagate gerrits to new opensource branch from older proprietary branch. Change-Id: I982aa22e173de607f1dc6be778b7887eb47dbcfe Signed-off-by: Anirudh Raghavendra --- bindings/msm-fastrpc.txt | 2 ++ sun/sun-dsp.dtsi | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/bindings/msm-fastrpc.txt b/bindings/msm-fastrpc.txt index d839212b..864db51f 100644 --- a/bindings/msm-fastrpc.txt +++ b/bindings/msm-fastrpc.txt @@ -17,6 +17,8 @@ Optional properties: - qcom,fastrpc-adsp-audio-pdr : Flag to enable ADSP Audio PDR - qcom,secure-domains : FastRPC secure domain configuration - qcom,fastrpc-adsp-sensors-pdr : Flag to enable Sensors PDR +- qcom,single-core-latency-vote : Limit FastRPC PM QoS to only vote for 1 + lowest capacity core Optional subnodes: - qcom,msm_fastrpc_compute_cb : Child nodes representing the compute context banks diff --git a/sun/sun-dsp.dtsi b/sun/sun-dsp.dtsi index 53bbbac2..c46da212 100644 --- a/sun/sun-dsp.dtsi +++ b/sun/sun-dsp.dtsi @@ -15,6 +15,7 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; pd-type = <1>; /* ROOT_PD */ }; @@ -27,6 +28,7 @@ qcom,iommu-faults = "stall-disable", "HUPCF"; qcom,nsessions = <8>; dma-coherent; + qcom,iova-best-fit; pd-type = <3>; /* SENSORS_STATICPD */ }; @@ -38,6 +40,7 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; pd-type = <2>; /* AUDIO_STATICPD */ }; @@ -49,6 +52,7 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; pd-type = <5>; /* OIS_STATICPD */ }; @@ -61,6 +65,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -72,6 +78,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; }; @@ -96,6 +104,7 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; pd-type = <1>; /* ROOT_PD */ }; @@ -109,6 +118,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -122,6 +133,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -135,6 +148,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -148,6 +163,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -161,6 +178,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -174,6 +193,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -187,6 +208,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -203,6 +226,7 @@ qcom,iommu-vmid = <0xA>; /* VMID_CP_PIXEL */ qcom,nsessions = <3>; dma-coherent; + qcom,iova-best-fit; pd-type = <6>; /* CPZ_USERPD */ }; @@ -216,6 +240,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -230,6 +256,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; @@ -242,6 +270,8 @@ qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; + qcom,iova-best-fit; + qcom,iova-max-align-shift = <9>; /* Set MAX alignment to 2 MB*/ pd-type = <7>; /* USERPD */ }; }; From d6c8f03029589f75c9f30425ef85dab91bb71056 Mon Sep 17 00:00:00 2001 From: Anirudh Raghavendra Date: Tue, 27 Feb 2024 15:15:44 -0800 Subject: [PATCH 2/3] arm64: dts: msm: Update iommu address field in DT Update DT to accomodate new devicetree property 'iommu-addresses' which describes the IOVA addresses that cannot be used. Update qcom,iommu-dma-addr-pool field to iommu-addresses to reflect this. Update PVM DT file to include all the addresses. Update TVM DT file accordingly. Signed-off-by: Anirudh Raghavendra Change-Id: I8fc25330c2db8d468c283c7c64136177031a8d9c --- sun/sun-dsp-trustedvm.dtsi | 6 +++++- sun/sun-dsp.dtsi | 18 ------------------ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/sun/sun-dsp-trustedvm.dtsi b/sun/sun-dsp-trustedvm.dtsi index 6f78bdf2..d0cc2ac7 100644 --- a/sun/sun-dsp-trustedvm.dtsi +++ b/sun/sun-dsp-trustedvm.dtsi @@ -2,11 +2,15 @@ #include &soc { + fastrpc_gen_pool_region : fastrpc_gen_pool_region { + iommu-addresses = <&fastrpc_compute_cb1 0x8000 0x11000>; + }; + fastrpc_compute_cb1: compute-cb@13 { compatible = "qcom,fastrpc-compute-cb"; reg = <11>; iommus = <&apps_smmu 0xC0B 0x0>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; + memory-region = <&fastrpc_gen_pool_region>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; qrtr-gen-pool = <&fastrpc_compute_cb1>; diff --git a/sun/sun-dsp.dtsi b/sun/sun-dsp.dtsi index 53bbbac2..3969f8da 100644 --- a/sun/sun-dsp.dtsi +++ b/sun/sun-dsp.dtsi @@ -12,7 +12,6 @@ reg = <3>; iommus = <&apps_smmu 0x1003 0x0080>, <&apps_smmu 0x1043 0x0020>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <1>; /* ROOT_PD */ @@ -23,7 +22,6 @@ reg = <4>; iommus = <&apps_smmu 0x1004 0x0080>, <&apps_smmu 0x1044 0x0020>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; qcom,nsessions = <8>; dma-coherent; @@ -35,7 +33,6 @@ reg = <5>; iommus = <&apps_smmu 0x1005 0x0080>, <&apps_smmu 0x1045 0x0020>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <2>; /* AUDIO_STATICPD */ @@ -46,7 +43,6 @@ reg = <6>; iommus = <&apps_smmu 0x1006 0x0080>, <&apps_smmu 0x1046 0x0020>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <5>; /* OIS_STATICPD */ @@ -58,7 +54,6 @@ iommus = <&apps_smmu 0x1007 0x0040>, <&apps_smmu 0x1067 0x0000>, <&apps_smmu 0x1087 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -69,7 +64,6 @@ reg = <8>; iommus = <&apps_smmu 0x1008 0x0080>, <&apps_smmu 0x1048 0x0020>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -93,7 +87,6 @@ iommus = <&apps_smmu 0x19C1 0x0000>, <&apps_smmu 0x0C21 0x0000>, <&apps_smmu 0x0C01 0x0040>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <1>; /* ROOT_PD */ @@ -106,7 +99,6 @@ <&apps_smmu 0x0C02 0x0020>, <&apps_smmu 0x0C42 0x0000>, <&apps_smmu 0x19C2 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -119,7 +111,6 @@ <&apps_smmu 0x0C23 0x0000>, <&apps_smmu 0x0C03 0x0040>, <&apps_smmu 0x19C3 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -132,7 +123,6 @@ <&apps_smmu 0x0C24 0x0000>, <&apps_smmu 0x0C04 0x0040>, <&apps_smmu 0x19C4 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -145,7 +135,6 @@ <&apps_smmu 0x0C25 0x0000>, <&apps_smmu 0x0C05 0x0040>, <&apps_smmu 0x19C5 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -158,7 +147,6 @@ <&apps_smmu 0x0C06 0x0020>, <&apps_smmu 0x0C46 0x0000>, <&apps_smmu 0x19C6 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -171,7 +159,6 @@ <&apps_smmu 0x0C27 0x0000>, <&apps_smmu 0x0C07 0x0040>, <&apps_smmu 0x19C7 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -184,7 +171,6 @@ <&apps_smmu 0x0C08 0x0020>, <&apps_smmu 0x0C48 0x0000>, <&apps_smmu 0x19C8 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -198,7 +184,6 @@ <&apps_smmu 0x0C29 0x0000>, <&apps_smmu 0x0C09 0x0040>, <&apps_smmu 0x19C9 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; qcom,iommu-vmid = <0xA>; /* VMID_CP_PIXEL */ qcom,nsessions = <3>; @@ -213,7 +198,6 @@ <&apps_smmu 0x0C2C 0x0000>, <&apps_smmu 0x0C0C 0x0040>, <&apps_smmu 0x19CC 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -227,7 +211,6 @@ <&apps_smmu 0x0C2E 0x0000>, <&apps_smmu 0x0C4D 0x0000>, <&apps_smmu 0x19CD 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ @@ -239,7 +222,6 @@ iommus = <&apps_smmu 0x196E 0x0000>, <&apps_smmu 0x0C0E 0x0040>, <&apps_smmu 0x19CE 0x0000>; - qcom,iommu-dma-addr-pool = <0x10000000 0xF0000000>; qcom,iommu-faults = "stall-disable", "HUPCF"; dma-coherent; pd-type = <7>; /* USERPD */ From 3969e073bd0a29cd81775caac3ed7ac24edbdd38 Mon Sep 17 00:00:00 2001 From: Edgar Flores Date: Mon, 4 Mar 2024 17:31:48 -0800 Subject: [PATCH 3/3] ARM: dts: Fix compilation of fastrpc device tree Add Pakala msm-id to fastrpc trusted drivers's dts file. Change-Id: I01069d942a4901a1bef35fbddbee357926fad3e1 --- sun/sun-dsp-trustedvm.dts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sun/sun-dsp-trustedvm.dts b/sun/sun-dsp-trustedvm.dts index 3304725f..68cb4c5f 100644 --- a/sun/sun-dsp-trustedvm.dts +++ b/sun/sun-dsp-trustedvm.dts @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + /dts-v1/; /plugin/; @@ -6,5 +11,5 @@ / { model = "Qualcomm Technologies, Inc. Sun - TrustedVM"; compatible = "qcom,sun"; - qcom,msm-id = <618 0x10000>; + qcom,msm-id = <618 0x10000>, <618 0x20000>, <639 0x10000>, <639 0x20000>; };