intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 08/11] drm/i915: Remove spurious warning "Failure to install fence"
Date: Thu, 27 May 2010 13:18:19 +0100	[thread overview]
Message-ID: <1274962702-6530-9-git-send-email-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <1274962702-6530-1-git-send-email-chris@chris-wilson.co.uk>

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>
---
 drivers/gpu/drm/i915/i915_gem.c |   17 +++++++++++------
 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 a5ca959..b87945d 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,
 	if (need_fence) {
 		ret = i915_gem_object_get_fence_reg(obj);
 		if (ret != 0) {
-			if (ret != -EBUSY && ret != -ERESTARTSYS)
-				DRM_ERROR("Failure to install fence: %d\n",
-					  ret);
 			i915_gem_object_unpin(obj);
 			return ret;
 		}
@@ -3815,11 +3812,19 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
 		if (ret != -ENOSPC || pin_tries >= 1) {
 			if (ret != -ERESTARTSYS) {
 				unsigned long long total_size = 0;
-				for (i = 0; i < args->buffer_count; i++)
+				int num_fences = 0;
+				for (i = 0; i < args->buffer_count; i++) {
+					obj_priv = object_list[i]->driver_private;
+
 					total_size += object_list[i]->size;
-				DRM_ERROR("Failed to pin buffer %d of %d, total %llu bytes: %d\n",
+					num_fences +=
+						exec_list[i].flags & EXEC_OBJECT_NEEDS_FENCE &&
+						obj_priv->tiling_mode != I915_TILING_NONE;
+				}
+				DRM_ERROR("Failed to pin buffer %d of %d, total %llu bytes, %d fences: %d\n",
 					  pinned+1, args->buffer_count,
-					  total_size, ret);
+					  total_size, num_fences,
+					  ret);
 				DRM_ERROR("%d objects [%d pinned], "
 					  "%d object bytes [%d pinned], "
 					  "%d/%d gtt bytes\n",
-- 
1.7.1

  parent reply	other threads:[~2010-05-27 12:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 12:18 A compendium of trivial patches Chris Wilson
2010-05-27 12:18 ` [PATCH 01/11] drm/i915: Only print an message if there was an error Chris Wilson
2010-05-27 12:18 ` [PATCH 02/11] drm/i915: Hold the spinlock whilst resetting unpin_work along error path Chris Wilson
2010-05-27 16:03   ` Jesse Barnes
2010-05-27 12:18 ` [PATCH 03/11] drm/i915: Avoid nesting of domain changes when setting display plane Chris Wilson
2010-05-27 12:18 ` [PATCH 04/11] drm/i915: Propagate error from unbinding an unfenceable object Chris Wilson
2010-05-27 16:05   ` Jesse Barnes
2010-05-27 16:32     ` Chris Wilson
2010-05-27 12:18 ` [PATCH 05/11] drm/i915: Only print "nothing to do" debug message as required Chris Wilson
2010-05-27 12:18 ` [PATCH 06/11] drm/i915: Include pitch in set_base debug statement Chris Wilson
2010-05-27 12:18 ` [PATCH 07/11] drm/i915: Rebind bo if currently bound with incorrect alignment Chris Wilson
2010-05-27 12:18 ` Chris Wilson [this message]
2010-05-27 12:18 ` [PATCH 09/11] drm/i915: Check error code whilst moving buffer to GTT domain Chris Wilson
2010-05-27 12:18 ` [PATCH 10/11] drm/i915: Reject bind_to_gtt() early if object > aperture Chris Wilson
2010-05-27 12:18 ` [PATCH 11/11] drm/i915: Cleanup after failed initialization of ringbuffers Chris Wilson
2010-05-28 18:01   ` Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274962702-6530-9-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).