Skip to content

Commit c56904f

Browse files
committed
drm/xe: Add always_migrate_to_vram modparam
Used to show we can bounce memory multiple times which will happen once a real migration policy is implemented. Can be removed once migration policy is implemented. v3: - Pull some changes into the previous patch (Thomas) - Better commit message (Thomas) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250306012657.3505757-32-matthew.brost@intel.com
1 parent 8e5a5dc commit c56904f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

drivers/gpu/drm/xe/xe_module.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ struct xe_modparam xe_modparam = {
2929
module_param_named(svm_notifier_size, xe_modparam.svm_notifier_size, uint, 0600);
3030
MODULE_PARM_DESC(svm_notifier_size, "Set the svm notifier size(in MiB), must be power of 2");
3131

32+
module_param_named(always_migrate_to_vram, xe_modparam.always_migrate_to_vram, bool, 0444);
33+
MODULE_PARM_DESC(always_migrate_to_vram, "Always migrate to VRAM on GPU fault");
34+
3235
module_param_named_unsafe(force_execlist, xe_modparam.force_execlist, bool, 0444);
3336
MODULE_PARM_DESC(force_execlist, "Force Execlist submission");
3437

drivers/gpu/drm/xe/xe_module.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
struct xe_modparam {
1313
bool force_execlist;
1414
bool probe_display;
15+
bool always_migrate_to_vram;
1516
u32 force_vram_bar_size;
1617
int guc_log_level;
1718
char *guc_firmware_path;

drivers/gpu/drm/xe/xe_svm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,9 @@ int xe_svm_handle_pagefault(struct xe_vm *vm, struct xe_vma *vma,
822822
}
823823
drm_exec_fini(&exec);
824824

825+
if (xe_modparam.always_migrate_to_vram)
826+
range->skip_migrate = false;
827+
825828
dma_fence_wait(fence, false);
826829
dma_fence_put(fence);
827830

0 commit comments

Comments
 (0)