[PATCH v2 15/15] drm/xe: Add modparam to enable / disable high SLPC on migrate queue
Matthew Brost
matthew.brost at intel.com
Tue Aug 5 23:42:00 UTC 2025
Having modparam to enable / disable high SLPC on migrate queue will help
with quick experiments.
v2:
- Enable by default
- Set low latency flag at caller
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_debugfs.c | 2 ++
drivers/gpu/drm/xe/xe_device.c | 2 ++
drivers/gpu/drm/xe/xe_device_types.h | 5 +++++
drivers/gpu/drm/xe/xe_migrate.c | 20 ++++++++------------
drivers/gpu/drm/xe/xe_module.c | 5 +++++
drivers/gpu/drm/xe/xe_module.h | 1 +
6 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
index a64ef860bf1f..cd243b1c2286 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_debugfs.c
@@ -82,6 +82,8 @@ static int info(struct seq_file *m, void *data)
drm_printf(&p, "vm_max_level %d\n", xe->info.vm_max_level);
drm_printf(&p, "force_execlist %s\n", str_yes_no(xe->info.force_execlist));
drm_printf(&p, "ulls_enable %s\n", str_yes_no(xe->info.ulls_enable));
+ drm_printf(&p, "high_slpc_migration_queue %s\n",
+ str_yes_no(xe->info.high_slpc_migration_queue));
drm_printf(&p, "has_flat_ccs %s\n", str_yes_no(xe->info.has_flat_ccs));
drm_printf(&p, "has_usm %s\n", str_yes_no(xe->info.has_usm));
drm_printf(&p, "skip_guc_pc %s\n", str_yes_no(xe->info.skip_guc_pc));
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 80c992859e90..649c81e6c68d 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -416,6 +416,8 @@ static void xe_device_parse_modparam(struct xe_device *xe)
{
xe->info.force_execlist = xe_modparam.force_execlist;
xe->info.ulls_enable = xe_modparam.ulls_enable;
+ xe->info.high_slpc_migration_queue =
+ xe_modparam.high_slpc_migration_queue;
xe->atomic_svm_timeslice_ms = 5;
}
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index 3858387eba34..29cd10eeb89a 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -319,6 +319,11 @@ struct xe_device {
* open
*/
u8 ulls_enable:1;
+ /**
+ * @info.high_slpc_migration_queue: High SLPC on migration
+ * queue
+ */
+ u8 high_slpc_migration_queue:1;
} info;
/** @wa_active: keep track of active workarounds */
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index bd9f3c446671..12ee9eb542f9 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -545,6 +545,9 @@ int xe_migrate_init(struct xe_migrate *m)
struct xe_gt *primary_gt = tile->primary_gt;
struct xe_device *xe = tile_to_xe(tile);
struct xe_vm *vm;
+ u32 flags = EXEC_QUEUE_FLAG_KERNEL | EXEC_QUEUE_FLAG_PERMANENT |
+ EXEC_QUEUE_FLAG_MIGRATE | (xe->info.high_slpc_migration_queue ?
+ EXEC_QUEUE_FLAG_LOW_LATENCY : 0);
int err;
/* Special layout, prepared below.. */
@@ -571,11 +574,9 @@ int xe_migrate_init(struct xe_migrate *m)
goto err_out;
}
+ flags |= EXEC_QUEUE_FLAG_HIGH_PRIORITY;
m->bind_q = xe_exec_queue_create(xe, vm, logical_mask, 1, hwe,
- EXEC_QUEUE_FLAG_KERNEL |
- EXEC_QUEUE_FLAG_PERMANENT |
- EXEC_QUEUE_FLAG_HIGH_PRIORITY |
- EXEC_QUEUE_FLAG_MIGRATE, 0);
+ flags, 0);
if (IS_ERR(m->bind_q)) {
err = PTR_ERR(m->bind_q);
goto err_out;
@@ -586,10 +587,7 @@ int xe_migrate_init(struct xe_migrate *m)
* PVC, may want to revisit if performance is needed.
*/
m->q = xe_exec_queue_create(xe, vm, logical_mask, 1, hwe,
- EXEC_QUEUE_FLAG_KERNEL |
- EXEC_QUEUE_FLAG_PERMANENT |
- EXEC_QUEUE_FLAG_HIGH_PRIORITY |
- EXEC_QUEUE_FLAG_MIGRATE, 0);
+ flags, 0);
} else {
m->bind_q = xe_exec_queue_create_class(xe, primary_gt, vm,
XE_ENGINE_CLASS_COPY,
@@ -602,10 +600,8 @@ int xe_migrate_init(struct xe_migrate *m)
}
m->q = xe_exec_queue_create_class(xe, primary_gt, vm,
- XE_ENGINE_CLASS_COPY,
- EXEC_QUEUE_FLAG_KERNEL |
- EXEC_QUEUE_FLAG_PERMANENT |
- EXEC_QUEUE_FLAG_MIGRATE, 0);
+ XE_ENGINE_CLASS_COPY, flags,
+ 0);
}
if (IS_ERR(m->q)) {
err = PTR_ERR(m->q);
diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
index d8d9db82e71d..760c2eb78cc8 100644
--- a/drivers/gpu/drm/xe/xe_module.c
+++ b/drivers/gpu/drm/xe/xe_module.c
@@ -26,6 +26,7 @@
#define DEFAULT_PROBE_DISPLAY true
#define DEFAULT_ULLS_ENABLE true
+#define DEFAULT_HIGH_SLPC_MIGRATION_QUEUE true
#define DEFAULT_VRAM_BAR_SIZE 0
#define DEFAULT_FORCE_PROBE CONFIG_DRM_XE_FORCE_PROBE
#define DEFAULT_MAX_VFS ~0
@@ -36,6 +37,7 @@
struct xe_modparam xe_modparam = {
.probe_display = DEFAULT_PROBE_DISPLAY,
.ulls_enable = DEFAULT_ULLS_ENABLE,
+ .high_slpc_migration_queue = DEFAULT_HIGH_SLPC_MIGRATION_QUEUE,
.guc_log_level = DEFAULT_GUC_LOG_LEVEL,
.force_probe = DEFAULT_FORCE_PROBE,
#ifdef CONFIG_PCI_IOV
@@ -60,6 +62,9 @@ MODULE_PARM_DESC(probe_display, "Probe display HW, otherwise it's left untouched
module_param_named(ulls_enable, xe_modparam.ulls_enable, bool, 0444);
MODULE_PARM_DESC(ulls_enable, "Enable ULLS on migration queue if LR VM open (default: true)");
+module_param_named(high_slpc_migration_queue, xe_modparam.high_slpc_migration_queue, bool, 0444);
+MODULE_PARM_DESC(high_slpc_migration_queue, "High SLPC on migration queue (default: false)");
+
module_param_named(vram_bar_size, xe_modparam.force_vram_bar_size, int, 0600);
MODULE_PARM_DESC(vram_bar_size, "Set the vram bar size in MiB (<0=disable-resize, 0=max-needed-size, >0=force-size "
"[default=" __stringify(DEFAULT_VRAM_BAR_SIZE) "])");
diff --git a/drivers/gpu/drm/xe/xe_module.h b/drivers/gpu/drm/xe/xe_module.h
index 8ea69a5b2141..d0afc085f443 100644
--- a/drivers/gpu/drm/xe/xe_module.h
+++ b/drivers/gpu/drm/xe/xe_module.h
@@ -13,6 +13,7 @@ struct xe_modparam {
bool force_execlist;
bool probe_display;
bool ulls_enable;
+ bool high_slpc_migration_queue;
u32 force_vram_bar_size;
int guc_log_level;
char *guc_firmware_path;
--
2.34.1
More information about the Intel-xe
mailing list