summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorDaniel Vetter2014-08-06 20:19:53 +0200
committerDaniel Vetter2014-08-13 14:23:31 +0200
commit82460d97246a993aa49e88bf9b4154cce60f8da8 (patch)
tree1913bb6b11b86df198cfd01a862a9e2263475072 /drivers/gpu/drm/i915/i915_gem.c
parentdrm/i915: Fix up checks for aliasing ppgtt (diff)
downloadkernel-qcow2-linux-82460d97246a993aa49e88bf9b4154cce60f8da8.tar.gz
kernel-qcow2-linux-82460d97246a993aa49e88bf9b4154cce60f8da8.tar.xz
kernel-qcow2-linux-82460d97246a993aa49e88bf9b4154cce60f8da8.zip
drm/i915: Rework ppgtt init to no require an aliasing ppgtt
Currently we abuse the aliasing ppgtt to set up the ppgtt support in general. Which is a bit backwards since with full ppgtt we don't ever need the aliasing ppgtt. So untangle this and separate the ppgtt init from the aliasing ppgtt. While at it drag it out of the context enabling (which just does a switch to the default context). Note that we still have the differentiation between synchronous and asynchronous ppgtt setup, but that will soon vanish. So also correctly wire up the return value handling to be prepared for when ->switch_mm drops the synchronous parameter and could start to fail. Reviewed-by: Michel Thierry <michel.thierry@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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6a7795097017..6c2f0b886eb0 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4719,6 +4719,14 @@ i915_gem_init_hw(struct drm_device *dev)
if (ret && ret != -EIO) {
DRM_ERROR("Context enable failed %d\n", ret);
i915_gem_cleanup_ringbuffer(dev);
+
+ return ret;
+ }
+
+ ret = i915_ppgtt_init_hw(dev);
+ if (ret && ret != -EIO) {
+ DRM_ERROR("PPGTT enable failed %d\n", ret);
+ i915_gem_cleanup_ringbuffer(dev);
}
return ret;