]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Pass intel_gt to intel_engines_init
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 22 Oct 2019 09:47:19 +0000 (10:47 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Oct 2019 11:16:42 +0000 (12:16 +0100)
Engines belong to the GT so make it indicative in the API.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191022094726.3001-6-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/gt/intel_engine.h
drivers/gpu/drm/i915/gt/intel_engine_cs.c
drivers/gpu/drm/i915/i915_gem.c

index a947bbb60a2201b0a44b9397018be6fc81e95d63..c2d9d67c63d99a253e32a4dd6c5d76624e5be8be 100644 (file)
@@ -326,7 +326,7 @@ __intel_ring_space(unsigned int head, unsigned int tail, unsigned int size)
 
 int intel_engines_init_mmio(struct intel_gt *gt);
 int intel_engines_setup(struct intel_gt *gt);
-int intel_engines_init(struct drm_i915_private *i915);
+int intel_engines_init(struct intel_gt *gt);
 void intel_engines_cleanup(struct intel_gt *gt);
 
 int intel_engine_init_common(struct intel_engine_cs *engine);
index af64f9079b0f10746a0a938a037582bef52ebd66..0e20713603ec1f6d3f1b4368d7f3ac1c667b7d10 100644 (file)
@@ -451,23 +451,23 @@ cleanup:
 
 /**
  * intel_engines_init() - init the Engine Command Streamers
- * @i915: i915 device private
+ * @gt: pointer to struct intel_gt
  *
  * Return: non-zero if the initialization failed.
  */
-int intel_engines_init(struct drm_i915_private *i915)
+int intel_engines_init(struct intel_gt *gt)
 {
        int (*init)(struct intel_engine_cs *engine);
        struct intel_engine_cs *engine;
        enum intel_engine_id id;
        int err;
 
-       if (HAS_EXECLISTS(i915))
+       if (HAS_EXECLISTS(gt->i915))
                init = intel_execlists_submission_init;
        else
                init = intel_ring_submission_init;
 
-       for_each_engine(engine, i915, id) {
+       for_each_engine(engine, gt, id) {
                err = init(engine);
                if (err)
                        goto cleanup;
@@ -476,7 +476,7 @@ int intel_engines_init(struct drm_i915_private *i915)
        return 0;
 
 cleanup:
-       intel_engines_cleanup(&i915->gt);
+       intel_engines_cleanup(gt);
        return err;
 }
 
index fb45c7ecc607ab7f12d38820b6e749bcd3d9cee4..34273269f8f9115d37d9abcfd75df29fd3992c81 100644 (file)
@@ -1261,7 +1261,7 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
                goto err_scratch;
        }
 
-       ret = intel_engines_init(dev_priv);
+       ret = intel_engines_init(&dev_priv->gt);
        if (ret) {
                GEM_BUG_ON(ret == -EIO);
                goto err_context;