From: Matt Roper <matthew.d.roper@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Gustavo Sousa <gustavo.sousa@intel.com>,
Matt Roper <matthew.d.roper@intel.com>
Subject: [PATCH] drm/xe/xe3p: Read resource copy presence from fuse register
Date: Tue, 29 Sep 2026 14:08:16 -0700 [thread overview]
Message-ID: <20260929-res_copy_fuse-v1-1-80876dba05db@intel.com> (raw)
As with service copy engines, Xe3p also introduced a fuse register to
indicate whether the resource copy engine is present. Somewhat
confusingly, the register field is 16 bits wide, even though all current
platforms only have at most a single resource copy engine (BCS0).
Bspec: 74623
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 3 +++
drivers/gpu/drm/xe/xe_hw_engine.c | 37 +++++++++++++++++++++++++++---------
2 files changed, 31 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 650f117c3e13..f5cd3a94e47f 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -301,6 +301,9 @@
#define SERVICE_COPY_ENABLE XE_REG(0x9170)
#define FUSE_SERVICE_COPY_ENABLE_MASK REG_GENMASK(7, 0)
+#define RESOURCE_COPY_ENABLE XE_REG(0x9174)
+#define FUSE_RESOURCE_COPY_ENABLE_MASK REG_GENMASK(15, 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 9680d2a5adec..265f95c0c899 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -875,23 +875,42 @@ static u32 read_svccopy_fuses(struct xe_gt *gt)
xe_mmio_read32(>->mmio, SERVICE_COPY_ENABLE));
}
+static u32 read_rescopy_fuses(struct xe_gt *gt)
+{
+ u32 fuse = REG_FIELD_GET(FUSE_RESOURCE_COPY_ENABLE_MASK,
+ xe_mmio_read32(>->mmio, RESOURCE_COPY_ENABLE));
+
+ /*
+ * Although the register field is 16-bits wide, we don't expect to ever
+ * see more than one resource copy engine (BCS0 in bit 0) enabled.
+ */
+ xe_gt_WARN(gt, fuse & GENMASK(15, 1), "Unexpected resource copy fuse (%#x)\n", fuse);
+
+ return fuse & BIT(0);
+}
+
static void read_copy_fuses(struct xe_gt *gt)
{
struct xe_device *xe = gt_to_xe(gt);
- u32 bcs_mask;
+ u32 bcs_mask, svc_copy_mask, res_copy_mask;
xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
- 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
+ if (GRAPHICS_VER(xe) >= 35) {
+ svc_copy_mask = read_svccopy_fuses(gt);
+ res_copy_mask = read_rescopy_fuses(gt);
+ } else if (GRAPHICS_VERx100(xe) == 1260) {
+ svc_copy_mask = infer_svccopy_from_meml3(gt);
+ /* Only BCS1-BCS8 may be fused off */
+ res_copy_mask = 0x1;
+ } else {
return;
+ }
- /* 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) {
+ bcs_mask = svc_copy_mask << XE_HW_ENGINE_BCS1 |
+ res_copy_mask << XE_HW_ENGINE_BCS0;
+
+ for (int i = XE_HW_ENGINE_BCS0; i <= XE_HW_ENGINE_BCS8; ++i) {
if (!(gt->info.engine_mask & BIT(i)))
continue;
---
base-commit: e6a6d431be7101c5cdbb1b5d97caa9c1ea9cb493
change-id: 20260928-res_copy_fuse-24781ce19c95
Best regards,
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
next reply other threads:[~2026-09-29 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 21:08 Matt Roper [this message]
2026-09-29 21:18 ` [PATCH] drm/xe/xe3p: Read resource copy presence from fuse register sashiko-bot
2026-09-29 22:18 ` ✓ CI.KUnit: success for " Patchwork
2026-09-30 0:23 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-30 6:10 ` ✗ Xe.CI.FULL: failure " 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=20260929-res_copy_fuse-v1-1-80876dba05db@intel.com \
--to=matthew.d.roper@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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