Re: [Intel-gfx] [PATCH 12/43] drm/i915: don't trash the gtt when running out of fences

2012-01-29 Thread Daniel Vetter
On Wed, Dec 14, 2011 at 03:09:24PM +, Chris Wilson wrote:
 On Wed, 14 Dec 2011 13:57:09 +0100, Daniel Vetter daniel.vet...@ffwll.ch 
 wrote:
  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.
  
  Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch
 Reviewed-by: Chris Wilson ch...@chris-wilson.co.uk
Queued for -next, thanks for the review.
-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 12/43] drm/i915: don't trash the gtt when running out of fences

2011-12-14 Thread Daniel Vetter
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.

Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch
---
 drivers/gpu/drm/i915/i915_gem.c |2 +-
 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 695709a..e995248 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2562,7 +2562,7 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj,
 
reg = i915_find_fence_reg(dev, pipelined);
if (reg == NULL)
-   return -ENOSPC;
+   return -EDEADLK;
 
ret = i915_gem_object_flush_fence(obj, pipelined);
if (ret)
-- 
1.7.7.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx