Skip to content

Commit

Permalink
Revert "drm/i915/execlists: Use a local lock for dfs_link access"
Browse files Browse the repository at this point in the history
This reverts commit 27745e8 ("drm/i915/execlists: Use a local lock
for dfs_link access") as the struct_mutex was required to prevent
concurrent retiring and freeing, now restored in the previous patch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161128143649.4289-2-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
  • Loading branch information
Chris Wilson committed Nov 29, 2016
1 parent 92117f0 commit 70cd147
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/gpu/drm/i915/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,6 @@ pt_lock_engine(struct i915_priotree *pt, struct intel_engine_cs *locked)

static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
{
static DEFINE_MUTEX(lock);
struct intel_engine_cs *engine = NULL;
struct i915_dependency *dep, *p;
struct i915_dependency stack;
Expand All @@ -704,8 +703,8 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
if (prio <= READ_ONCE(request->priotree.priority))
return;

/* Need global lock to use the temporary link inside i915_dependency */
mutex_lock(&lock);
/* Need BKL in order to use the temporary link inside i915_dependency */
lockdep_assert_held(&request->i915->drm.struct_mutex);

stack.signaler = &request->priotree;
list_add(&stack.dfs_link, &dfs);
Expand Down Expand Up @@ -772,8 +771,6 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
if (engine)
spin_unlock_irq(&engine->timeline->lock);

mutex_unlock(&lock);

/* XXX Do we need to preempt to make room for us and our deps? */
}

Expand Down

0 comments on commit 70cd147

Please sign in to comment.