[igt-dev] [PATCH i-g-t] xe/xe_mmap: Optimise code to use xe_bo_mmap
priyanka.dandamudi at intel.com
priyanka.dandamudi at intel.com
Tue Jul 4 05:27:17 UTC 2023
From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
Optimise code to use xe_bo_mmap.
Cc: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
---
tests/xe/xe_mmap.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/xe/xe_mmap.c b/tests/xe/xe_mmap.c
index 664ed54fc..7fe8f73a4 100644
--- a/tests/xe/xe_mmap.c
+++ b/tests/xe/xe_mmap.c
@@ -46,11 +46,8 @@ test_mmap(int fd, uint32_t flags)
igt_require_f(flags, "Device doesn't support such memory region\n");
bo = xe_bo_create_flags(fd, 0, 4096, flags);
- mmo = xe_bo_mmap_offset(fd, bo);
-
- map = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED, fd, mmo);
- igt_assert(map != MAP_FAILED);
+ map = xe_bo_map(fd, bo, 4096);
strcpy(map, "Write some data to the BO!");
munmap(map, 4096);
--
2.25.1
More information about the igt-dev
mailing list