Skip to content

CMA-memory-to-offload-FNN-PLUS-module-to-eNPU- #1023 - #1378

Open
ks5-dev wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
ks5-dev:topic/audio_mem_allocate
Open

ks5-dev wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
ks5-dev:topic/audio_mem_allocate

Conversation

@ks5-dev

@ks5-dev ks5-dev commented Nov 2, 2026

Copy link
Copy Markdown

This series contains patches for allocating CMA memory to offload
FNN PLUS module to eNPU.

Link: https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

shaspand added 2 commits November 2, 2026 15:23
…ion for AudioReach

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).

Link: https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/
…eNPU audio offload

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

Link: https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

Signed-off-by: shaspand <shaspand@qti.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

2 similar comments
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qlijarvis

Copy link
Copy Markdown

PR #1378 — validate-patch

PR: #1378

Verdict Issues Detailed Report
❌ 0 Full report

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

  2. Lore link matches PR commits: Partial — diff content is faithful to lore, but authorship is incorrect (original author's Signed-off-by missing from both commits) and tree context differs (different base commit).

  3. Upstream patch status: ❌ NACKed — Krzysztof Kozlowski rejected patch 1/2 on 25 Aug 2026 for using downstream-only devicetree node naming pattern (qcom,audio-ml). Patch 2/2 has no maintainer reply yet.

  4. PR present in qcom-next/topics: Fail - 2/2 commit(s) are missing from both qcom-next and topics

Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1378 - FROMLIST: arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach (2 commits)
Upstream commit: https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream ✅ Both commits: subjects match lore (with FROMLIST: prefix added)
Body preserves rationale ✅ Both commits: technical rationale preserved verbatim
Fixes tag present/correct N/A No Fixes tag in upstream patches
Authorship preserved ❌ FAIL - PR author is shaspand <shaspand@qti.qualcomm.com> but lore author is Karthik S <karthik.s@oss.qualcomm.com>. Original author's Signed-off-by is missing from PR commit 2/2.
Backport note (if applicable) N/A FROMLIST: prefix used correctly

Diff

File Status Notes
arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi ✅ Identical to lore patch 1/2
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts ✅ Identical to lore patch 1/2 (context differs: index 0948a33 vs a13315b)
arch/arm64/boot/dts/qcom/kodiak-el2.dtso ✅ Identical to lore patch 2/2 (context differs: index bfc7738 vs 8daf7f0)

Issues

Critical authorship violation (FROMLIST: commits):

  1. Commit 1/2: PR From: is shaspand <shaspand@qti.qualcomm.com> but lore author is Karthik S <karthik.s@oss.qualcomm.com>. The PR commit message does not include Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com> to preserve the original author's attribution.

  2. Commit 2/2: PR From: is shaspand <shaspand@qti.qualcomm.com> but lore author is Karthik S <karthik.s@oss.qualcomm.com>. The PR commit message does include Signed-off-by: shaspand <shaspand@qti.qualcomm.com> but is missing Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com> to preserve the original author's attribution.

For FROMLIST: commits: The submitter (who cherry-picks and adds the prefix) may legitimately appear in From:, but the original lore author's Signed-off-by: must be present in the commit message. This is missing from both commits.

Upstream patch status - NACKed:

Maintainer Krzysztof Kozlowski explicitly rejected patch 1/2 on 25 Aug 2026:

"Don't send downstream code. There are no such patterns in upstream for years."

The rejection targets the node name pattern qcom,audio-ml in the reserved-memory node, which Krzysztof identifies as a downstream-only pattern not accepted in mainline for years.

Dependency note:

The cover letter states:

"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/"

This prerequisite patch introduces the kodiak-el2.dtso file. Without it, patch 2/2 cannot apply.

Verdict

Do not merge. This PR has three blocking issues:

  1. Authorship violation: Both commits are missing the original author's Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com> line, violating kernel contribution attribution rules for FROMLIST: commits.

  2. Upstream NACKed: Patch 1/2 was explicitly rejected by subsystem maintainer Krzysztof Kozlowski for using downstream-only devicetree patterns (qcom,audio-ml node name).

  3. Not in qcom-next/topics: Per integration_presence_report.md, both commits are missing from qcom-next and all topic branches.

Required actions:

  1. Fix authorship: Add Signed-off-by: Karthik S <karthik.s@oss.qualcomm.com> to both commit messages (above the submitter's Signed-off-by line).

  2. Address upstream NAK: The qcom,audio-ml node name pattern must be changed to follow current upstream conventions. Consult recent merged patches in arch/arm64/boot/dts/qcom/ for the correct reserved-memory node naming pattern (typically just a descriptive label without vendor prefix in the node name).

  3. Verify dependency: Ensure the prerequisite patch (kodiak EL2 overlay) is merged before this series.

  4. Re-post to lore: After fixing the devicetree pattern, post a v2 series to lore.kernel.org addressing Krzysztof's feedback, then update this PR to match the v2.

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

  2. Lore link matches PR commits: Partial — diff content is faithful to lore, but authorship is incorrect (original author's Signed-off-by missing from both commits) and tree context differs (different base commit).

  3. Upstream patch status: ❌ NACKed — Krzysztof Kozlowski rejected patch 1/2 on 25 Aug 2026 for using downstream-only devicetree node naming pattern (qcom,audio-ml). Patch 2/2 has no maintainer reply yet.

  4. PR present in qcom-next/topics: No — per integration_presence_report.md, both commits (2/2) are missing from qcom-next and all topic branches (FAIL status).

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 17bbb4b37bbc4fc5827b4667445a0c43967c0f48
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] FROMLIST: arm64: dts: qcom: qcs6490-rb3gen2: add audio missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing
2/2 [PATCH 2/2] FROMLIST: arm64: dts: qcom: kodiak-el2: add LPASS AML missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing

Final Status

overall_status: FAIL
present_commits: 0/2
partial_commits: 0/2
missing_commits: 2/2
topics_checked_for_commits: 2/2
final_summary: PR present in qcom-next/topics: Fail - 2/2 commit(s) are missing from both qcom-next and topics

@qlijarvis

Copy link
Copy Markdown

PR #1378 — checker-log-analyzer

PR: #1378
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/41425361843

Checker Result Summary
Checker Result Summary
checkpatch ❌ Missing Signed-off-by in commit 1/2
dt-binding-check ⏭️ No binding changes
dtb-check ❌ Phandle reference error: audio_cma_mem undefined
sparse-check ⏭️ No C/H changes
check-uapi-headers ⏭️ No UAPI changes
check-patch-compliance ❌ b4 fetch failed for both commits
tag-check ✅ Both commits have FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1378 - FROMLIST: arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/41425361843

Checker Result Summary
checkpatch ❌ Missing Signed-off-by in commit 1/2
dt-binding-check ⏭️ No binding changes
dtb-check ❌ Phandle reference error: audio_cma_mem undefined
sparse-check ⏭️ No C/H changes
check-uapi-headers ⏭️ No UAPI changes
check-patch-compliance ❌ b4 fetch failed for both commits
tag-check ✅ Both commits have FROMLIST: prefix

❌ checkpatch

Root cause: Commit 1/2 is missing the mandatory Signed-off-by: trailer.

Failure details:

Commit 03fbe4abb872 ("FROMLIST: arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach")
ERROR: Missing Signed-off-by: line(s)
03fbe4abb872f22b4d7216eafd5d3a9221dc0957 total: 1 errors, 0 warnings, 0 checks, 21 lines checked

Fix:

git rebase -i 58b1e624b961920b9e3924f17301dc4dd0ccc405
# mark commit 03fbe4abb872 as 'edit'
git commit --amend --signoff
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git 58b1e624b961920b9e3924f17301dc4dd0ccc405..38d4ef252e6650461c09f6ba8c8e9d3ca689e36b

❌ dtb-check

Root cause: qcs6490-audioreach.dtsi references &audio_cma_mem but the label is only defined in qcs6490-rb3gen2.dts, breaking all other boards that include the audioreach DTSI.

Failure details:

../arch/arm64/boot/dts/qcom/qcs6490-audioreach.dtsi:97.19-101.6: ERROR (phandle_references): 
  /soc@0/remoteproc@3700000/glink-edge/gpr/service@1/dais: Reference to non-existent node or label "audio_cma_mem"

ERROR: Input tree has errors, aborting (use -f to force output)

Analysis:
The patch adds memory-region = <&audio_cma_mem>; to the shared qcs6490-audioreach.dtsi file (line 100), but defines the audio_cma_mem node only in the board-specific qcs6490-rb3gen2.dts. This creates a broken phandle reference for any other qcs6490 board that includes qcs6490-audioreach.dtsi but doesn't define audio_cma_mem.

Fix:
Move the memory-region property from the shared DTSI to the board-specific DTS file:

# Option 1: Move memory-region to board DTS (recommended)
# In qcs6490-audioreach.dtsi: remove the memory-region line
# In qcs6490-rb3gen2.dts: add an overlay for q6apmdai:

&q6apmdai {
    memory-region = <&audio_cma_mem>;
};

# Option 2: Make memory-region optional in the binding
# If the driver already handles missing memory-region gracefully,
# just remove the reference from audioreach.dtsi and add it only
# in rb3gen2.dts as shown above.

Reproduce locally:

make -j$(nproc) O=out defconfig
make -j$(nproc) O=out CHECK_DTBS=y arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dtb

❌ check-patch-compliance

Root cause: b4 fetch failed for the lore link in both commits — the link points to a future date (2026-08-25) that doesn't exist yet, or the series was never posted.

Failure details:

Checking commit: FROMLIST: arm64: dts: qcom: qcs6490-rb3gen2: add audio CMA memory region for AudioReach
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

Checking commit: FROMLIST: arm64: dts: qcom: kodiak-el2: add LPASS AML IOMMU SIDs for eNPU audio offload
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

Analysis:
Both commits reference the same lore link: https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

The message-ID timestamp is 20260825 (August 25, 2026), but today is November 2, 2026. Either:

  1. The series was never actually posted to lore
  2. The link is incorrect
  3. The series is still in draft and hasn't been sent yet

Fix:

# If the series has been posted, update the Link: to the correct lore URL
# If not posted yet, change prefix from FROMLIST: to PENDING: or QCLINUX:

# Option 1: If posted with a different message-ID
git rebase -i 58b1e624b961920b9e3924f17301dc4dd0ccc405
# mark commits as 'edit', update Link: trailer with correct URL
git commit --amend
# update the Link: line in the commit message
git rebase --continue

# Option 2: If not posted upstream
# Change prefix from FROMLIST: to QCLINUX: or PENDING:
# (Note: check-patch-compliance will still fail for QCLINUX:/PENDING: — known limitation)

Reproduce locally:

b4 am --single-message -C -l -3 https://lore.kernel.org/all/20260825133333.376591-1-karthik.s@oss.qualcomm.com/

Verdict

3 blockers must be fixed before merge:

  1. checkpatch: Add Signed-off-by: to commit 03fbe4a
  2. dtb-check: Move memory-region = <&audio_cma_mem>; from qcs6490-audioreach.dtsi to qcs6490-rb3gen2.dts as a &q6apmdai overlay
  3. check-patch-compliance: Verify the lore link is correct, or change the prefix if the series was never posted

The dtb-check failure is the most critical — it breaks the device tree build for all qcs6490 boards. The architectural issue is that a shared DTSI file should not reference board-specific memory regions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants