From patchwork Wed Oct 17 09:17:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1604461 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id D5EE2DF2AB for ; Wed, 17 Oct 2012 09:36:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A304FA092C for ; Wed, 17 Oct 2012 02:36:12 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 066579EEF7 for ; Wed, 17 Oct 2012 02:16:17 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id u50so4438829wey.36 for ; Wed, 17 Oct 2012 02:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer; bh=EK9oamQNG5/KVU4UuY9qrVAIRexWqEioWczgShM/4as=; b=gRQQGEFv6JLr78DBwkBR237rcNr5+G7h2MIjMVXoPVOhsq24X5Pa6ciIqf2nDuMmxl JfR3t13+cKqAD4Wbd8ey82iuUKKTJym4U16zDPhQwfrr+AIrbuacp6Y6T+46ZL3yDr/8 IuahlVXoH/GZTy53Za6YeBavL0rxYgbywm2RY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=EK9oamQNG5/KVU4UuY9qrVAIRexWqEioWczgShM/4as=; b=KXDzU/9fwsD8D5strqKN6TD7Brjc/u3lvxCg5q8kHuS5DLsqD6rDrvhvgUJu09nxW9 C4rp6m3DPpw+Xc7ALVImTLM6B9qfaxWAAHAv6lZA2OZ4a/tebGXkacPbiANWXQmsf2Im MAWfOkjGGVJ0GkTxc1wx1o0f+iN7tj40UR1wYXdwu7y0QDPNACJ+sp/ukFlNovq5yTpV e+F8nYtGzMhGdLacCl+Q3Q+ZvkmRPKTAmKkfEO7CaMZbPYXAkDxhoC6xDsJjY/1zwzg1 PiJAh+6YJn6uzy5/cRMr36eD/gObx/11qi+UeLGr1Y1Cqn1G8Z8R/P1s7rCK++mBCS7j iIyg== Received: by 10.180.87.74 with SMTP id v10mr2662336wiz.21.1350465377238; Wed, 17 Oct 2012 02:16:17 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id q7sm26655691wiy.11.2012.10.17.02.16.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Oct 2012 02:16:16 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 17 Oct 2012 11:17:16 +0200 Message-Id: <1350465436-15328-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkbEunM8FphIMVvhdozqkvucWF/XrCfSUyx0ZLZyHlZCOa5EKawAybE2Lxo8k/S0/ZQqbY0 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: shut up spurious WARN in the gtt fault handler X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org -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 Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } }