diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-14 23:41:00 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-15 00:00:25 +0300 |
commit | 663f71e73ffd16327745f752269f5059bf196464 (patch) | |
tree | 110d42bd74b4e23014e9e7da1d53680ead2f0d73 /drivers/gpu/drm/i915/intel_lrc.c | |
parent | d55ac5bf97c6b00539526e2aad8c938376681786 (diff) | |
download | linux-663f71e73ffd16327745f752269f5059bf196464.tar.xz |
drm/i915: Remove engine->execlist_lock
The execlist_lock is now completely subsumed by the engine->timeline->lock,
and so we can remove the redundant layer of locking.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114204105.29171-5-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index dca41834dec1..d1aea7462515 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -471,7 +471,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) */ spin_lock_irqsave(&engine->timeline->lock, flags); - spin_lock(&engine->execlist_lock); list_for_each_entry(cursor, &engine->execlist_queue, execlist_link) { /* Can we combine this request with the current port? It has to * be the same context/ringbuffer and not have any exceptions @@ -524,7 +523,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) i915_gem_request_assign(&port->request, last); } - spin_unlock(&engine->execlist_lock); spin_unlock_irqrestore(&engine->timeline->lock, flags); if (submit) @@ -633,13 +631,14 @@ static void execlists_submit_request(struct drm_i915_gem_request *request) struct intel_engine_cs *engine = request->engine; unsigned long flags; - spin_lock_irqsave(&engine->execlist_lock, flags); + /* Will be called from irq-context when using foreign fences. */ + spin_lock_irqsave(&engine->timeline->lock, flags); list_add_tail(&request->execlist_link, &engine->execlist_queue); if (execlists_elsp_idle(engine)) tasklet_hi_schedule(&engine->irq_tasklet); - spin_unlock_irqrestore(&engine->execlist_lock, flags); + spin_unlock_irqrestore(&engine->timeline->lock, flags); } int intel_logical_ring_alloc_request_extras(struct drm_i915_gem_request *request) |