summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLukasz Laguna <lukasz.laguna@intel.com>2025-11-24 22:02:34 +0300
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2025-11-25 19:45:22 +0300
commit79cb005c7134340d78e2fa8e526a6104fe492695 (patch)
treeeb1e64f8eb10b0b8d150b5ed54406bd86f50a539 /drivers/gpu
parent69ef30d6c903c4b9cd75c50367acb1cd1f95d440 (diff)
downloadlinux-79cb005c7134340d78e2fa8e526a6104fe492695.tar.xz
drm/xe: Add device flag to indicate standalone MERT
The MERT subsystem manages memory accesses between host and device. On the Crescent Island platform, it requires direct management by the driver. Introduce a device flag and corresponding helpers to identify platforms with standalone MERT, enabling proper initialization and handling. Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patch.msgid.link/20251124190237.20503-2-lukasz.laguna@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/xe/xe_device.h5
-rw-r--r--drivers/gpu/drm/xe/xe_device_types.h2
-rw-r--r--drivers/gpu/drm/xe/xe_pci.c2
-rw-r--r--drivers/gpu/drm/xe/xe_pci_types.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
index 32cc6323b7f6..6604b89330d5 100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -172,6 +172,11 @@ static inline bool xe_device_has_lmtt(struct xe_device *xe)
return IS_DGFX(xe);
}
+static inline bool xe_device_has_mert(struct xe_device *xe)
+{
+ return xe->info.has_mert;
+}
+
u32 xe_device_ccs_bytes(struct xe_device *xe, u64 size);
void xe_device_snapshot_print(struct xe_device *xe, struct drm_printer *p);
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index a03cc83aa26f..1907f868e770 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -303,6 +303,8 @@ struct xe_device {
u8 has_mbx_power_limits:1;
/** @info.has_mem_copy_instr: Device supports MEM_COPY instruction */
u8 has_mem_copy_instr:1;
+ /** @info.has_mert: Device has standalone MERT */
+ u8 has_mert:1;
/** @info.has_pxp: Device has PXP support */
u8 has_pxp:1;
/** @info.has_range_tlb_inval: Has range based TLB invalidations */
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 10eb18bc740e..4b4c6aa800ec 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -407,6 +407,7 @@ static const struct xe_device_desc cri_desc = {
.has_display = false,
.has_flat_ccs = false,
.has_mbx_power_limits = true,
+ .has_mert = true,
.has_sriov = true,
.max_gt_per_tile = 2,
.require_force_probe = true,
@@ -671,6 +672,7 @@ static int xe_info_init_early(struct xe_device *xe,
xe->info.has_heci_cscfi = desc->has_heci_cscfi;
xe->info.has_late_bind = desc->has_late_bind;
xe->info.has_llc = desc->has_llc;
+ xe->info.has_mert = desc->has_mert;
xe->info.has_pxp = desc->has_pxp;
xe->info.has_sriov = xe_configfs_primary_gt_allowed(to_pci_dev(xe->drm.dev)) &&
desc->has_sriov;
diff --git a/drivers/gpu/drm/xe/xe_pci_types.h b/drivers/gpu/drm/xe/xe_pci_types.h
index 9892c063a9c5..d89ee5d82439 100644
--- a/drivers/gpu/drm/xe/xe_pci_types.h
+++ b/drivers/gpu/drm/xe/xe_pci_types.h
@@ -47,6 +47,7 @@ struct xe_device_desc {
u8 has_llc:1;
u8 has_mbx_power_limits:1;
u8 has_mem_copy_instr:1;
+ u8 has_mert:1;
u8 has_pxp:1;
u8 has_sriov:1;
u8 needs_scratch:1;