drm/i915: BUG_ON put_pages later
authorBen Widawsky <ben@bwidawsk.net>
Thu, 1 Aug 2013 00:00:04 +0000 (17:00 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 5 Aug 2013 17:04:13 +0000 (19:04 +0200)
commit3e12302705a961cfe86d52155b4a8cbb34214748
tree7e0bce798c6a0f8c0badac9953cd74a73f61d8e2
parent3089c6f239d7d2c4cb2dd5c353e8984cf79af1d7
drm/i915: BUG_ON put_pages later

With multiple VMs, the eviction code benefits from being able to blindly
put pages without needing to know if there are any entities still
holding on to those pages. As such it's preferable to return the -EBUSY
before the BUG.

Eviction code is the only user for now, but overall it makes sense
anyway, IMO.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c