All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH v2] test/gem_exec_suspend: Enable the test for discrete GPUs
@ 2021-09-06 14:18 Thomas Hellström
  2021-09-06 15:07 ` [igt-dev] ✓ Fi.CI.BAT: success for test/gem_exec_suspend: Enable the test for discrete GPUs (rev2) Patchwork
  2021-09-06 16:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Hellström @ 2021-09-06 14:18 UTC (permalink / raw)
  To: igt-dev
  Cc: maarten.lankhorst, matthew.auld, Thomas Hellström, Petri Latvala

Discrete GPUs don't support gem_set_caching() and uses a single,
kernel provided caching mode, FIXED. Adjust the test accordingly.

This makes the test run on DG1.

v2:
- Use igt_require() do determine which of the caching mode subtests to
  run. (Petri Latvala)
- Pass the ctx parameter to igt_spin_new(), as it appears to be needed for
  the hang-SX subtests to run on DG1.

Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

Z# Untracked files:
---
 tests/i915/gem_exec_suspend.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_exec_suspend.c b/tests/i915/gem_exec_suspend.c
index dbe0c8a7..887bb735 100644
--- a/tests/i915/gem_exec_suspend.c
+++ b/tests/i915/gem_exec_suspend.c
@@ -114,7 +114,8 @@ static void run_test(int fd, const intel_ctx_t *ctx,
 
 	memset(obj, 0, sizeof(obj));
 	obj[0].handle = gem_create(fd, 4096);
-	gem_set_caching(fd, obj[0].handle, !!(flags & CACHED));
+	if (!gem_has_lmem(fd))
+		gem_set_caching(fd, obj[0].handle, !!(flags & CACHED));
 	obj[0].flags |= EXEC_OBJECT_WRITE;
 	obj[1].handle = gem_create(fd, 4096);
 	gem_write(fd, obj[1].handle, 0, &bbe, sizeof(bbe));
@@ -178,7 +179,8 @@ static void run_test(int fd, const intel_ctx_t *ctx,
 	}
 
 	if (flags & HANG)
-		spin = igt_spin_new(fd, .ahnd = ahnd, .engine = engine);
+		spin = igt_spin_new(fd, .ahnd = ahnd, .engine = engine,
+			.ctx = ctx);
 
 	switch (mode(flags)) {
 	case NOSLEEP:
@@ -318,7 +320,18 @@ igt_main
 		run_test(fd, ctx, ALL_ENGINES, HIBERNATE);
 
 	for (m = modes; m->suffix; m++) {
+		igt_subtest_with_dynamic_f("fixed%s", m->suffix) {
+			igt_require(gem_has_lmem(fd));
+			for_each_ctx_engine(fd, ctx, e) {
+				if (!gem_class_can_store_dword(fd, e->class))
+					continue;
+				igt_dynamic_f("%s", e->name)
+					run_test(fd, ctx, e->flags, m->mode);
+			}
+		}
+
 		igt_subtest_with_dynamic_f("uncached%s", m->suffix) {
+			igt_require(!gem_has_lmem(fd));
 			for_each_ctx_engine(fd, ctx, e) {
 				if (!gem_class_can_store_dword(fd, e->class))
 					continue;
@@ -328,6 +341,7 @@ igt_main
 		}
 
 		igt_subtest_with_dynamic_f("cached%s", m->suffix) {
+			igt_require(!gem_has_lmem(fd));
 			for_each_ctx_engine(fd, ctx, e) {
 				if (!gem_class_can_store_dword(fd, e->class))
 					continue;
-- 
2.31.1

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

end of thread, other threads:[~2021-09-06 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 14:18 [igt-dev] [PATCH v2] test/gem_exec_suspend: Enable the test for discrete GPUs Thomas Hellström
2021-09-06 15:07 ` [igt-dev] ✓ Fi.CI.BAT: success for test/gem_exec_suspend: Enable the test for discrete GPUs (rev2) Patchwork
2021-09-06 16:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.