]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: don't trash the gtt when running out of fences
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 14 Dec 2011 12:57:09 +0000 (13:57 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 29 Jan 2012 17:24:10 +0000 (18:24 +0100)
commitda4a051b2bd1fc87a1eec6e66ac1e70f1a610dda
tree1645cf5a2150b6e081b2fe4d79e7f7a282d9aff2
parent6d9db736450d0dee62783c35ba246772aba3dc06
drm/i915: don't trash the gtt when running out of fences

With the fence accounting fixed up in the previous commit not finding
enough fences is a fatal error and userspace bug. Trashing the entire
gtt is not gonna turn up that missing fence, so don't to this by
returning another error thatn ENOSPC.

This has the added benefit that it's easier to distinguish fence
accounting errors from gtt space accounting issues.

TTM serves as precendence for the EDEADLK error code - it returns it
when the reservation code needs resources already blocked by the
current reservation.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c