[patch 40/43] drm/i915: Dont double-unpin buffers if we take a signal in evict_everything().

From: Greg KH
Date: Fri Mar 20 2009 - 19:40:09 EST


2.6.28-stable review patch. If anyone has any objections, please let us know.

------------------

From: Eric Anholt <eric@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Dave Airlie <airlied@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/gpu/drm/i915/i915_gem.c | 1 +
1 file changed, 1 insertion(+)

--- 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 *d
/* 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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/