From: sashiko-bot@kernel.org
To: "Maarten Lankhorst" <dev@lankhorst.se>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock()
Date: Thu, 02 Jul 2026 08:27:06 +0000 [thread overview]
Message-ID: <20260702082707.0F3781F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260702080913.434121-2-dev@lankhorst.se>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Request submission to the ELSP hardware is executed with interrupts enabled, violating hardware constraints for tightly packed MMIO sequences and risking GPU hangs.
--
commit 03bdcff0829362b8c38fdcf058920884f728b511
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock()
This commit replaces the local_irq_disable() wrapper around
execlists_dequeue() with spin_lock_irq() inside the function, to resolve a
PREEMPT_RT incompatibility.
> 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);
>
> /*
> * We can skip poking the HW if we ended up with exactly the same set
> @@ -1614,13 +1614,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
> }
> }
>
> -static void execlists_dequeue_irq(struct intel_engine_cs *engine)
> -{
> - local_irq_disable(); /* Suspend interrupts across request submission */
> - execlists_dequeue(engine);
> - local_irq_enable(); /* flush irq_work (e.g. breadcrumb enabling) */
> -}
[Severity: High]
Does removing the local_irq_disable() wrapper leave the hardware submission
sequence exposed to interruptions?
In the original code, local_irq_disable() inside execlists_dequeue_irq()
protected the entire execlists_dequeue() function. Now that
spin_unlock_irq() is used instead, interrupts are re-enabled before the
function finishes:
spin_unlock_irq(&sched_engine->lock);
/* ... */
if (submit && ...) {
/* ... */
execlists_submit_ports(engine);
}
Because interrupts are now enabled prior to calling execlists_submit_ports(),
an interrupt or thread preemption event could occur during the ELSP MMIO
writes. Since the ELSP hardware requires tightly packed writes without
excessive delays, could this interruption cause a hardware state machine
timeout and result in a GPU hang?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702080913.434121-1-dev@lankhorst.se?part=1
next prev parent reply other threads:[~2026-07-02 8:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 8:09 [PATCH 0/7] drm/i915: All fixes to make i915 work well with PREEMPT_RT Maarten Lankhorst
2026-07-02 8:09 ` [PATCH 1/7] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock() Maarten Lankhorst
2026-07-02 8:27 ` sashiko-bot [this message]
2026-07-02 8:09 ` [PATCH 2/7] drm/i915: Drop the irqs_disabled() check Maarten Lankhorst
2026-07-02 8:09 ` [PATCH 3/7] drm/i915/guc: Consider also RCU depth in busy loop Maarten Lankhorst
2026-07-02 8:09 ` [PATCH 4/7] drm/i915/gt: Fix selftests on PREEMPT_RT Maarten Lankhorst
2026-07-02 8:09 ` [PATCH 5/7] drm/i915/gt: Set stop_timeout() correctly on PREEMPT-RT Maarten Lankhorst
2026-07-02 8:09 ` [PATCH 6/7] drm/i915: Use sleeping selftests for igt_atomic on PREEMPT_RT Maarten Lankhorst
2026-07-02 8:09 ` [PATCH 7/7] drm/i915/gt: Add a spinlock to prevent starvation of irq_work Maarten Lankhorst
2026-07-02 8:24 ` sashiko-bot
2026-07-02 12:42 ` ✗ i915.CI.BAT: failure for drm/i915: All fixes to make i915 work well with PREEMPT_RT Patchwork
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=20260702082707.0F3781F00A3D@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.