From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06D91E73158 for ; Mon, 2 Feb 2026 11:48:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C0F5D10E468; Mon, 2 Feb 2026 11:48:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TtLCl21t"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C1E910E476 for ; Mon, 2 Feb 2026 11:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770032880; x=1801568880; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=0EZ8+Y2uLqytGtzZ8WmhfVGj61vTrzxi36f2jRBjB5Y=; b=TtLCl21tRH03SX46FFx2pvI6+wsAxE9BrMWgNW2jlOK3LnlVuSCfpLqW PfzREXwT/FyeGNrX5kL7hqMcruRhhvnGFZJ1kiJGOymwzg5HRd0yOhQVr kxMNdWZVZjWpgQEo11g5+vGfQ1uAk2fhJB972LefLRT5bg0idc/J3atS+ CF1D39ySBYLmYnGE+IXGmSoAK73yI/tmzEnhMjktfH9gZglUsPp1aoUF1 aUeJLNBvoTOLRJOU3lmr29xaVV8LLn+matHMW8ug55kJzs6f907oh8XYj 9OBgSCuayL0UyJGYIPwuEnh6uuw9owBwKtBwkXxusvG8CiVDFZi1HOPHY w==; X-CSE-ConnectionGUID: d4pAoSkRS3SruqzY6DRtqQ== X-CSE-MsgGUID: mULccKoYT36vQRAzDOijeA== X-IronPort-AV: E=McAfee;i="6800,10657,11689"; a="71272653" X-IronPort-AV: E=Sophos;i="6.21,268,1763452800"; d="scan'208";a="71272653" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2026 03:48:00 -0800 X-CSE-ConnectionGUID: sR5lWSyoQxmly1nxBK3g2w== X-CSE-MsgGUID: w9UXqA/gTr+d9BhUUzJPQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,268,1763452800"; d="scan'208";a="208765886" Received: from jraag-z790m-itx-wifi.iind.intel.com ([10.190.239.23]) by orviesa010.jf.intel.com with ESMTP; 02 Feb 2026 03:47:56 -0800 From: Raag Jadav 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 Subject: [PATCH v1] drm/xe/irq: Introduce xe_irq_init_late() Date: Mon, 2 Feb 2026 17:14:29 +0530 Message-ID: <20260202114609.1276227-1-raag.jadav@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" 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 --- 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