Skip to content

drm/msm: split DPU core IRQ handler under CONFIG_PREEMPT_RT - #1738

Open
namathak wants to merge 1 commit into
qualcomm-linux:tech/mm/drmfrom
namathak:for-drm
Open

drm/msm: split DPU core IRQ handler under CONFIG_PREEMPT_RT#1738
namathak wants to merge 1 commit into
qualcomm-linux:tech/mm/drmfrom
namathak:for-drm

Conversation

@namathak

Copy link
Copy Markdown

On a PREEMPT_RT kernel, dpu_core_irq() runs as a true hardirq handler, but it dispatches per-encoder callbacks that take sleepable locks (spinlock_t becomes an rt_mutex on RT, and some DRM-core locks reached through vblank/CRC/writeback handling are sleepable as well). Sleeping inside a hardirq handler is not allowed and eventually crashes the display, which is what happens after running GLMark2 for a while.

Split dpu_core_irq() into a minimal hardirq handler that only acknowledges the hardware and records which interrupts fired, plus a new dpu_core_irq_thread() that performs the actual callback dispatch from a real, preemptible IRQ thread. This split only takes effect under CONFIG_PREEMPT_RT; non-RT kernels keep dispatching callbacks directly from dpu_core_irq() as before.

irq_lock is changed from spinlock_t to raw_spinlock_t unconditionally, since the hardirq handler needs a lock that never sleeps under RT, and raw_spinlock_t behaves the same as spinlock_t on non-RT kernels.

dpu_core_irq() itself now takes irq_lock with plain raw_spin_lock() instead of raw_spin_lock_irqsave(), dropping the irqsave/irqrestore pair it previously needed as a bottom-half-safe spinlock user. This is safe because dpu_core_irq() only ever runs as a primary IRQ handler (hardirq context on non-RT, forced-thread primary handler on RT), both of which are always entered with local IRQs already disabled by genirq before the handler is called, so there is nothing left for irqsave to save here. dpu_core_irq_read(), by contrast, is called from process context and still needs raw_spin_lock_irqsave().

Fixes: 25fdd59 ("drm/msm: Add SDM845 DPU support")
Cc: [email protected]

CRs-Fixed: 4642652

On a PREEMPT_RT kernel, dpu_core_irq() runs as a true hardirq handler,
but it dispatches per-encoder callbacks that take sleepable locks
(spinlock_t becomes an rt_mutex on RT, and some DRM-core locks reached
through vblank/CRC/writeback handling are sleepable as well). Sleeping
inside a hardirq handler is not allowed and eventually crashes the
display, which is what happens after running GLMark2 for a while.

Split dpu_core_irq() into a minimal hardirq handler that only
acknowledges the hardware and records which interrupts fired, plus a
new dpu_core_irq_thread() that performs the actual callback dispatch
from a real, preemptible IRQ thread. This split only takes effect
under CONFIG_PREEMPT_RT; non-RT kernels keep dispatching callbacks
directly from dpu_core_irq() as before.

irq_lock is changed from spinlock_t to raw_spinlock_t unconditionally,
since the hardirq handler needs a lock that never sleeps under RT, and
raw_spinlock_t behaves the same as spinlock_t on non-RT kernels.

dpu_core_irq() itself now takes irq_lock with plain raw_spin_lock()
instead of raw_spin_lock_irqsave(), dropping the irqsave/irqrestore
pair it previously needed as a bottom-half-safe spinlock user. This is
safe because dpu_core_irq() only ever runs as a primary IRQ handler
(hardirq context on non-RT, forced-thread primary handler on RT), both
of which are always entered with local IRQs already disabled by genirq
before the handler is called, so there is nothing left for irqsave to
save here. dpu_core_irq_read(), by contrast, is called from process
context and still needs raw_spin_lock_irqsave().

Fixes: 25fdd59 ("drm/msm: Add SDM845 DPU support")
Cc: [email protected]
Signed-off-by: Naman S Thaker <[email protected]>
@qcomlnxci
qcomlnxci requested review from a team, Rajesh Kemisetti (quic-rajeshk) and riteshk-quic and removed request for a team August 24, 2026 09:32
@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1738

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

# Error File:Line PR-introduced? Root Cause
1 Merge conflict during automerge drivers/gpu/drm/msm/dp/dp_ctrl.c No Pre-existing conflict between baseline integration branch and topic/tech/mm/drm
2 Merge conflict during automerge drivers/gpu/drm/msm/dp/dp_ctrl.h No Pre-existing conflict between baseline integration branch and topic/tech/mm/drm
3 Merge conflict during automerge drivers/gpu/drm/msm/dp/dp_display.c No Pre-existing conflict between baseline integration branch and topic/tech/mm/drm

Verdict

All 3 failures are pre-existing merge conflicts unrelated to this PR. The PR modifies only DPU IRQ handling code (dpu_core_irq.*, dpu_hw_interrupts.*, dpu_kms.c, msm_kms.*), while conflicts occur in unrelated DP (DisplayPort) driver files (dp_ctrl.*, dp_display.c). The build never reached compilation stage.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1738

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

# Error File:Line PR-introduced? Root Cause
1 Merge conflict drivers/gpu/drm/msm/dp/dp_ctrl.c No Pre-existing conflict between baseline and topic/tech/mm/drm branch
2 Merge conflict drivers/gpu/drm/msm/dp/dp_ctrl.h No Pre-existing conflict between baseline and topic/tech/mm/drm branch
3 Merge conflict drivers/gpu/drm/msm/dp/dp_display.c No Pre-existing conflict between baseline and topic/tech/mm/drm branch

Verdict

All 3 merge conflicts are pre-existing issues in the integration branch; none are introduced by this PR.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

PR #1738 — validate-patch

PR: #1738

Verdict Issues Detailed Report
0 Full report

Final Summary

  1. Lore link present: No — no lore.kernel.org Link tag found in commit message; required for upstream/backport validation
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — cannot determine without lore link; commit lacks required prefix (UPSTREAM:/FROMLIST:/BACKPORT:/QCLINUX:/PENDING:/WORKAROUND:)
  4. PR present in qcom-next/topics: Partial - 1/1 commit(s) only have partial integration evidence
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1738 - drm/msm: split DPU core IRQ handler under CONFIG_PREEMPT_RT only
Upstream commit: N/A
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream No upstream link to compare against; missing required prefix (UPSTREAM:/FROMLIST:/BACKPORT:/QCLINUX:/etc.)
Body preserves rationale N/A No upstream source to compare
Fixes tag present/correct Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") present
Authorship preserved N/A No upstream source to verify
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h Cannot validate without upstream reference
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c Cannot validate without upstream reference
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h Cannot validate without upstream reference
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c Cannot validate without upstream reference
drivers/gpu/drm/msm/msm_kms.c Cannot validate without upstream reference
drivers/gpu/drm/msm/msm_kms.h Cannot validate without upstream reference

Issues

Critical:

  1. No lore.kernel.org link found — The commit message lacks a Link: tag pointing to the upstream lore.kernel.org posting. This is required for all commits that originate from or are posted to the upstream mailing list.

  2. Missing commit prefix — The subject line lacks a required prefix indicating the commit's origin:

    • UPSTREAM: → merged into Linus's tree (requires lore or kernel.org commit link)
    • FROMLIST: → posted to mailing list, not yet merged (requires lore.kernel.org link)
    • BACKPORT: → upstream commit backported with modifications (requires original lore/upstream link)
    • QCLINUX: → vendor-only, no upstream equivalent (no link required)
    • PENDING: → work-in-progress, not yet posted (no link required)
    • WORKAROUND: → temporary fix, not suitable for upstream (no link required)
  3. Incomplete integration — Per integration_presence_report.md, this commit shows only "partial" evidence in qcom-next/topics (subject or partial tree match found, but full change not verified). This indicates the commit may not have landed completely or correctly in the integration branches.

Verdict

Do not merge. This commit cannot be validated because:

  1. It lacks the required lore.kernel.org link that would allow verification of upstream fidelity
  2. It lacks a commit prefix that would classify its origin and integration status
  3. It is not fully present in qcom-next or kernel-topics branches

Required actions before merge:

  • If this patch has been posted upstream, add FROMLIST: prefix and Link: https://lore.kernel.org/r/<message-id> tag
  • If this patch has been merged upstream, add UPSTREAM: prefix and the upstream commit link
  • If this is vendor-only work, add QCLINUX: prefix (no lore link needed)
  • If this is work-in-progress, add PENDING: prefix (no lore link needed)
  • Verify why the commit shows only partial presence in integration branches and ensure it lands completely

Final Summary

  1. Lore link present: No — no lore.kernel.org Link tag found in commit message; required for upstream/backport validation
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Unknown — cannot determine without lore link; commit lacks required prefix (UPSTREAM:/FROMLIST:/BACKPORT:/QCLINUX:/PENDING:/WORKAROUND:)
  4. PR present in qcom-next/topics: Partial — integration_presence_report.md shows "partial - subject or partial tree evidence found, but full change was not verified" (1/1 commits only 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: 3c1e80ceb9fb6978aa94bc0624e7c0003f3b4f6e
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/1 [PATCH] drm/msm: split DPU core IRQ handler under CONFIG_PREEMPT_RT 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: PARTIAL
present_commits: 0/1
partial_commits: 1/1
missing_commits: 0/1
topics_checked_for_commits: 1/1
final_summary: PR present in qcom-next/topics: Partial - 1/1 commit(s) only have partial integration evidence

@qlijarvis

Copy link
Copy Markdown

PR #1738 — checker-log-analyzer

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

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 N/A Skipped (target branch is qcom-next)

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1738 - drm/msm: split DPU core IRQ handler under CONFIG_PREEMPT_RT only
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/32712061578

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 N/A Skipped (target branch is qcom-next)

❌ All Checkers — Automerge Failure

Root cause: Merge conflicts when integrating PR #1738 with the baseline qcom-next branch and topic branch topic/tech/mm/drm.

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.
automerge returned non-zero; check logs for conflicts

Analysis:

The kernel-checkers CI workflow uses an automerge process to integrate the PR commit with:

  1. The baseline branch (qcom-next at tag 3c1e80ceb9fb6978aa94bc0624e7c0003f3b4f6e)
  2. Topic branches (specifically topic/tech/mm/drm)

This PR modifies DPU core IRQ handling in:

  • drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h
  • drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c
  • drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h
  • drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
  • drivers/gpu/drm/msm/msm_kms.c
  • drivers/gpu/drm/msm/msm_kms.h

However, the merge conflicts occurred in different files in the DP (DisplayPort) subsystem:

  • drivers/gpu/drm/msm/dp/dp_ctrl.c
  • drivers/gpu/drm/msm/dp/dp_ctrl.h
  • drivers/gpu/drm/msm/dp/dp_display.c

This indicates that the topic/tech/mm/drm branch contains changes to the DP subsystem that conflict with the baseline, not with this PR's changes. The PR itself does not touch any DP files.

This is a false failure — the PR is not the cause of the merge conflict. The conflict exists between the baseline qcom-next branch and the topic/tech/mm/drm topic branch that the CI attempts to merge together.

Fix:

This is not a PR-level issue. The merge conflict needs to be resolved at the integration/topic-branch level:

  1. Option A (Recommended): Resolve the conflict in the topic/tech/mm/drm branch:

    git checkout topic/tech/mm/drm
    git fetch baseline qcom-next
    git merge baseline/qcom-next
    # Resolve conflicts in dp_ctrl.c, dp_ctrl.h, dp_display.c
    git add drivers/gpu/drm/msm/dp/
    git commit
    git push
  2. Option B: Re-trigger CI after the topic branch conflict is resolved upstream.

  3. Option C: If this PR is urgent and the DP conflicts are unrelated, request that the CI be run without merging topic/tech/mm/drm, or merge this PR directly to qcom-next and let the topic branch maintainer rebase.

Reproduce locally:

# Clone and set up the integration environment
git clone https://github.com/qualcomm-linux/kernel.git
cd kernel
git remote add topic https://github.com/qualcomm-linux/kernel-topics.git
git fetch topic pull/1738/head:pr1738
git fetch origin qcom-next

# Attempt the same merge the CI does
git checkout -b test-integ qcom-next
git merge topic/tech/mm/drm
# This is where the conflict occurs (before even merging the PR)

Note on tag-check:
The target branch for this PR is qcom-next. According to the checker policy, subject-line prefix tags (FROMLIST:, UPSTREAM:, etc.) are not required for commits targeting qcom-next or qcom-next-staging. Therefore, the tag-check is correctly skipped (N/A).


Verdict

This PR cannot be evaluated by CI due to pre-existing merge conflicts in the integration environment.

The PR itself appears clean and does not introduce the conflicts. The conflicts are between the baseline qcom-next branch and the topic/tech/mm/drm topic branch in the DP subsystem, which this PR does not touch.

Recommended actions:

  1. Resolve the topic/tech/mm/drmqcom-next merge conflict in the DP files.
  2. Re-trigger CI after the topic branch is updated.
  3. Alternatively, merge this PR directly if the DP conflicts are unrelated and can be resolved separately.

Blocker: Integration-level merge conflict (not caused by this PR).

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