aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-05-12 04:49:57 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2018-05-14 06:49:09 -0400
commit0c591a40af1b369cc11dce4d558dd71bebbdc090 (patch)
tree972ef15f48c88c1e1a4a8c29ada1290ed7cf7b95
parent4db518e4e8286ca93bd5399f26549eafc87607ea (diff)
drm/i915: Mark up nested spinlocks
When we process the outstanding requests upon banning a context, we need to acquire both the engine and the client's timeline, nesting the locks. This requires explicit markup as the two timelines are now of the same class, since commit a89d1f921c15 ("drm/i915: Split i915_gem_timeline into individual timelines"). Testcase: igt/gem_eio/banned Fixes: a89d1f921c15 ("drm/i915: Split i915_gem_timeline into individual timelines") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180512084957.9829-1-chris@chris-wilson.co.uk
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 89bf5d67cb74..0a2070112b66 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3119,7 +3119,7 @@ static void engine_skip_context(struct i915_request *request)
3119 GEM_BUG_ON(timeline == &engine->timeline); 3119 GEM_BUG_ON(timeline == &engine->timeline);
3120 3120
3121 spin_lock_irqsave(&engine->timeline.lock, flags); 3121 spin_lock_irqsave(&engine->timeline.lock, flags);
3122 spin_lock(&timeline->lock); 3122 spin_lock_nested(&timeline->lock, SINGLE_DEPTH_NESTING);
3123 3123
3124 list_for_each_entry_continue(request, &engine->timeline.requests, link) 3124 list_for_each_entry_continue(request, &engine->timeline.requests, link)
3125 if (request->ctx == hung_ctx) 3125 if (request->ctx == hung_ctx)