summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-20 00:33:07 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-03 09:35:28 +0100
commit35a57ffbb10840af219eeaf64718434242bb7c76 (patch)
treed8a9ca94097b8a506a3f09fe13a475489118e2fb /drivers/gpu/drm/i915/i915_gem.c
parent99be1dfe06e56b6e32f522979e9cf354dad5dc2e (diff)
downloadtalos-obmc-linux-35a57ffbb10840af219eeaf64718434242bb7c76.tar.gz
talos-obmc-linux-35a57ffbb10840af219eeaf64718434242bb7c76.zip
drm/i915: Only init engines once
We can do this. And now there's finally the clean split between software setup and hardware setup I kinda wanted since multi-ring support was merged aeons ago. It only took almost 5 years. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Dave Gordon <david.s.gordon@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0751ec9a96f1..7a83a9fa76b3 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4769,6 +4769,7 @@ int
i915_gem_init_hw(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
+ struct intel_engine_cs *ring;
int ret, i;
if (INTEL_INFO(dev)->gen < 6 && !intel_enable_gtt())
@@ -4795,9 +4796,11 @@ i915_gem_init_hw(struct drm_device *dev)
i915_gem_init_swizzling(dev);
- ret = dev_priv->gt.init_rings(dev);
- if (ret)
- return ret;
+ for_each_ring(ring, dev_priv, i) {
+ ret = ring->init_hw(ring);
+ if (ret)
+ return ret;
+ }
for (i = 0; i < NUM_L3_SLICES(dev); i++)
i915_gem_l3_remap(&dev_priv->ring[RCS], i);
@@ -4870,6 +4873,10 @@ int i915_gem_init(struct drm_device *dev)
return ret;
}
+ ret = dev_priv->gt.init_rings(dev);
+ if (ret)
+ return ret;
+
ret = i915_gem_init_hw(dev);
if (ret == -EIO) {
/* Allow ring initialisation to fail by marking the GPU as
OpenPOWER on IntegriCloud