Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357996
b: refs/heads/master
c: 35451cb
h: refs/heads/master
v: v3
  • Loading branch information
Ben Widawsky authored and Daniel Vetter committed Jan 17, 2013
1 parent 9916c40 commit deb8e66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: c1fc6521efbed7d3aca4e37ac61b23300f161cd1
refs/heads/master: 35451cb6fbd3655ede4694b11761a587d400d647
4 changes: 3 additions & 1 deletion trunk/drivers/gpu/drm/i915/i915_gem_gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ void i915_gem_setup_global_gtt(struct drm_device *dev,
struct drm_i915_gem_object *obj;
unsigned long hole_start, hole_end;

BUG_ON(mappable_end > end);

/* Subtract the guard page ... */
drm_mm_init(&dev_priv->mm.gtt_space, start, end - start - PAGE_SIZE);
if (!HAS_LLC(dev))
Expand All @@ -557,7 +559,7 @@ void i915_gem_setup_global_gtt(struct drm_device *dev,
dev_priv->mm.gtt_start = start;
dev_priv->mm.gtt_mappable_end = mappable_end;
dev_priv->mm.gtt_total = end - start;
dev_priv->mm.mappable_gtt_total = min(end, mappable_end) - start;
dev_priv->mm.mappable_gtt_total = mappable_end - start;

/* Clear any non-preallocated blocks */
drm_mm_for_each_hole(entry, &dev_priv->mm.gtt_space,
Expand Down

0 comments on commit deb8e66

Please sign in to comment.