Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: matthew.brost@intel.com, jani.nikula@intel.com,
	ville.syrjala@linux.intel.com, rodrigo.vivi@intel.com,
	thomas.hellstrom@linux.intel.com, riana.tauro@intel.com,
	michal.wajdeczko@intel.com, matthew.d.roper@intel.com,
	mallesh.koujalagi@intel.com, dev@lankhorst.se,
	Raag Jadav <raag.jadav@intel.com>
Subject: [PATCH v1] drm/xe/irq: Introduce xe_irq_init_late()
Date: Mon,  2 Feb 2026 17:14:29 +0530	[thread overview]
Message-ID: <20260202114609.1276227-1-raag.jadav@intel.com> (raw)

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


             reply	other threads:[~2026-02-02 11:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 11:44 Raag Jadav [this message]
2026-02-02 22:01 ` ✓ CI.KUnit: success for drm/xe/irq: Introduce xe_irq_init_late() Patchwork
2026-02-02 23:19 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-03 10:38 ` [PATCH v1] " Raag Jadav

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=20260202114609.1276227-1-raag.jadav@intel.com \
    --to=raag.jadav@intel.com \
    --cc=dev@lankhorst.se \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=mallesh.koujalagi@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=ville.syrjala@linux.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