Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/i915: Return actual submission method from gem_submission_method
@ 2021-10-19  3:17 Ashutosh Dixit
  2021-10-19  4:13 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915: Return actual submission method from gem_submission_method (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ashutosh Dixit @ 2021-10-19  3:17 UTC (permalink / raw)
  To: igt-dev; +Cc: John Harrison, Tvrtko Ursulin

gem_submission_method() purports to return the currently used submission
method by the driver, as evidenced by its callers. Therefore remove the
GEM_SUBMISSION_EXECLISTS flag when GuC submission is detected.

This also fixes gem_has_execlists() to match its description, previously
gem_has_execlists() would return true even if GuC submission was actually
being used in the driver.

v2: Or gem_has_execlists call-sites with gem_has_guc_submission to make the
    new code equivalent to the previous code.

Reported-by: John Harrison <john.c.harrison@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/i915/gem_submission.c   | 2 +-
 tests/i915/gem_ctx_shared.c | 2 +-
 tests/i915/gem_watchdog.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index 2627b802cfb..b037d04cc4a 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -86,7 +86,7 @@ unsigned gem_submission_method(int fd)
 		return 0;
 
 	if (igt_sysfs_get_u32(dir, "enable_guc") & 1) {
-		flags |= GEM_SUBMISSION_GUC | GEM_SUBMISSION_EXECLISTS;
+		flags |= GEM_SUBMISSION_GUC;
 		goto out;
 	}
 
diff --git a/tests/i915/gem_ctx_shared.c b/tests/i915/gem_ctx_shared.c
index ea1b5dd1b8c..f50ef13263f 100644
--- a/tests/i915/gem_ctx_shared.c
+++ b/tests/i915/gem_ctx_shared.c
@@ -159,7 +159,7 @@ static void disjoint_timelines(int i915, const intel_ctx_cfg_t *cfg)
 	uint32_t plug;
 	uint64_t ahnd;
 
-	igt_require(gem_has_execlists(i915));
+	igt_require(gem_has_execlists(i915) || gem_has_guc_submission(i915));
 
 	/*
 	 * Each context, although they share a vm, are expected to be
diff --git a/tests/i915/gem_watchdog.c b/tests/i915/gem_watchdog.c
index db562335a2a..21c7710a806 100644
--- a/tests/i915/gem_watchdog.c
+++ b/tests/i915/gem_watchdog.c
@@ -222,7 +222,7 @@ static void virtual(int i915, const intel_ctx_cfg_t *base_cfg)
 	const intel_ctx_t *ctx[num_engines];
 	uint64_t ahnd;
 
-	igt_require(gem_has_execlists(i915));
+	igt_require(gem_has_execlists(i915) || gem_has_guc_submission(i915));
 
 	igt_debug("%u virtual engines\n", num_engines);
 	igt_require(num_engines);
-- 
2.33.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t] lib/i915: Return actual submission method from gem_submission_method
@ 2021-10-16  0:23 Ashutosh Dixit
  2021-10-18 23:39 ` John Harrison
  0 siblings, 1 reply; 11+ messages in thread
From: Ashutosh Dixit @ 2021-10-16  0:23 UTC (permalink / raw)
  To: igt-dev; +Cc: John Harrison, Tvrtko Ursulin, Michal Wajdeczko

gem_submission_method() purports to return the currently used submission
method by the driver, as evidenced by its callers. Therefore remove the
GEM_SUBMISSION_EXECLISTS flag when GuC submission is detected.

This also fixes gem_has_execlists() to match its description, previously
gem_has_execlists() would return true even if GuC submission was actually
being used in the driver.

Reported-by: John Harrison <john.c.harrison@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/i915/gem_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index 2627b802cfb..b037d04cc4a 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -86,7 +86,7 @@ unsigned gem_submission_method(int fd)
 		return 0;
 
 	if (igt_sysfs_get_u32(dir, "enable_guc") & 1) {
-		flags |= GEM_SUBMISSION_GUC | GEM_SUBMISSION_EXECLISTS;
+		flags |= GEM_SUBMISSION_GUC;
 		goto out;
 	}
 
-- 
2.33.0

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

end of thread, other threads:[~2021-10-19 20:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-19  3:17 [igt-dev] [PATCH i-g-t] lib/i915: Return actual submission method from gem_submission_method Ashutosh Dixit
2021-10-19  4:13 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915: Return actual submission method from gem_submission_method (rev2) Patchwork
2021-10-19  5:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-10-19 18:19 ` [igt-dev] [PATCH i-g-t] lib/i915: Return actual submission method from gem_submission_method John Harrison
2021-10-19 20:40   ` Dixit, Ashutosh
  -- strict thread matches above, loose matches on Subject: below --
2021-10-16  0:23 Ashutosh Dixit
2021-10-18 23:39 ` John Harrison
2021-10-18 23:59   ` Dixit, Ashutosh
2021-10-19  0:12     ` Dixit, Ashutosh
2021-10-19  7:16       ` John Harrison
2021-10-19  8:39         ` Tvrtko Ursulin

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