[10/21] drm/i915: Move scheduler caps init to i915_gem_init
diff mbox series

Message ID 20190606093639.9372-11-tvrtko.ursulin@linux.intel.com
State New
Headers show
Series
  • Implicit dev_priv removal
Related show

Commit Message

Tvrtko Ursulin June 6, 2019, 9:36 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

This step is more about the GEM and less about the hardware so move it to
the more appropriate place.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Chris Wilson June 6, 2019, 9:59 a.m. UTC | #1
Quoting Tvrtko Ursulin (2019-06-06 10:36:28)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> This step is more about the GEM and less about the hardware so move it to
> the more appropriate place.

Just happens to be the wrong place. It needs to be reset after we
restart the HW as the capabilities do change following wedging.
-Chris

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4739a6307c32..8eee9ecf0adf 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1311,7 +1311,6 @@  int i915_gem_init_hw(struct drm_i915_private *dev_priv)
 
 	intel_uncore_forcewake_put(&dev_priv->uncore, FORCEWAKE_ALL);
 
-	intel_engines_set_scheduler_caps(dev_priv);
 	return 0;
 
 cleanup_uc:
@@ -1567,6 +1566,8 @@  int i915_gem_init(struct drm_i915_private *dev_priv)
 		goto err_context;
 	}
 
+	intel_engines_set_scheduler_caps(dev_priv);
+
 	intel_init_gt_powersave(dev_priv);
 
 	ret = intel_uc_init(dev_priv);