Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1320944imm; Fri, 28 Sep 2018 16:22:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV62w7DO5sOG5NT3sxzeRvBntXHG8uZbRzU+Rp8RDuCBkWTgQNiC6voRnjwIPSOnX4u1D9+P7 X-Received: by 2002:a17:902:28a4:: with SMTP id f33-v6mr701686plb.297.1538176947416; Fri, 28 Sep 2018 16:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538176947; cv=none; d=google.com; s=arc-20160816; b=p1cPOGtMcXq1S7fQM/xmfLq2bE9PmOsZ2f86NxIciGlok81KwShHqCUnNImd3I3QhX qDtNzW7O7TN4Y2HBVc8pjCc+xu/vDNy4oEKEs69LGo5kjqOUMlidi9812E/l9jZPMO0D xsgd+SzUNlqEPUFUcSv3feUaCxqV4LgWpaL4MpYsRJ2YxcndYVTzCrUpmRuF0h1T/571 47YA3WkD+Q29VDF78fq1dNVRv787Vwur120qeD96zfuK1o86NTam5GeRvMHgLn6m01B7 Iokm28OloN9CeJdjuEl5kRgRFWiZbO7YE0GlUpvy6+WMZ6qcGlZXr9IyFKM2H6LC2Ko/ lRuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=9WcwBtYgu15wDj9h25kwX4INnSgX1h5StCxmmbETx9k=; b=ZzXSPNVOP4/woYKO7pwcqqV23Wu2QtjUgjLAJ3KYow46Q1mQgoPaOdERZPgjjtnrWM vkU41H4AqYtwdUbOzvol6sQORqtD2qbVXhFv1QGONb8cV36+7pmchlzwt3HjAJzCeMD1 gEIM4CsYtwBpsO7zU3cMg2QxnYpOJccLa0i8nr6FY7xHVjSME1ZuhDYT3AlOH6meMjtw GpyXsukSkaLVhCadEcYXwbNnUwELmZZeG0oH5gEQ53uR9tIBeikbszYfGDWRq8xO7CX2 R9KSEzhuL/rKIhciENWDnF3dQmGmQtNmN0XpNh+qFFydQ0FCgFet88Ub43QVa4UA/Kwo zL1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c32-v6si5659203plj.272.2018.09.28.16.22.13; Fri, 28 Sep 2018 16:22:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727751AbeI2Frn (ORCPT + 99 others); Sat, 29 Sep 2018 01:47:43 -0400 Received: from anholt.net ([50.246.234.109]:45464 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727401AbeI2Frd (ORCPT ); Sat, 29 Sep 2018 01:47:33 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 105A710A1AED; Fri, 28 Sep 2018 16:21:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z0gbsOGzIDem; Fri, 28 Sep 2018 16:21:31 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 18DE310A1AE7; Fri, 28 Sep 2018 16:21:28 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id EE0DC2FE1B43; Fri, 28 Sep 2018 16:21:26 -0700 (PDT) From: Eric Anholt To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, boris.brezillon@bootlin.com, Eric Anholt Subject: [PATCH 4/4] drm/v3d: Skip debugfs dumping GCA on platforms without GCA. Date: Fri, 28 Sep 2018 16:21:26 -0700 Message-Id: <20180928232126.4332-4-eric@anholt.net> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180928232126.4332-1-eric@anholt.net> References: <20180928232126.4332-1-eric@anholt.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes an oops reading this debugfs entry on BCM7278. Signed-off-by: Eric Anholt --- drivers/gpu/drm/v3d/v3d_debugfs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_debugfs.c b/drivers/gpu/drm/v3d/v3d_debugfs.c index d48008adb085..eb2b2d2f8553 100644 --- a/drivers/gpu/drm/v3d/v3d_debugfs.c +++ b/drivers/gpu/drm/v3d/v3d_debugfs.c @@ -71,10 +71,13 @@ static int v3d_v3d_debugfs_regs(struct seq_file *m, void *unused) V3D_READ(v3d_hub_reg_defs[i].reg)); } - for (i = 0; i < ARRAY_SIZE(v3d_gca_reg_defs); i++) { - seq_printf(m, "%s (0x%04x): 0x%08x\n", - v3d_gca_reg_defs[i].name, v3d_gca_reg_defs[i].reg, - V3D_GCA_READ(v3d_gca_reg_defs[i].reg)); + if (v3d->ver < 41) { + for (i = 0; i < ARRAY_SIZE(v3d_gca_reg_defs); i++) { + seq_printf(m, "%s (0x%04x): 0x%08x\n", + v3d_gca_reg_defs[i].name, + v3d_gca_reg_defs[i].reg, + V3D_GCA_READ(v3d_gca_reg_defs[i].reg)); + } } for (core = 0; core < v3d->cores; core++) { -- 2.18.0