aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-12-10 10:09:41 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-23 14:55:30 -0700
commit6d314fc551bc7989f41765391055f69a70f75973 (patch)
tree03d26206c5196b2adda513d8690bc4329c48e5ab
parentd60104ad4ede25a065bddcd3b34befdc68f59444 (diff)
drm/i915: Don't double-unpin buffers if we take a signal in evict_everything().
commit b117763627ef4d24086801dd5f74c9eb2f487790 upstream. We haven't seen this in practice, but it was visible when looking at a bug report from when i915_gem_evict_everything() was broken and would always return error. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 24fe8c10b4b..79077c402a9 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2036,6 +2036,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
/* unpin all of our buffers */
for (i = 0; i < pinned; i++)
i915_gem_object_unpin(object_list[i]);
+ pinned = 0;
/* evict everyone we can from the aperture */
ret = i915_gem_evict_everything(dev);