From: Daniel Vetter Date: Wed, 17 Oct 2012 09:17:16 +0000 (+0200) Subject: drm/i915: shut up spurious WARN in the gtt fault handler X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a7c2e1aad6c846f316641bbaa54cf999aeaa7ebc;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git drm/i915: shut up spurious WARN in the gtt fault handler -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 Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index bb941f8cd55..45888d2ed53 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; } }