[PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT

Runyu Xiao posted 1 patch 6 days, 3 hours ago
drivers/gpu/drm/i915/display/intel_lpe_audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
Posted by Runyu Xiao 6 days, 3 hours ago
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
Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
Posted by Sebastian Andrzej Siewior 5 days, 21 hours ago
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
Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
Posted by Maarten Lankhorst 5 days, 15 hours ago
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
Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
Posted by Jani Nikula 4 days, 19 hours ago
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
Re:Re: [PATCH v3] drm/i915/display: Fix intel_lpe_audio_irq_handler for PREEMPT-RT
Posted by Runyu Xiao 4 days, 14 hours ago
> 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
>