From: Junxiao Chang <junxiao.chang@intel.com>
To: 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>,
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
Subject: [PATCH] drm/i915/gsc: mei interrupt top half should be in irq disabled context
Date: Thu, 24 Apr 2025 14:56:08 +0800 [thread overview]
Message-ID: <20250424065609.624457-1-junxiao.chang@intel.com> (raw)
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. In this case, local IRQ
should be disabled for MEI GSC interrupt top half.
This change fixes A380/A770 GPU boot hang issue with RT kernel.
Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
---
drivers/gpu/drm/i915/gt/intel_gsc.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_gsc.c b/drivers/gpu/drm/i915/gt/intel_gsc.c
index 1e925c75fb080..9c72117263f78 100644
--- a/drivers/gpu/drm/i915/gt/intel_gsc.c
+++ b/drivers/gpu/drm/i915/gt/intel_gsc.c
@@ -270,6 +270,9 @@ static void gsc_init_one(struct drm_i915_private *i915, struct intel_gsc *gsc,
static void gsc_irq_handler(struct intel_gt *gt, unsigned int intf_id)
{
int ret;
+#ifdef CONFIG_PREEMPT_RT
+ int irq_disabled_flag;
+#endif
if (intf_id >= INTEL_GSC_NUM_INTERFACES) {
gt_warn_once(gt, "GSC irq: intf_id %d is out of range", intf_id);
@@ -284,7 +287,18 @@ static void gsc_irq_handler(struct intel_gt *gt, unsigned int intf_id)
if (gt->gsc.intf[intf_id].irq < 0)
return;
+#ifdef CONFIG_PREEMPT_RT
+ /* mei interrupt top half should run in irq disabled context */
+ irq_disabled_flag = irqs_disabled();
+ if (!irq_disabled_flag)
+ local_irq_disable();
+#endif
ret = generic_handle_irq(gt->gsc.intf[intf_id].irq);
+#ifdef CONFIG_PREEMPT_RT
+ if (!irq_disabled_flag)
+ local_irq_enable();
+#endif
+
if (ret)
gt_err_ratelimited(gt, "error handling GSC irq: %d\n", ret);
}
--
2.34.1
next reply other threads:[~2025-04-24 6:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 6:56 Junxiao Chang [this message]
2025-04-24 7:15 ` [PATCH] drm/i915/gsc: mei interrupt top half should be in irq disabled context 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-24 13:39 ` ✓ i915.CI.BAT: success for " Patchwork
2025-04-24 20:37 ` ✗ i915.CI.Full: failure " Patchwork
2025-04-25 6:04 ` [PATCH] " Junxiao Chang
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 7:29 ` ✗ i915.CI.BAT: failure for drm/i915/gsc: mei interrupt top half should be in irq disabled context (rev2) Patchwork
2025-04-25 12:04 ` [PATCH] drm/i915/gsc: mei interrupt top half should be in irq disabled context Junxiao Chang
2025-04-25 12:38 ` Sebastian Andrzej Siewior
2025-04-25 15:11 ` Junxiao Chang
2025-06-30 18:22 ` Rodrigo Vivi
2025-04-25 18:46 ` ✓ i915.CI.BAT: success for drm/i915/gsc: mei interrupt top half should be in irq disabled context (rev3) Patchwork
2025-04-25 19:38 ` ✓ i915.CI.BAT: success for drm/i915/gsc: mei interrupt top half should be in irq disabled context (rev4) Patchwork
2025-04-26 2:10 ` ✓ i915.CI.Full: " Patchwork
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=20250424065609.624457-1-junxiao.chang@intel.com \
--to=junxiao.chang@intel.com \
--cc=airlied@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--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=tursulin@ursulin.net \
/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