summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-06-13 15:38:13 -0700
committerKeith Packard <keithp@keithp.com>2008-06-13 15:38:13 -0700
commit4086cdb6550a4e957fd436c77a6260204e026538 (patch)
tree8df2ba62aeab06bfc41d13f0114634e2315a1b69 /linux-core
parentbaf521369478eff2842b99feda16f9d145402d27 (diff)
[intel-gem] Left the last exec buffer pinned. oops.
Loop end variable 'pinned' was set one too low.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/i915_gem.c5
1 files 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]);
}