Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29ac2218 authored by Eric Anholt's avatar Eric Anholt Committed by Greg Kroah-Hartman
Browse files

drm/v3d: Skip debugfs dumping GCA on platforms without GCA.



commit 2f20fa8d12e859a03f68bdd81d75830141bc9ac9 upstream.

Fixes an oops reading this debugfs entry on BCM7278.

Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180928232126.4332-4-eric@anholt.net


Fixes: 57692c94 ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
Cc: <stable@vger.kernel.org>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c56e89e
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -71,11 +71,14 @@ static int v3d_v3d_debugfs_regs(struct seq_file *m, void *unused)
			   V3D_READ(v3d_hub_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_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++) {
		for (i = 0; i < ARRAY_SIZE(v3d_core_reg_defs); i++) {