drm/i915: Allow i915_gem_setup_global_gtt to fail

We already needs this just as a safety check in case the preallocation
reservation dance fails. But we definitely need this to be able to
move tha aliasing ppgtt setup back out of the context code to this
place, where it belongs.

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2014-08-06 15:04:50 +02:00
parent 5dc383b05a
commit 6c5566a82c
3 changed files with 18 additions and 9 deletions

View File

@@ -4754,7 +4754,12 @@ int i915_gem_init(struct drm_device *dev)
dev_priv->gt.stop_ring = intel_logical_ring_stop;
}
i915_gem_init_userptr(dev);
ret = i915_gem_init_userptr(dev);
if (ret) {
mutex_unlock(&dev->struct_mutex);
return ret;
}
i915_gem_init_global_gtt(dev);
ret = i915_gem_context_init(dev);