Commit ab9e2f77 authored by Chris Wilson's avatar Chris Wilson

drm/i915/gt: Pull engine w/a initialisation into common

We need to setup the workarounds on all engines, with the knowledge
about which platforms each workaround applies to kept together in the
workaround list. As such, we can pull the w/a initialisation into the
common setup and try to avoid duplicating knowledge about when to setup
the workarounds.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190703135805.7310-2-chris@chris-wilson.co.uk
parent 4a54da35
...@@ -657,7 +657,6 @@ int i915_gem_contexts_init(struct drm_i915_private *dev_priv) ...@@ -657,7 +657,6 @@ int i915_gem_contexts_init(struct drm_i915_private *dev_priv)
GEM_BUG_ON(dev_priv->kernel_context); GEM_BUG_ON(dev_priv->kernel_context);
GEM_BUG_ON(dev_priv->preempt_context); GEM_BUG_ON(dev_priv->preempt_context);
intel_engine_init_ctx_wa(dev_priv->engine[RCS0]);
init_contexts(dev_priv); init_contexts(dev_priv);
/* lowest priority; idle task */ /* lowest priority; idle task */
......
...@@ -636,6 +636,10 @@ static int intel_engine_setup_common(struct intel_engine_cs *engine) ...@@ -636,6 +636,10 @@ static int intel_engine_setup_common(struct intel_engine_cs *engine)
engine->sseu = engine->sseu =
intel_sseu_from_device_info(&RUNTIME_INFO(engine->i915)->sseu); intel_sseu_from_device_info(&RUNTIME_INFO(engine->i915)->sseu);
intel_engine_init_workarounds(engine);
intel_engine_init_whitelist(engine);
intel_engine_init_ctx_wa(engine);
return 0; return 0;
} }
......
...@@ -2807,9 +2807,6 @@ int intel_execlists_submission_init(struct intel_engine_cs *engine) ...@@ -2807,9 +2807,6 @@ int intel_execlists_submission_init(struct intel_engine_cs *engine)
if (ret) if (ret)
return ret; return ret;
intel_engine_init_workarounds(engine);
intel_engine_init_whitelist(engine);
if (intel_init_workaround_bb(engine)) if (intel_init_workaround_bb(engine))
/* /*
* We continue even if we fail to initialize WA batch * We continue even if we fail to initialize WA batch
......
...@@ -1364,7 +1364,7 @@ void intel_engine_init_workarounds(struct intel_engine_cs *engine) ...@@ -1364,7 +1364,7 @@ void intel_engine_init_workarounds(struct intel_engine_cs *engine)
{ {
struct i915_wa_list *wal = &engine->wa_list; struct i915_wa_list *wal = &engine->wa_list;
if (GEM_WARN_ON(INTEL_GEN(engine->i915) < 8)) if (INTEL_GEN(engine->i915) < 8)
return; return;
wa_init_start(wal, engine->name); wa_init_start(wal, engine->name);
......
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