drm/i915: Consolidate common error handling in intel_pin_and_map_ringbuffer_obj
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Apr 2016 11:11:10 +0000 (12:11 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Apr 2016 16:11:08 +0000 (17:11 +0100)
commitd2cad5358ba7c6d94343837cd4d367fb6ce2a33c
treef8ffe234744f3bc9a151b49007815076b72dec81
parent6d19245f187b28541ea9b077f88d8367054823cb
drm/i915: Consolidate common error handling in intel_pin_and_map_ringbuffer_obj

After we pin the ringbuffer into the GGTT, all error paths need to unpin
it again. Move this common step into one block, and make the unable to
iomap error code consistent (i.e. treat it as out of memory to avoid
confusing it with a invalid argument).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460113874-17366-3-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_ringbuffer.c