From 4086cdb6550a4e957fd436c77a6260204e026538 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 13 Jun 2008 15:38:13 -0700 Subject: [intel-gem] Left the last exec buffer pinned. oops. Loop end variable 'pinned' was set one too low. --- linux-core/i915_gem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c index d14b2f2d..210ae9d9 100644 --- a/linux-core/i915_gem.c +++ b/linux-core/i915_gem.c @@ -1647,7 +1647,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, DRM_ERROR("object bind and relocate failed %d\n", ret); goto err; } - pinned = i; + pinned = i + 1; } /* Set the pending read domains for the batch buffer to COMMAND */ @@ -1745,7 +1745,8 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, err: if (object_list != NULL) { for (i = 0; i < pinned; i++) - i915_gem_object_unpin (object_list[i]); + i915_gem_object_unpin(object_list[i]); + for (i = 0; i < args->buffer_count; i++) drm_gem_object_unreference(object_list[i]); } -- cgit v1.2.3