Skip to content

drm/msm/dpu: fix pipe ordering for source-split planes - #1258

Open
quicmahap wants to merge 10 commits into
qualcomm-linux:qcom-6.18.yfrom
quicmahap:drm-lm-fixes-v4-2.0
Open

quicmahap wants to merge 10 commits into
qualcomm-linux:qcom-6.18.yfrom
quicmahap:drm-lm-fixes-v4-2.0

Conversation

@quicmahap

@quicmahap quicmahap commented Oct 8, 2026 •

Copy link
Copy Markdown

CRs-Fixed: 4703533

This PR carries the existing 6-commit layer-mixer (LM) allocation and mode-limit series, followed by the 4-commit pipe-ordering fix.

LM series:

  • drm/msm/dpu: split modes a single layer mixer cannot clock
  • drm/msm/dpu: do not assume a merged datapath when validating mode clock
  • drm/msm/dpu: check mode against PINGPONG or DSC max width
  • drm/msm/dpu: filter writeback modes using writeback maxlinewidth
  • drm/msm/dpu: remove max_mixer_width from catalog
  • drm/msm/dpu: limit the mode width to a pipe if the LM has no source split

LM series: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-0-fa986071c3c1@oss.qualcomm.com/

Pipe-ordering series:

  • Keep SSPP priority order for split planes on DPU < 5.0
  • Add SSPP operation to program source split order
  • Program source split order for split planes
  • Add source split order operation for DPU 13.x

Pipe-ordering series: https://lore.kernel.org/all/20261010-pipe_order-v1-0-9d8bd29fd78a@oss.qualcomm.com/

Mahadevan P and others added 6 commits October 8, 2026 23:52
The layer mixer count is picked purely from the mode width, via the
MAX_HDISPLAY_SPLIT threshold. Width is only half of what constrains a
mixer: it also processes one pixel per core clock cycle, so a mode narrow
enough to stay under the width threshold can still demand a higher pixel
rate than one mixer sustains. A 1080 wide panel at a few hundred Hz is
enough to get there.

Such a mode is currently given a single mixer and then has to be clocked
past the maximum core clock rate, which that mixer cannot do.

Factor the decision out into dpu_crtc_num_lm_for_mode() and have it ask
for a second mixer when the adjusted mode clock does not fit the maximum
core clock rate, in addition to the existing width test. Modes that
already fit within one mixer are unaffected, so the only decisions that
change are the ones that could not be driven as they were.

Assisted-by: LLM
Link: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-1-fa986071c3c1@oss.qualcomm.com/
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
…g mode clock

dpu_crtc_mode_valid() halves the adjusted mode clock whenever the
hardware has a 3d_mux block, assuming the mode will be driven by two
layer mixers. Modes no wider than MAX_HDISPLAY_SPLIT are driven by a
single mixer, so for those the check permits twice the pixel rate the
datapath can sustain.

Divide by the mixer count the mode will really be driven by, as reported
by dpu_crtc_num_lm_for_mode(). Split modes still get the halved rate,
single mixer modes are held to what one mixer sustains, and parts
without a 3d_mux divide by one.

Assisted-by: LLM
Link: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-2-fa986071c3c1@oss.qualcomm.com/
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
LM block doesn't have a hardware buffer (unlike PINGPONG and DSC
encoders). As such, don't use ephemeral max_mixer_width and
MAX_HDISPLAY_SPLIT to validate requested modes. Instead use PP and DSC
buffer widths.

While on the DPU 8.x+ supports a max linewidth of 8960 for PINGPONG_0,
there is some additional logic that needs to be added to the resource
manager to specifically try and reserve PINGPONG_0 for modes that are
greater than 5k.

The layer-mixer count for a merge-capable, non-DSC mode is chosen by
dpu_crtc_num_lm_for_mode(); feed the PINGPONG/DSC derived width to it as
the split threshold in place of the removed MAX_HDISPLAY_SPLIT, so the
pixel-rate floor added earlier keeps high-refresh modes that now fit
within a single PINGPONG buffer split across two mixers.

[MP: rebased on msm-next; fed PINGPONG/DSC width into
 dpu_crtc_num_lm_for_mode() instead of open-coding the width test]

Link: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-3-fa986071c3c1@oss.qualcomm.com/
Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
Tested-by: Xilin Wu <sophon@radxa.com>
[DB: reworked to drop catalog changes, updated commit message]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
…width

Maximum width of the writeback mode is limited by the hardware buffer in
the WB block rather than by the LM properties (LM doesn't have an actual
buffer). Use the actual hardware limit (the writeback maxlinewidth) to
filter modes.

Link: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-4-fa986071c3c1@oss.qualcomm.com/
Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
[DB: fixed commit message]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
Remove the now-unused max_mixer_width field from the HW catalog. It
doesn't represent an actual hardware constraint.

[MP: rebased on msm-next; also drop the field from the milos,
 eliza and kaanapali catalogs added since v3]

Link: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-5-fa986071c3c1@oss.qualcomm.com/
Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[Mahadevan: dropped dpu_10_2_milos.h and dpu_12_4_eliza.h hunks, not present in qcom-6.18.y]
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
…o source split

Layer mixers without DPU_MIXER_SOURCESPLIT stage one pipe per blend level,
so a plane is fetched by a single pipe of at most max_linewidth pixels.

max_mixer_width used to reject wider modes. Now that the mode is checked
against the PINGPONG width (4096/5120), keep max_linewidth as an extra
bound when source split isn't available.

Assisted-by: LLM
Link: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-6-fa986071c3c1@oss.qualcomm.com/
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4703533 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4703533
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qlijarvis

Copy link
Copy Markdown

PR #1258 — validate-patch

PR: #1258

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — all 6 commits link to https://lore.kernel.org/all/20261008-lm_fixes_final-v4-{1..6}-fa986071c3c1@oss.qualcomm.com/
  2. Lore link matches PR commits: Yes — diff content faithful; line number shifts are context-only; commit 5 backport adaptations documented
  3. Upstream patch status: ⏳ In review — Reviewed-by: Dmitry Baryshkov present; no merge/NAK signal yet (posted Oct 8, 2026)
  4. PR present in qcom-next/topics: Fail - 3/6 commit(s) are missing from both qcom-next and topics
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1258 - drm/msm/dpu: rework layer mixer allocation and mode limits (6 commits)
Upstream commits: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-0-fa986071c3c1@oss.qualcomm.com/
Verdict: ⚠️ PARTIAL

Commit Message

Check Status Note
Subject matches upstream ✅ All 6 commits preserve upstream subjects with correct FROMLIST:/BACKPORT: prefixes
Body preserves rationale ✅ Technical rationale and problem description preserved faithfully
Fixes tag present/correct N/A No Fixes tags in upstream or PR (new feature work, not bug fixes)
Authorship preserved ⚠️ Commit 5: PR has From: Jessica Zhang <jesszhan0024@gmail.com> but lore shows From: Mahadevan P as series submitter; Jessica is original author in commit body
Backport note (if applicable) ✅ Commit 5 (BACKPORT) includes [MP: rebased on msm-next...] and [Mahadevan: dropped dpu_10_2_milos.h...] notes documenting adaptations

Diff

File Status Notes
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c ✅ Code changes match lore patches; line number shifts (1365 vs 1376) are context-only deltas
drivers/gpu/drm/msm/disp/dpu1/catalog/*.h ✅ Commit 5 removes max_mixer_width from 31 catalog files; PR drops 2 files not present in qcom-6.18.y per backport note
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h ✅ Struct field removal matches upstream

Issues

Commit 5 authorship (BACKPORT prefix):
The lore series v4 is submitted by Mahadevan P (From: Mahadevan P), but patch 5/6 in the series body shows From: Jessica Zhang as the original author with Dmitry Baryshkov's sign-off chain. The PR commit correctly uses From: Jessica Zhang <jesszhan0024@gmail.com> to preserve original authorship per BACKPORT rules. However, the lore mbox shows Mahadevan as the series submitter in the email headers. This is acceptable for BACKPORT: the original author (Jessica) is in From:, and the backporter (Mahadevan) adds their Signed-off-by: and backport notes.

Integration presence:
Per integration_presence_report.md, 3/6 commits are missing from both qcom-next and topics, 3/6 show partial evidence. This is a validation concern: patches should land in qcom-next or topics before being merged into qcom-6.18.y.

Verdict

Merge with caution. Diff content is faithful to lore v4. Commit messages preserve rationale and include proper backport notes. Authorship follows BACKPORT conventions. However:

  1. Upstream status: Patches posted Oct 8, 2026 (v4); have Reviewed-by: Dmitry Baryshkov but no maintainer merge confirmation yet. Status: ⏳ Decision Pending (under review, < 3 days old).
  2. Integration presence: 3/6 commits missing from qcom-next/topics per deterministic check. Recommend waiting for qcom-next landing before merging to qcom-6.18.y.

Final Summary

  1. Lore link present: Yes — all 6 commits link to https://lore.kernel.org/all/20261008-lm_fixes_final-v4-{1..6}-fa986071c3c1@oss.qualcomm.com/
  2. Lore link matches PR commits: Yes — diff content faithful; line number shifts are context-only; commit 5 backport adaptations documented
  3. Upstream patch status: ⏳ In review — Reviewed-by: Dmitry Baryshkov present; no merge/NAK signal yet (posted Oct 8, 2026)
  4. PR present in qcom-next/topics: Fail — 3/6 commits missing from both qcom-next and topics per integration_presence_report.md

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/6 [PATCH 1/6] FROMLIST: drm/msm/dpu: split modes a single layer mixer 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
2/6 [PATCH 2/6] FROMLIST: drm/msm/dpu: do not assume a merged datapath missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing
3/6 [PATCH 3/6] FROMLIST: drm/msm/dpu: check mode against PINGPONG or DSC 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/6 [PATCH 4/6] FROMLIST: drm/msm/dpu: filter writeback modes using missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing
5/6 [PATCH 5/6] BACKPORT: drm/msm/dpu: remove max_mixer_width from missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing
6/6 [PATCH 6/6] FROMLIST: drm/msm/dpu: limit the mode width to a pipe if 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

Final Status

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

@qlijarvis

Copy link
Copy Markdown

PR #1258 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ❌ 6 warnings across all commits
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Content mismatch on commit 5/6
tag-check ✅ All commits have valid prefixes

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1258 - drm/msm/dpu: split modes a single layer mixer cannot clock
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/37824207834
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch ❌ 6 warnings across all commits
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Content mismatch on commit 5/6
tag-check ✅ All commits have valid prefixes

❌ checkpatch

Root cause: Two types of warnings across 6 commits: (1) malformed Assisted-by: trailer format in 3 commits, and (2) From:/Signed-off-by: email mismatch in 4 commits.

Failure details:

Issue 1: Assisted-by format (commits 1, 2, 6):

WARNING: Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format
#23: 
Assisted-by: LLM

Commits affected:
- c20b5b37f6a5 "FROMLIST: drm/msm/dpu: split modes a single layer mixer cannot clock"
- d1f71e6cac68 "FROMLIST: drm/msm/dpu: do not assume a merged datapath when validating mode clock"
- 4aa596b05346 "FROMLIST: drm/msm/dpu: limit the mode width to a pipe if the LM has no source split"

Issue 2: From/Signed-off-by email mismatch (commits 3, 4, 5, 6):

WARNING: From:/Signed-off-by: email address mismatch: 
  'From: Jessica Zhang <jesszhan0024@gmail.com>' != 
  'Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>'

Commits affected:
- f6171e566cfb "FROMLIST: drm/msm/dpu: check mode against PINGPONG or DSC max width"
- 69b8d1ad1967 "FROMLIST: drm/msm/dpu: filter writeback modes using writeback maxlinewidth"
- 42245e3cd0d0 "BACKPORT: drm/msm/dpu: remove max_mixer_width from catalog"

Fix:

For Assisted-by format issue:

git rebase -i f19f3cdab691  # mark commits c20b5b37, d1f71e6cac68, 4aa596b05346 as 'edit'
# For each commit, update the Assisted-by trailer to proper format:
# Change: Assisted-by: LLM
# To:     Assisted-by: Codex:gpt-4 [checkpatch] [sparse]
# (or remove the trailer entirely if not needed)
git commit --amend
git rebase --continue

For From/Signed-off-by mismatch:

This warning indicates the patch author's email (From:) differs from the Signed-off-by: email. This is acceptable when backporting patches from upstream where the original author used a different email. The warning is informational and does not block merge.

However, if you want to silence it, you can either:

  1. Change the From: line to match the Signed-off-by: email (if Jessica Zhang's corporate email is the correct identity)
  2. Or add an additional Signed-off-by: with the original email to preserve the chain

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git f19f3cdab691..4aa596b05346

❌ check-patch-compliance

Root cause: Commit 5/6 (BACKPORT: drm/msm/dpu: remove max_mixer_width from catalog) has content differences from the upstream patch linked in the commit message.

Failure details:

Checking commit: BACKPORT: drm/msm/dpu: remove max_mixer_width from catalog
Change is different from the one mentioned in Link

The commit message includes:

Link: https://lore.kernel.org/all/20261008-lm_fixes_final-v4-5-fa986071c3c1@oss.qualcomm.com/

And notes in the commit body:

[MP: rebased on msm-next; also drop the field from the milos,
 eliza and kaanapali catalogs added since v3]
...
[Mahadevan: dropped dpu_10_2_milos.h and dpu_12_4_eliza.h hunks, not present in qcom-6.18.y]

Analysis:

This is a BACKPORT commit (correctly prefixed), and the commit message explicitly documents the adaptations made during backport:

  • Rebased on msm-next
  • Dropped hunks for dpu_10_2_milos.h and dpu_12_4_eliza.h (not present in qcom-6.18.y)
  • Also dropped the field from milos, eliza, and kaanapali catalogs

The check-patch-compliance checker compares the patch content against the upstream lore link and flags any differences. Since this is a BACKPORT with documented adaptations, the content mismatch is expected and acceptable.

Fix:

No action required. The BACKPORT: prefix correctly signals that this patch has been adapted from upstream. The commit message documents the specific changes made during backport. This is the correct workflow for backported patches with necessary modifications.

The checker limitation is that it flags all content mismatches, even for BACKPORT: commits where differences are expected and documented.

Reproduce locally:

b4 am --single-message -C -l -3 https://lore.kernel.org/all/20261008-lm_fixes_final-v4-5-fa986071c3c1@oss.qualcomm.com/ -o /tmp/upstream
git format-patch -1 42245e3cd0d0 --stdout > /tmp/backport.patch
# Compare the two patches to verify documented changes

✅ tag-check

Status: PASS

All 6 commits have valid subject-line prefixes as required for the qcom-6.18.y branch:

  • Commits 1-4, 6: FROMLIST: (posted to mailing list)
  • Commit 5: BACKPORT: (backported with modifications)

The target branch qcom-6.18.y is not qcom-next or qcom-next-staging, so subject-line prefix tags are mandatory. All commits comply.


Verdict

2 non-blocking issues to address before merge:

  1. checkpatch - Assisted-by format (3 commits): Fix the Assisted-by: trailer format or remove it. This is a style issue but should be corrected for consistency.

  2. checkpatch - From/Signed-off-by mismatch (4 commits): This is informational only and acceptable for backported patches. The original author (Jessica Zhang) used jesszhan0024@gmail.com upstream and jessica.zhang@oss.qualcomm.com in the backport. No action required unless you want to silence the warning.

  3. check-patch-compliance - Content mismatch (commit 5): This is expected and acceptable for a BACKPORT: commit with documented adaptations. No action required.

Recommendation: Fix the Assisted-by: format issue in commits 1, 2, and 6. The other warnings are acceptable for backported patches and do not block merge.

Mahadevan P added 4 commits October 10, 2026 19:22
Before DPU 5.0, the layer mixer places the higher priority SSPP on
the left of a source-split pair. Priority follows the SSPP index
(VIG, RGB, DMA), while allocation prefers DMA, RGB, then VIG.

Swap the two SSPPs when the right one has the lower index. Both are
reserved with the same requirements. Same-SSPP parallel multirect
already puts RECT_0, the higher priority rectangle, on the left.

Fixes: 8c62a31 ("drm/msm/dpu: allow using two SSPP blocks for a single plane")
Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
DPU 5.0 introduced SRC_SPLIT_ORDER in bit 4 of SSPP_SRC_OP_MODE and
SSPP_SRC_OP_MODE_REC1. For source-split pairs using legacy CTL routing,
this field identifies the left source with 0 and the right source with 1.

Add a setup_src_split_order() operation for the SSPP register layout
used on DPU 5.0 through 12.x. Select SSPP_SRC_OP_MODE for SOLO or RECT0
and SSPP_SRC_OP_MODE_REC1 for RECT1, and update only the ordering bit.

Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
Virtual planes can use two SSPPs when a plane exceeds the single-pipe
width or clock limit and parallel multirect cannot be used.

Program SRC_SPLIT_ORDER during mixer setup from the pipes' destination
X positions. Set the bit for the right source and clear it for the
left source or a source without a sibling.

Fixes: 8c62a31 ("drm/msm/dpu: allow using two SSPP blocks for a single plane")
Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
DPU 13.x places the SSPP op-mode register in separate REC0 and REC1
banks. Add the source split order operation for this layout, using
the shared helper to update SRC_SPLIT_ORDER in the selected bank.

Assisted-by: LLM
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
@quicmahap quicmahap changed the title drm/msm/dpu: rework layer mixer allocation and mode limits drm/msm/dpu: fix pipe ordering for source-split planes Oct 10, 2026
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