[igt-dev] [PATCH i-g-t] tests/i915: use gem_require_mmap_device_coherent

priyanka.dandamudi at intel.com priyanka.dandamudi at intel.com
Mon Oct 11 07:15:55 UTC 2021


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

Update gem_require_mmap_wc to gem_require_mmap_device_coherent
along with mmap__wc, as it works on discrete platforms, while
still using an explicit WC mmap on integrated platforms.
Below are the updated tests:
gem_exec_schedule
gem_exec_async
gem_busy
kms_busy

Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
 tests/i915/gem_busy.c          | 4 ++--
 tests/i915/gem_exec_async.c    | 2 +-
 tests/i915/gem_exec_schedule.c | 4 ++--
 tests/i915/kms_busy.c          | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
index b107734c..b4757736 100644
--- a/tests/i915/gem_busy.c
+++ b/tests/i915/gem_busy.c
@@ -479,7 +479,7 @@ igt_main
 		igt_subtest_group {
 			igt_fixture {
 				igt_require(has_extended_busy_ioctl(fd));
-				gem_require_mmap_wc(fd);
+				gem_require_mmap_device_coherent(fd);
 			}
 
 			test_each_engine_store("extended", fd, ctx, e) {
@@ -529,7 +529,7 @@ igt_main
 		igt_subtest_group {
 			igt_fixture {
 				igt_require(has_extended_busy_ioctl(fd));
-				gem_require_mmap_wc(fd);
+				gem_require_mmap_device_coherent(fd);
 			}
 
 			test_each_engine_store("hang-extended", fd, ctx, e) {
diff --git a/tests/i915/gem_exec_async.c b/tests/i915/gem_exec_async.c
index ddebae13..d50fe45e 100644
--- a/tests/i915/gem_exec_async.c
+++ b/tests/i915/gem_exec_async.c
@@ -186,7 +186,7 @@ igt_main
 	igt_fixture {
 		fd = drm_open_driver_master(DRIVER_INTEL);
 		igt_require_gem(fd);
-		gem_require_mmap_wc(fd);
+		gem_require_mmap_device_coherent(fd);
 		igt_require(has_async_execbuf(fd));
 
 		ctx = intel_ctx_create_all_physical(fd);
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 1f6f71db..9478ed1a 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1071,7 +1071,7 @@ static void semaphore_resolve(int i915, const intel_ctx_cfg_t *cfg,
 	inner = intel_ctx_create(i915, cfg);
 
 	semaphore = gem_create(i915, 4096);
-	sema = gem_mmap__wc(i915, semaphore, 0, 4096, PROT_WRITE);
+	sema = gem_mmap__device_coherent(i915, semaphore, 0, 4096, PROT_WRITE);
 
 	for_each_ctx_cfg_engine(i915, cfg, e) {
 		struct drm_i915_gem_exec_object2 obj[3];
@@ -3094,7 +3094,7 @@ igt_main
 		gem_scheduler_print_capability(fd);
 
 		igt_require_gem(fd);
-		gem_require_mmap_wc(fd);
+		gem_require_mmap_device_coherent(fd);
 		gem_require_contexts(fd);
 		ctx = intel_ctx_create_all_physical(fd);
 
diff --git a/tests/i915/kms_busy.c b/tests/i915/kms_busy.c
index 0afa1d36..99a07c2a 100644
--- a/tests/i915/kms_busy.c
+++ b/tests/i915/kms_busy.c
@@ -341,7 +341,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
 		enum pipe pipe;
 
 		igt_require_gem(fd);
-		gem_require_mmap_wc(fd);
+		gem_require_mmap_device_coherent(fd);
 		igt_require(gem_has_ring(fd, I915_EXEC_DEFAULT));
 
 		kmstest_set_vt_graphics_mode();
-- 
2.25.1



More information about the igt-dev mailing list