Commit a5e93b42 authored by Chris Wilson's avatar Chris Wilson

drm/i915/execlists: Select arb on/off around batches based on preemption

Decide whether or not we need to disable arbitration within user batches
based on our intel_engine_has_preemption() flag.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213151331.1788371-1-chris@chris-wilson.co.uk
parent 0f100b70
...@@ -3256,7 +3256,7 @@ static void execlists_reset_finish(struct intel_engine_cs *engine) ...@@ -3256,7 +3256,7 @@ static void execlists_reset_finish(struct intel_engine_cs *engine)
atomic_read(&execlists->tasklet.count)); atomic_read(&execlists->tasklet.count));
} }
static int gen8_emit_bb_start(struct i915_request *rq, static int gen8_emit_bb_start_noarb(struct i915_request *rq,
u64 offset, u32 len, u64 offset, u32 len,
const unsigned int flags) const unsigned int flags)
{ {
...@@ -3292,7 +3292,7 @@ static int gen8_emit_bb_start(struct i915_request *rq, ...@@ -3292,7 +3292,7 @@ static int gen8_emit_bb_start(struct i915_request *rq,
return 0; return 0;
} }
static int gen9_emit_bb_start(struct i915_request *rq, static int gen8_emit_bb_start(struct i915_request *rq,
u64 offset, u32 len, u64 offset, u32 len,
const unsigned int flags) const unsigned int flags)
{ {
...@@ -3767,6 +3767,11 @@ void intel_execlists_set_default_submission(struct intel_engine_cs *engine) ...@@ -3767,6 +3767,11 @@ void intel_execlists_set_default_submission(struct intel_engine_cs *engine)
if (INTEL_GEN(engine->i915) >= 12) if (INTEL_GEN(engine->i915) >= 12)
engine->flags |= I915_ENGINE_HAS_RELATIVE_MMIO; engine->flags |= I915_ENGINE_HAS_RELATIVE_MMIO;
if (intel_engine_has_preemption(engine))
engine->emit_bb_start = gen8_emit_bb_start;
else
engine->emit_bb_start = gen8_emit_bb_start_noarb;
} }
static void execlists_shutdown(struct intel_engine_cs *engine) static void execlists_shutdown(struct intel_engine_cs *engine)
...@@ -3820,10 +3825,6 @@ logical_ring_default_vfuncs(struct intel_engine_cs *engine) ...@@ -3820,10 +3825,6 @@ logical_ring_default_vfuncs(struct intel_engine_cs *engine)
* until a more refined solution exists. * until a more refined solution exists.
*/ */
} }
if (IS_GEN(engine->i915, 8))
engine->emit_bb_start = gen8_emit_bb_start;
else
engine->emit_bb_start = gen9_emit_bb_start;
} }
static inline void static inline void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment