linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, boris.brezillon@bootlin.com,
	Eric Anholt <eric@anholt.net>
Subject: [PATCH 4/4] drm/v3d: Skip debugfs dumping GCA on platforms without GCA.
Date: Fri, 28 Sep 2018 16:21:26 -0700	[thread overview]
Message-ID: <20180928232126.4332-4-eric@anholt.net> (raw)
In-Reply-To: <20180928232126.4332-1-eric@anholt.net>

Fixes an oops reading this debugfs entry on BCM7278.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 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


  parent reply	other threads:[~2018-09-28 23:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28 23:21 [PATCH 1/4] drm/v3d: Fix a use-after-free race accessing the scheduler's fences Eric Anholt
2018-09-28 23:21 ` [PATCH 2/4] drm/v3d: Add a little debugfs entry for measuring the core clock Eric Anholt
2018-10-09 13:26   ` Boris Brezillon
2018-09-28 23:21 ` [PATCH 3/4] drm/v3d: Add some better documentation of the in_sync arguments Eric Anholt
2018-10-09 13:27   ` Boris Brezillon
2018-09-28 23:21 ` Eric Anholt [this message]
2018-10-09 13:30   ` [PATCH 4/4] drm/v3d: Skip debugfs dumping GCA on platforms without GCA Boris Brezillon
2018-10-08 13:46 ` [PATCH 1/4] drm/v3d: Fix a use-after-free race accessing the scheduler's fences Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180928232126.4332-4-eric@anholt.net \
    --to=eric@anholt.net \
    --cc=boris.brezillon@bootlin.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).