drm/i915: Simplify cleanup path in intel_engines_init
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 16 Feb 2017 12:23:22 +0000 (12:23 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 17 Feb 2017 11:39:59 +0000 (11:39 +0000)
We can call the engine cleanup vfunc instead of duplicating the
decision making here.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_engine_cs.c

index 538d845d72513abf94013a9f5e8bd48336cfd7ed..012ac94834917a7b9457fdf1c22de4d3ba6c50df 100644 (file)
@@ -210,10 +210,8 @@ cleanup:
        for_each_engine(engine, dev_priv, id) {
                if (id >= err_id)
                        kfree(engine);
-               else if (i915.enable_execlists)
-                       intel_logical_ring_cleanup(engine);
                else
-                       intel_engine_cleanup(engine);
+                       dev_priv->gt.cleanup_engine(engine);
        }
        return err;
 }