All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Dave Gordon <david.s.gordon@intel.com>,
	Tom O'Rourke <Tom.O'Rourke@intel.com>
Subject: [PATCH 2/2] drm/i915: Soften error messages in i915_gem_object_create_from_data()
Date: Tue, 28 Jul 2015 14:27:16 +0100	[thread overview]
Message-ID: <1438090036-19235-2-git-send-email-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <1438090036-19235-1-git-send-email-chris@chris-wilson.co.uk>

Since we already return -EFAULT to the user, emitting an error message
*and* WARN is overkill. If the caller is upset, they can do so, but for
the purposes of debugging we need only log the erroneous values.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc:: Alex Dai <yu.dai@intel.com>
Cc: Dave Gordon <david.s.gordon@intel.com>
Cc: Tom O'Rourke <Tom.O'Rourke@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index c1ded76a6eb4..2039798f4403 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5243,8 +5243,8 @@ i915_gem_object_create_from_data(struct drm_device *dev,
 
 	i915_gem_object_unpin_pages(obj);
 
-	if (WARN_ON(bytes != size)) {
-		DRM_ERROR("Incomplete copy, wrote %zu of %zu", bytes, size);
+	if (bytes != size) {
+		DRM_DEBUG_GEM("Incomplete copy, wrote %zu of %zu", bytes, size);
 		ret = -EFAULT;
 		goto fail;
 	}
-- 
2.4.6

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-07-28 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 13:27 [PATCH 1/2] drm: Add DRM_DEBUG_GEM Chris Wilson
2015-07-28 13:27 ` Chris Wilson [this message]
2015-07-28 16:29   ` [PATCH 2/2] drm/i915: Soften error messages in i915_gem_object_create_from_data() Dave Gordon
2015-07-28 16:34     ` Chris Wilson
2015-07-28 17:09       ` Dave Gordon
2015-07-28 17:18         ` Chris Wilson

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=1438090036-19235-2-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=Tom.O'Rourke@intel.com \
    --cc=david.s.gordon@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.