aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-27 08:18:19 -0400
committerEric Anholt <eric@anholt.net>2010-05-28 13:49:38 -0400
commit3d1cc47037f36004b10681d3436ef0942ebb279b (patch)
tree7d20448e21382196b2c39734b56d81bbf614c44b
parentac0c6b5ad3b3b513e1057806d4b7627fcc0ecc27 (diff)
drm/i915: Remove spurious warning "Failure to install fence"
This particular warning is harmless as we emit during the normal pinning process where the batch buffer requires more fences than is available without eviction. Only if we fail to evict enough fences does this become a problem, so include the requested number of fences in the ultimate *error* message. v2: Remember to compile test even trial patches to remove warnings. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a5ca9599b232..b87945db1021 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3327,9 +3327,6 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj,
3327 if (need_fence) { 3327 if (need_fence) {
3328 ret = i915_gem_object_get_fence_reg(obj); 3328 ret = i915_gem_object_get_fence_reg(obj);
3329 if (ret != 0) { 3329 if (ret != 0) {
3330 if (ret != -EBUSY && ret != -ERESTARTSYS)
3331 DRM_ERROR("Failure to install fence: %d\n",
3332 ret);
3333 i915_gem_object_unpin(obj); 3330 i915_gem_object_unpin(obj);
3334 return ret; 3331 return ret;
3335 } 3332 }
@@ -3815,11 +3812,19 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
3815 if (ret != -ENOSPC || pin_tries >= 1) { 3812 if (ret != -ENOSPC || pin_tries >= 1) {
3816 if (ret != -ERESTARTSYS) { 3813 if (ret != -ERESTARTSYS) {
3817 unsigned long long total_size = 0; 3814 unsigned long long total_size = 0;
3818 for (i = 0; i < args->buffer_count; i++) 3815 int num_fences = 0;
3816 for (i = 0; i < args->buffer_count; i++) {
3817 obj_priv = object_list[i]->driver_private;
3818
3819 total_size += object_list[i]->size; 3819 total_size += object_list[i]->size;
3820 DRM_ERROR("Failed to pin buffer %d of %d, total %llu bytes: %d\n", 3820 num_fences +=
3821 exec_list[i].flags & EXEC_OBJECT_NEEDS_FENCE &&
3822 obj_priv->tiling_mode != I915_TILING_NONE;
3823 }
3824 DRM_ERROR("Failed to pin buffer %d of %d, total %llu bytes, %d fences: %d\n",
3821 pinned+1, args->buffer_count, 3825 pinned+1, args->buffer_count,
3822 total_size, ret); 3826 total_size, num_fences,
3827 ret);
3823 DRM_ERROR("%d objects [%d pinned], " 3828 DRM_ERROR("%d objects [%d pinned], "
3824 "%d object bytes [%d pinned], " 3829 "%d object bytes [%d pinned], "
3825 "%d/%d gtt bytes\n", 3830 "%d/%d gtt bytes\n",