ASoC: qcom: add q6apm VMID support and qdsp6 GPR destination-domain routing#734
Conversation
4c7c090 to
bb43cbd
Compare
PR #734 — validate-patchPR: #734
Final Summary
|
PR #734 — checker-log-analyzerPR: #734
Detailed report: Full report
|
bb43cbd to
7f072c9
Compare
PR #734 — validate-patchPR: #734
Final Summary
|
PR #734 — checker-log-analyzerPR: #734
Detailed report: Full report
|
🔨 Build Failure Analysis — PR #734PR: #734
VerdictThis is NOT a compilation failure. All 4 errors are merge conflicts that occurred during PR integration. The build never started because the merge failed. These conflicts are pre-existing (not introduced by the PR code itself) and result from concurrent changes to Shikra device tree files in the base branch. 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #734PR: #734
VerdictThis is not a compilation failure. The build failed during the merge stage before any compilation could occur. All 4 conflicts are merge conflicts between the PR changes and the current 📎 Detailed analysis: Full report |
7f072c9 to
d42220e
Compare
|
Build Failed : |
d42220e to
084d6c6
Compare
This change Depends on other changes (Depends on: #725, #723, #726), just need to do Rebase. will rebase once Dependency changes got merged |
084d6c6 to
a267eef
Compare
🔨 Build Failure Analysis — PR #734PR: #734 Build Status: Merge Conflict (Not a Compilation Failure)The build failed during the git merge phase before any compilation could occur. The PR could not be automatically merged into the base branch
VerdictNo compilation errors found. The build failed due to 3 git merge conflicts that must be resolved before the kernel can be compiled. The PR changes themselves did not introduce any compilation errors—the merge conflicts prevented the build from starting. 📎 Detailed analysis: Full report |
🔨 Build Failure Analysis — PR #734PR: #734
VerdictThis is NOT a compilation failure. All 3 errors are Git merge conflicts caused by the base branch diverging from the PR branch. The PR needs to be rebased on the latest 📎 Detailed analysis: Full report |
PR #734 — validate-patchPR: #734
Final Summary
|
PR #734 — checker-log-analyzerPR: #734
Detailed report: Full report
|
a267eef to
bac1145
Compare
Buffers are allocated on pcm_new and mapped in the dsp on every prepare call, which is inefficient and unnecessary. Add new functions q6apm_[un]map_memory_fixed_region to map it on to dsp only once after allocation. The push-pull / pos-buffer parts of the upstream commit are not included as that infrastructure does not exist in this 6.18 branch. Link: https://patch.msgid.link/20260402081118.348071-14-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Add optional VMID-based SCM memory assignment for q6apm fixed PCM DMA uffers when qcom,vmid is provided in DT. On platforms where audio processing runs outside HLOS, LPASS PCM DMA buffers must be shared with secure/non-HLOS VMIDs so both endpoints can access the same payload memory. Keep HLOS as an RW owner and grant configured destination VMIDs RW access so both playback and capture data paths remain functional. Assign and unassign SCM permissions at fixed-buffer lifetime boundaries: assign in pcm_new() after fixed buffer allocation/map, and restore HLOS ownership in pcm_free() before unmap. Link: https://lore.kernel.org/all/20260609064038.492641-3-ajay.nandam@oss.qualcomm.com/ Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Use each GPR domain advertised by the qcom APR/GPR layer when building APM/PRM packets and add explicit dest_domain parameters to all AudioReach alloc helpers. Legacy helpers fall back to ADSP while graphs, media-format, and shared-memory packets reuse gdev->domain_id for modem targets. Also fix q6prm_set_hw_core_req() which was left with the old 5-argument audioreach_alloc_cmd_pkt() call and a stray duplicate call appended outside any function after MODULE_LICENSE. Replace with the correct 6-argument form passing audioreach_gpr_dest_domain(gdev) and remove the stray lines. Link: https://lore.kernel.org/all/20260609064038.492641-4-ajay.nandam@oss.qualcomm.com/ Co-developed-by: Pratyush Meduri <mpratyus@qti.qualcomm.com> Signed-off-by: Pratyush Meduri <mpratyus@qti.qualcomm.com> Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
bac1145 to
8861cc8
Compare
Test Matrix
|
PR #734 — checker-log-analyzerPR: #734
Detailed report: Full report
|
Test Matrix
|
8861cc8 to
7cb3868
Compare
Test Matrix
|
Document the new memory-region property that allows one or more reserved-memory carveout regions to be SCM-assigned to the VMIDs listed in qcom,vmid. - Add memory-region as an optional phandle-array (1-8 entries). Each entry must point to a shared-dma-pool, no-map reserved-memory node. Index 0 is the control-path buffer; subsequent entries are data-path buffers. - Enforce via dependentRequired that memory-region is only valid when qcom,vmid is also present. - Expand qcom,vmid description to mention carveout regions and the qcom_scm_is_available() probe-defer requirement. - Add a second example showing both properties in use with two carveout regions and two destination VMIDs. Link: https://lore.kernel.org/all/20260618113509.2025881-2-ajay.nandam@oss.qualcomm.com/ Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
…te APM DAIs memory regions Add a dedicated MDSP carveout memory region for audio usecases on Shikra and mark both existing audio heap and MDSP carveout regions as shared DMA pools. Update the Q6 APM DAI node to reference multiple memory regions, where index 0 is used for control path buffers and index 1 is used for MDSP data path buffers. This separation ensures proper memory allocation and access for APM communication between APSS and MDSP. Also add shared-dma-pool compatibility to the existing audio heap region to align with upstream DMA pool usage. Link: https://lore.kernel.org/all/20260618113509.2025881-3-ajay.nandam@oss.qualcomm.com/ Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
… buffers On targets like Shikra where audio processing runs on the mDSP (modem DSP) instead of the ADSP, the DSP operates with stage-2 secured memory. Unlike ADSP platforms where SMMU-mapped system RAM is directly accessible, mDSP cannot access buffers unless they are explicitly SCM-assigned to the appropriate VMIDs. This requires allocating PCM DMA buffers from reserved carveout regions and performing SCM assignment to grant both HLOS and the mDSP shared RW access. Add support for reserved-memory carveout regions listed in the memory-region DT property of the q6apm-dais node. When qcom,vmid is configured, all carveout regions are SCM-assigned to HLOS + the configured destination VMIDs (RW) at pcm_new() time and ownership is restored to HLOS-only at pcm_free(). For the data-path region (memory-region index 1), the device DMA pool is attached via of_reserved_mem_device_init_by_idx() so that snd_pcm_set_managed_buffer_all() allocates PCM buffers directly from the carveout. The pool size is read from the DT node and capped at BUFFER_BYTES_MAX. All paths are gated on use_scm_assign and has_reserved_mem so existing platforms without memory-region or qcom,vmid in DT are completely unaffected. Link: https://lore.kernel.org/all/20260618112810.2009847-1-ajay.nandam@oss.qualcomm.com/ Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
7cb3868 to
9fc912a
Compare
PR #734 — checker-log-analyzerPR: #734
Detailed report: Full report
|
Test Matrix
|
We are currently encountering a DTB check issue in the PR, which was not flagged in the latest upstream kernel. |
Justification for the link deviation is that QLI2.O is based on the 6.18 kernel, while the current upstream work targets the latest kernel version. Due to the significant changes between 6.18 and the latest kernel, we had to apply some manual adjustments to ensure the patch applies correctly. |
quicAspratap
left a comment
There was a problem hiding this comment.
Approved with Justification from developer.
- Links differ as some API changed in latest upstream kernel.
- dtb check will be fixed in next version of upstream post.
Add optional qcom,vmid support in q6apm-dai so fixed PCM DMA buffers can
be shared with secure/non-HLOS VMIDs via SCM assignment when required.
Generalize qdsp6 AudioReach/APM/PRM packet destination-domain routing so
packet allocation follows the active GPR device domain instead of assuming
ADSP, while preserving ADSP fallback for legacy/default paths.
CRs-Fixed: 4575596
qli-2.0 GA Critical Fix