All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Only switch to kernel context when locked
@ 2018-05-09  6:59 Chris Wilson
  2018-05-09  8:15 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Chris Wilson @ 2018-05-09  6:59 UTC (permalink / raw)
  To: intel-gfx

In igt_flush_test() we try to switch back to the kernel context, but we
are only able to do so when we care called with struct_mutex held.

More CI fallout from lockdep being temporarily suppressed :(

Fixes: 4cdf65ce8cc2 ("drm/i915/selftests: Return to kernel context after each test")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/selftests/igt_flush_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/igt_flush_test.c b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
index 7f35bddc2e95..0d06f559243f 100644
--- a/drivers/gpu/drm/i915/selftests/igt_flush_test.c
+++ b/drivers/gpu/drm/i915/selftests/igt_flush_test.c
@@ -57,7 +57,8 @@ int igt_flush_test(struct drm_i915_private *i915, unsigned int flags)
 
 	cond_resched();
 
-	if (i915_gem_switch_to_kernel_context(i915)) {
+	if (flags & I915_WAIT_LOCKED &&
+	    i915_gem_switch_to_kernel_context(i915)) {
 		pr_err("Failed to switch back to kernel context; declaring wedged\n");
 		i915_gem_set_wedged(i915);
 	}
-- 
2.17.0

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

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

end of thread, other threads:[~2018-05-09 10:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09  6:59 [PATCH] drm/i915/selftests: Only switch to kernel context when locked Chris Wilson
2018-05-09  8:15 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-05-09  8:19 ` [PATCH] " Mika Kuoppala
2018-05-09  8:57 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-05-09  9:21   ` Chris Wilson
2018-05-09 10:18 ` ✓ 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.