aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-06-06 04:46:03 -0400
committerEric Anholt <eric@anholt.net>2009-06-09 17:51:39 -0400
commit2939e1f5331455d17a4a704dd6210e1474002545 (patch)
tree15679a405ce113260f755ab1f441e620ae7cc8db /drivers
parent21d509e339565c82887733c02465bb7f5866c8f5 (diff)
drm/i915: NOMEM->NOSPC
To differentiate between encountering an out-of-memory error with running out of space in the aperture, use ENOSPC for the later. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index cf5dc08b6fa..c0ae6bbbd9b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2005,7 +2005,7 @@ i915_gem_evict_something(struct drm_device *dev)
2005 /* If we didn't do any of the above, there's nothing to be done 2005 /* If we didn't do any of the above, there's nothing to be done
2006 * and we just can't fit it in. 2006 * and we just can't fit it in.
2007 */ 2007 */
2008 return -ENOMEM; 2008 return -ENOSPC;
2009 } 2009 }
2010 return ret; 2010 return ret;
2011} 2011}
@@ -2020,7 +2020,7 @@ i915_gem_evict_everything(struct drm_device *dev)
2020 if (ret != 0) 2020 if (ret != 0)
2021 break; 2021 break;
2022 } 2022 }
2023 if (ret == -ENOMEM) 2023 if (ret == -ENOSPC)
2024 return 0; 2024 return 0;
2025 return ret; 2025 return ret;
2026} 2026}
@@ -2229,7 +2229,7 @@ try_again:
2229 loff_t offset; 2229 loff_t offset;
2230 2230
2231 if (avail == 0) 2231 if (avail == 0)
2232 return -ENOMEM; 2232 return -ENOSPC;
2233 2233
2234 for (i = dev_priv->fence_reg_start; 2234 for (i = dev_priv->fence_reg_start;
2235 i < dev_priv->num_fence_regs; i++) { 2235 i < dev_priv->num_fence_regs; i++) {
@@ -2378,7 +2378,7 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
2378 spin_unlock(&dev_priv->mm.active_list_lock); 2378 spin_unlock(&dev_priv->mm.active_list_lock);
2379 if (lists_empty) { 2379 if (lists_empty) {
2380 DRM_ERROR("GTT full, but LRU list empty\n"); 2380 DRM_ERROR("GTT full, but LRU list empty\n");
2381 return -ENOMEM; 2381 return -ENOSPC;
2382 } 2382 }
2383 2383
2384 ret = i915_gem_evict_something(dev); 2384 ret = i915_gem_evict_something(dev);
@@ -3349,7 +3349,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
3349 break; 3349 break;
3350 3350
3351 /* error other than GTT full, or we've already tried again */ 3351 /* error other than GTT full, or we've already tried again */
3352 if (ret != -ENOMEM || pin_tries >= 1) { 3352 if (ret != -ENOSPC || pin_tries >= 1) {
3353 if (ret != -ERESTARTSYS) 3353 if (ret != -ERESTARTSYS)
3354 DRM_ERROR("Failed to pin buffers %d\n", ret); 3354 DRM_ERROR("Failed to pin buffers %d\n", ret);
3355 goto err; 3355 goto err;