intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Skip live context execution test without logical contexts
@ 2018-07-05 15:38 Chris Wilson
  2018-07-05 20:50 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-07-06  9:09 ` ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2018-07-05 15:38 UTC (permalink / raw)
  To: intel-gfx

If the HW (or driver) doesn't support logical contexts, don't pretend we
gain anything from trying to execute GPU commands with them. At best it
reports -ENODEV, which is an unhelpful failure that we should just skip.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/selftests/i915_gem_context.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index 0b36265a0f96..0853731af954 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -334,7 +334,7 @@ static int igt_ctx_exec(void *arg)
 	LIST_HEAD(objects);
 	unsigned long ncontexts, ndwords, dw;
 	bool first_shared_gtt = true;
-	int err = -ENODEV;
+	int err = 0;
 
 	/* Create a few different contexts (with different mm) and write
 	 * through each ctx/mm using the GPU making sure those writes end
@@ -363,7 +363,9 @@ static int igt_ctx_exec(void *arg)
 		}
 		if (IS_ERR(ctx)) {
 			err = PTR_ERR(ctx);
-			goto out_unlock;
+			if (err == -ENODEV) /* no logical ctx support */
+				err = 0;
+			break;
 		}
 
 		for_each_engine(engine, i915, id) {
-- 
2.18.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-07-06  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-05 15:38 [PATCH] drm/i915/selftests: Skip live context execution test without logical contexts Chris Wilson
2018-07-05 20:50 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-07-06  9:09 ` ✓ 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;
as well as URLs for NNTP newsgroup(s).