* [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2
@ 2026-11-19 16:47 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI is hosted on the modem DSP. In the hypervisor
configuration its shared memory is assigned directly, but when Linux runs
at EL2 it owns the apps SMMU and the audio stream must be described and
mapped there. Using the normal translating domain causes context faults
because the firmware consumes SID-tagged physical addresses.
Select an identity domain for the Shikra q6apm DAI. Also allow
modem-domain q6apm DAIs carrying an IOMMU specifier to use the DMA/IOMMU
path, while retaining SCM assignment for modem-domain DAIs without an
IOMMU.
The series is ordered as follows:
1. Add the Shikra-specific q6apm DAI compatible to the binding.
2. Select an identity domain for that compatible.
3. Add the compatible to the Shikra q6apm DAI node.
4. Select SCM or IOMMU operation from the presence of an IOMMU stream.
The Shikra EL2 overlay is expected to provide the q6apm DAI SMMU stream
description. That overlay change is maintained separately from this
series.
Validated on a Shikra EVK booted under KVM/EL2. The q6apm DAI probes
through the IOMMU path without the previous SCM/IOMMU mutual-exclusion
failure, and playback and capture use the per-stream identity domain.
Mohit Sharma (4):
dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible
iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI
arm64: dts: qcom: shikra: add q6apm DAI compatible
ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path
.../devicetree/bindings/sound/qcom,q6apm-dai.yaml | 6 +++++-
arch/arm64/boot/dts/qcom/shikra.dtsi | 3 ++-
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 +
sound/soc/qcom/qdsp6/q6apm-dai.c | 9 ++-------
4 files changed, 10 insertions(+), 9 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
2026-11-19 16:47 ` [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI Mohit Sharma
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI needs a SoC-specific compatible so that the Qualcomm
SMMU implementation can select the identity domain required by its
firmware ABI. The ASoC driver continues to bind using the generic
fallback compatible.
Allow the Shikra compatible followed by the existing generic compatible.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
index c1f9fc9eab64..c5eea6698ab6 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
@@ -14,7 +14,11 @@ description: |
properties:
compatible:
- const: qcom,q6apm-dais
+ oneOf:
+ - const: qcom,q6apm-dais
+ - items:
+ - const: qcom,shikra-q6apm-dais
+ - const: qcom,q6apm-dais
iommus:
minItems: 1
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
2026-11-19 16:47 ` [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible Mohit Sharma
2026-11-19 16:47 ` [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path Mohit Sharma
3 siblings, 0 replies; 5+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Shikra's q6apm DAI is hosted on the modem DSP under SMMU stream ID
0x1cc. Its firmware consumes the SID-tagged shared-memory addresses as
physical addresses, so a translating domain leaves those addresses
unmapped and causes context faults when Linux owns the SMMU under EL2.
Add the Shikra q6apm DAI compatible to the Qualcomm SMMU client match
table. This selects an identity domain for this stream while retaining
an SMMU mapping scoped to its own stream ID.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index a0550740185f..b340ca5f5117 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -435,6 +435,7 @@ static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
{ .compatible = "qcom,sdm670-mdss" },
{ .compatible = "qcom,sdm845-mdss" },
{ .compatible = "qcom,sdm845-mss-pil" },
+ { .compatible = "qcom,shikra-q6apm-dais" },
{ .compatible = "qcom,sm6115-mdss" },
{ .compatible = "qcom,sm6350-mdss" },
{ .compatible = "qcom,sm6375-mdss" },
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
2026-11-19 16:47 ` [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
2026-11-19 16:47 ` [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path Mohit Sharma
3 siblings, 0 replies; 5+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
Add the Shikra-specific compatible to the q6apm DAI node while retaining
the generic fallback used by the ASoC driver. The specific compatible
lets arm-smmu-qcom select the identity domain required by the firmware
ABI when the EL2 overlay describes this stream to the SMMU.
The EL2 stream description is part of the prerequisite Shikra EL2
overlay series.
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
index f096469fb984..09b268af9eef 100644
--- a/arch/arm64/boot/dts/qcom/shikra.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
@@ -2983,7 +2983,8 @@ q6apmbedai: bedais {
};
q6apmdai: dais {
- compatible = "qcom,q6apm-dais";
+ compatible = "qcom,shikra-q6apm-dais",
+ "qcom,q6apm-dais";
memory-region = <&audio_heap_mem
&audio_mdsp_carveout_mem>;
};
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
` (2 preceding siblings ...)
2026-11-19 16:47 ` [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible Mohit Sharma
@ 2026-11-19 16:47 ` Mohit Sharma
3 siblings, 0 replies; 5+ messages in thread
From: Mohit Sharma @ 2026-11-19 16:47 UTC (permalink / raw)
To: Srinivas Kandagatla, Bjorn Andersson, Mark Brown
Cc: Ajay Kumar Nandam, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Will Deacon,
Robin Murphy, Joerg Roedel, Konrad Dybcio, Abel Vesa,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-arm-msm,
devicetree, iommu, linux-arm-kernel, linux-kernel, Mohit Sharma
The q6apm DAI currently selects SCM buffer assignment solely from the GPR
domain. This prevents an mDSP-backed DAI from using an IOMMU, even when
the device tree provides an iommus property for environments where the
mDSP stream is routed through the apps SMMU.
Use the parsed stream ID to distinguish the two memory access models. An
mDSP DAI without an IOMMU continues to use SCM-assigned buffers, while an
mDSP DAI with an IOMMU follows the existing DMA/IOMMU path. This also
avoids requiring SCM availability for the IOMMU configuration.
Fixes: bb8afd437d79 ("ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms")
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Signed-off-by: Mohit Sharma <mohit.sharma@oss.qualcomm.com>
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index c1f0af93e808..a29fe4241776 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -1218,16 +1218,11 @@ static int q6apm_dai_probe(struct platform_device *pdev)
pdata->sid = args.args[0] & SID_MASK_DEFAULT;
if (apm && apm->gdev &&
- apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM) {
+ apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM &&
+ pdata->sid < 0) {
if (!qcom_scm_is_available())
return -EPROBE_DEFER;
- if (pdata->sid >= 0) {
- dev_err(dev,
- "iommus and mDSP SCM path are mutually exclusive\n");
- return -EINVAL;
- }
-
pdata->use_scm_assign = true;
rc = devm_add_action_or_reset(dev, q6apm_dai_scm_cleanup,
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-19 16:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 16:47 [PATCH 0/4] Fix Shikra q6apm DAI under KVM/EL2 Mohit Sharma
2026-11-19 16:47 ` [PATCH 1/4] dt-bindings: sound: qcom,q6apm-dai: allow Shikra compatible Mohit Sharma
2026-11-19 16:47 ` [PATCH 2/4] iommu: arm-smmu-qcom: use identity domain for Shikra q6apm DAI Mohit Sharma
2026-11-19 16:47 ` [PATCH 3/4] arm64: dts: qcom: shikra: add q6apm DAI compatible Mohit Sharma
2026-11-19 16:47 ` [PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path Mohit Sharma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®