* [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
@ 2026-06-02 0:45 Runyu Xiao
2026-06-02 6:29 ` Sebastian Andrzej Siewior
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Runyu Xiao @ 2026-06-02 0:45 UTC (permalink / raw)
To: jani.nikula, rodrigo.vivi
Cc: joonas.lahtinen, tursulin, airlied, simona, dev, bigeasy,
matthew.brost, uma.shankar, pierre-louis.bossart, jerome.anand,
tiwai, intel-gfx, dri-devel, linux-kernel, jianhao.xu, runyu.xiao
From: Maarten Lankhorst <dev@lankhorst.se>
The LPE audio interrupt comes from the i915 interrupt handler. It
should be in irq disabled context.
With PREEMPT_RT enabled, the IRQ handler is threaded.
Because intel_lpe_audio_irq_handler() may be called in threaded IRQ context,
generic_handle_irq_safe API disables the interrupts before calling LPE's
interrupt top half handler.
This fixes braswell audio issues with RT enabled.
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
---
v3:
- Rebase the standalone patch on Maarten Lankhorst's original fix
- Keep Maarten Lankhorst as author per Sebastian's feedback
- Carry forward Maarten's Reviewed-by tags
drivers/gpu/drm/i915/display/intel_lpe_audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_lpe_audio.c b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
index 42284e9928f2..ac1dfd592a9f 100644
--- a/drivers/gpu/drm/i915/display/intel_lpe_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_lpe_audio.c
@@ -263,7 +263,7 @@ void intel_lpe_audio_irq_handler(struct intel_display *display)
if (!HAS_LPE_AUDIO(display))
return;
- ret = generic_handle_irq(display->audio.lpe.irq);
+ ret = generic_handle_irq_safe(display->audio.lpe.irq);
if (ret)
drm_err_ratelimited(display->drm,
"error handling LPE audio irq: %d\n", ret);
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
2026-06-02 0:45 [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT Runyu Xiao
@ 2026-06-02 6:29 ` Sebastian Andrzej Siewior
2026-06-02 12:33 ` Maarten Lankhorst
2026-06-04 3:25 ` Claude review: " Claude Code Review Bot
2026-06-04 3:25 ` Claude Code Review Bot
2 siblings, 1 reply; 7+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-06-02 6:29 UTC (permalink / raw)
To: Runyu Xiao
Cc: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, airlied,
simona, dev, matthew.brost, uma.shankar, pierre-louis.bossart,
jerome.anand, tiwai, intel-gfx, dri-devel, linux-kernel,
jianhao.xu
On 2026-06-02 08:45:15 [+0800], Runyu Xiao wrote:
> From: Maarten Lankhorst <dev@lankhorst.se>
>
> The LPE audio interrupt comes from the i915 interrupt handler. It
> should be in irq disabled context.
>
> With PREEMPT_RT enabled, the IRQ handler is threaded.
> Because intel_lpe_audio_irq_handler() may be called in threaded IRQ context,
> generic_handle_irq_safe API disables the interrupts before calling LPE's
> interrupt top half handler.
>
> This fixes braswell audio issues with RT enabled.
>
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
2026-06-02 6:29 ` Sebastian Andrzej Siewior
@ 2026-06-02 12:33 ` Maarten Lankhorst
2026-06-03 8:27 ` Jani Nikula
0 siblings, 1 reply; 7+ messages in thread
From: Maarten Lankhorst @ 2026-06-02 12:33 UTC (permalink / raw)
To: Sebastian Andrzej Siewior, Runyu Xiao
Cc: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, airlied,
simona, matthew.brost, uma.shankar, pierre-louis.bossart,
jerome.anand, tiwai, intel-gfx, dri-devel, linux-kernel,
jianhao.xu
Thanks, pushed!
On 6/2/26 08:29, Sebastian Andrzej Siewior wrote:
> On 2026-06-02 08:45:15 [+0800], Runyu Xiao wrote:
>> From: Maarten Lankhorst <dev@lankhorst.se>
>>
>> The LPE audio interrupt comes from the i915 interrupt handler. It
>> should be in irq disabled context.
>>
>> With PREEMPT_RT enabled, the IRQ handler is threaded.
>> Because intel_lpe_audio_irq_handler() may be called in threaded IRQ context,
>> generic_handle_irq_safe API disables the interrupts before calling LPE's
>> interrupt top half handler.
>>
>> This fixes braswell audio issues with RT enabled.
>>
>> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
>> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
>
> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>
> Sebastian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
2026-06-02 12:33 ` Maarten Lankhorst
@ 2026-06-03 8:27 ` Jani Nikula
2026-06-03 13:28 ` Runyu Xiao
0 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2026-06-03 8:27 UTC (permalink / raw)
To: Maarten Lankhorst, Sebastian Andrzej Siewior, Runyu Xiao
Cc: rodrigo.vivi, joonas.lahtinen, tursulin, airlied, simona,
matthew.brost, uma.shankar, pierre-louis.bossart, jerome.anand,
tiwai, intel-gfx, dri-devel, linux-kernel, jianhao.xu
On Tue, 02 Jun 2026, Maarten Lankhorst <dev@lankhorst.se> wrote:
> Thanks, pushed!
Where are the CI results?
>
> On 6/2/26 08:29, Sebastian Andrzej Siewior wrote:
>> On 2026-06-02 08:45:15 [+0800], Runyu Xiao wrote:
>>> From: Maarten Lankhorst <dev@lankhorst.se>
>>>
>>> The LPE audio interrupt comes from the i915 interrupt handler. It
>>> should be in irq disabled context.
>>>
>>> With PREEMPT_RT enabled, the IRQ handler is threaded.
>>> Because intel_lpe_audio_irq_handler() may be called in threaded IRQ context,
>>> generic_handle_irq_safe API disables the interrupts before calling LPE's
>>> interrupt top half handler.
>>>
>>> This fixes braswell audio issues with RT enabled.
>>>
>>> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
>>> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
>>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>>> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
>>
>> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>>
>> Sebastian
>
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re:Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
2026-06-03 8:27 ` Jani Nikula
@ 2026-06-03 13:28 ` Runyu Xiao
0 siblings, 0 replies; 7+ messages in thread
From: Runyu Xiao @ 2026-06-03 13:28 UTC (permalink / raw)
To: Jani Nikula
Cc: Maarten Lankhorst, Sebastian Andrzej Siewior, rodrigo.vivi,
joonas.lahtinen, tursulin, airlied, simona, matthew.brost,
uma.shankar, pierre-louis.bossart, jerome.anand, tiwai, intel-gfx,
dri-devel, linux-kernel, jianhao.xu
> On Wed, 03 Jun 2026, Jani Nikula wrote:
> Where are the CI results?
Intel GFX pre-merge CI was not triggered for this submission.
Patchwork validation failed with:
"Address 'runyu.xiao@seu.edu.cn' is not on the allowlist, which prevents CI from being triggered for this patch."
I have already contacted i915-ci-infra@lists.freedesktop.org to request allowlisting for this address.
Sorry for the confusion.
Runyu
>>
>> On 6/2/26 08:29, Sebastian Andrzej Siewior wrote:
>>> On 2026-06-02 08:45:15 [+0800], Runyu Xiao wrote:
>>>> From: Maarten Lankhorst <dev@lankhorst.se>
>>>>
>>>> The LPE audio interrupt comes from the i915 interrupt handler. It
>>>> should be in irq disabled context.
>>>>
>>>> With PREEMPT_RT enabled, the IRQ handler is threaded.
>>>> Because intel_lpe_audio_irq_handler() may be called in threaded IRQ context,
>>>> generic_handle_irq_safe API disables the interrupts before calling LPE's
>>>> interrupt top half handler.
>>>>
>>>> This fixes braswell audio issues with RT enabled.
>>>>
>>>> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
>>>> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
>>>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>>>> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
>>>
>>> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>>>
>>> Sebastian
>>
>
>--
>Jani Nikula, Intel
>
>>
>> On 6/2/26 08:29, Sebastian Andrzej Siewior wrote:
>>> On 2026-06-02 08:45:15 [+0800], Runyu Xiao wrote:
>>>> From: Maarten Lankhorst <dev@lankhorst.se>
>>>>
>>>> The LPE audio interrupt comes from the i915 interrupt handler. It
>>>> should be in irq disabled context.
>>>>
>>>> With PREEMPT_RT enabled, the IRQ handler is threaded.
>>>> Because intel_lpe_audio_irq_handler() may be called in threaded IRQ context,
>>>> generic_handle_irq_safe API disables the interrupts before calling LPE's
>>>> interrupt top half handler.
>>>>
>>>> This fixes braswell audio issues with RT enabled.
>>>>
>>>> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
>>>> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
>>>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
>>>> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
>>>
>>> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>>>
>>> Sebastian
>>
>
>--
>Jani Nikula, Intel
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Claude review: drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
2026-06-02 0:45 [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT Runyu Xiao
2026-06-02 6:29 ` Sebastian Andrzej Siewior
@ 2026-06-04 3:25 ` Claude Code Review Bot
2026-06-04 3:25 ` Claude Code Review Bot
2 siblings, 0 replies; 7+ messages in thread
From: Claude Code Review Bot @ 2026-06-04 3:25 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
Author: Runyu Xiao <runyu.xiao@seu.edu.cn>
Patches: 4
Reviewed: 2026-06-04T13:25:57.081447
---
This is a single-patch fix (v3) that replaces `generic_handle_irq()` with `generic_handle_irq_safe()` in the LPE audio IRQ forwarding path. The change is correct and well-motivated: on PREEMPT_RT kernels, i915's IRQ handler runs in threaded context (not hard IRQ context), so `generic_handle_irq()` — which requires hard IRQ context — is inappropriate. `generic_handle_irq_safe()` wraps the call with `local_irq_save()`/`local_irq_restore()`, making it safe from any context.
The fix is minimal, one-line, and uses the correct upstream API. The commit message accurately describes the problem and the solution. The current drm-next tree still has `generic_handle_irq()` at line 265, confirming this fix is still needed.
**One process concern:** The Signed-off-by chain has Maarten Lankhorst as From/author with his own Signed-off-by, then Runyu Xiao's Signed-off-by as the submitter. The v3 changelog says this is a rebase of Maarten's original fix. The Reviewed-by tags from Matthew Brost and Uma Shankar are carried forward — this is acceptable if the patch content hasn't materially changed from what they reviewed, which appears to be the case (same one-line change).
**Verdict: Looks good.** This is a straightforward, correct RT fix.
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Claude review: drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
2026-06-02 0:45 [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT Runyu Xiao
2026-06-02 6:29 ` Sebastian Andrzej Siewior
2026-06-04 3:25 ` Claude review: " Claude Code Review Bot
@ 2026-06-04 3:25 ` Claude Code Review Bot
2 siblings, 0 replies; 7+ messages in thread
From: Claude Code Review Bot @ 2026-06-04 3:25 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Change:**
```c
- ret = generic_handle_irq(display->audio.lpe.irq);
+ ret = generic_handle_irq_safe(display->audio.lpe.irq);
```
**Analysis:**
- **Correctness:** The fix is correct. `generic_handle_irq()` requires hard IRQ context (per its documentation: "must be called from an IRQ context with irq regs initialized"). On PREEMPT_RT, the i915 interrupt handler is force-threaded, so it runs in process context. `generic_handle_irq_safe()` explicitly handles this by doing `local_irq_save()`/`local_irq_restore()` around the actual handler dispatch (confirmed at `kernel/irq/irqdesc.c:710-712`), making it callable from any context.
- **No functional regression on non-RT:** On non-RT kernels where the handler already runs in hard IRQ context, interrupts are already disabled, so the `local_irq_save()`/`local_irq_restore()` in `generic_handle_irq_safe()` is a no-op — no performance or behavioral difference.
- **Scope:** The change is appropriately minimal. Only this one call site in `intel_lpe_audio_irq_handler()` needs the fix — the caller is the i915 IRQ handler chain, and this is the point where IRQs get forwarded to the LPE audio chained IRQ chip.
- **Commit message:** Accurate and clear. Correctly identifies the PREEMPT_RT threading issue and the Braswell audio platform affected.
**No issues found.**
Reviewed-by worthy as-is.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-06-04 3:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 0:45 [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT Runyu Xiao
2026-06-02 6:29 ` Sebastian Andrzej Siewior
2026-06-02 12:33 ` Maarten Lankhorst
2026-06-03 8:27 ` Jani Nikula
2026-06-03 13:28 ` Runyu Xiao
2026-06-04 3:25 ` Claude review: " Claude Code Review Bot
2026-06-04 3:25 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox