diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-27 08:18:15 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-05-28 13:42:52 -0400 |
commit | 808b24d6ed8b155aac17007788390ebfde263f30 (patch) | |
tree | e7c848fccd7bfdbf837f3814c537f46a9086051f /drivers/gpu/drm/i915 | |
parent | b118c1e363befe3d74469f4a014ce6353097f08a (diff) |
drm/i915: Propagate error from unbinding an unfenceable object.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 1c65f0b591fc..6425c2a4b11f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3307,9 +3307,13 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj, | |||
3307 | obj_priv->tiling_mode != I915_TILING_NONE; | 3307 | obj_priv->tiling_mode != I915_TILING_NONE; |
3308 | 3308 | ||
3309 | /* Check fence reg constraints and rebind if necessary */ | 3309 | /* Check fence reg constraints and rebind if necessary */ |
3310 | if (need_fence && !i915_gem_object_fence_offset_ok(obj, | 3310 | if (need_fence && |
3311 | obj_priv->tiling_mode)) | 3311 | !i915_gem_object_fence_offset_ok(obj, |
3312 | i915_gem_object_unbind(obj); | 3312 | obj_priv->tiling_mode)) { |
3313 | ret = i915_gem_object_unbind(obj); | ||
3314 | if (ret) | ||
3315 | return ret; | ||
3316 | } | ||
3313 | 3317 | ||
3314 | /* Choose the GTT offset for our buffer and put it there. */ | 3318 | /* Choose the GTT offset for our buffer and put it there. */ |
3315 | ret = i915_gem_object_pin(obj, (uint32_t) entry->alignment); | 3319 | ret = i915_gem_object_pin(obj, (uint32_t) entry->alignment); |