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>,
Gustavo Sousa <gustavo.sousa@intel.com>
Subject: [PATCH v2 08/22] drm/xe/xe3p: Determine service copy availability from fuse
Date: Wed, 15 Oct 2025 15:06:23 -0700 [thread overview]
Message-ID: <20251015-xe3p-v2-8-b9189b3056a2@intel.com> (raw)
In-Reply-To: <20251015-xe3p-v2-0-b9189b3056a2@intel.com>
From: Matt Roper <matthew.d.roper@intel.com>
Xe3p introduces a dedicated SERVICE_COPY_ENABLE fuse register to reflect
the availability of the service copy engines (BCS1-BCS8).
Bspec: 74624
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 3 +++
drivers/gpu/drm/xe/xe_hw_engine.c | 43 ++++++++++++++++++++++++++++--------
2 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index 21c15441c4537..228de47c0f3f5 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -239,6 +239,9 @@
#define XE2_GT_GEOMETRY_DSS_1 XE_REG(0x9150)
#define XE2_GT_GEOMETRY_DSS_2 XE_REG(0x9154)
+#define SERVICE_COPY_ENABLE XE_REG(0x9170)
+#define FUSE_SERVICE_COPY_ENABLE_MASK REG_GENMASK(7, 0)
+
#define GDRST XE_REG(0x941c)
#define GRDOM_GUC REG_BIT(3)
#define GRDOM_FULL REG_BIT(0)
diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index b08a6d42c8ffc..073ecd263e543 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -718,27 +718,52 @@ static void read_media_fuses(struct xe_gt *gt)
}
}
+static u32 infer_svccopy_from_meml3(struct xe_gt *gt)
+{
+ u32 meml3 = REG_FIELD_GET(MEML3_EN_MASK,
+ xe_mmio_read32(>->mmio, MIRROR_FUSE3));
+ u32 svccopy_mask = 0;
+
+ /*
+ * Each of the four meml3 bits determines the fusing of two service
+ * copy engines.
+ */
+ for (int i = 0; i < 4; i++)
+ svccopy_mask |= (meml3 & BIT(i)) ? 0b11 << 2 * i : 0;
+
+ return svccopy_mask;
+}
+
+static u32 read_svccopy_fuses(struct xe_gt *gt)
+{
+ return REG_FIELD_GET(FUSE_SERVICE_COPY_ENABLE_MASK,
+ xe_mmio_read32(>->mmio, SERVICE_COPY_ENABLE));
+}
+
static void read_copy_fuses(struct xe_gt *gt)
{
struct xe_device *xe = gt_to_xe(gt);
u32 bcs_mask;
- if (GRAPHICS_VERx100(xe) < 1260 || GRAPHICS_VERx100(xe) >= 1270)
- return;
-
xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
- bcs_mask = xe_mmio_read32(>->mmio, MIRROR_FUSE3);
- bcs_mask = REG_FIELD_GET(MEML3_EN_MASK, bcs_mask);
+ if (GRAPHICS_VER(xe) >= 35)
+ bcs_mask = read_svccopy_fuses(gt);
+ else if (GRAPHICS_VERx100(xe) == 1260)
+ bcs_mask = infer_svccopy_from_meml3(gt);
+ else
+ return;
- /* BCS0 is always present; only BCS1-BCS8 may be fused off */
- for (int i = XE_HW_ENGINE_BCS1, j = 0; i <= XE_HW_ENGINE_BCS8; ++i, ++j) {
+ /* Only BCS1-BCS8 may be fused off */
+ bcs_mask <<= XE_HW_ENGINE_BCS1;
+ for (int i = XE_HW_ENGINE_BCS1; i <= XE_HW_ENGINE_BCS8; ++i) {
if (!(gt->info.engine_mask & BIT(i)))
continue;
- if (!(BIT(j / 2) & bcs_mask)) {
+ if (!(bcs_mask & BIT(i))) {
gt->info.engine_mask &= ~BIT(i);
- xe_gt_info(gt, "bcs%u fused off\n", j);
+ xe_gt_info(gt, "bcs%u fused off\n",
+ i - XE_HW_ENGINE_BCS0);
}
}
}
--
2.51.0
next prev parent reply other threads:[~2025-10-15 22:07 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 22:06 [PATCH v2 00/22] drm/xe: Add Xe3p support Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 01/22] drm/xe/xe3: Add support for graphics IP versions 30.04 & 30.05 Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 02/22] drm/xe/xe3p_lpm: Add support for media IP versions 35.00 & 35.03 Lucas De Marchi
2025-10-16 16:12 ` Gustavo Sousa
2025-10-16 16:46 ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 03/22] drm/xe: Drop CTC_MODE register read Lucas De Marchi
2025-10-15 23:26 ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 04/22] drm/xe: Add GT_VER() to check version specific to gt type Lucas De Marchi
2025-10-15 23:34 ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 05/22] drm/xe/xe3p_lpm: Skip disabling NOA on unsupported IPs Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 06/22] drm/xe/xe3p_lpm: Handle MCR steering Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 07/22] drm/xe/xe3p: Stop programming RCU_MODE's fixed slice mode setting Lucas De Marchi
2025-10-15 22:06 ` Lucas De Marchi [this message]
2025-10-15 22:06 ` [PATCH v2 09/22] drm/xe: Dump CURRENT_LRCA register Lucas De Marchi
2025-10-15 23:28 ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 10/22] drm/xe/xe3p: Dump CSMQDEBUG register Lucas De Marchi
2025-10-15 23:33 ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 11/22] drm/xe/nvl: Define NVL-S platform Lucas De Marchi
2025-10-16 16:41 ` Gustavo Sousa
2025-10-15 22:06 ` [PATCH v2 12/22] drm/xe/nvls: Define GuC firmware for NVL-S Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 13/22] drm/xe/nvls: Attach MOCS table " Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 14/22] drm/xe/xe3p_xpc: Add Xe3p_XPC IP definition Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 15/22] drm/xe/xe3p_xpc: Add L3 bank mask Lucas De Marchi
2025-10-15 23:29 ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 16/22] drm/xe/xe3p_xpc: Add MCR steering Lucas De Marchi
2025-10-16 11:44 ` Gustavo Sousa
2025-10-16 19:48 ` Lucas De Marchi
2025-10-16 20:16 ` Gustavo Sousa
2025-10-15 22:06 ` [PATCH v2 17/22] drm/xe/irq: Rename fuse mask variables Lucas De Marchi
2025-10-15 23:39 ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 18/22] drm/xe/irq: Split irq mask per engine class Lucas De Marchi
2025-10-15 23:52 ` Matt Roper
2025-10-16 4:38 ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 19/22] drm/xe/xe3p_xpc: Add support for compute walker for non-MSIx Lucas De Marchi
2025-10-16 0:07 ` Matt Roper
2025-10-16 5:33 ` Lucas De Marchi
2025-10-16 6:52 ` Muqthyar Ahmed, Syed Abdul
2025-10-16 13:59 ` Lucas De Marchi
2025-10-17 6:52 ` Joonas Lahtinen
2025-10-15 22:06 ` [PATCH v2 20/22] drm/xe/xe3p_xpc: Skip compression tuning on platforms without flatccs Lucas De Marchi
2025-10-16 12:30 ` Gustavo Sousa
2025-10-16 16:54 ` Matt Roper
2025-10-15 22:06 ` [PATCH v2 21/22] drm/xe/xe3p_xpc: Setup PAT table Lucas De Marchi
2025-10-16 14:30 ` Vivekanandan, Balasubramani
2025-10-16 20:22 ` Lucas De Marchi
2025-10-15 22:06 ` [PATCH v2 22/22] drm/xe/xe3p: Add xe3p EU stall data format Lucas De Marchi
2025-10-15 23:58 ` Dixit, Ashutosh
2025-10-16 3:25 ` Lucas De Marchi
2025-10-16 5:11 ` ✗ CI.checkpatch: warning for drm/xe: Add Xe3p support (rev2) Patchwork
2025-10-16 5:13 ` ✓ CI.KUnit: success " Patchwork
2025-10-16 5:55 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-16 23:29 ` ✗ Xe.CI.Full: " Patchwork
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=20251015-xe3p-v2-8-b9189b3056a2@intel.com \
--to=lucas.demarchi@intel.com \
--cc=balasubramani.vivekanandan@intel.com \
--cc=gustavo.sousa@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