Skip to content

Commit ab9e2f7

Browse files
committed
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: Chris Wilson <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 4a54da3 commit ab9e2f7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

drivers/gpu/drm/i915/gem/i915_gem_context.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ int i915_gem_contexts_init(struct drm_i915_private *dev_priv)
657657
GEM_BUG_ON(dev_priv->kernel_context);
658658
GEM_BUG_ON(dev_priv->preempt_context);
659659

660-
intel_engine_init_ctx_wa(dev_priv->engine[RCS0]);
661660
init_contexts(dev_priv);
662661

663662
/* lowest priority; idle task */

drivers/gpu/drm/i915/gt/intel_engine_cs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,10 @@ static int intel_engine_setup_common(struct intel_engine_cs *engine)
636636
engine->sseu =
637637
intel_sseu_from_device_info(&RUNTIME_INFO(engine->i915)->sseu);
638638

639+
intel_engine_init_workarounds(engine);
640+
intel_engine_init_whitelist(engine);
641+
intel_engine_init_ctx_wa(engine);
642+
639643
return 0;
640644
}
641645

drivers/gpu/drm/i915/gt/intel_lrc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,9 +2807,6 @@ int intel_execlists_submission_init(struct intel_engine_cs *engine)
28072807
if (ret)
28082808
return ret;
28092809

2810-
intel_engine_init_workarounds(engine);
2811-
intel_engine_init_whitelist(engine);
2812-
28132810
if (intel_init_workaround_bb(engine))
28142811
/*
28152812
* We continue even if we fail to initialize WA batch

drivers/gpu/drm/i915/gt/intel_workarounds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,7 @@ void intel_engine_init_workarounds(struct intel_engine_cs *engine)
13641364
{
13651365
struct i915_wa_list *wal = &engine->wa_list;
13661366

1367-
if (GEM_WARN_ON(INTEL_GEN(engine->i915) < 8))
1367+
if (INTEL_GEN(engine->i915) < 8)
13681368
return;
13691369

13701370
wa_init_start(wal, engine->name);

0 commit comments

Comments
 (0)