Re: [PATCH] drm/i915/gsc: mei interrupt top half should be in irq disabled context

From: Rodrigo Vivi
Date: Mon Jun 30 2025 - 14:23:46 EST


On Fri, Apr 25, 2025 at 11:11:07PM +0800, Junxiao Chang wrote:
> MEI GSC interrupt comes from i915. It has top half and bottom half.
> Top half is called from i915 interrupt handler. It should be in
> irq disabled context.
>
> With RT kernel, by default i915 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 A380/A770 GPU boot hang issue with RT kernel.
>
> Fixes: 1e3dc1d8622b ("drm/i915/gsc: add gsc as a mei auxiliary device")
> Tested-by: Furong Zhou <furong.zhou@xxxxxxxxx>
> Suggested-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Signed-off-by: Junxiao Chang <junxiao.chang@xxxxxxxxx>
> ---
> drivers/gpu/drm/i915/gt/intel_gsc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gsc.c b/drivers/gpu/drm/i915/gt/intel_gsc.c
> index 1e925c75fb080..c43febc862dc3 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gsc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gsc.c
> @@ -284,7 +284,7 @@ static void gsc_irq_handler(struct intel_gt *gt, unsigned int intf_id)
> if (gt->gsc.intf[intf_id].irq < 0)
> return;
>
> - ret = generic_handle_irq(gt->gsc.intf[intf_id].irq);
> + ret = generic_handle_irq_safe(gt->gsc.intf[intf_id].irq);


Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
and pushed to drm-intel-gt-next

> if (ret)
> gt_err_ratelimited(gt, "error handling GSC irq: %d\n", ret);
> }
> --
> 2.34.1
>