summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorBen Widawsky2013-04-09 03:43:56 +0200
committerDaniel Vetter2013-04-18 09:43:16 +0200
commitb7c36d25461ae41e6562a2f70cb3423bcf8af2d2 (patch)
tree6b6a9bb0d909fb2ee7c90bdb79aa1b316ddc69ed /drivers/gpu/drm/i915/i915_gem.c
parentdrm/i915: NULL aliasing_ppgtt on cleanup (diff)
downloadkernel-qcow2-linux-b7c36d25461ae41e6562a2f70cb3423bcf8af2d2.tar.gz
kernel-qcow2-linux-b7c36d25461ae41e6562a2f70cb3423bcf8af2d2.tar.xz
kernel-qcow2-linux-b7c36d25461ae41e6562a2f70cb3423bcf8af2d2.zip
drm/i915: Allow PPGTT enable to fail
I'm really not happy that we have to support this, but this will be the simplest way to handle cases where PPGTT init can fail, which I promise will be coming in the future. v2: Resolve conflicts due to patch series reordering. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1) 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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8a73a68a79ff..da6d6de0a8b9 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4029,8 +4029,13 @@ i915_gem_init_hw(struct drm_device *dev)
* contexts before PPGTT.
*/
i915_gem_context_init(dev);
- if (dev_priv->mm.aliasing_ppgtt)
- dev_priv->mm.aliasing_ppgtt->enable(dev);
+ if (dev_priv->mm.aliasing_ppgtt) {
+ ret = dev_priv->mm.aliasing_ppgtt->enable(dev);
+ if (ret) {
+ i915_gem_cleanup_aliasing_ppgtt(dev);
+ DRM_INFO("PPGTT enable failed. This is not fatal, but unexpected\n");
+ }
+ }
return 0;
}