summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-03-26 09:45:42 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-03-27 13:15:24 +0200
commitd1dd20a96524ac462ed4f28dae168b9637f079e5 (patch)
tree766c8349ac17cf3066c352b50d4359ad33212362 /drivers/gpu/drm/i915/i915_dma.c
parent9021f284e9eaff1ed1d3e6bab7c90e3712201ac2 (diff)
downloadblackbird-op-linux-d1dd20a96524ac462ed4f28dae168b9637f079e5.tar.gz
blackbird-op-linux-d1dd20a96524ac462ed4f28dae168b9637f079e5.zip
drm/i915: clear the entire gtt when using gem
We've lost our guard page somewhere in the gtt rewrite, this patch here will restore it. Exercised by i-g-t/tests/gem_cs_prefetch. v2: Substract the guard page from the range we're supposed to manage with gem. Suggested by Chris Wilson to increase the odds of old ums + gem userspace not blowing up. To compensate for the loss of a page, don't substract the guard page in the modeset init code any longer. Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44748 Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index c2d9eaedff33..4f690374fffe 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1207,8 +1207,6 @@ static int i915_load_gem_init(struct drm_device *dev)
/* 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;
- /* For paranoia keep the guard page in between. */
- gtt_size -= PAGE_SIZE;
i915_gem_init_global_gtt(dev, 0, mappable_size, gtt_size);
@@ -1227,7 +1225,7 @@ static int i915_load_gem_init(struct drm_device *dev)
* aperture.
*/
i915_gem_init_global_gtt(dev, 0, mappable_size,
- gtt_size - PAGE_SIZE);
+ gtt_size);
}
ret = i915_gem_init_hw(dev);
OpenPOWER on IntegriCloud