From patchwork Fri Feb 14 19:28:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 3653471 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4F4E1BF13A for ; Fri, 14 Feb 2014 19:28:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87870201BF for ; Fri, 14 Feb 2014 19:28:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A18B22011D for ; Fri, 14 Feb 2014 19:28:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6001AFB5C4; Fri, 14 Feb 2014 11:28:51 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by gabe.freedesktop.org (Postfix) with ESMTP id AC6DCFB5C4; Fri, 14 Feb 2014 11:28:49 -0800 (PST) Received: by mail-qc0-f173.google.com with SMTP id i8so20911827qcq.32 for ; Fri, 14 Feb 2014 11:28:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=75Ko87xHtWppqXNLCkWsIPgKr9/RRXPVgU9wjRA2knk=; b=TDo+DKuVg83E8zMfJt+bENWXTN+p/ykyDoBbTKteNiq5KTcs2UvX19c8I8t4QbggeK 331BK7+RRwpGt5z7fd1eMVC1+XWMuVpUt0WPj0OtvnFIM7Ti9eGzBI7tBiQacOLa3XP0 f+p0poBWKkbihe6jBtyDjGMwlA+LZdGMlA0CPgqiRVYVpzS5p3yTw6sYq5ABpRykhPwO xwkv451tBnwdR1CnV730+ebYOVen4ogPmNXgWOEL6dcA2/6tF20LsmK+C9686dIG0cQz O6/LQ8/CsAwDnLIzJ7ctndMHGDjzFvwUqryC+BdV5QBvj6zp1Wk2Ukg1q79tgtqPLLvw ADOA== X-Received: by 10.224.115.78 with SMTP id h14mr16520392qaq.94.1392406129037; Fri, 14 Feb 2014 11:28:49 -0800 (PST) Received: from localhost.localdomain (cpe-74-71-29-187.nyc.res.rr.com. [74.71.29.187]) by mx.google.com with ESMTPSA id b30sm9092240qge.21.2014.02.14.11.28.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Feb 2014 11:28:48 -0800 (PST) From: Ilia Mirkin To: Ben Skeggs , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/nv50/gr: decode texture trap status code Date: Fri, 14 Feb 2014 14:28:36 -0500 Message-Id: <1392406116-1093-1-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.8.3.2 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ilia Mirkin --- Statuses derived from envytools, as usual. Not 100% sure about the "any" thing, but it makes sense... drivers/gpu/drm/nouveau/core/engine/graph/nv50.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c index ef38320..2c7809e 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c @@ -330,6 +330,15 @@ static const struct nouveau_bitfield nv50_mpc_traps[] = { {} }; +static const struct nouveau_bitfield nv50_tex_traps[] = { + { 0x00000001, "" }, /* any bit set? */ + { 0x00000002, "FAULT" }, + { 0x00000004, "STORAGE_TYPE_MISMATCH" }, + { 0x00000008, "LINEAR_MISMATCH" }, + { 0x00000020, "WRONG_MEMTYPE" }, + {} +}; + static const struct nouveau_bitfield nv50_graph_trap_m2mf[] = { { 0x00000001, "NOTIFY" }, { 0x00000002, "IN" }, @@ -532,6 +541,13 @@ nv50_priv_tp_trap(struct nv50_graph_priv *priv, int type, u32 ustatus_old, for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4) nv_error(priv, "\t0x%08x: 0x%08x\n", r, nv_rd32(priv, r)); + if (ustatus) { + nv_error(priv, "%s - TP%d:", name, i); + nouveau_bitfield_print(nv50_tex_traps, + ustatus); + pr_cont("\n"); + ustatus = 0; + } } break; case 7: /* MP error */