Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199609
b: refs/heads/master
c: 654fc60
h: refs/heads/master
i:
  199607: b6af910
v: v3
  • Loading branch information
Chris Wilson authored and Eric Anholt committed May 28, 2010
1 parent 3299bff commit 26e075a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85cd4612fdab4e837d7eea048a697c75d0477d3b
refs/heads/master: 654fc6073f68efa3b6c466825749e73e7fbb92cd
8 changes: 8 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2648,6 +2648,14 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
return -EINVAL;
}

/* If the object is bigger than the entire aperture, reject it early
* before evicting everything in a vain attempt to find space.
*/
if (obj->size > dev->gtt_total) {
DRM_ERROR("Attempting to bind an object larger than the aperture\n");
return -E2BIG;
}

search_free:
free_space = drm_mm_search_free(&dev_priv->mm.gtt_space,
obj->size, alignment, 0);
Expand Down

0 comments on commit 26e075a

Please sign in to comment.