From: Junxiao Chang <junxiao.chang@intel.com>
To: tomas.winkler@intel.com,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Vitaly Lubart <vitaly.lubart@intel.com>,
Alexander Usyskin <alexander.usyskin@intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Cc: junxiao.chang@intel.com, furong.zhou@intel.com
Subject: [PATCH] drm/i915/gsc: mei interrupt top half should be in irq disabled context
Date: Fri, 25 Apr 2025 14:04:54 +0800 [thread overview]
Message-ID: <20250425060455.641008-1-junxiao.chang@intel.com> (raw)
In-Reply-To: <20250424065609.624457-1-junxiao.chang@intel.com>
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@intel.com>
Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
---
drivers/gpu/drm/i915/gt/intel_gsc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gsc.c b/drivers/gpu/drm/i915/gt/intel_gsc.c
index 1e925c75fb080..a099d885508ac 100644
--- a/drivers/gpu/drm/i915/gt/intel_gsc.c
+++ b/drivers/gpu/drm/i915/gt/intel_gsc.c
@@ -284,7 +284,9 @@ 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);
+ /* It can be called in both irq context and in thread context */
+ ret = generic_handle_irq_safe(gt->gsc.intf[intf_id].irq);
+
if (ret)
gt_err_ratelimited(gt, "error handling GSC irq: %d\n", ret);
}
--
2.34.1
next prev parent reply other threads:[~2025-04-25 6:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 6:56 [PATCH] drm/i915/gsc: mei interrupt top half should be in irq disabled context Junxiao Chang
2025-04-24 7:15 ` Sebastian Andrzej Siewior
2025-04-24 7:30 ` Jani Nikula
2025-04-24 10:53 ` Chang, Junxiao
2025-04-24 11:07 ` Sebastian Andrzej Siewior
2025-04-25 6:04 ` Junxiao Chang [this message]
2025-04-25 8:00 ` Jani Nikula
2025-04-25 8:33 ` Chang, Junxiao
2025-04-25 8:27 ` Sebastian Andrzej Siewior
2025-04-25 12:04 ` Junxiao Chang
2025-04-25 12:38 ` Sebastian Andrzej Siewior
2025-04-25 15:11 ` Junxiao Chang
2025-06-30 18:22 ` Rodrigo Vivi
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=20250425060455.641008-1-junxiao.chang@intel.com \
--to=junxiao.chang@intel.com \
--cc=airlied@gmail.com \
--cc=alexander.usyskin@intel.com \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=daniele.ceraolospurio@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=furong.zhou@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=rodrigo.vivi@intel.com \
--cc=rostedt@goodmis.org \
--cc=simona@ffwll.ch \
--cc=tomas.winkler@intel.com \
--cc=tursulin@ursulin.net \
--cc=vitaly.lubart@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).