drm/xe/vm: Add a couple of VM debug printouts

Add debug printouts that are valueable for pagemap prefetch,
migration and page collection.

v2:
- Add additional debug prinouts around migration and page collection.
- Require CONFIG_DRM_XE_DEBUG_VM.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com> #v1
Link: https://patch.msgid.link/20251219113320.183860-18-thomas.hellstrom@linux.intel.com
This commit is contained in:
Thomas Hellström
2025-12-19 12:33:13 +01:00
parent 2df55d9e66
commit 54dc5842a8
2 changed files with 17 additions and 0 deletions

View File

@@ -2931,6 +2931,13 @@ static int prefetch_ranges(struct xe_vm *vm, struct xe_vma_op *op)
if (!dpagemap)
xe_svm_range_migrate_to_smem(vm, svm_range);
if (IS_ENABLED(CONFIG_DRM_XE_DEBUG_VM)) {
drm_dbg(&vm->xe->drm,
"Prefetch pagemap is %s start 0x%016lx end 0x%016lx\n",
dpagemap ? dpagemap->drm->unique : "system",
xe_svm_range_start(svm_range), xe_svm_range_end(svm_range));
}
if (xe_svm_range_needs_migrate_to_vram(svm_range, vma, dpagemap)) {
err = xe_svm_alloc_vram(svm_range, &ctx, dpagemap);
if (err) {