[i-g-t,5/6] lib/ tests/: drop usage of __gem_mmap__wc in code

Submitted by Lukasz Kalamarz on Jan. 9, 2019, 5:40 p.m.

Details

Message ID 20190109174057.16835-5-lukasz.kalamarz@intel.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Lukasz Kalamarz Jan. 9, 2019, 5:40 p.m.
With implementation of __gem_mmap we can drop __gem_mmap__wc
and instead use refactored function.

Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 lib/igt_dummyload.c           | 4 ++--
 tests/i915/gem_exec_big.c     | 2 +-
 tests/i915/gem_exec_gttfill.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 982906f2..00f39b94 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -114,8 +114,8 @@  emit_recursive_batch(igt_spin_t *spin,
 	memset(relocs, 0, sizeof(relocs));
 
 	obj[BATCH].handle = gem_create(fd, BATCH_SIZE);
-	batch = __gem_mmap__wc(fd, obj[BATCH].handle,
-			       0, BATCH_SIZE, PROT_WRITE);
+	batch = __gem_mmap(fd, obj[BATCH].handle, 0, BATCH_SIZE,
+		           PROT_WRITE, true);
 	if (!batch)
 		batch = gem_mmap__gtt(fd, obj[BATCH].handle,
 				       	BATCH_SIZE, PROT_WRITE);
diff --git a/tests/i915/gem_exec_big.c b/tests/i915/gem_exec_big.c
index b57560af..15b1021d 100644
--- a/tests/i915/gem_exec_big.c
+++ b/tests/i915/gem_exec_big.c
@@ -222,7 +222,7 @@  igt_simple_main
 		if (!FORCE_PREAD_PWRITE && gem_has_llc(fd))
 			ptr = __gem_mmap(fd, handle, 0, batch_size, PROT_READ, false);
 		else if (!FORCE_PREAD_PWRITE && gem_mmap__has_wc(fd))
-			ptr = __gem_mmap__wc(fd, handle, 0, batch_size, PROT_READ);
+			ptr = __gem_mmap(fd, handle, 0, batch_size, PROT_READ, true);
 		else
 			ptr = NULL;
 
diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
index efd612bb..c39d2d15 100644
--- a/tests/i915/gem_exec_gttfill.c
+++ b/tests/i915/gem_exec_gttfill.c
@@ -157,8 +157,8 @@  static void fillgtt(int fd, unsigned ring, int timeout)
 	for (unsigned i = 0; i < count; i++) {
 		batches[i].handle = gem_create(fd, BATCH_SIZE);
 		batches[i].ptr =
-			__gem_mmap__wc(fd, batches[i].handle,
-				       0, BATCH_SIZE, PROT_WRITE);
+			__gem_mmap(fd, batches[i].handle,0, BATCH_SIZE,
+				   PROT_WRITE, true);
 		if (!batches[i].ptr) {
 			batches[i].ptr =
 				__gem_mmap__gtt(fd, batches[i].handle,