* [PATCH] drm/me/gsc: mei interrupt top half should be in irq disabled context
@ 2025-11-07 3:31 Junxiao Chang
2025-11-06 7:16 ` Sebastian Andrzej Siewior
2025-12-11 9:42 ` Maarten Lankhorst
0 siblings, 2 replies; 4+ messages in thread
From: Junxiao Chang @ 2025-11-07 3:31 UTC (permalink / raw)
To: lucas.demarchi, thomas.hellstrom, rodrigo.vivi, airlied, simona,
bigeasy, clrkwllms, rostedt, daniele.ceraolospurio,
alexander.usyskin, intel-xe, dri-devel, linux-kernel,
linux-rt-devel
Cc: baoli.zhang, junxiao.chang
MEI GSC interrupt comes from i915 or xe driver. It has top half and
bottom half. Top half is called from i915/xe interrupt handler. It
should be in irq disabled context.
With RT kernel(PREEMPT_RT enabled), by default IRQ handler is in
threaded IRQ. MEI GSC top half might be in threaded IRQ context.
generic_handle_irq_safe API could be called from either IRQ or
process context, it disables local IRQ then calls MEI GSC interrupt
top half.
This change fixes B580 GPU boot issue with RT enabled.
Fixes: e02cea83d32d ("drm/xe/gsc: add Battlemage support")
Tested-by: Baoli Zhang <baoli.zhang@intel.com>
Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
---
drivers/gpu/drm/xe/xe_heci_gsc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c
index a415ca4887914..32d509b113915 100644
--- a/drivers/gpu/drm/xe/xe_heci_gsc.c
+++ b/drivers/gpu/drm/xe/xe_heci_gsc.c
@@ -221,7 +221,7 @@ void xe_heci_gsc_irq_handler(struct xe_device *xe, u32 iir)
if (xe->heci_gsc.irq < 0)
return;
- ret = generic_handle_irq(xe->heci_gsc.irq);
+ ret = generic_handle_irq_safe(xe->heci_gsc.irq);
if (ret)
drm_err_ratelimited(&xe->drm, "error handling GSC irq: %d\n", ret);
}
@@ -241,7 +241,7 @@ void xe_heci_csc_irq_handler(struct xe_device *xe, u32 iir)
if (xe->heci_gsc.irq < 0)
return;
- ret = generic_handle_irq(xe->heci_gsc.irq);
+ ret = generic_handle_irq_safe(xe->heci_gsc.irq);
if (ret)
drm_err_ratelimited(&xe->drm, "error handling GSC irq: %d\n", ret);
}
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] drm/me/gsc: mei interrupt top half should be in irq disabled context
2025-11-07 3:31 [PATCH] drm/me/gsc: mei interrupt top half should be in irq disabled context Junxiao Chang
@ 2025-11-06 7:16 ` Sebastian Andrzej Siewior
2025-11-06 8:20 ` Chang, Junxiao
2025-12-11 9:42 ` Maarten Lankhorst
1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-11-06 7:16 UTC (permalink / raw)
To: Junxiao Chang
Cc: lucas.demarchi, thomas.hellstrom, rodrigo.vivi, airlied, simona,
clrkwllms, rostedt, daniele.ceraolospurio, alexander.usyskin,
intel-xe, dri-devel, linux-kernel, linux-rt-devel, baoli.zhang
On 2025-11-07 11:31:52 [+0800], Junxiao Chang wrote:
> MEI GSC interrupt comes from i915 or xe driver. It has top half and
> bottom half. Top half is called from i915/xe interrupt handler. It
> should be in irq disabled context.
>
> With RT kernel(PREEMPT_RT enabled), by default IRQ handler is in
> threaded IRQ. MEI GSC top half might be in threaded IRQ context.
> generic_handle_irq_safe API could be called from either IRQ or
> process context, it disables local IRQ then calls MEI GSC interrupt
> top half.
>
> This change fixes B580 GPU boot issue with RT enabled.
>
> Fixes: e02cea83d32d ("drm/xe/gsc: add Battlemage support")
> Tested-by: Baoli Zhang <baoli.zhang@intel.com>
> Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
Sounds reasonable.
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
What about intel_lpe_audio_irq_handler() ?
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [PATCH] drm/me/gsc: mei interrupt top half should be in irq disabled context
2025-11-06 7:16 ` Sebastian Andrzej Siewior
@ 2025-11-06 8:20 ` Chang, Junxiao
0 siblings, 0 replies; 4+ messages in thread
From: Chang, Junxiao @ 2025-11-06 8:20 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: De Marchi, Lucas, thomas.hellstrom, Vivi, Rodrigo, airlied,
simona, clrkwllms, rostedt, Ceraolo Spurio, Daniele, Usyskin,
Alexander, intel-xe, dri-devel, linux-kernel, linux-rt-devel,
Zhang, Baoli
>From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>Sent: Thursday, November 6, 2025 3:16 PM
>What about intel_lpe_audio_irq_handler() ?
Good finding. I will try to reproduce the issue which looks like hdmi audio related. If it could be reproduced, a separate patch will be submitted to fix it. Thank you!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/me/gsc: mei interrupt top half should be in irq disabled context
2025-11-07 3:31 [PATCH] drm/me/gsc: mei interrupt top half should be in irq disabled context Junxiao Chang
2025-11-06 7:16 ` Sebastian Andrzej Siewior
@ 2025-12-11 9:42 ` Maarten Lankhorst
1 sibling, 0 replies; 4+ messages in thread
From: Maarten Lankhorst @ 2025-12-11 9:42 UTC (permalink / raw)
To: Junxiao Chang, lucas.demarchi, thomas.hellstrom, rodrigo.vivi,
airlied, simona, bigeasy, clrkwllms, rostedt,
daniele.ceraolospurio, alexander.usyskin, intel-xe, dri-devel,
linux-kernel, linux-rt-devel, Matthew Brost
Cc: baoli.zhang
Thanks for the patch, I pushed it.
I also added Matthew Brost's r-b, as I submitted this patch separately, and b4-am recognised it as the same patch.
Kind regards,
~Maarten Lankhorst
Den 2025-11-07 kl. 04:31, skrev Junxiao Chang:
> MEI GSC interrupt comes from i915 or xe driver. It has top half and
> bottom half. Top half is called from i915/xe interrupt handler. It
> should be in irq disabled context.
>
> With RT kernel(PREEMPT_RT enabled), by default IRQ handler is in
> threaded IRQ. MEI GSC top half might be in threaded IRQ context.
> generic_handle_irq_safe API could be called from either IRQ or
> process context, it disables local IRQ then calls MEI GSC interrupt
> top half.
>
> This change fixes B580 GPU boot issue with RT enabled.
>
> Fixes: e02cea83d32d ("drm/xe/gsc: add Battlemage support")
> Tested-by: Baoli Zhang <baoli.zhang@intel.com>
> Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
> ---
> drivers/gpu/drm/xe/xe_heci_gsc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_heci_gsc.c b/drivers/gpu/drm/xe/xe_heci_gsc.c
> index a415ca4887914..32d509b113915 100644
> --- a/drivers/gpu/drm/xe/xe_heci_gsc.c
> +++ b/drivers/gpu/drm/xe/xe_heci_gsc.c
> @@ -221,7 +221,7 @@ void xe_heci_gsc_irq_handler(struct xe_device *xe, u32 iir)
> if (xe->heci_gsc.irq < 0)
> return;
>
> - ret = generic_handle_irq(xe->heci_gsc.irq);
> + ret = generic_handle_irq_safe(xe->heci_gsc.irq);
> if (ret)
> drm_err_ratelimited(&xe->drm, "error handling GSC irq: %d\n", ret);
> }
> @@ -241,7 +241,7 @@ void xe_heci_csc_irq_handler(struct xe_device *xe, u32 iir)
> if (xe->heci_gsc.irq < 0)
> return;
>
> - ret = generic_handle_irq(xe->heci_gsc.irq);
> + ret = generic_handle_irq_safe(xe->heci_gsc.irq);
> if (ret)
> drm_err_ratelimited(&xe->drm, "error handling GSC irq: %d\n", ret);
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-11 9:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-07 3:31 [PATCH] drm/me/gsc: mei interrupt top half should be in irq disabled context Junxiao Chang
2025-11-06 7:16 ` Sebastian Andrzej Siewior
2025-11-06 8:20 ` Chang, Junxiao
2025-12-11 9:42 ` Maarten Lankhorst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®