Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] xe/xe_mmap: Optimise code to use xe_bo_mmap
@ 2023-07-04  5:27 priyanka.dandamudi
  2023-07-04  6:01 ` Bommu, Krishnaiah
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: priyanka.dandamudi @ 2023-07-04  5:27 UTC (permalink / raw)
  To: krishnaiah.bommu, igt-dev, priyanka.dandamudi

From: Priyanka Dandamudi <priyanka.dandamudi@intel.com>

Optimise code to use xe_bo_mmap.

Cc: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-04  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-04  5:27 [igt-dev] [PATCH i-g-t] xe/xe_mmap: Optimise code to use xe_bo_mmap priyanka.dandamudi
2023-07-04  6:01 ` Bommu, Krishnaiah
2023-07-04  6:30 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-07-04  7:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox