aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2011-12-14 07:57:09 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-29 12:24:10 -0500
commit39965b376601314ba374b8fa3944f5957d4ff2de (patch)
tree1645cf5a2150b6e081b2fe4d79e7f7a282d9aff2 /drivers/gpu/drm/i915/i915_gem.c
parent1690e1eb7a9021826853e181baa48dd77090da28 (diff)
drm/i915: don't trash the gtt when running out of fences
With the fence accounting fixed up in the previous commit not finding enough fences is a fatal error and userspace bug. Trashing the entire gtt is not gonna turn up that missing fence, so don't to this by returning another error thatn ENOSPC. This has the added benefit that it's easier to distinguish fence accounting errors from gtt space accounting issues. TTM serves as precendence for the EDEADLK error code - it returns it when the reservation code needs resources already blocked by the current reservation. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index c78930ed2e80..721924150d02 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2566,7 +2566,7 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj,
2566 2566
2567 reg = i915_find_fence_reg(dev, pipelined); 2567 reg = i915_find_fence_reg(dev, pipelined);
2568 if (reg == NULL) 2568 if (reg == NULL)
2569 return -ENOSPC; 2569 return -EDEADLK;
2570 2570
2571 ret = i915_gem_object_flush_fence(obj, pipelined); 2571 ret = i915_gem_object_flush_fence(obj, pipelined);
2572 if (ret) 2572 if (ret)