drm/i915: Push the use-semaphore marker onto the intel_context
Instead of rummaging through the intel_context to peek at the GEM context in the middle of request submission to decide whether to use semaphores, store that information on the intel_context itself. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191220101230.256839-2-chris@chris-wilson.co.uk
This commit is contained in:
@@ -917,18 +917,16 @@ i915_request_await_request(struct i915_request *to, struct i915_request *from)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (to->engine == from->engine) {
|
||||
if (to->engine == from->engine)
|
||||
ret = i915_sw_fence_await_sw_fence_gfp(&to->submit,
|
||||
&from->submit,
|
||||
I915_FENCE_GFP);
|
||||
} else if (intel_engine_has_semaphores(to->engine) &&
|
||||
to->context->gem_context->sched.priority >= I915_PRIORITY_NORMAL) {
|
||||
else if (intel_context_use_semaphores(to->context))
|
||||
ret = emit_semaphore_wait(to, from, I915_FENCE_GFP);
|
||||
} else {
|
||||
else
|
||||
ret = i915_sw_fence_await_dma_fence(&to->submit,
|
||||
&from->fence, 0,
|
||||
I915_FENCE_GFP);
|
||||
}
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
Reference in New Issue
Block a user