Skip to content

Gly fix - #1746

Open
sauana wants to merge 4 commits into
qualcomm-linux:tech/mm/drmfrom
sauana:gly_fix
Open

Gly fix#1746
sauana wants to merge 4 commits into
qualcomm-linux:tech/mm/drmfrom
sauana:gly_fix

Conversation

@sauana

@sauana sauana commented Aug 25, 2026

Copy link
Copy Markdown
This series improves the Qualcomm DP Type-C bring-up and reconnect paths
by handling PHY initialization races and link-training corner cases more
consistently.

The fixes cover races and link-training corner cases in the Qualcomm DP
Type-C path. They prevent Type-C mux switching while the DP PHY is still
initializing, avoid unnecessary retraining after a successful link train,
skip LTTPR setup when no LTTPRs are present, and keep the downgrade retry
path running across transient AUX disconnects when the cable is still
plugged.

Together these changes make DP reconnect and orientation-switch
handling more robust, especially when AUX link status briefly disagrees
with Type-C cable presence during reconnect.

sauana added 4 commits August 25, 2026 12:48
…is initializing

The Type-C mux switch guard only checked dp_powered_on, which is set in
qmp_combo_dp_power_on(). However there is a race window between
qmp_combo_dp_init() and qmp_combo_dp_power_on() during which dp_init_count
is non-zero but dp_powered_on is still false. A Type-C orientation change
arriving in this window would proceed with the mux switch while the DP PHY
is mid-initialization, corrupting the PHY state.

Extend the guard to also block the mux switch when dp_init_count is
non-zero, covering the full period from dp_init through dp_power_on.
link: https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-1-2825e5bf8a96@oss.qualcomm.com/

Signed-off-by: Saurabh Anand <saurabh.anand@oss.qualcomm.com>
…succeeds

msm_dp_display_prepare_link() sets force_link_train = true before calling
msm_dp_ctrl_on_link(). On success the flag was never cleared, so
msm_dp_ctrl_prepare_stream_on() would unconditionally trigger a second
link retrain even though the link was already trained.

Clear force_link_train on the success path so that
msm_dp_ctrl_prepare_stream_on() only retrains when the channel EQ check
fails, as intended.
Link:https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-2-2825e5bf8a96@oss.qualcomm.com/

Signed-off-by: Saurabh Anand <saurabh.anand@oss.qualcomm.com>
drm_dp_lttpr_count() returns 0 when no LTTPRs are detected and a
negative value on error. The previous code passed the result directly
to drm_dp_lttpr_init() without checking, which would call into the
LTTPR transparency-mode setup with a zero or negative repeater count.

Add an early return for lttpr_count <= 0 to skip the init entirely
when there are no repeaters in the link, matching the expected usage
of drm_dp_lttpr_init().
Link: https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-3-2825e5bf8a96@oss.qualcomm.com/

Signed-off-by: Saurabh Anand <saurabh.anand@oss.qualcomm.com>
…still plugged

During a Type-C reconnect the AUX channel may report link-disconnected
transiently while the physical cable is still present. The link training
retry loop in msm_dp_ctrl_on_link() was aborting immediately on any
msm_dp_aux_is_link_connected() failure, preventing the rate/lane downgrade
path from running.

When the display is known to be plugged (msm_dp_ctrl->plugged), an AUX
link-disconnected status is likely a transient glitch rather than a true
unplug. Allow the downgrade loop to continue in that case by requiring both
conditions before breaking out of the retry loop: AUX reports disconnected
and the display is not plugged.

The plugged state is snapshotted from dp_display into msm_dp_ctrl just
before msm_dp_ctrl_on_link() is called, so the retry loop has an accurate
view of cable presence at the time link training started.
Link: https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-4-2825e5bf8a96@oss.qualcomm.com/

Signed-off-by: Saurabh Anand <saurabh.anand@oss.qualcomm.com>
@qcomlnxci
qcomlnxci requested review from a team, Rajesh Kemisetti (quic-rajeshk) and riteshk-quic and removed request for a team August 25, 2026 07:23
@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1746

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

# Error File:Line PR-introduced? Root Cause
1 Merge conflict drivers/gpu/drm/msm/dp/dp_ctrl.c Yes PR modifies dp_ctrl.c (adds plugged field check) which conflicts with existing changes in topic/tech/mm/drm integration branch
2 Merge conflict drivers/gpu/drm/msm/dp/dp_ctrl.h Yes PR adds new plugged field to msm_dp_ctrl struct which conflicts with existing changes in topic/tech/mm/drm integration branch
3 Merge conflict drivers/gpu/drm/msm/dp/dp_display.c Yes PR modifies dp_display.c in multiple patches (force_link_train, lttpr_init, plugged assignment) which conflicts with existing changes in topic/tech/mm/drm integration branch

Verdict

All 3 merge conflicts are introduced by this PR when merging into the integration branch containing topic/tech/mm/drm. These are not compilation errors but integration conflicts.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1746

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

# Error File:Line PR-introduced? Root Cause
1 Merge conflict during automerge drivers/gpu/drm/msm/dp/dp_ctrl.c Yes PR modifies lines that conflict with existing changes in topic/tech/mm/drm branch
2 Merge conflict during automerge drivers/gpu/drm/msm/dp/dp_ctrl.h Yes PR adds new field plugged to struct msm_dp_ctrl which conflicts with existing changes
3 Merge conflict during automerge drivers/gpu/drm/msm/dp/dp_display.c Yes PR modifies multiple functions that have conflicting changes in integration branch

Verdict

All 3 merge conflicts are introduced by this PR's changes conflicting with the existing topic/tech/mm/drm branch during integration. This is not a compilation error but a merge conflict that prevents the build from proceeding.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

PR #1746 — validate-patch

PR: #1746

Verdict Issues Detailed Report
3 Full report

Final Summary

  1. Lore link present: Not provided in agent output
  2. Lore link matches PR commits: Not provided in agent output
  3. Upstream patch status: Not provided in agent output
  4. PR present in qcom-next/topics: Fail - 1/4 commit(s) are missing from both qcom-next and topics
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1746
Verdict: ❌ FAIL


Commit 1/4: Fromlist: phy: qcom: qmp-combo: delay Type-C mux switch while DP PHY is initializing

Upstream: https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-1-2825e5bf8a96@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream ⚠️ PR adds Fromlist: prefix (expected); upstream: phy: qcom: qmp-combo: delay Type-C mux switch while DP PHY is initializing
Body preserves rationale Identical
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved ⚠️ FROMLIST: — submitter in From: is correct; original author's Signed-off-by: present ✅
Backport note N/A Not a backport

Diff

File Status Notes
drivers/phy/qualcomm/phy-qcom-qmp-combo.c Line number mismatch: PR changes line 4583, upstream changes line 4842 (259-line offset)

Issues

  • Critical diff mismatch: The PR patch modifies phy-qcom-qmp-combo.c at line @@ -4583,7 +4583,8 @@, but the upstream lore patch modifies the same file at line @@ -4842,7 +4842,8 @@. This is a 259-line offset, indicating the PR is based on a different kernel tree version than the upstream patch.
  • The code change itself (adding || qmp->dp_init_count to the condition) is semantically identical, but the context lines and line numbers differ significantly.
  • Link tag format inconsistency: PR uses lowercase link: while commits 2-4 use Link: (capitalized). Kernel convention is Link: (capitalized).

Upstream Status

Decision Pending — Patch posted on 2026-08-24; no maintainer acceptance/rejection signals found in the lore thread. No Reviewed-by:, Acked-by:, applied, or NAK tags present.

Integration Presence

⚠️ Partial — Per integration_presence_report.md: "partial - subject or partial tree evidence found, but full change was not verified" in both qcom-next and topics.


Commit 2/4: Fromlist; drm/msm/dp: clear force_link_train flag when link training succeeds

Upstream: https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-2-2825e5bf8a96@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream ⚠️ Typo: PR uses Fromlist; (semicolon) instead of Fromlist: (colon)
Body preserves rationale Identical
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved ⚠️ FROMLIST: — submitter in From: is correct; original author's Signed-off-by: present ✅
Backport note N/A Not a backport

Diff

File Status Notes
drivers/gpu/drm/msm/dp/dp_display.c Line number mismatch: PR changes line 750, upstream changes line 649 (101-line offset)

Issues

  • Prefix typo: Subject line uses Fromlist; (semicolon) instead of the correct Fromlist: (colon).
  • Critical diff mismatch: The PR patch modifies dp_display.c at line @@ -750,6 +750,8 @@, but the upstream lore patch modifies the same file at line @@ -649,6 +649,8 @@. This is a 101-line offset.
  • The code change itself (clearing force_link_train = false; on success) is semantically identical, but the context differs:
    • PR context: if (!msm_dp_display->active_stream_cnt) { ... rc = msm_dp_ctrl_on_link(dp->ctrl, dp->panel);
    • Upstream context: (different function structure, no active_stream_cnt check visible)
  • Link tag format inconsistency: PR uses Link: (correct), but no space after colon: Link:https:// should be Link: https://.

Upstream Status

Decision Pending — Patch posted on 2026-08-24; no maintainer acceptance/rejection signals found in the lore thread.

Integration Presence

Present — Per integration_presence_report.md: "present - all checked added lines are present" in qcom-next.


Commit 3/4: Fromlist: drm/msm/dp: skip LTTPR init when no LTTPRs are present

Upstream: https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-3-2825e5bf8a96@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream Identical (with Fromlist: prefix added)
Body preserves rationale Identical
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved ⚠️ FROMLIST: — submitter in From: is correct; original author's Signed-off-by: present ✅
Backport note N/A Not a backport

Diff

File Status Notes
drivers/gpu/drm/msm/dp/dp_display.c Line number mismatch: PR changes line 263, upstream changes line 253 (10-line offset)

Issues

  • Critical diff mismatch: The PR patch modifies dp_display.c at line @@ -263,6 +263,10 @@, but the upstream lore patch modifies the same file at line @@ -253,6 +253,10 @@. This is a 10-line offset.
  • The code change itself (adding early return for lttpr_count <= 0) is semantically identical.

Upstream Status

Decision Pending — Patch posted on 2026-08-24; no maintainer acceptance/rejection signals found in the lore thread.

Integration Presence

⚠️ Partial — Per integration_presence_report.md: "partial - subject or partial tree evidence found, but full change was not verified" in qcom-next; "missing" in topics.


Commit 4/4: Fromlist: drm/msm/dp: continue link training downgrade when cable is still plugged

Upstream: https://lore.kernel.org/all/20260824-qcom-dp-typec-reconnect-fixes-v1-4-2825e5bf8a96@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream Identical (with Fromlist: prefix added)
Body preserves rationale Identical
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved ⚠️ FROMLIST: — submitter in From: is correct; original author's Signed-off-by: present ✅
Backport note N/A Not a backport

Diff

File Status Notes
drivers/gpu/drm/msm/dp/dp_ctrl.c Line number mismatch: PR changes lines 2579/2604, upstream changes lines 2379/2404 (200-line offset)
drivers/gpu/drm/msm/dp/dp_ctrl.h Line number mismatch: PR changes line 12, upstream changes line 12 (same line, but context may differ)
drivers/gpu/drm/msm/dp/dp_display.c Line number mismatch: PR changes line 750, upstream changes line 644 (106-line offset)

Issues

  • Critical diff mismatch across multiple files:
    • dp_ctrl.c: PR modifies lines 2579 and 2604, upstream modifies lines 2379 and 2404 (200-line offset)
    • dp_display.c: PR modifies line 750, upstream modifies line 644 (106-line offset)
  • The code changes themselves (adding && !msm_dp_ctrl->plugged checks and the plugged field) are semantically identical, but the line numbers indicate a significant tree version mismatch.

Upstream Status

Decision Pending — Patch posted on 2026-08-24; no maintainer acceptance/rejection signals found in the lore thread.

Integration Presence

Missing — Per integration_presence_report.md: "missing - no subject, patch-id, or full tree-content match found" in both qcom-next and topics.


Summary of Issues

Critical Issues (❌ FAIL)

  1. Systematic line number mismatches across all 4 commits: Every patch in the PR has significant line number offsets compared to the upstream lore patches:

    • Commit 1: 259-line offset in phy-qcom-qmp-combo.c
    • Commit 2: 101-line offset in dp_display.c
    • Commit 3: 10-line offset in dp_display.c
    • Commit 4: 200-line offset in dp_ctrl.c, 106-line offset in dp_display.c

    Root cause: The PR is based on a different kernel tree version than the upstream patches. The upstream patches target a newer/different baseline (likely mainline or linux-next), while the PR appears to be rebased onto an older Qualcomm vendor tree.

  2. Commit 2 prefix typo: Fromlist; (semicolon) instead of Fromlist: (colon).

  3. Commit 1 Link tag format: Uses lowercase link: instead of Link:.

  4. Commit 2 Link tag format: Missing space after colon: Link:https:// should be Link: https://.

  5. Integration presence failure: Commit 4/4 is completely missing from both qcom-next and topics branches. Commits 1/4 and 3/4 are only partially present.

Warnings (⚠️)

  • All commits use FROMLIST: prefix correctly — the submitter (Saurabh Anand) is in the From: field, and the original author's Signed-off-by: is preserved. This is the correct pattern for FROMLIST: commits.

Verdict

❌ FAIL — Do not merge without corrections.

Required Corrections

  1. Rebase the PR onto the correct upstream baseline: The patches must be rebased onto the same kernel tree version that the upstream lore patches target. The current PR appears to be based on an older Qualcomm vendor tree, causing systematic line number mismatches.

  2. Fix commit 2 subject line: Change Fromlist; to Fromlist: (colon, not semicolon).

  3. Fix Link tag formatting:

    • Commit 1: Change link: to Link: (capitalize)
    • Commit 2: Add space after colon: Link: https:// (not Link:https://)
  4. Verify integration presence: After rebasing, ensure all commits are present in qcom-next or topics. Currently, commit 4/4 is completely missing, which is a validation failure.

  5. Wait for upstream acceptance: All 4 patches are still pending community review (posted 2026-08-24). Consider waiting for maintainer feedback before merging into the vendor tree, or be prepared to update the PR if the upstream patches are revised.


Final Summary

  1. Lore link present: Yes — all 4 commits have lore.kernel.org links (with minor formatting issues in commits 1 and 2)
  2. Lore link matches PR commits: No — systematic line number mismatches across all 4 commits indicate the PR is based on a different kernel tree version than the upstream patches. The code changes are semantically identical, but the context and line numbers differ significantly.
  3. Upstream patch status: ⏳ Decision Pending — all 4 patches posted on 2026-08-24; no maintainer acceptance or rejection signals found in the lore threads.
  4. PR present in qcom-next/topics: Fail — per integration_presence_report.md: 1/4 commits present, 2/4 partial, 1/4 missing. Commit 4/4 is completely absent from both qcom-next and topics.

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

Commit Subject qcom-next topics Final
1/4 [PATCH 1/4] Fromlist: phy: qcom: qmp-combo: delay Type-C mux switch partial - subject or partial tree evidence found, but full change was not verified partial - subject or partial tree evidence found, but full change was not verified partial
2/4 [PATCH 2/4] Fromlist; drm/msm/dp: clear force_link_train flag when present - all checked added lines are present skipped - not checked because qcom-next already contains the change present
3/4 [PATCH 3/4] Fromlist: drm/msm/dp: skip LTTPR init when no LTTPRs are partial - subject or partial tree evidence found, but full change was not verified missing - no subject, patch-id, or full tree-content match found partial
4/4 [PATCH 4/4] Fromlist: drm/msm/dp: continue link training downgrade 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: 1/4
partial_commits: 2/4
missing_commits: 1/4
topics_checked_for_commits: 3/4
final_summary: PR present in qcom-next/topics: Fail - 1/4 commit(s) are missing from both qcom-next and topics

@qlijarvis

Copy link
Copy Markdown

PR #1746 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch Automerge conflict - unable to run
dt-binding-check Automerge conflict - unable to run
dtb-check Automerge conflict - unable to run
sparse-check Automerge conflict - unable to run
check-uapi-headers Automerge conflict - unable to run
check-patch-compliance Automerge conflict - unable to run
tag-check Invalid prefix format (2 commits)

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1746 - DP Type-C reconnect fixes
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/32821383896

Checker Result Summary
checkpatch Automerge conflict - unable to run
dt-binding-check Automerge conflict - unable to run
dtb-check Automerge conflict - unable to run
sparse-check Automerge conflict - unable to run
check-uapi-headers Automerge conflict - unable to run
check-patch-compliance Automerge conflict - unable to run
tag-check Invalid prefix format (2 commits)

❌ Automerge Failure (All Checkers Blocked)

Root cause: The CI automerge step failed with merge conflicts in drivers/gpu/drm/msm/dp/ files, preventing all checkers from running.

Failure details:

CONFLICT (content): Merge conflict in drivers/gpu/drm/msm/dp/dp_ctrl.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/msm/dp/dp_ctrl.h
CONFLICT (content): Merge conflict in drivers/gpu/drm/msm/dp/dp_display.c
Automatic merge failed; fix conflicts and then commit the result.

The CI workflow attempts to merge the PR branch with the integration baseline (topic/tech/mm/drm) before running checkers. This PR modifies three files in drivers/gpu/drm/msm/dp/ that have conflicting changes in the baseline.

Fix: Rebase the PR branch on the latest integration baseline to resolve conflicts:

# Fetch the latest baseline
git fetch origin topic/tech/mm/drm

# Rebase your branch
git rebase origin/topic/tech/mm/drm

# Resolve conflicts in:
#   - drivers/gpu/drm/msm/dp/dp_ctrl.c
#   - drivers/gpu/drm/msm/dp/dp_ctrl.h
#   - drivers/gpu/drm/msm/dp/dp_display.c

# For each conflicted file:
git add <file>
git rebase --continue

# Force-push the rebased branch
git push --force-with-lease

Reproduce locally:

git fetch origin topic/tech/mm/drm
git merge origin/topic/tech/mm/drm
# Conflicts will appear in the same three files

❌ tag-check

Root cause: Commit subjects use incorrect prefix format - Fromlist: (capitalized) instead of the required FROMLIST: (all caps), and commit 2/4 uses semicolon instead of colon.

Failure details:

Commit 1/4:

Subject: Fromlist: phy: qcom: qmp-combo: delay Type-C mux switch while DP PHY is initializing

❌ Uses Fromlist: instead of FROMLIST:

Commit 2/4:

Subject: Fromlist; drm/msm/dp: clear force_link_train flag when link training succeeds

❌ Uses Fromlist; (semicolon) instead of FROMLIST: (colon)

Commit 3/4:

Subject: Fromlist: drm/msm/dp: skip LTTPR init when no LTTPRs are present

❌ Uses Fromlist: instead of FROMLIST:

Commit 4/4:

Subject: Fromlist: drm/msm/dp: continue link training downgrade when cable is still plugged

❌ Uses Fromlist: instead of FROMLIST:

The required prefix tags are case-sensitive and must be in all caps: FROMLIST:, FROMGIT:, UPSTREAM:, BACKPORT:, QCLINUX:, PENDING:, or WORKAROUND:.

Fix: Amend each commit to use the correct prefix format:

# Interactive rebase to edit all 4 commits
git rebase -i HEAD~4

# Mark all 4 commits as 'reword' (or 'r')
# For each commit, change the subject line:

# Commit 1: Change "Fromlist:" to "FROMLIST:"
FROMLIST: phy: qcom: qmp-combo: delay Type-C mux switch while DP PHY is initializing

# Commit 2: Change "Fromlist;" to "FROMLIST:"
FROMLIST: drm/msm/dp: clear force_link_train flag when link training succeeds

# Commit 3: Change "Fromlist:" to "FROMLIST:"
FROMLIST: drm/msm/dp: skip LTTPR init when no LTTPRs are present

# Commit 4: Change "Fromlist:" to "FROMLIST:"
FROMLIST: drm/msm/dp: continue link training downgrade when cable is still plugged

# Complete the rebase
git rebase --continue

# Force-push the corrected commits
git push --force-with-lease

Reproduce locally:

git log --oneline -4
# Check each commit subject starts with FROMLIST: (all caps)

Verdict

2 blockers must be fixed before merge:

  1. Automerge conflicts — Rebase on origin/topic/tech/mm/drm and resolve conflicts in dp_ctrl.c, dp_ctrl.h, and dp_display.c
  2. Subject prefix format — Change all 4 commit subjects from Fromlist: to FROMLIST: (all caps), and fix commit 2's semicolon to colon

Once these are fixed, re-trigger CI to run all checkers (checkpatch, dt-binding-check, dtb-check, sparse-check, check-uapi-headers, check-patch-compliance).

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