Skip to content

FROMLIST: PCI: qcom: Set max OPP before DBI access during resume#1145

Open
ziyuezhang-123 wants to merge 1 commit into
qualcomm-linux:tech/bus/pci/allfrom
ziyuezhang-123:hamoa_514
Open

FROMLIST: PCI: qcom: Set max OPP before DBI access during resume#1145
ziyuezhang-123 wants to merge 1 commit into
qualcomm-linux:tech/bus/pci/allfrom
ziyuezhang-123:hamoa_514

Conversation

@ziyuezhang-123
Copy link
Copy Markdown

Before accessing DBI registers during resume, the OPP (Operating Performance Point) must be set to maximum to ensure the required voltage corner is available. Without this, DBI access may fail on some platforms.

Refactor the open-coded max OPP selection in probe() into a helper qcom_pcie_set_max_opp(), and call it during resume before re-enabling the CPU-PCIe interconnect.

Link: https://lore.kernel.org/r/20260416-setmaxopp-v1-1-6a74e2d945a0@oss.qualcomm.com

@qcomlnxci qcomlnxci requested review from a team, krishnachaitanya-linux and meleung and removed request for a team May 14, 2026 09:31
@sgaud-quic
Copy link
Copy Markdown
Contributor

PR #1145 — validate-patch

PR: #1145

Verdict Issues Detailed Report
⚠️ 0 Full report
Verdict: ⚠️ — click to expand

Patch Validation Report

PR: FROMLIST: PCI: qcom: Set max OPP before DBI access during resume — #1145
Upstream: https://lore.kernel.org/r/20260416-setmaxopp-v1-1-6a74e2d945a0@oss.qualcomm.com
Verdict: ⚠️ PARTIAL


Commit Message

Check Status Note
Subject matches upstream FROMLIST: prefix correctly prepended; subject line is well-formed
Body preserves rationale Problem statement (DBI access may fail without max OPP) and refactor intent both described clearly
Fixes tag present/correct ✅ N/A No Fixes: tag — patch introduces new resume-path behaviour, not a regression fix against a known commit; omission is correct
Authorship preserved FROMLIST: rule: lore author (Qiang Yu <qiang.yu@oss.qualcomm.com>) appears as both From: and Signed-off-by:; second Signed-off-by: Ziyue Zhang also present
Backport note N/A FROMLIST: — no upstream SHA to reference
Co-developed-by misuse Not used

Diff

File Hunks Status Notes
drivers/pci/controller/dwc/pcie-qcom.c 3 ⚠️ See issues below

Hunk detail:

Hunk Location Status Notes
1 — new helper qcom_pcie_set_max_opp() after line 1650 Clean, self-contained; correct use of dev_pm_opp_find_freq_floor / dev_pm_opp_set_opp / dev_pm_opp_put
2 — refactor in qcom_pcie_probe() ~line 1898 ⚠️ Open-coded OPP block replaced by helper call; "Unable to find max freq OPP" error log silently dropped (helper returns PTR_ERR but does not log); minor diagnostic regression
3 — new call in qcom_pcie_resume_noirq() ~line 2158 Correctly guarded by pcie->use_pm_opp; placed before icc_enable() as intended

Upstream Patch Status

Commit Community Verdict
PCI: qcom: Set max OPP before DBI access during resume ⏭️ Skipped — lore.kernel.org unreachable from this environment; verify manually at the link above

Dependency Check

  • Patch is a single-patch series (v1-1 in message-ID suffix) — no predecessor patches required
  • All APIs used (dev_pm_opp_find_freq_floor, dev_pm_opp_set_opp, dev_pm_opp_put) are existing kernel OPP framework calls
  • pcie->use_pm_opp field is a pre-existing member of struct qcom_pcie (used elsewhere in the driver)
  • No Depends-on: tag in commit message; no missing header/helper changes identified

qcom-next Presence

Commit Status
PCI: qcom: Set max OPP before DBI access during resume ⏭️ Skipped — network unavailable; verify manually with git log --grep="Set max OPP before DBI access" against qcom-next

Issues Found

  1. Silent error-log drop in helper (minor, ⚠️ REVIEW):
    The original qcom_pcie_probe() code emitted two distinct error messages:

    // Original — two separate log lines:
    dev_err_probe(pci->dev, ret, "Unable to find max freq OPP\n");   // on find failure
    dev_err_probe(pci->dev, ret, "Failed to set OPP for freq %lu\n", max_freq);  // on set failure

    The new helper qcom_pcie_set_max_opp() returns the error code but logs nothing:

    static int qcom_pcie_set_max_opp(struct device *dev)
    {
        opp = dev_pm_opp_find_freq_floor(dev, &max_freq);
        if (IS_ERR(opp))
            return PTR_ERR(opp);   // ← no log here
        ret = dev_pm_opp_set_opp(dev, opp);
        dev_pm_opp_put(opp);
        return ret;
    }

    The probe caller now only logs "Failed to set max OPP in probe\n" for the combined failure, losing the distinction between "find" and "set" failures. This is a deliberate simplification but reduces debuggability. Not a correctness issue; worth noting for upstream review.

  2. dev_err_probedev_err in resume path (informational):
    The resume error path uses dev_err(dev, "Failed to set max OPP in resume: %d\n", ret) rather than dev_err_probe. This is correct — dev_err_probe is intended for probe-time deferred-probe handling, not resume paths. ✅ No issue.

  3. Lore fetch skipped — diff faithfulness unverified against upstream posting:
    Network access was unavailable; the PR diff could not be compared byte-for-byte against the lore mbox. The patch is internally consistent and the commit message accurately describes the change, but a human reviewer should confirm the lore posting at the linked URL matches this diff exactly before merging.


Recommendation

The patch is well-structured and the commit message is accurate. The FROMLIST: prefix, lore Link: tag, and authorship are all correct. The only flagged item is a minor diagnostic regression (loss of the "Unable to find max freq OPP" log line) which is a deliberate simplification and not a correctness defect. Merge is acceptable pending manual confirmation that the lore posting at the linked URL matches this diff (lore was unreachable during automated validation). If the upstream thread shows any reviewer feedback requesting the error-log distinction be preserved, address that before merging.

@sgaud-quic
Copy link
Copy Markdown
Contributor

PR #1145 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch Merge conflict at sync step — checker never ran
dt-binding-check Merge conflict at sync step — checker never ran
dtb-check Merge conflict at sync step — checker never ran
sparse-check Merge conflict at sync step — checker never ran
check-uapi-headers Merge conflict at sync step — checker never ran
check-patch-compliance Merge conflict at sync step — checker never ran
tag-check Single commit has valid FROMLIST: prefix
qcom-next-check ⏭️ FROMLIST: commit — qcom-next not fetchable in this environment

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1145FROMLIST: PCI: qcom: Set max OPP before DBI access during resume
Run: https://github.com/qualcomm-linux/kernel-config/actions/runs/25852653724
Target branch: tech/bus/pci/all

Checker Result Summary
checkpatch Merge conflict at sync step — checker never ran
dt-binding-check Merge conflict at sync step — checker never ran
dtb-check Merge conflict at sync step — checker never ran
sparse-check Merge conflict at sync step — checker never ran
check-uapi-headers Merge conflict at sync step — checker never ran
check-patch-compliance Merge conflict at sync step — checker never ran
tag-check Single commit has valid FROMLIST: prefix
qcom-next-check ⏭️ FROMLIST: commit — qcom-next not fetchable in this environment

❌ All Checkers — Merge Conflict During Integration

Root cause: The topic branch topic/tech/bus/pci/all cannot be automatically merged onto the baseline tag 4e0b0df1c84f9b81089bf478c63d635cc97040a1 due to content conflicts in 4 PCI driver files; every checker job aborts at the sync step before any actual checking runs.

Failure details:

** Merging topic branch: topic/tech/bus/pci/all
CONFLICT (content): Merge conflict in drivers/pci/controller/dwc/pcie-designware-host.c
CONFLICT (content): Merge conflict in drivers/pci/controller/dwc/pcie-qcom.c
CONFLICT (content): Merge conflict in drivers/pci/controller/pci-host-common.c
CONFLICT (content): Merge conflict in drivers/pci/controller/pci-host-common.h
Automatic merge failed; fix conflicts and then commit the result.
Merge failed, manual merge
##[error]Process completed with exit code 1.

This identical failure appears in all 6 checker logs (checkpatch, check-patch-compliance, dt-binding-check, dtb-check, sparse-check, check-uapi-headers).

Fix:

The PR patch itself (pcie-qcom.c only) is clean — the conflicts are in the topic branch integration, meaning other commits already in topic/tech/bus/pci/all conflict with the current baseline. The resolution path is:

  1. Identify which other commits in topic/tech/bus/pci/all conflict with the baseline:
    git log topic/tech/bus/pci/all --not <baseline> --oneline
  2. Rebase or re-merge the topic branch onto the updated baseline:
    git checkout topic/tech/bus/pci/all
    git rebase 4e0b0df1c84f9b81089bf478c63d635cc97040a1
    # resolve conflicts in:
    #   drivers/pci/controller/dwc/pcie-designware-host.c
    #   drivers/pci/controller/dwc/pcie-qcom.c
    #   drivers/pci/controller/pci-host-common.c
    #   drivers/pci/controller/pci-host-common.h
    git rebase --continue
  3. Force-push the updated topic branch and re-trigger CI.

Note: The PR commit itself (FROMLIST: PCI: qcom: Set max OPP before DBI access during resume, SHA f4fda6b) only touches pcie-qcom.c and has a valid FROMLIST: prefix and a lore Link: tag — the patch itself is well-formed. The conflict is a topic-branch integration problem, not a defect in this PR's patch.

Reproduce locally:

git checkout -b integ 4e0b0df1c84f9b81089bf478c63d635cc97040a1
git merge topic/tech/bus/pci/all
# observe conflicts in the 4 files above

✅ tag-check

Single commit subject: FROMLIST: PCI: qcom: Set max OPP before DBI access during resume — starts with FROMLIST:, which is a valid required prefix for branch tech/bus/pci/all. ✅ PASS

⏭️ qcom-next-check

The single FROMLIST: commit (f4fda6b) should be checked against qcom-next, but the qcom-next remote is not fetchable in this offline environment.

⚠️ qcom-next-check — SKIPPED (could not fetch qcom-next)
Manually verify: git log qcom-linux/qcom-next --grep="PCI: qcom: Set max OPP before DBI access during resume"

The lore link https://lore.kernel.org/r/20260416-setmaxopp-v1-1-6a74e2d945a0@oss.qualcomm.com should be checked to confirm upstream acceptance status.


Verdict

1 blocker before merge: The topic branch topic/tech/bus/pci/all has merge conflicts with the current baseline in 4 files (pcie-designware-host.c, pcie-qcom.c, pci-host-common.c, pci-host-common.h). Resolve the topic-branch conflicts, force-push, and re-trigger CI — the PR patch itself is clean and well-formed.

Before accessing DBI registers during resume, the OPP (Operating
Performance Point) must be set to maximum to ensure the required
voltage corner is available. Without this, DBI access may fail on
some platforms.

Refactor the open-coded max OPP selection in probe() into a helper
qcom_pcie_set_max_opp(), and call it during resume before
re-enabling the CPU-PCIe interconnect.

Link: https://lore.kernel.org/r/20260416-setmaxopp-v1-1-6a74e2d945a0@oss.qualcomm.com
Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
Signed-off-by: Ziyue Zhang <ziyue.zhang@oss.qualcomm.com>
@qcomlnxci qcomlnxci requested a review from a team May 14, 2026 10:09
@sgaud-quic
Copy link
Copy Markdown
Contributor

🔨 Build Failure Analysis — PR #1145

PR: #1145
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/25854286789

# Error File:Line PR-introduced? Root Cause
1 CONFLICT (content): Merge conflict drivers/pci/controller/dwc/pcie-qcom.c Yes PR modifies pcie-qcom.c (same file touched by another topic branch already in the integration tree), causing a content conflict during the automerge step
2 CONFLICT (content): Merge conflict drivers/pci/controller/dwc/pcie-designware-host.c No A different topic branch in tech/bus/pci/all modifies this file; PR #1145 does not touch it — pre-existing inter-branch conflict
3 CONFLICT (content): Merge conflict drivers/pci/controller/pci-host-common.c No Same as above — pre-existing inter-branch conflict unrelated to this PR
4 CONFLICT (content): Merge conflict drivers/pci/controller/pci-host-common.h No Same as above — pre-existing inter-branch conflict unrelated to this PR

Verdict

1 of 4 merge conflicts is directly introduced by this PR (overlap in pcie-qcom.c); the remaining 3 are pre-existing conflicts between other topic branches already queued in tech/bus/pci/all.

📎 Detailed analysis: Full report

@sgaud-quic
Copy link
Copy Markdown
Contributor

🔨 Build Failure Analysis — PR #1145

PR: #1145
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/25854286789

# Error File:Line PR-introduced? Root Cause
1 Merge conflict drivers/pci/controller/dwc/pcie-qcom.c Yes PR modifies pcie-qcom.c; the topic/tech/bus/pci/all integration branch already contains other in-flight changes to the same file, causing a content conflict during the CI auto-merge step
2 Merge conflict drivers/pci/controller/dwc/pcie-designware-host.c No (indirect) Another patch in the tech/bus/pci/all topic branch touches this file; no overlap with this PR's diff
3 Merge conflict drivers/pci/controller/pci-host-common.c No (indirect) Same as above — unrelated in-flight patch in the same topic branch
4 Merge conflict drivers/pci/controller/pci-host-common.h No (indirect) Same as above — unrelated in-flight patch in the same topic branch

Verdict

1 of 4 conflicts is directly introduced by this PR (overlap in pcie-qcom.c); the remaining 3 are caused by other in-flight patches already queued in the tech/bus/pci/all topic branch that conflict with the integration baseline — but the pcie-qcom.c conflict is the blocker that must be resolved before this PR can land.

📎 Detailed analysis: Full report

@sgaud-quic
Copy link
Copy Markdown
Contributor

PR #1145 — validate-patch

PR: #1145

Verdict Issues Detailed Report
⚠️ 0 Full report
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: FROMLIST: PCI: qcom: Set max OPP before DBI access during resume — PR #1145
Upstream: https://lore.kernel.org/r/20260416-setmaxopp-v1-1-6a74e2d945a0@oss.qualcomm.com
Verdict: ⚠️ PARTIAL


Commit Message

Check Status Note
Subject matches upstream FROMLIST: prefix correctly prepended; subject PCI: qcom: Set max OPP before DBI access during resume is well-formed
Body preserves rationale Problem statement (DBI access may fail without max OPP) and refactor description (new helper qcom_pcie_set_max_opp()) are clear and complete
Fixes tag present/correct ⚠️ No Fixes: tag present; this is a bug-fix patch — lore posting may carry one; absence should be verified against the lore thread
Authorship preserved FROMLIST: rule satisfied: original author Qiang Yu appears in From: and Signed-off-by:; submitter Ziyue Zhang adds a second Signed-off-by: — correct pattern
Backport note (if applicable) N/A Not a backport
Co-developed-by misuse Not present; no misuse

Diff

File Status Notes
drivers/pci/controller/dwc/pcie-qcom.c (hunk 1 — new helper) Adds qcom_pcie_set_max_opp() helper; clean, self-contained
drivers/pci/controller/dwc/pcie-qcom.c (hunk 2 — probe locals) Removes now-redundant max_freq and opp local variables from qcom_pcie_probe()
drivers/pci/controller/dwc/pcie-qcom.c (hunk 3 — probe call site) Replaces open-coded OPP logic with qcom_pcie_set_max_opp(dev); error message updated from pci->dev to dev (same device, cleaner)
drivers/pci/controller/dwc/pcie-qcom.c (hunk 4 — resume first branch) Adds use_pm_opp-guarded qcom_pcie_set_max_opp() call before DBI access in the suspend-to-idle resume path
drivers/pci/controller/dwc/pcie-qcom.c (hunk 5 — resume second branch) Adds same guard in the pm_suspend_target_state != PM_SUSPEND_MEM branch; symmetric with hunk 4

Note — lore diff comparison skipped: Network access is blocked in this environment; the upstream lore patch at the Link: URL could not be fetched. The diff analysis above is based solely on internal consistency of the PR patch. A human reviewer should run curl -L "https://lore.kernel.org/r/20260416-setmaxopp-v1-1-6a74e2d945a0@oss.qualcomm.com/raw" to confirm the PR diff is identical to the lore posting.


Upstream Patch Status

Commit Community Verdict
PCI: qcom: Set max OPP before DBI access during resume ⏳ Decision Pending — lore thread not reachable from this environment; message-ID dated 2026-04-16, v1 single patch, no evidence of a v2 or maintainer applied tag visible locally

Dependency Check

  • ✅ Single-patch series (v1-1); no prerequisite patches declared
  • ✅ No Depends-on: in commit message
  • use_pm_opp field referenced in resume hunks must already exist in struct qcom_pcie (set during probe OPP initialisation path) — consistent with the existing probe-side code being refactored

qcom-next Presence

Commit Status
PCI: qcom: Set max OPP before DBI access during resume ⏭️ Skipped — network access blocked; verify manually with git log --grep="Set max OPP before DBI access" against qcom-next

Issues

  1. ⚠️ Missing Fixes: tag — The patch fixes a real bug (DBI register access during resume without the required voltage corner). The lore posting may carry a Fixes: <sha> ("pci: qcom: ...") tag pointing to the commit that introduced the resume path. Verify the lore thread and add the tag if present upstream.

  2. ⏭️ Lore diff not verified — Network was unavailable; the PR diff could not be compared byte-for-byte against the lore mbox. A reviewer must manually confirm interdiff between the lore raw patch and pr.patch produces no output.


Verdict

The commit message structure and authorship are correct for a FROMLIST: patch; the diff is internally coherent and the refactor is logically sound — request one change before merging: verify whether the lore posting carries a Fixes: tag and add it to the commit message if so, then confirm the diff is byte-for-byte identical to the lore patch once network access is available.

@sgaud-quic
Copy link
Copy Markdown
Contributor

PR #1145 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch Merge conflict aborted CI before checkpatch ran
dt-binding-check Merge conflict aborted CI before checker ran
dtb-check Merge conflict aborted CI before checker ran
sparse-check Merge conflict aborted CI before checker ran
check-uapi-headers Merge conflict aborted CI before checker ran
check-patch-compliance Merge conflict aborted CI before checker ran
tag-check Single commit has valid FROMLIST: prefix
qcom-next-check ⏭️ Network unavailable; manual verification required

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1145FROMLIST: PCI: qcom: Set max OPP before DBI access during resume
Run: https://github.com/qualcomm-linux/kernel-config/actions/runs/25854321166
Target branch: tech/bus/pci/all

Checker Result Summary
checkpatch Merge conflict aborted CI before checkpatch ran
dt-binding-check Merge conflict aborted CI before checker ran
dtb-check Merge conflict aborted CI before checker ran
sparse-check Merge conflict aborted CI before checker ran
check-uapi-headers Merge conflict aborted CI before checker ran
check-patch-compliance Merge conflict aborted CI before checker ran
tag-check Single commit has valid FROMLIST: prefix
qcom-next-check ⏭️ Network unavailable; manual verification required

❌ All Checkers — Merge Conflict in CI Sync Step

Root cause: The topic branch topic/tech/bus/pci/all cannot be automatically merged onto the baseline (4e0b0df1c84f9b81089bf478c63d635cc97040a1) due to content conflicts in 4 PCI driver files — every checker job failed at this pre-check step before any actual analysis ran.

Failure details:

** Merging topic branch: topic/tech/bus/pci/all
CONFLICT (content): Merge conflict in drivers/pci/controller/dwc/pcie-designware-host.c
CONFLICT (content): Merge conflict in drivers/pci/controller/dwc/pcie-qcom.c
CONFLICT (content): Merge conflict in drivers/pci/controller/pci-host-common.c
CONFLICT (content): Merge conflict in drivers/pci/controller/pci-host-common.h
Automatic merge failed; fix conflicts and then commit the result.
Merge failed, manual merge
##[error]Process completed with exit code 1.

This is identical across all 6 checker jobs (checkpatch, dt-binding-check, dtb-check, sparse-check, check-uapi-headers, check-patch-compliance).

Root cause analysis: The PR's single commit (d9e3cfe0) modifies drivers/pci/controller/dwc/pcie-qcom.c. The baseline (4e0b0df1c84f9b81089bf478c63d635cc97040a1) has diverged from the PR's base in the same 4 files, causing unresolvable auto-merge conflicts. This is a rebase/merge conflict — the PR needs to be rebased onto the current baseline.

Fix:

# Rebase the PR branch onto the current baseline
git fetch origin tech/bus/pci/all
git rebase 4e0b0df1c84f9b81089bf478c63d635cc97040a1

# Resolve conflicts in:
#   drivers/pci/controller/dwc/pcie-designware-host.c
#   drivers/pci/controller/dwc/pcie-qcom.c
#   drivers/pci/controller/pci-host-common.c
#   drivers/pci/controller/pci-host-common.h

git add <resolved files>
git rebase --continue

# Force-push the rebased branch to update the PR
git push --force-with-lease

Reproduce locally:

git fetch origin
git checkout -b integ 4e0b0df1c84f9b81089bf478c63d635cc97040a1
git merge topic/tech/bus/pci/all
# Observe the same 4 conflicts

✅ tag-check

The single commit d9e3cfe0 has subject FROMLIST: PCI: qcom: Set max OPP before DBI access during resume — valid FROMLIST: prefix. ✅


⏭️ qcom-next-check

Commit d9e3cfe0 carries FROMLIST: prefix with Link: https://lore.kernel.org/r/20260416-setmaxopp-v1-1-6a74e2d945a0@oss.qualcomm.com. Network access is unavailable to verify presence in qcom-next.

# Manually verify:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git qcom-next
git log FETCH_HEAD --oneline --grep="Set max OPP before DBI access during resume"

Verdict

1 blocker to fix before merge: rebase the PR branch onto the current baseline (4e0b0df1c84f9b81089bf478c63d635cc97040a1) and resolve the 4 merge conflicts in the PCI DWC/qcom driver files. Once rebased and force-pushed, re-trigger CI — no patch content issues were detected (the FROMLIST: prefix and Link: tag are both present and correct).

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.

3 participants