All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/scheduler: Assert that we do not have a dep cycle back to request
@ 2018-01-05 14:13 Chris Wilson
  2018-01-05 14:38 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2018-01-05 14:13 UTC (permalink / raw)
  To: intel-gfx

When reprioritising a request, we build a list of its dependencies in
topological order. This should leave our origin request as the first
element in our list, if it moves we have a dependency cycle and severe
breakage. Assert that it doesn't move.

Complete, but expensive checking is done by swfence, this assert is more
about documenting the topologically ordered list.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 4e150b095a11..42705e3875cd 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1050,6 +1050,13 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
 		}
 	}
 
+	/*
+	 * We should never have a dep cycle back to ourselves, leaving
+	 * the original request as the origin of our topologically sorted
+	 * list.
+	 */
+	GEM_BUG_ON(list_first_entry(&dfs, typeof(stack), dfs_link) != &stack);
+
 	/*
 	 * If we didn't need to bump any existing priorities, and we haven't
 	 * yet submitted this request (i.e. there is no potential race with
-- 
2.15.1

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

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

end of thread, other threads:[~2018-01-11  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 14:13 [PATCH] drm/i915/scheduler: Assert that we do not have a dep cycle back to request Chris Wilson
2018-01-05 14:38 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-08 15:21 ` ✓ Fi.CI.IGT: " Patchwork
2018-01-11  9:38 ` [PATCH] " Michał Winiarski

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.