diff options
author | Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> | 2025-05-13 09:32:28 +0530 |
---|---|---|
committer | Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> | 2025-05-14 19:25:54 +0530 |
commit | 5aee6e33e19593dafc42f9afb59fd2c53f75141f (patch) | |
tree | 5e9e0b6db99995c41e7381df6837e77a9b75c7dd | |
parent | 09ba0a8f06cd69d93eef0dc3bee33546880e46f8 (diff) |
drm/xe/vm: Add debug prints for SVM range prefetch
Introduce debug logs for the prefetch operation of SVM ranges.
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250513040228.470682-16-himal.prasad.ghimiray@intel.com
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 842af808c39b..5a978da411b0 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -2399,8 +2399,10 @@ alloc_next_range: goto unwind_prefetch_ops; } - if (xe_svm_range_validate(vm, svm_range, tile_mask, !!prefetch_region)) + if (xe_svm_range_validate(vm, svm_range, tile_mask, !!prefetch_region)) { + xe_svm_range_debug(svm_range, "PREFETCH - RANGE IS VALID"); goto check_next_range; + } err = xa_alloc(&op->prefetch_range.range, &i, svm_range, xa_limit_32b, @@ -2411,6 +2413,7 @@ alloc_next_range: op->prefetch_range.ranges_count++; vops->flags |= XE_VMA_OPS_FLAG_HAS_SVM_PREFETCH; + xe_svm_range_debug(svm_range, "PREFETCH - RANGE CREATED"); check_next_range: if (range_end > xe_svm_range_end(svm_range) && xe_svm_range_end(svm_range) < xe_vma_end(vma)) { @@ -2909,6 +2912,7 @@ static int prefetch_ranges(struct xe_vm *vm, struct xe_vma_op *op) vm->usm.asid, &vm->svm.gpusvm, ERR_PTR(err)); return -ENODATA; } + xe_svm_range_debug(svm_range, "PREFETCH - RANGE MIGRATED TO VRAM"); } err = xe_svm_range_get_pages(vm, svm_range, &ctx); @@ -2919,6 +2923,7 @@ static int prefetch_ranges(struct xe_vm *vm, struct xe_vma_op *op) vm->usm.asid, &vm->svm.gpusvm, ERR_PTR(err)); return err; } + xe_svm_range_debug(svm_range, "PREFETCH - RANGE GET PAGES DONE"); } return err; |