From 2b3d418209bda3cb28a70e5f6608ccfd35a8906a Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Mon, 21 Mar 2011 18:20:51 -0700 Subject: [PATCH] video: tegra: add HOST1_SYNC regs to nvhost_debug_show dump Change-Id: I48cccf5b0df768b9cfc774803f3945f4806a62ac --- drivers/video/tegra/host/debug.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) 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; } -- 2.34.1