drm/i915: Avoid unbinding due to an interrupted pin_and_fence during execbuffer
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 24 Aug 2012 18:18:18 +0000 (19:18 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 24 Aug 2012 19:02:51 +0000 (21:02 +0200)
commit7788a765205f63abcb8645c16c85a968bd578f4f
tree9e3497c7c370c514a7a5974ea493fc1aeb607b04
parent050ee91f128bd767b1413383fea6c973aa464c54
drm/i915: Avoid unbinding due to an interrupted pin_and_fence during execbuffer

If we need to stall in order to complete the pin_and_fence operation
during execbuffer reservation, there is a high likelihood that the
operation will be interrupted by a signal (thanks X!). In order to
simplify the cleanup along that error path, the object was
unconditionally unbound and the error propagated. However, being
interrupted here is far more common than I would like and so we can
strive to avoid the extra work by eliminating the forced unbind.

v2: In discussion over the indecent colour of the new functions and
unwind path, we realised that we can use the new unreserve function to
clean up the code even further.

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