From: Jesus Narvaez <jesus.narvaez@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com>,
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Alan Previn <alan.previn.teres.alexis@intel.com>,
Jesus Narvaez <jesus.narvaez@intel.com>
Subject: [PATCH v5 1/2] drm/xe: Add has_sem64 bit to graphics/media IP descriptors
Date: Fri, 20 Nov 2026 21:11:13 +0200 [thread overview]
Message-ID: <20261120191111.4097737-5-jesus.narvaez@intel.com> (raw)
In-Reply-To: <20261120191111.4097737-4-jesus.narvaez@intel.com>
From: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com>
Add a has_sem64 capability bit to the graphics/media IP descriptors,
set on every Xe3p platform that supports it. Graphics version 35.10 and
Media version 35.00 only gain support at stepping B0, so that exception
is applied when resolving the final gt->info.has_sem64 value.
The bit indicates whether the GT's command streamer supports the
MI_SEMAPHORE_WAIT_64 instruction. A platform's CS must not mix
MI_SEMAPHORE_WAIT and MI_SEMAPHORE_WAIT_64 within a context or across
context submissions, so both the primary and media GT must agree before
either one enables sem64; each GT allocator resolves its own has_sem64
from its own descriptor and stepping exception, and xe_info_init()
clears both back to false afterwards if the two disagree.
v2: Only compare has_sem64 when both GTs are present (Daniele)
Assisted-by: LLM
Signed-off-by: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com>
Signed-off-by: Jesus Narvaez <jesus.narvaez@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
drivers/gpu/drm/xe/xe_gt_types.h | 2 ++
drivers/gpu/drm/xe/xe_pci.c | 27 +++++++++++++++++++++++++--
drivers/gpu/drm/xe/xe_pci_types.h | 2 ++
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
index c00a7c171f80..cc7d6adb6aec 100644
--- a/drivers/gpu/drm/xe/xe_gt_types.h
+++ b/drivers/gpu/drm/xe/xe_gt_types.h
@@ -167,6 +167,8 @@ struct xe_gt {
* error reporting support
*/
u8 has_uncorrectable_error_reporting:1;
+ /** @info.has_sem64: GT supports the MI_SEMAPHORE_WAIT_64 instruction */
+ u8 has_sem64:1;
/**
* @info.has_xe2_blt_instructions: GT supports Xe2-style MEM_SET
* and MEM_COPY blitter functionality. Note that despite the
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 619653c68f2c..c2adbba1b087 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -128,6 +128,7 @@ static const struct xe_graphics_desc graphics_xe3p_lpg = {
.multi_queue_engine_class_mask = BIT(XE_ENGINE_CLASS_COPY) | BIT(XE_ENGINE_CLASS_COMPUTE),
.num_geometry_xecore_fuse_regs = 3,
.num_compute_xecore_fuse_regs = 3,
+ .has_sem64 = 1,
};
static const struct xe_graphics_desc graphics_xe3p_xpc = {
@@ -154,11 +155,20 @@ static const struct xe_media_desc media_xelpmp = {
.hw_engine_mask =
GENMASK(XE_HW_ENGINE_VCS7, XE_HW_ENGINE_VCS0) |
GENMASK(XE_HW_ENGINE_VECS3, XE_HW_ENGINE_VECS0) |
- BIT(XE_HW_ENGINE_GSCCS0)
+ BIT(XE_HW_ENGINE_GSCCS0),
+};
+
+static const struct xe_media_desc media_xe3p_lpm = {
+ .hw_engine_mask =
+ GENMASK(XE_HW_ENGINE_VCS7, XE_HW_ENGINE_VCS0) |
+ GENMASK(XE_HW_ENGINE_VECS3, XE_HW_ENGINE_VECS0) |
+ BIT(XE_HW_ENGINE_GSCCS0),
+ .has_sem64 = 1,
};
static const struct xe_media_desc media_xe3p_hpm = {
.has_uncorrectable_error_reporting = 1,
+ .has_sem64 = 1,
.hw_engine_mask =
GENMASK(XE_HW_ENGINE_VCS7, XE_HW_ENGINE_VCS0) |
GENMASK(XE_HW_ENGINE_VECS3, XE_HW_ENGINE_VECS0) |
@@ -199,7 +209,7 @@ static const struct xe_ip media_ips[] = {
{ 2000, "Xe2_LPM", &media_xelpmp },
{ 3000, "Xe3_LPM", &media_xelpmp },
{ 3002, "Xe3_LPM", &media_xelpmp },
- { 3500, "Xe3p_LPM", &media_xelpmp },
+ { 3500, "Xe3p_LPM", &media_xe3p_lpm },
{ 3503, "Xe3p_HPM", &media_xe3p_hpm },
};
@@ -904,6 +914,9 @@ static struct xe_gt *alloc_primary_gt(struct xe_tile *tile,
gt->info.has_indirect_ring_state = graphics_desc->has_indirect_ring_state;
gt->info.has_uncorrectable_error_reporting =
graphics_desc->has_uncorrectable_error_reporting;
+ /* excludes configs that don't support sem64 */
+ gt->info.has_sem64 = graphics_desc->has_sem64 &&
+ !(GRAPHICS_VERx100(xe) == 3510 && xe->info.step.graphics < STEP_B0);
gt->info.multi_queue_engine_class_mask = graphics_desc->multi_queue_engine_class_mask;
if (!xe_configfs_get_enable_multi_queue(to_pci_dev(xe->drm.dev))) {
xe_gt_info(gt, "Multi-queue disabled via configfs\n");
@@ -954,6 +967,9 @@ static struct xe_gt *alloc_media_gt(struct xe_tile *tile,
gt->info.id = tile->id * xe->info.max_gt_per_tile + 1;
gt->info.has_indirect_ring_state = media_desc->has_indirect_ring_state;
gt->info.has_uncorrectable_error_reporting = media_desc->has_uncorrectable_error_reporting;
+ /* excludes configs that don't support sem64 */
+ gt->info.has_sem64 = media_desc->has_sem64 &&
+ !(MEDIA_VERx100(xe) == 3500 && xe->info.step.media < STEP_B0);
gt->info.engine_mask = media_desc->hw_engine_mask;
return gt;
@@ -1108,6 +1124,13 @@ static int xe_info_init(struct xe_device *xe,
tile->media_gt = alloc_media_gt(tile, media_desc);
if (IS_ERR(tile->media_gt))
return PTR_ERR(tile->media_gt);
+
+ /* can't mix MI_SEMAPHORE_WAIT/_64 across GTs on the same device */
+ if (tile->primary_gt && tile->media_gt &&
+ !(tile->primary_gt->info.has_sem64 && tile->media_gt->info.has_sem64)) {
+ tile->primary_gt->info.has_sem64 = false;
+ tile->media_gt->info.has_sem64 = false;
+ }
}
/*
diff --git a/drivers/gpu/drm/xe/xe_pci_types.h b/drivers/gpu/drm/xe/xe_pci_types.h
index 74a6cd461b21..90936f805d8f 100644
--- a/drivers/gpu/drm/xe/xe_pci_types.h
+++ b/drivers/gpu/drm/xe/xe_pci_types.h
@@ -84,6 +84,7 @@ struct xe_graphics_desc {
u8 has_usm:1;
u8 has_64bit_timestamp:1;
u8 has_uncorrectable_error_reporting:1;
+ u8 has_sem64:1;
};
struct xe_media_desc {
@@ -91,6 +92,7 @@ struct xe_media_desc {
u8 has_indirect_ring_state:1;
u8 has_uncorrectable_error_reporting:1;
+ u8 has_sem64:1;
};
struct xe_ip {
--
2.43.0
next prev parent reply other threads:[~2026-11-20 19:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 19:11 [PATCH v5 0/2] drm/xe: Handle GuC semaphore instruction field check error Jesus Narvaez
2026-11-20 19:11 ` Jesus Narvaez [this message]
2026-11-20 19:45 ` [PATCH v5 1/2] drm/xe: Add has_sem64 bit to graphics/media IP descriptors sashiko-bot
2026-11-20 19:11 ` [PATCH v5 2/2] drm/xe/guc: Handle GuC semaphore instruction field check error Jesus Narvaez
2026-11-20 19:23 ` ✗ CI.checkpatch: warning for drm/xe: Handle GuC semaphore instruction field check error (rev2) Patchwork
2026-11-20 19:25 ` ✓ CI.KUnit: success " Patchwork
2026-11-20 20:08 ` ✓ Xe.CI.BAT: " 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=20261120191111.4097737-5-jesus.narvaez@intel.com \
--to=jesus.narvaez@intel.com \
--cc=alan.previn.teres.alexis@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=tilak.tirumalesh.tangudu@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