drm/i915: Move w/a LRI debug message from context-init to driver load
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 1 Mar 2017 12:11:31 +0000 (12:11 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 1 Mar 2017 20:29:24 +0000 (20:29 +0000)
The spam of every context initialisation saying the same thing is annoying
me! Move the information to the setup of the engine.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170301121131.11588-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/intel_engine_cs.c

index c4d4698f98e7cc6f69e76d651063a9cbb9210fd2..c58339b22f6a6eb7199c09443600bf608039e9ed 100644 (file)
@@ -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;
 }