From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Shekhar Chauhan <shekhar.chauhan@intel.com>,
Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>,
Matt Roper <matthew.d.roper@intel.com>,
Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: [PATCH v3 17/24] drm/xe/irq: Rename fuse mask variables
Date: Thu, 16 Oct 2025 19:26:36 -0700 [thread overview]
Message-ID: <20251016-xe3p-v3-17-3dd173a3097a@intel.com> (raw)
In-Reply-To: <20251016-xe3p-v3-0-3dd173a3097a@intel.com>
It's confusing to refer to some masks as the interrupt masks and others
as the fuse masks. Rename the fuse one to make it clearer.
Note that the most important role they play here is that the call
to xe_hw_engine_mask_per_class() will not only limit the engines
according to the fuses, but also by what is available in the specific
architecture - the latter is more important information to know what
interrupts should be enabled. Add a comment about that.
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/xe/xe_irq.c | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c
index 838fb512b7779..9c3a85c4585ed 100644
--- a/drivers/gpu/drm/xe/xe_irq.c
+++ b/drivers/gpu/drm/xe/xe_irq.c
@@ -139,7 +139,6 @@ void xe_irq_enable_hwe(struct xe_gt *gt)
{
struct xe_device *xe = gt_to_xe(gt);
struct xe_mmio *mmio = >->mmio;
- u32 ccs_mask, bcs_mask;
u32 irqs, dmask, smask;
u32 gsc_mask = 0;
u32 heci_mask = 0;
@@ -157,36 +156,43 @@ void xe_irq_enable_hwe(struct xe_gt *gt)
GT_WAIT_SEMAPHORE_INTERRUPT;
}
- ccs_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_COMPUTE);
- bcs_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_COPY);
-
dmask = irqs << 16 | irqs;
smask = irqs << 16;
if (xe_gt_is_main_type(gt)) {
+ /*
+ * For enabling the interrupts, the information about fused off
+ * engines doesn't matter much, but this also allows to check if
+ * the engine is available architecturally in the platform
+ */
+ u32 ccs_fuse_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_COMPUTE);
+ u32 bcs_fuse_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_COPY);
+
/* Enable interrupts for each engine class */
xe_mmio_write32(mmio, RENDER_COPY_INTR_ENABLE, dmask);
- if (ccs_mask)
+ if (ccs_fuse_mask)
xe_mmio_write32(mmio, CCS_RSVD_INTR_ENABLE, smask);
/* Unmask interrupts for each engine instance */
xe_mmio_write32(mmio, RCS0_RSVD_INTR_MASK, ~smask);
xe_mmio_write32(mmio, BCS_RSVD_INTR_MASK, ~smask);
- if (bcs_mask & (BIT(1)|BIT(2)))
+ if (bcs_fuse_mask & (BIT(1)|BIT(2)))
xe_mmio_write32(mmio, XEHPC_BCS1_BCS2_INTR_MASK, ~dmask);
- if (bcs_mask & (BIT(3)|BIT(4)))
+ if (bcs_fuse_mask & (BIT(3)|BIT(4)))
xe_mmio_write32(mmio, XEHPC_BCS3_BCS4_INTR_MASK, ~dmask);
- if (bcs_mask & (BIT(5)|BIT(6)))
+ if (bcs_fuse_mask & (BIT(5)|BIT(6)))
xe_mmio_write32(mmio, XEHPC_BCS5_BCS6_INTR_MASK, ~dmask);
- if (bcs_mask & (BIT(7)|BIT(8)))
+ if (bcs_fuse_mask & (BIT(7)|BIT(8)))
xe_mmio_write32(mmio, XEHPC_BCS7_BCS8_INTR_MASK, ~dmask);
- if (ccs_mask & (BIT(0)|BIT(1)))
+ if (ccs_fuse_mask & (BIT(0)|BIT(1)))
xe_mmio_write32(mmio, CCS0_CCS1_INTR_MASK, ~dmask);
- if (ccs_mask & (BIT(2)|BIT(3)))
+ if (ccs_fuse_mask & (BIT(2)|BIT(3)))
xe_mmio_write32(mmio, CCS2_CCS3_INTR_MASK, ~dmask);
}
if (xe_gt_is_media_type(gt) || MEDIA_VER(xe) < 13) {
+ u32 other_fuse_mask = xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_OTHER);
+
/* Enable interrupts for each engine class */
xe_mmio_write32(mmio, VCS_VECS_INTR_ENABLE, dmask);
@@ -199,7 +205,7 @@ void xe_irq_enable_hwe(struct xe_gt *gt)
* the heci2 interrupt is enabled via the same register as the
* GSCCS interrupts, but it has its own mask register.
*/
- if (xe_hw_engine_mask_per_class(gt, XE_ENGINE_CLASS_OTHER)) {
+ if (other_fuse_mask) {
gsc_mask = irqs | GSC_ER_COMPLETE;
heci_mask = GSC_IRQ_INTF(1);
} else if (xe->info.has_heci_gscfi) {
--
2.51.0
next prev parent reply other threads:[~2025-10-17 2:27 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 2:26 [PATCH v3 00/24] drm/xe: Add Xe3p support Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 01/24] drm/xe/xe3: Add support for graphics IP versions 30.04 & 30.05 Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 02/24] drm/xe/xe3p: Add support for media IP versions 35.00 & 35.03 Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 03/24] drm/xe: Drop CTC_MODE register read Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 04/24] drm/xe: Add GT_VER() to check version specific to gt type Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 05/24] drm/xe/xe3p_lpm: Skip disabling NOA on unsupported IPs Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 06/24] drm/xe/xe3p_lpm: Handle MCR steering Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 07/24] drm/xe/xe3p: Stop programming RCU_MODE's fixed slice mode setting Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 08/24] drm/xe/xe3p: Determine service copy availability from fuse Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 09/24] drm/xe: Dump CURRENT_LRCA register Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 10/24] drm/xe/xe3p: Dump CSMQDEBUG register Lucas De Marchi
2025-10-17 15:55 ` Matt Roper
2025-10-21 16:02 ` Summers, Stuart
2025-10-17 2:26 ` [PATCH v3 11/24] drm/xe/nvl: Define NVL-S platform Lucas De Marchi
2025-10-17 13:05 ` Gustavo Sousa
2025-10-17 2:26 ` [PATCH v3 12/24] drm/xe/nvls: Define GuC firmware for NVL-S Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 13/24] drm/xe/nvls: Attach MOCS table " Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 14/24] drm/xe/xe3p_xpc: Add Xe3p_XPC IP definition Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 15/24] drm/xe/xe3p_xpc: Add L3 bank mask Lucas De Marchi
2025-10-17 17:51 ` Matt Roper
2025-10-18 3:18 ` Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 16/24] drm/xe/xe3p_xpc: Add MCR steering Lucas De Marchi
2025-10-17 2:26 ` Lucas De Marchi [this message]
2025-10-17 2:26 ` [PATCH v3 18/24] drm/xe/irq: Split irq mask per engine class Lucas De Marchi
2025-10-17 16:03 ` Matt Roper
2025-10-17 2:26 ` [PATCH v3 19/24] drm/xe/irq: Rename bits used with all engines Lucas De Marchi
2025-10-17 16:05 ` Matt Roper
2025-10-17 2:26 ` [PATCH v3 20/24] drm/xe/irq: Check fuse mask for media engines Lucas De Marchi
2025-10-17 16:07 ` Matt Roper
2025-10-17 2:26 ` [PATCH v3 21/24] drm/xe/xe3p_xpc: Add support for compute walker for non-MSIx Lucas De Marchi
2025-10-17 17:04 ` Matt Roper
2025-10-17 2:26 ` [PATCH v3 22/24] drm/xe/xe3p_xpc: Skip compression tuning on platforms without flatccs Lucas De Marchi
2025-10-17 2:26 ` [PATCH v3 23/24] drm/xe/xe3p_xpc: Setup PAT table Lucas De Marchi
2025-10-17 11:05 ` Ville Syrjälä
2025-10-17 17:18 ` Matt Roper
2025-10-17 18:09 ` Ville Syrjälä
2025-10-17 20:33 ` Matt Roper
2025-10-17 2:26 ` [PATCH v3 24/24] drm/xe/xe3p: Add xe3p EU stall data format Lucas De Marchi
2025-10-17 2:35 ` ✗ CI.checkpatch: warning for drm/xe: Add Xe3p support (rev3) Patchwork
2025-10-17 2:36 ` ✓ CI.KUnit: success " Patchwork
2025-10-17 3:23 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-18 1:56 ` ✗ Xe.CI.Full: failure " Patchwork
2025-10-19 2:55 ` [PATCH v3 00/24] drm/xe: Add Xe3p support Lucas De Marchi
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=20251016-xe3p-v3-17-3dd173a3097a@intel.com \
--to=lucas.demarchi@intel.com \
--cc=balasubramani.vivekanandan@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=shekhar.chauhan@intel.com \
--cc=tejas.upadhyay@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