[Intel-gfx] [PATCH] drm/i915: Move w/a LRI debug message from context-init to driver load
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Mar 1 19:23:36 UTC 2017
On 01/03/2017 12:11, Chris Wilson wrote:
> The spam of every context initialisation saying the same thing is annoying
> me! Move the information to the setup of the engine.
Yes I've noticed this ugly side effect of code consolidation. :)
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
> drivers/gpu/drm/i915/intel_engine_cs.c | 38 +++++++++++++++++-----------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index c4d4698f98e7..c58339b22f6a 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -1009,30 +1009,32 @@ static int glk_init_workarounds(struct intel_engine_cs *engine)
> int init_workarounds_ring(struct intel_engine_cs *engine)
> {
> struct drm_i915_private *dev_priv = engine->i915;
> + int err;
>
> WARN_ON(engine->id != RCS);
>
> dev_priv->workarounds.count = 0;
> - dev_priv->workarounds.hw_whitelist_count[RCS] = 0;
> + dev_priv->workarounds.hw_whitelist_count[engine->id] = 0;
>
> if (IS_BROADWELL(dev_priv))
> - return bdw_init_workarounds(engine);
> -
> - if (IS_CHERRYVIEW(dev_priv))
> - return chv_init_workarounds(engine);
> -
> - if (IS_SKYLAKE(dev_priv))
> - return skl_init_workarounds(engine);
> -
> - if (IS_BROXTON(dev_priv))
> - return bxt_init_workarounds(engine);
> -
> - if (IS_KABYLAKE(dev_priv))
> - return kbl_init_workarounds(engine);
> -
> - if (IS_GEMINILAKE(dev_priv))
> - return glk_init_workarounds(engine);
> + err = bdw_init_workarounds(engine);
> + else if (IS_CHERRYVIEW(dev_priv))
> + err = chv_init_workarounds(engine);
> + else if (IS_SKYLAKE(dev_priv))
> + err = skl_init_workarounds(engine);
> + else if (IS_BROXTON(dev_priv))
> + err = bxt_init_workarounds(engine);
> + else if (IS_KABYLAKE(dev_priv))
> + err = kbl_init_workarounds(engine);
> + else if (IS_GEMINILAKE(dev_priv))
> + err = glk_init_workarounds(engine);
> + else
> + err = 0;
> + if (err)
> + return err;
>
> + DRM_DEBUG_DRIVER("%s: Number of context specific w/a: %d\n",
> + engine->name, dev_priv->workarounds.count);
> return 0;
> }
>
> @@ -1066,8 +1068,6 @@ int intel_ring_workarounds_emit(struct drm_i915_gem_request *req)
> if (ret)
> return ret;
>
> - DRM_DEBUG_DRIVER("Number of Workarounds emitted: %d\n", w->count);
> -
> return 0;
> }
>
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the Intel-gfx
mailing list