Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306986
b: refs/heads/master
c: d1dd20a
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Mar 27, 2012
1 parent 95c77b6 commit 399a584
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9021f284e9eaff1ed1d3e6bab7c90e3712201ac2
refs/heads/master: d1dd20a96524ac462ed4f28dae168b9637f079e5
4 changes: 1 addition & 3 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem_gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,14 +429,15 @@ void i915_gem_init_global_gtt(struct drm_device *dev,
{
drm_i915_private_t *dev_priv = dev->dev_private;

drm_mm_init(&dev_priv->mm.gtt_space, start, end - start);
/* Substract the guard page ... */
drm_mm_init(&dev_priv->mm.gtt_space, start, end - start - PAGE_SIZE);

dev_priv->mm.gtt_start = start;
dev_priv->mm.gtt_mappable_end = mappable_end;
dev_priv->mm.gtt_end = end;
dev_priv->mm.gtt_total = end - start;
dev_priv->mm.mappable_gtt_total = min(end, mappable_end) - start;

/* Take over this portion of the GTT */
/* ... but ensure that we clear the entire range. */
intel_gtt_clear_range(start / PAGE_SIZE, (end-start) / PAGE_SIZE);
}

0 comments on commit 399a584

Please sign in to comment.