Skip to contentSkip to conversation

drm/i915: Make IRQ reset and postinstall multi-gt aware

PATCH Superseded Andi Shyti 3 participants 3 messages Apr 17, 2023

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Andi Shyti

author
#0 lore raw

PATCH v4 1/1 drm/i915: Make IRQ reset and postinstall multi-gt aware

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.

Cc Tvrtko Ursulin <[email protected]>

---
Hi,

The rsults of this patch are more than promising as we are able to have MTL booting and executing basic tests.(*)

Thank you Daniele and Matt for the valuable exchange of opinions.

Amdo

(*) https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v5/index.html?

Changelog
=========
v3 -> v4
- do not change the initial gt and uncore initialization in order to gain a better understanding at a glance of the purpose of all the local variables.
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 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +7 -2
index dea1a117f3fa1..c027fd5189b85 100644
@@ -2858,10 +2858,13 @@ 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;
+	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_);
@@ -3646,8 +3649,10 @@ 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;
 	u32 gu_misc_masked = GEN11_GU_MISC_GSE;
+	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);
 
Signature · 1 line
2.39.2
Reviewed-by on v4 1/1
#1 lore raw
Quoted 18 lines · Andi Shyti

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.

Cc Tvrtko Ursulin <[email protected]>

---
Hi,

The rsults of this patch are more than promising as we are able to have MTL booting and executing basic tests.(*)

Thank you Daniele and Matt for the valuable exchange of opinions.

Amdo

Quoted 8 lines

(*) https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v5/index.html?

Changelog
=========
v3 -> v4
- do not change the initial gt and uncore initialization in order to gain a better understanding at a glance of the purpose of all the local variables.

I think I may not have explained myself well on the previous feedback here. What I meant was that rather than doing

        struct intel_uncore *uncore = to_gt(dev_priv)->uncore;

as you were in the previous rev, you can simply do

        struct intel_uncore *uncore = dev_priv->uncore;

because gt0's uncore pointer is always the same as dev_priv's. Since we're using the uncore variable to access display-specific gunit stuff I figured that was slightly more clear to the reader to take the device-level pointer rather than grabbing it from any of the GTs.

That said, using "uncore = gt->uncore" as you have in this version doesn't cause any real problems since the actual registers being accessed are sgunit registers and thus don't get translated by GSI offset. You still wind up at the same sgunit register offsets on MTL no matter which GT you grab an uncore from, and display/gunit isn't something that PVC even needs to worry about. So

Quoted 43 lines

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 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +7 -2
index dea1a117f3fa1..c027fd5189b85 100644
@@ -2858,10 +2858,13 @@ 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;
+	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_);
@@ -3646,8 +3649,10 @@ 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;
 	u32 gu_misc_masked = GEN11_GU_MISC_GSE;
+	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);
 
Signature · 1 line
2.39.2
Signature · 4 lines
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Make IRQ reset and postinstall multi-gt aware (rev6)

In reply to Andi Shyti
== Series Details ==

== Series Details ==

Series: drm/i915: Make IRQ reset and postinstall multi-gt aware (rev6)
URL : https://patchwork.freedesktop.org/series/115465/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13023 -> Patchwork_115465v6
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/index.html

Participating hosts (38 -> 36)
------------------------------

Missing (2): fi-kbl-soraka fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_115465v6:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@debugfs_test@basic-hwmon:
- {bat-mtlp-8}: NOTRUN -> [SKIP][1] +40 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-mtlp-8/igt@[email protected]

* igt@i915_selftest@live@gt_mocs:
- {bat-mtlp-8}: NOTRUN -> [ABORT][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-mtlp-8/igt@i915_selftest@live@gt_mocs.html

* igt@kms_frontbuffer_tracking@basic:
- {bat-mtlp-8}: NOTRUN -> [DMESG-FAIL][3] +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-mtlp-8/igt@[email protected]

* igt@kms_psr@sprite_plane_onoff:
- {bat-mtlp-8}: NOTRUN -> [DMESG-WARN][4] +2 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-mtlp-8/igt@kms_psr@sprite_plane_onoff.html

* igt@prime_vgem@basic-userptr:
- {bat-mtlp-8}: NOTRUN -> [FAIL][5] +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-mtlp-8/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_115465v6 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@gt_lrc:
- bat-rplp-1: [PASS][6] -> [INCOMPLETE][7] ([i915#4983] / [i915#7609] / [i915#7913])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13023/bat-rplp-1/igt@i915_selftest@live@gt_lrc.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-rplp-1/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@gt_pm:
- bat-rpls-2: [PASS][8] -> [DMESG-FAIL][9] ([i915#4258])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13023/bat-rpls-2/igt@i915_selftest@live@gt_pm.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-rpls-2/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@migrate:
- bat-dg2-11: [PASS][10] -> [DMESG-WARN][11] ([i915#7699])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13023/bat-dg2-11/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@reset:
- bat-rpls-2: [PASS][12] -> [ABORT][13] ([i915#4983] / [i915#7913])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13023/bat-rpls-2/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-rpls-2/igt@i915_selftest@[email protected]
- bat-rpls-1: [PASS][14] -> [ABORT][15] ([i915#4983])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13023/bat-rpls-1/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
- bat-dg2-8: [PASS][16] -> [FAIL][17] ([i915#7932])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13023/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_pipe_crc_basic@read-crc:
- bat-dg2-11: NOTRUN -> [SKIP][18] ([i915#5354]) +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-dg2-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@load:
- {bat-mtlp-8}: [ABORT][19] ([i915#8361]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13023/bat-mtlp-8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/bat-mtlp-8/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#8361]: https://gitlab.freedesktop.org/drm/intel/issues/8361

Build changes
-------------

* Linux: CI_DRM_13023 -> Patchwork_115465v6

CI-20190529: 20190529
CI_DRM_13023: 0c6c8e560ac78d000179e195e1280cc3479ebd58 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7258: ad2eb276eda849b7a7985229009a816c7608186c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115465v6: 0c6c8e560ac78d000179e195e1280cc3479ebd58 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

031a0a92497e drm/i915: Make IRQ reset and postinstall multi-gt aware

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115465v6/index.html