]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
drm/i915: Conditionally carve out GGTT PDE
authorBen Widawsky <ben@bwidawsk.net>
Tue, 9 Apr 2013 01:43:52 +0000 (18:43 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 18 Apr 2013 07:43:14 +0000 (09:43 +0200)
It only works that way on GEN6 and GEN7. Let's not assume GENn will be
the same.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c

index 0f214fb1a75fae9adcaca5f1cf3187ebea4b5ea8..b4ba488e5c83b313244aa8df2382970837bc4ce5 100644 (file)
@@ -623,9 +623,12 @@ void i915_gem_init_global_gtt(struct drm_device *dev)
 
        if (intel_enable_ppgtt(dev) && HAS_ALIASING_PPGTT(dev)) {
                int ret;
-               /* PPGTT pdes are stolen from global gtt ptes, so shrink the
-                * aperture accordingly when using aliasing ppgtt. */
-               gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE;
+
+               if (INTEL_INFO(dev)->gen <= 7) {
+                       /* PPGTT pdes are stolen from global gtt ptes, so shrink the
+                        * aperture accordingly when using aliasing ppgtt. */
+                       gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE;
+               }
 
                i915_gem_setup_global_gtt(dev, 0, mappable_size, gtt_size);