From: Andi Shyti <andi.shyti@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Andi Shyti <andi.shyti@kernel.org>,
Matt Roper <matthew.d.roper@intel.com>,
Nirmoy Das <nirmoy.das@intel.com>
Subject: [Intel-gfx] [PATCH v3] drm/i915: Make IRQ reset and postinstall multi-gt aware
Date: Mon, 17 Apr 2023 00:46:36 +0200 [thread overview]
Message-ID: <20230416224636.1207298-1-andi.shyti@linux.intel.com> (raw)
In multi-gt systems IRQs need to be reset and enabled per GT.
This might add some redundancy when handling interrupts for
engines that might not exist in every tile, but helps to keep the
code cleaner and more understandable.
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
Hi,
Following the most recent discussions, it appears that the
cleanest method for handling multi-GT interrupts in MTL is to
utilize for_each_gt in the reset and post-install functions.
Attempting to configure everything in one go requires addressing
certain exceptions, which could ultimately make the code appear
more complex and hacky. Moreover, the media-GT is managed while
configuring a different GT.
Thank you Daniele and Matt for the valuable exchange of opinions.
This patch has been tested on trybot and allows MTL to boot and
execute some BAT tests.
Andi
Changelog
=========
v2 -> v3
- keep GUnit irq initialization out of the for_each_gt() loop as
the media GT doesn't have a GUnit.
v1 -> v2
- improve description in the commit log.
drivers/gpu/drm/i915/i915_irq.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index b4dd6a5a536f9..eb185dc2e59a0 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2856,12 +2856,15 @@ static void gen11_irq_reset(struct drm_i915_private *dev_priv)
static void dg1_irq_reset(struct drm_i915_private *dev_priv)
{
- struct intel_gt *gt = to_gt(dev_priv);
- struct intel_uncore *uncore = gt->uncore;
+ struct intel_uncore *uncore = to_gt(dev_priv)->uncore;
+ struct intel_gt *gt;
+ unsigned int i;
dg1_master_intr_disable(dev_priv->uncore.regs);
- gen11_gt_irq_reset(gt);
+ for_each_gt(gt, dev_priv, i)
+ gen11_gt_irq_reset(gt);
+
gen11_display_irq_reset(dev_priv);
GEN3_IRQ_RESET(uncore, GEN11_GU_MISC_);
@@ -3643,11 +3646,13 @@ static void gen11_irq_postinstall(struct drm_i915_private *dev_priv)
static void dg1_irq_postinstall(struct drm_i915_private *dev_priv)
{
- struct intel_gt *gt = to_gt(dev_priv);
- struct intel_uncore *uncore = gt->uncore;
+ struct intel_uncore *uncore = to_gt(dev_priv)->uncore;
u32 gu_misc_masked = GEN11_GU_MISC_GSE;
+ struct intel_gt *gt;
+ unsigned int i;
- gen11_gt_irq_postinstall(gt);
+ for_each_gt(gt, dev_priv, i)
+ gen11_gt_irq_postinstall(gt);
GEN3_IRQ_INIT(uncore, GEN11_GU_MISC_, ~gu_misc_masked, gu_misc_masked);
--
2.39.2
next reply other threads:[~2023-04-16 22:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 22:46 Andi Shyti [this message]
2023-04-16 23:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Make IRQ reset and postinstall multi-gt aware (rev3) Patchwork
2023-04-17 1:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-04-17 13:22 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Make IRQ reset and postinstall multi-gt aware (rev4) Patchwork
2023-04-17 19:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Make IRQ reset and postinstall multi-gt aware (rev5) 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=20230416224636.1207298-1-andi.shyti@linux.intel.com \
--to=andi.shyti@linux.intel.com \
--cc=andi.shyti@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=nirmoy.das@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