[PATCH] drm/xe: Reorder 'Get pages failed' message

Matthew Brost matthew.brost at intel.com
Tue Jun 10 04:56:49 UTC 2025


Print the error from get pages failing, not the cast to -ENODATA.

Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 18f967ce1f1a..d18807b92b18 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2924,10 +2924,10 @@ static int prefetch_ranges(struct xe_vm *vm, struct xe_vma_op *op)
 
 		err = xe_svm_range_get_pages(vm, svm_range, &ctx);
 		if (err) {
-			if (err == -EOPNOTSUPP || err == -EFAULT || err == -EPERM)
-				err = -ENODATA;
 			drm_dbg(&vm->xe->drm, "Get pages failed, asid=%u, gpusvm=%p, errno=%pe\n",
 				vm->usm.asid, &vm->svm.gpusvm, ERR_PTR(err));
+			if (err == -EOPNOTSUPP || err == -EFAULT || err == -EPERM)
+				err = -ENODATA;
 			return err;
 		}
 		xe_svm_range_debug(svm_range, "PREFETCH - RANGE GET PAGES DONE");
-- 
2.34.1



More information about the Intel-xe mailing list