diff options
author | Chris Johnson <cwj@nvidia.com> | 2011-03-21 18:20:51 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-05-23 18:29:19 -0700 |
commit | 7459fa8c61fe757c24a81e0f546c90e49e1df401 (patch) | |
tree | 5e612a309ea9217f0a447f3e7018af60b79cf72c /drivers/video | |
parent | 27dab5f6b7c27b439859d538cbcdfd6a370cbebc (diff) |
video: tegra: add HOST1_SYNC regs to nvhost_debug_show dump
Change-Id: I48cccf5b0df768b9cfc774803f3945f4806a62ac
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/host/debug.c | 25 |
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; } |