[PATCH i-g-t v8 08/10] fixtype

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Mar 8 06:47:50 UTC 2023


---
 tests/xe/xe_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/xe/xe_vm.c b/tests/xe/xe_vm.c
index f28165bc7d..e59c1dd5e2 100644
--- a/tests/xe/xe_vm.c
+++ b/tests/xe/xe_vm.c
@@ -1099,7 +1099,7 @@ test_munmap_style_unbind(int fd, struct drm_xe_engine_class_instance *eci,
 	bo_size = page_size * bo_n_pages;
 
 	if (flags & MUNMAP_FLAG_USERPTR) {
-		map = mmap((void *)addr, bo_size, PROT_READ |
+		map = mmap(from_user_pointer(addr), bo_size, PROT_READ |
 			    PROT_WRITE, MAP_SHARED | MAP_FIXED |
 			    MAP_ANONYMOUS, -1, 0);
 		igt_assert(data != MAP_FAILED);
@@ -1253,7 +1253,7 @@ try_again_after_invalidate:
 	 * in the bookkeeping for another rebind after a userptr invalidate.
 	 */
 	if (flags & MUNMAP_FLAG_INVALIDATE && !invalidate++) {
-		map = mmap((void *)addr, bo_size, PROT_READ |
+		map = mmap(from_user_pointer(addr), bo_size, PROT_READ |
 			    PROT_WRITE, MAP_SHARED | MAP_FIXED |
 			    MAP_ANONYMOUS, -1, 0);
 		igt_assert(data != MAP_FAILED);
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list