[Intel-gfx] [PATCH 04/11] drm/i915: Propagate error from unbinding an unfenceable object.
Jesse Barnes
jbarnes at virtuousgeek.org
Thu May 27 18:05:04 CEST 2010
On Thu, 27 May 2010 13:18:15 +0100
Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
> 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 1c65f0b..6425c2a 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,
> obj_priv->tiling_mode != I915_TILING_NONE;
>
> /* Check fence reg constraints and rebind if necessary */
> - if (need_fence && !i915_gem_object_fence_offset_ok(obj,
> - obj_priv->tiling_mode))
> - i915_gem_object_unbind(obj);
> + if (need_fence &&
> + !i915_gem_object_fence_offset_ok(obj,
> + obj_priv->tiling_mode)) {
> + ret = i915_gem_object_unbind(obj);
> + if (ret)
> + return ret;
> + }
>
> /* Choose the GTT offset for our buffer and put it there. */
> ret = i915_gem_object_pin(obj, (uint32_t) entry->alignment);
Looks ok to me. Out of curiosity, are you seeing errors here on unbind
with some loads?
Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list