From: sashiko-bot@kernel.org
To: "Maarten Lankhorst" <dev@lankhorst.se>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 1/7] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock()
Date: Mon, 06 Jul 2026 10:56:16 +0000 [thread overview]
Message-ID: <20260706105617.3A36A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260706104043.726178-2-dev@lankhorst.se>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Removing local_irq_disable() re-enables interrupts before and during ELSP hardware writes, risking incomplete submissions and GPU hangs.
--
commit ff9840660b858aab1bd255c1588d895283bda28f
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock()
This commit replaces local_irq_disable() and spin_lock() with spin_lock_irq()
in the execlists submission path to improve PREEMPT_RT compatibility.
However, releasing the lock earlier in the function leaves the hardware ELSP
MMIO writes exposed to interrupts and preemption.
> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> index 1359fc9cb88ef..e11db81dca9c5 100644
> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
[ ... ]
> @@ -1588,7 +1588,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
> */
> sched_engine->queue_priority_hint = queue_prio(sched_engine);
> i915_sched_engine_reset_on_empty(sched_engine);
> - spin_unlock(&sched_engine->lock);
> + spin_unlock_irq(&sched_engine->lock);
[Severity: High]
Does this change leave the hardware ELSP writes exposed to interrupts and
preemption?
By removing local_irq_disable() around the entire execlists_dequeue() call
and replacing it with spin_lock_irq() internally, interrupts are now
re-enabled at this spin_unlock_irq() call.
This means the subsequent hardware writes in execlists_submit_ports() now
occur with interrupts enabled:
execlists_dequeue() {
...
spin_unlock_irq(&sched_engine->lock);
/* ... */
if (submit && ...) {
...
execlists_submit_ports(engine);
}
}
Since execlists_submit_ports() performs 4-DWord MMIO writes to the ELSP
that must remain strictly atomic, could being interrupted or preempted
during these writes result in incomplete context descriptors being fetched,
potentially causing GPU hangs?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260706104043.726178-1-dev@lankhorst.se?part=1
next prev parent reply other threads:[~2026-07-06 10:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 10:40 [PATCH v3 0/7] drm/i915: All fixes to make i915 work well with PREEMPT_RT Maarten Lankhorst
2026-07-06 10:40 ` [PATCH v3 1/7] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock() Maarten Lankhorst
2026-07-06 10:56 ` sashiko-bot [this message]
2026-07-06 10:40 ` [PATCH v3 2/7] drm/i915: Drop the irqs_disabled() check Maarten Lankhorst
2026-07-06 10:40 ` [PATCH v3 3/7] drm/i915/guc: Consider also RCU depth in busy loop Maarten Lankhorst
2026-07-06 10:40 ` [PATCH v3 4/7] drm/i915/gt: Fix selftests on PREEMPT_RT Maarten Lankhorst
2026-07-06 10:40 ` [PATCH v3 5/7] drm/i915/gt: Set stop_timeout() correctly on PREEMPT-RT Maarten Lankhorst
2026-07-06 10:40 ` [PATCH v3 6/7] drm/i915: Use sleeping selftests for igt_atomic on PREEMPT_RT Maarten Lankhorst
2026-07-06 10:40 ` [PATCH v3 7/7] drm/i915/gt: Use signalers_lock to prevent starvation of irq_work Maarten Lankhorst
2026-07-06 10:53 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260706105617.3A36A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.