Skip to content

Qcom 6.18.y SCMI repair - #1122

Open
LXQUALCOMM wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
LXQUALCOMM:qcom-6.18.y
Open

LXQUALCOMM wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
LXQUALCOMM:qcom-6.18.y

Conversation

@LXQUALCOMM

@LXQUALCOMM LXQUALCOMM commented Sep 16, 2026 •

Copy link
Copy Markdown

This PR restores the SCMI memlat devfreq support for qcom-6.18.y that was previously reverted in #1081, and fixes the resulting kgsl out-of-tree module build failure.

Commit 1: Revert "Revert SCMI for qcom-6.18.y (#1081)"
Restores the full SCMI series, including the QCOM SCMI Generic Vendor Protocol, the remote devfreq governor, and the QCOM SCMI Memlat devfreq driver. As part of this, drivers/devfreq/governor.h is moved to the public header location include/linux/devfreq-governor.h.

Commit 2: QCLINUX: drivers/devfreq: Add compatibility shim for out-of-tree modules
The governor.h move breaks out-of-tree modules (e.g. kgsl) that still #include "governor.h" from the old path. A compatibility shim is added at drivers/devfreq/governor.h that simply redirects to <linux/devfreq-governor.h>. No changes to in-tree drivers or kgsl are required

CRs-Fixed: 4559569

@qswat-orbit-external

Copy link
Copy Markdown

Dev Completion validation failed

CR: 4559569
Change Task: kernel.qli.2.0
Error: GenAI Assisted field must be set before moving change tasks to Development Complete. Please provide GenAI information.

The change task for this CR could not be moved to Dev Complete because of the error above. Please resolve the issue in Orbit and re-run the failed Orbit check.

This reverts commit 926f4ae, reversing
changes made to be1f40d.

Signed-off-by: Xin Liu <xin.liu@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Dev Completion validation failed

CR: 4559569
Change Task: kernel.qli.2.0
Error: GenAI Assisted field must be set before moving change tasks to Development Complete. Please provide GenAI information.

The change task for this CR could not be moved to Dev Complete because of the error above. Please resolve the issue in Orbit and re-run the failed Orbit check.

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

governor.h was moved to include/linux/devfreq-governor.h as part of the
SCMI series. Add a compatibility shim at the old location to support
out-of-tree modules (e.g. kgsl) that still reference
drivers/devfreq/governor.h on 6.18.y kernels.

Signed-off-by: Xin Liu <xin.liu@oss.qualcomm.com>
@qlijarvis

Copy link
Copy Markdown

PR #1122 — validate-patch

PR: #1122

Verdict Issues Detailed Report
⚠️ 2 Full report

Final Summary

  1. Lore link present: No — Commit 1/2 is a revert (no lore link expected); Commit 2/2 has QCLINUX: prefix (vendor-only, no lore link expected or required)

  2. Lore link matches PR commits: N/A — no lore links to compare against (revert + vendor-only commits)

  3. Upstream patch status: N/A — Commit 1/2 is a revert of a local commit; Commit 2/2 is vendor-only (QCLINUX: prefix) and not posted upstream by design

  4. PR present in qcom-next/topics: Partial - 1/2 commit(s) only have partial integration evidence

Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1122 — Re-apply SCMI changes and add devfreq compatibility shim
Upstream commit: N/A (revert + vendor-only commits)
Verdict: ⚠️ PARTIAL


Commit 1/2: Revert "Revert SCMI for qcom-6.18.y (#1081)"

Commit Message

Check Status Note
Subject matches upstream N/A Revert commit — no upstream source
Body preserves rationale ⚠️ Minimal: only states what is being reverted, not why
Fixes tag present/correct N/A Not applicable to revert commits
Authorship preserved ✅ Author: Xin Liu (submitter)
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
28 files changed ✅ Re-applies SCMI devfreq changes (governor_remote, scmi-qcom-memlat, vendor protocol extensions)

Issues

  • Missing rationale: The commit message does not explain why the revert is being reverted. Best practice for double-reverts is to include context: "The original revert was applied because [reason], but [new information] means we should re-apply the changes."
  • No reference to original work: The commit being reverted (926f4ae) is not described. Readers cannot easily understand what SCMI changes are being re-introduced without looking up the history.

Commit 2/2: QCLINUX: drivers/devfreq: Add compatibility shim for out-of-tree modules

Commit Message

Check Status Note
Subject matches upstream N/A QCLINUX: vendor-only commit
Body preserves rationale ✅ Clear explanation of purpose and context
Fixes tag present/correct N/A Not fixing a bug
Authorship preserved ✅ Author: Xin Liu
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
drivers/devfreq/governor.h ✅ Creates compatibility shim redirecting to new location

Issues

None — commit message is clear and the change is appropriate for a vendor tree supporting out-of-tree modules.


Verdict

Commit 1/2: ⚠️ REVIEW — The revert is mechanically correct but lacks rationale. Recommend adding a paragraph explaining why the original revert is being undone.

Commit 2/2: ✅ PASS — Well-documented vendor-specific compatibility fix.

Overall: ⚠️ PARTIAL — Merge with recommendation to improve commit 1/2 message in future similar changes.


Final Summary

  1. Lore link present: No — Commit 1/2 is a revert (no lore link expected); Commit 2/2 has QCLINUX: prefix (vendor-only, no lore link expected or required)

  2. Lore link matches PR commits: N/A — no lore links to compare against (revert + vendor-only commits)

  3. Upstream patch status: N/A — Commit 1/2 is a revert of a local commit; Commit 2/2 is vendor-only (QCLINUX: prefix) and not posted upstream by design

  4. PR present in qcom-next/topics: Partial — per integration_presence_report.md: Commit 1/2 is present (found in topics); Commit 2/2 is partial (subject or partial tree evidence found, but full change not verified). Overall status: PARTIAL — 1/2 commits fully present, 1/2 partially present.

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: ba86f67908354f41f269ca1d64b22e4624766dcf
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] Revert "Revert SCMI for qcom-6.18.y (#1081)" partial - subject or partial tree evidence found, but full change was not verified present - all checked added lines are present present
2/2 [PATCH 2/2] QCLINUX: drivers/devfreq: Add compatibility shim for missing - no subject, patch-id, or full tree-content match found partial - subject or partial tree evidence found, but full change was not verified partial

Final Status

overall_status: PARTIAL
present_commits: 1/2
partial_commits: 1/2
missing_commits: 0/2
topics_checked_for_commits: 2/2
final_summary: PR present in qcom-next/topics: Partial - 1/2 commit(s) only have partial integration evidence

@qlijarvis

Copy link
Copy Markdown

PR #1122 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ❌ 2 warnings, 1 check in commit 1
dt-binding-check ⏭️ No DT binding changes
dtb-check ✅ Test passed
sparse-check ✅ Passed
check-uapi-headers ✅ No UAPI changes
check-patch-compliance ❌ 2 commits missing required prefix
tag-check ❌ Commit 1 missing prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1122 - Revert "Revert SCMI for qcom-6.18.y (#1081)" + compatibility shim
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/38213491189
Target Branch: qcom-6.18.y

Checker Result Summary
checkpatch ❌ 2 warnings, 1 check in commit 1
dt-binding-check ⏭️ No DT binding changes
dtb-check ✅ Test passed
sparse-check ✅ Passed
check-uapi-headers ✅ No UAPI changes
check-patch-compliance ❌ 2 commits missing required prefix
tag-check ❌ Commit 1 missing prefix

❌ checkpatch

Root cause: Commit 1 (Revert) inherits line-length warnings and NULL comparison check from the reverted code.

Failure details:

Commit 5f772bd18dfa ("Revert "Revert SCMI for qcom-6.18.y (#1081)"")

WARNING: line length of 107 exceeds 100 columns
#1318: FILE: drivers/devfreq/scmi-qcom-memlat-devfreq.c:385:
+							       const struct scmi_qcom_monitor_cfg *mon_cfg)

WARNING: line length of 102 exceeds 100 columns
#1407: FILE: drivers/devfreq/scmi-qcom-memlat-devfreq.c:474:
+			const struct scmi_qcom_monitor_cfg *monitor_cfg = &memory_cfg->monitor_cfg[j];

CHECK: Comparison to NULL could be written "of_machine_get_match"
#2271: FILE: include/linux/of.h:994:
+	return of_machine_get_match(matches) != NULL;

5f772bd18dfa80fc1a4459b60aa1f9b4234c7864 total: 0 errors, 2 warnings, 1 checks, 2095 lines checked

Fix:

Since this is a revert commit that restores previously merged code, these style issues were present in the original commit. You have two options:

  1. Accept as-is (recommended for revert commits) — the warnings are inherited from the original code and don't represent new issues introduced by this PR.

  2. Fix the warnings (if you want to clean up the code):

    git rebase -i ab439ff21547145a1b6b13bc471f4383ac7e9b66
    # mark commit 5f772bd18dfa as 'edit'
    
    # Fix line 385 in drivers/devfreq/scmi-qcom-memlat-devfreq.c
    # Wrap the long parameter line
    
    # Fix line 474 in drivers/devfreq/scmi-qcom-memlat-devfreq.c
    # Wrap the long variable declaration
    
    # Fix line 994 in include/linux/of.h
    # Change: return of_machine_get_match(matches) != NULL;
    # To:     return of_machine_get_match(matches);
    
    git add drivers/devfreq/scmi-qcom-memlat-devfreq.c include/linux/of.h
    git commit --amend --no-edit
    git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git ab439ff21547145a1b6b13bc471f4383ac7e9b66..ff8ef1d0eec35aa4f0c053ce94bc120cb99174b3

❌ check-patch-compliance

Root cause: Both commits lack the required upstream-linkable prefix tags enforced by this checker.

Failure details:

Checking commit: Revert "Revert SCMI for qcom-6.18.y (#1081)"
Commit summary does not start with a required prefix

Checking commit: QCLINUX: drivers/devfreq: Add compatibility shim for out-of-tree modules
Commit summary does not start with a required prefix

Analysis:

Commit 1: Revert "Revert SCMI for qcom-6.18.y (#1081)"

  • Missing prefix before "Revert"
  • The checker requires: FROMLIST:, FROMGIT:, UPSTREAM:, or BACKPORT: before Revert

Commit 2: QCLINUX: drivers/devfreq: Add compatibility shim for out-of-tree modules

  • Uses QCLINUX: prefix, which is not in the allowed list for check-patch-compliance
  • This is a known limitation — the checker only accepts upstream-linkable prefixes
  • QCLINUX: is a vendor-internal prefix for code with no upstream equivalent

Fix:

For Commit 1 (Revert):

git rebase -i ab439ff21547145a1b6b13bc471f4383ac7e9b66
# mark commit 5f772bd18dfa as 'edit'

# Determine the correct prefix:
# - If the original SCMI code was merged upstream → use UPSTREAM:
# - If it was posted to lore but not merged → use FROMLIST:
# - If it came from a maintainer tree → use FROMGIT:

git commit --amend -m "UPSTREAM: Revert \"Revert SCMI for qcom-6.18.y (#1081)\""
# (adjust prefix based on the origin of the original SCMI code)

git rebase --continue

For Commit 2 (QCLINUX):

This commit is vendor-only code with no upstream equivalent. The check-patch-compliance checker will always fail for QCLINUX: prefixed commits because it enforces upstream-linkable prefixes only.

Options:

  1. Accept the failure — this is a known limitation for vendor-only commits
  2. If the code was posted upstream — change to FROMLIST: and add a Link: tag pointing to the lore.kernel.org URL
  3. If the code is not suitable for upstream — keep QCLINUX: and document that this checker failure is expected

Reproduce locally:

cd /path/to/kernel
bash /path/to/kernel-checkers/check-patch-compliance.sh \
  --base ab439ff21547145a1b6b13bc471f4383ac7e9b66 \
  --head ff8ef1d0eec35aa4f0c053ce94bc120cb99174b3

❌ tag-check

Root cause: Commit 1 has no subject-line prefix tag (bare "Revert" with no leading prefix).

Failure details:

Since the target branch is qcom-6.18.y (not qcom-next or qcom-next-staging), every commit must start with a valid prefix tag.

Commit 1: Revert "Revert SCMI for qcom-6.18.y (#1081)"

  • ❌ Missing prefix — subject starts with bare "Revert"
  • Required: One of FROMLIST:, FROMGIT:, UPSTREAM:, BACKPORT:, QCLINUX:, PENDING:, WORKAROUND: before Revert

Commit 2: QCLINUX: drivers/devfreq: Add compatibility shim for out-of-tree modules

  • ✅ Has valid prefix — QCLINUX: is accepted by tag-check (even though check-patch-compliance rejects it)

Fix:

git rebase -i ab439ff21547145a1b6b13bc471f4383ac7e9b66
# mark commit 5f772bd18dfa as 'edit'

# Choose the correct prefix based on the origin of the original SCMI code:
# - Merged into Linus's tree → UPSTREAM:
# - Posted to lore but not merged → FROMLIST:
# - In a maintainer tree → FROMGIT:
# - Vendor-only → QCLINUX:

git commit --amend -m "UPSTREAM: Revert \"Revert SCMI for qcom-6.18.y (#1081)\""
# (adjust prefix as appropriate)

git rebase --continue

Reproduce locally:

# Extract commit subjects and check for prefix
git log ab439ff21547145a1b6b13bc471f4383ac7e9b66..ff8ef1d0eec35aa4f0c053ce94bc120cb99174b3 --format="%H %s" | while read sha subject; do
  if ! echo "$subject" | grep -qE '^(FROMLIST|FROMGIT|UPSTREAM|BACKPORT|QCLINUX|PENDING|WORKAROUND):' &&
     ! echo "$subject" | grep -qE '^(FROMLIST|FROMGIT|UPSTREAM|BACKPORT|QCLINUX|PENDING|WORKAROUND): Revert'; then
    echo "❌ MISSING prefix in commit $sha: $subject"
  else
    echo "✅ Valid prefix in commit $sha: $subject"
  fi
done

Verdict

2 blockers must be fixed before merge:

  1. Commit 1 prefix — Add UPSTREAM: (or appropriate prefix) before Revert to satisfy both check-patch-compliance and tag-check
  2. Commit 2 QCLINUX prefix — This is a known limitation of check-patch-compliance for vendor-only code. If this code has no upstream equivalent, the checker failure is expected and can be accepted. If it was posted upstream, change to FROMLIST: + add Link: tag.

Optional (checkpatch warnings):

  • The 2 line-length warnings and 1 NULL comparison check in Commit 1 are inherited from the original code being reverted. These are not new issues introduced by this PR and can be accepted as-is for a revert commit.

Recommendation: Fix the prefix issue in Commit 1 (add UPSTREAM: or appropriate prefix before Revert). For Commit 2, if the code is vendor-only with no upstream equivalent, document that the check-patch-compliance failure is expected and acceptable.

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