diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2013-04-08 21:43:52 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-04-18 03:43:14 -0400 |
commit | 3eb1c005c616f110ccec25540712ce7232d5d4bf (patch) | |
tree | 3ea2b0638eeac9f51f1eb3396ad0e71fd2201770 | |
parent | 1e7d12d46733d5a6ddf3f07a1f9ab75ec12d5a19 (diff) |
drm/i915: Conditionally carve out GGTT PDE
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>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_gtt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 0f214fb1a75f..b4ba488e5c83 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c | |||
@@ -623,9 +623,12 @@ void i915_gem_init_global_gtt(struct drm_device *dev) | |||
623 | 623 | ||
624 | if (intel_enable_ppgtt(dev) && HAS_ALIASING_PPGTT(dev)) { | 624 | if (intel_enable_ppgtt(dev) && HAS_ALIASING_PPGTT(dev)) { |
625 | int ret; | 625 | int ret; |
626 | /* PPGTT pdes are stolen from global gtt ptes, so shrink the | 626 | |
627 | * aperture accordingly when using aliasing ppgtt. */ | 627 | if (INTEL_INFO(dev)->gen <= 7) { |
628 | gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE; | 628 | /* PPGTT pdes are stolen from global gtt ptes, so shrink the |
629 | * aperture accordingly when using aliasing ppgtt. */ | ||
630 | gtt_size -= I915_PPGTT_PD_ENTRIES*PAGE_SIZE; | ||
631 | } | ||
629 | 632 | ||
630 | i915_gem_setup_global_gtt(dev, 0, mappable_size, gtt_size); | 633 | i915_gem_setup_global_gtt(dev, 0, mappable_size, gtt_size); |
631 | 634 | ||