summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/debug.c
diff options
context:
space:
mode:
authorChris Johnson <cwj@nvidia.com>2011-03-21 18:20:51 -0700
committerRebecca Schultz Zavin <rebecca@android.com>2011-03-22 11:30:02 -0700
commit2b3d418209bda3cb28a70e5f6608ccfd35a8906a (patch)
tree34253daa4c2e5e20e9ddcd9b9549227e7b167375 /drivers/video/tegra/host/debug.c
parente75e6b2a2ff3af9724f2e6e25790cbe1f4b4dad8 (diff)
video: tegra: add HOST1_SYNC regs to nvhost_debug_show dump
Change-Id: I48cccf5b0df768b9cfc774803f3945f4806a62ac
Diffstat (limited to 'drivers/video/tegra/host/debug.c')
-rw-r--r--drivers/video/tegra/host/debug.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/video/tegra/host/debug.c b/drivers/video/tegra/host/debug.c
index a1be13eb063c..4f0b941a7ab1 100644
--- a/drivers/video/tegra/host/debug.c
+++ b/drivers/video/tegra/host/debug.c
@@ -126,6 +126,27 @@ static void nvhost_debug_handle_word(struct seq_file *s, int *state, int *count,
}
}
+static void nvhost_sync_reg_dump(struct seq_file *s)
+{
+ struct nvhost_master *m = s->private;
+ int i;
+
+ /* print HOST1X_SYNC regs 4 per line (from 0x3000 -> 0x31E0) */
+ for (i = 0; i <= 0x1E0; i += 4) {
+ if ((i & 0xF) == 0x0)
+ seq_printf(s, "\n0x%08x : ", i);
+ seq_printf(s, "%08x ", readl(m->sync_aperture + i));
+ }
+
+ seq_printf(s, "\n\n");
+
+ /* print HOST1X_SYNC regs 4 per line (from 0x3340 -> 0x3774) */
+ for (i = 0x340; i <= 0x774; i += 4) {
+ if ((i & 0xF) == 0x0)
+ seq_printf(s, "\n0x%08x : ", i);
+ seq_printf(s, "%08x ", readl(m->sync_aperture + i));
+ }
+}
static int nvhost_debug_show(struct seq_file *s, void *unused)
{
@@ -232,7 +253,7 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
fifostat = readl(regs + HOST1X_CHANNEL_FIFOSTAT);
if ((fifostat & 1 << 10) == 0 ) {
- seq_printf(s, "\n%d: fifo:\n", i);
+ seq_printf(s, "\n%d: fifo:\n", i);
writel(0x0, m->aperture + HOST1X_SYNC_CFPEEK_CTRL);
writel(1 << 31 | i << 16, m->aperture + HOST1X_SYNC_CFPEEK_CTRL);
rd_ptr = readl(m->aperture + HOST1X_SYNC_CFPEEK_PTRS) & 0x1ff;
@@ -265,6 +286,8 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
seq_printf(s, "\n");
}
+ nvhost_sync_reg_dump(s);
+
nvhost_module_idle(&m->mod);
return 0;
}