* [PATCH v1 0/2] CMA-memory-to-offload-FNN-PLUS-module-to-eNPU
@ 2026-08-25 13:33 Karthik S
2026-08-25 13:33 ` [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach Karthik S
2026-08-25 13:33 ` [PATCH v1 2/2] arm64: dts: qcom: kodiak-el2: add LPASS AML IOMMU SIDs for eNPU audio offload Karthik S
0 siblings, 2 replies; 6+ messages in thread
From: Karthik S @ 2026-08-25 13:33 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Karthik S
This series contains patches for allocating CMA memory to offload
FNN PLUS module to eNPU.
Karthik S (2):
arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for
AudioReach
arm64: dts: qcom: kodiak-el2: add LPASS AML IOMMU SIDs for eNPU audio
offload
arch/arm64/boot/dts/qcom/kodiak-el2.dtso | 5 ++++-
arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi | 1 +
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 8 ++++++++
3 files changed, 13 insertions(+), 1 deletion(-)
This patch depends on:
arm64: dts: qcom: kodiak: EL2 overlay for qcm6490-idp / qcs6490-rb3gen2
Link: https://lore.kernel.org/all/20260803121042.3313824-1-mukesh.ojha@oss.qualcomm.com/
The prerequisite patch introduces kodiak el2 overlay.
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach
2026-08-25 13:33 [PATCH v1 0/2] CMA-memory-to-offload-FNN-PLUS-module-to-eNPU Karthik S
@ 2026-08-25 13:33 ` Karthik S
2026-08-25 13:34 ` Krzysztof Kozlowski
2026-08-25 13:48 ` Konrad Dybcio
2026-08-25 13:33 ` [PATCH v1 2/2] arm64: dts: qcom: kodiak-el2: add LPASS AML IOMMU SIDs for eNPU audio offload Karthik S
1 sibling, 2 replies; 6+ messages in thread
From: Karthik S @ 2026-08-25 13:33 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Karthik S
Add a dynamic CMA pool for the AudioReach audio stack on qcs6490-rb3gen2.
Use alloc-ranges to let the kernel pick a free address rather than a fixed
reg, which avoided EFI-reserved memory at 0x9cc00000. Add 4 MiB alignment
to satisfy CMA_MIN_ALIGNMENT_BYTES. Wire memory-region into q6apmdai so
the q6apm-audio-mem-cma child driver can attach the pool.
Based on the equivalent implementation for lemans (SA8295P).
Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi | 1 +
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi b/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
index c1867711298b..06f65ae8afbc 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
@@ -97,6 +97,7 @@ q6apm: service@1 {
q6apmdai: dais {
compatible = "qcom,q6apm-dais";
iommus = <&apps_smmu 0x1801 0x0>;
+ memory-region = <&audio_cma_mem>;
};
q6apmbedai: bedais {
diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
index a13315bf0fb0..d39246f34172 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
@@ -174,6 +174,14 @@ rmtfs_mem: memory@f8500000 {
qcom,client-id = <1>;
qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>, <QCOM_SCM_VMID_NAV>;
};
+
+ audio_cma_mem: qcom,audio-ml {
+ compatible = "shared-dma-pool";
+ alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>;
+ reusable;
+ alignment = <0x0 0x400000>;
+ size = <0x0 0x1000000>;
+ };
};
gpio-keys {
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach
2026-08-25 13:33 ` [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach Karthik S
@ 2026-08-25 13:34 ` Krzysztof Kozlowski
2026-08-25 13:42 ` Krzysztof Kozlowski
2026-08-25 13:48 ` Konrad Dybcio
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-25 13:34 UTC (permalink / raw)
To: Karthik S, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 25/08/2026 15:33, Karthik S wrote:
> Add a dynamic CMA pool for the AudioReach audio stack on qcs6490-rb3gen2.
> Use alloc-ranges to let the kernel pick a free address rather than a fixed
> reg, which avoided EFI-reserved memory at 0x9cc00000. Add 4 MiB alignment
> to satisfy CMA_MIN_ALIGNMENT_BYTES. Wire memory-region into q6apmdai so
> the q6apm-audio-mem-cma child driver can attach the pool.
>
> Based on the equivalent implementation for lemans (SA8295P).
>
> Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi | 1 +
> arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 8 ++++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi b/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
> index c1867711298b..06f65ae8afbc 100644
> --- a/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi
> @@ -97,6 +97,7 @@ q6apm: service@1 {
> q6apmdai: dais {
> compatible = "qcom,q6apm-dais";
> iommus = <&apps_smmu 0x1801 0x0>;
> + memory-region = <&audio_cma_mem>;
> };
>
> q6apmbedai: bedais {
> diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> index a13315bf0fb0..d39246f34172 100644
> --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts
> @@ -174,6 +174,14 @@ rmtfs_mem: memory@f8500000 {
> qcom,client-id = <1>;
> qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>, <QCOM_SCM_VMID_NAV>;
> };
> +
> + audio_cma_mem: qcom,audio-ml {
Don't send downstream code. There are no such patterns in upstream for
years.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach
2026-08-25 13:34 ` Krzysztof Kozlowski
@ 2026-08-25 13:42 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-25 13:42 UTC (permalink / raw)
To: Karthik S, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 25/08/2026 15:34, Krzysztof Kozlowski wrote:
> On 25/08/2026 15:33, Karthik S wrote:
>> Add a dynamic CMA pool for the AudioReach audio stack on qcs6490-rb3gen2.
>> Use alloc-ranges to let the kernel pick a free address rather than a fixed
>> reg, which avoided EFI-reserved memory at 0x9cc00000. Add 4 MiB alignment
>> to satisfy CMA_MIN_ALIGNMENT_BYTES. Wire memory-region into q6apmdai so
>> the q6apm-audio-mem-cma child driver can attach the pool.
>>
>> Based on the equivalent implementation for lemans (SA8295P).
And the "equivalent implementation for lemans" received comments which
you missed and re-implemented the same issues.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach
2026-08-25 13:33 ` [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach Karthik S
2026-08-25 13:34 ` Krzysztof Kozlowski
@ 2026-08-25 13:48 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-08-25 13:48 UTC (permalink / raw)
To: Karthik S, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 8/25/26 3:33 PM, Karthik S wrote:
> Add a dynamic CMA pool for the AudioReach audio stack on qcs6490-rb3gen2.
> Use alloc-ranges to let the kernel pick a free address rather than a fixed
> reg, which avoided EFI-reserved memory at 0x9cc00000. Add 4 MiB alignment
> to satisfy CMA_MIN_ALIGNMENT_BYTES. Wire memory-region into q6apmdai so
> the q6apm-audio-mem-cma child driver can attach the pool.
>
> Based on the equivalent implementation for lemans (SA8295P).
>
> Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com>
> ---
Please don't send patches that you haven't compile-tested
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v1 2/2] arm64: dts: qcom: kodiak-el2: add LPASS AML IOMMU SIDs for eNPU audio offload
2026-08-25 13:33 [PATCH v1 0/2] CMA-memory-to-offload-FNN-PLUS-module-to-eNPU Karthik S
2026-08-25 13:33 ` [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach Karthik S
@ 2026-08-25 13:33 ` Karthik S
1 sibling, 0 replies; 6+ messages in thread
From: Karthik S @ 2026-08-25 13:33 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Karthik S
Add the three LPASS AML stream IDs to remoteproc_adsp in the
kodiak EL2 overlay so that the q6apm-audio-mem-cma child driver
can obtain an IOMMU domain via iommu_get_domain_for_dev(dev).
Without these SIDs the CMA device has no IOMMU domain (has_iommu=0)
and IOCTL_MAP_HYP_ASSIGN falls through to the SCM path, which fails
on RB3Gen2 because Gunyah owns the SMMU.
SID assignments:
0x1860 / mask 0x9 — ML Activation + Weights + Write streams
0x1862 / mask 0x1 — ML Config + Bias streams
0x1864 / mask 0x0 — ML Normalized Data stream
Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/kodiak-el2.dtso | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/kodiak-el2.dtso b/arch/arm64/boot/dts/qcom/kodiak-el2.dtso
index 8daf7f02fd75..d050857cab31 100644
--- a/arch/arm64/boot/dts/qcom/kodiak-el2.dtso
+++ b/arch/arm64/boot/dts/qcom/kodiak-el2.dtso
@@ -13,7 +13,10 @@ &gpu_zap_shader {
};
&remoteproc_adsp {
- iommus = <&apps_smmu 0x1800 0x0>;
+ iommus = <&apps_smmu 0x1800 0x0>,
+ <&apps_smmu 0x1860 0x9>,
+ <&apps_smmu 0x1862 0x1>,
+ <&apps_smmu 0x1864 0x0>;
};
&remoteproc_cdsp {
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-08-25 13:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 13:33 [PATCH v1 0/2] CMA-memory-to-offload-FNN-PLUS-module-to-eNPU Karthik S
2026-08-25 13:33 ` [PATCH v1 1/2] arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach Karthik S
2026-08-25 13:34 ` Krzysztof Kozlowski
2026-08-25 13:42 ` Krzysztof Kozlowski
2026-08-25 13:48 ` Konrad Dybcio
2026-08-25 13:33 ` [PATCH v1 2/2] arm64: dts: qcom: kodiak-el2: add LPASS AML IOMMU SIDs for eNPU audio offload Karthik S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox