aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 051134c56ae..53d54455262 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1011,8 +1011,16 @@ static int i915_load_modeset_init(struct drm_device *dev)
1011 /* Basic memrange allocator for stolen space (aka vram) */ 1011 /* Basic memrange allocator for stolen space (aka vram) */
1012 drm_mm_init(&dev_priv->vram, 0, prealloc_size); 1012 drm_mm_init(&dev_priv->vram, 0, prealloc_size);
1013 1013
1014 /* Let GEM Manage from end of prealloc space to end of aperture */ 1014 /* Let GEM Manage from end of prealloc space to end of aperture.
1015 i915_gem_do_init(dev, prealloc_size, agp_size); 1015 *
1016 * However, leave one page at the end still bound to the scratch page.
1017 * There are a number of places where the hardware apparently
1018 * prefetches past the end of the object, and we've seen multiple
1019 * hangs with the GPU head pointer stuck in a batchbuffer bound
1020 * at the last page of the aperture. One page should be enough to
1021 * keep any prefetching inside of the aperture.
1022 */
1023 i915_gem_do_init(dev, prealloc_size, agp_size - 4096);
1016 1024
1017 ret = i915_gem_init_ringbuffer(dev); 1025 ret = i915_gem_init_ringbuffer(dev);
1018 if (ret) 1026 if (ret)
@@ -1350,6 +1358,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
1350 DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, 0), 1358 DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, 0),
1351 DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, 0), 1359 DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, 0),
1352 DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, 0), 1360 DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, 0),
1361 DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, 0),
1353}; 1362};
1354 1363
1355int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); 1364int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);