diff mbox

drm/i915: shut up spurious WARN in the gtt fault handler

Message ID 1350465436-15328-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Oct. 17, 2012, 9:17 a.m. UTC
-ENOSPC can happen if userspace is being simplistic and tries to map a
too big object. To aid further spurious WARN debugging, also print out
the error code.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56017
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_gem.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Chris Wilson Oct. 17, 2012, 9:43 a.m. UTC | #1
On Wed, 17 Oct 2012 11:17:16 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> -ENOSPC can happen if userspace is being simplistic and tries to map a
> too big object. To aid further spurious WARN debugging, also print out
> the error code.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56017
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

%i is the new %d?

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Daniel Vetter Oct. 17, 2012, 9:57 a.m. UTC | #2
On Wed, Oct 17, 2012 at 10:43:15AM +0100, Chris Wilson wrote:
> On Wed, 17 Oct 2012 11:17:16 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > -ENOSPC can happen if userspace is being simplistic and tries to map a
> > too big object. To aid further spurious WARN debugging, also print out
> > the error code.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56017
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> %i is the new %d?
> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Picked up for -fixes.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index bb941f8..45888d2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1408,8 +1408,10 @@  out:
 		return VM_FAULT_NOPAGE;
 	case -ENOMEM:
 		return VM_FAULT_OOM;
+	case -ENOSPC:
+		return VM_FAULT_SIGBUS;
 	default:
-		WARN_ON_ONCE(ret);
+		WARN_ONCE(ret, "unhandled error in i915_gem_fault: %i\n", ret);
 		return VM_FAULT_SIGBUS;
 	}
 }