drm/i915: Reject bind_to_gtt() early if object > aperture
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 27 May 2010 12:18:21 +0000 (13:18 +0100)
committerEric Anholt <eric@anholt.net>
Fri, 28 May 2010 17:52:15 +0000 (10:52 -0700)
commit654fc6073f68efa3b6c466825749e73e7fbb92cd
treeb6b0c3905dd1777a3412c855cec3b0db0785dbc7
parent85cd4612fdab4e837d7eea048a697c75d0477d3b
drm/i915: Reject bind_to_gtt() early if object > aperture

If the object is bigger than the entire aperture, reject it early
before evicting everything in a vain attempt to find space.

v2: Use E2BIG as suggested by Owain G. Ainsworth.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c