Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/xe/irq: Introduce xe_irq_init_late()
@ 2026-02-02 11:44 Raag Jadav
  2026-02-02 22:01 ` ✓ CI.KUnit: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Raag Jadav @ 2026-02-02 11:44 UTC (permalink / raw)
  To: intel-xe
  Cc: matthew.brost, jani.nikula, ville.syrjala, rodrigo.vivi,
	thomas.hellstrom, riana.tauro, michal.wajdeczko, matthew.d.roper,
	mallesh.koujalagi, dev, Raag Jadav

Introduce xe_irq_init_late() which will enable the IRQs at the end of
xe_device_probe() to make sure we don't hit them during probe sequence.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
PS: I'm not aware of any historic significance of current sequence.
If I've missed anything, please let me know.

 drivers/gpu/drm/xe/xe_device.c |  3 +++
 drivers/gpu/drm/xe/xe_irq.c    | 10 ++++++++--
 drivers/gpu/drm/xe/xe_irq.h    |  1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 9cf82bde36c4..40c27e62bc01 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1013,6 +1013,9 @@ int xe_device_probe(struct xe_device *xe)
 
 	detect_preproduction_hw(xe);
 
+	/* Turn irqs on only after we're setup to service them */
+	xe_irq_init_late(xe);
+
 	return devm_add_action_or_reset(xe->drm.dev, xe_device_sanitize, xe);
 
 err_unregister_display:
diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c
index 7560a45f7f64..bf554268762e 100644
--- a/drivers/gpu/drm/xe/xe_irq.c
+++ b/drivers/gpu/drm/xe/xe_irq.c
@@ -802,6 +802,14 @@ int xe_irq_init(struct xe_device *xe)
 	return xe_irq_msix_init(xe);
 }
 
+void xe_irq_init_late(struct xe_device *xe)
+{
+	if (!atomic_read(&xe->irq.enabled))
+		return;
+
+	xe_irq_postinstall(xe);
+}
+
 int xe_irq_install(struct xe_device *xe)
 {
 	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
@@ -831,8 +839,6 @@ int xe_irq_install(struct xe_device *xe)
 
 	atomic_set(&xe->irq.enabled, 1);
 
-	xe_irq_postinstall(xe);
-
 	return devm_add_action_or_reset(xe->drm.dev, irq_uninstall, xe);
 }
 
diff --git a/drivers/gpu/drm/xe/xe_irq.h b/drivers/gpu/drm/xe/xe_irq.h
index a28bd577ba52..ad03e830a0b0 100644
--- a/drivers/gpu/drm/xe/xe_irq.h
+++ b/drivers/gpu/drm/xe/xe_irq.h
@@ -15,6 +15,7 @@ struct xe_tile;
 struct xe_gt;
 
 int xe_irq_init(struct xe_device *xe);
+void xe_irq_init_late(struct xe_device *xe);
 int xe_irq_install(struct xe_device *xe);
 void xe_irq_suspend(struct xe_device *xe);
 void xe_irq_resume(struct xe_device *xe);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-03 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 11:44 [PATCH v1] drm/xe/irq: Introduce xe_irq_init_late() Raag Jadav
2026-02-02 22:01 ` ✓ CI.KUnit: success for " Patchwork
2026-02-02 23:19 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-03 10:38 ` [PATCH v1] " Raag Jadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox