summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChris Johnson <cwj@nvidia.com>2011-03-16 14:25:22 -0700
committerRebecca Schultz Zavin <rebecca@android.com>2011-03-21 12:12:54 -0700
commit8456f1bcf83bd6ac8eb6cf69911051ede3494174 (patch)
tree6d567137f3e3c46ad964fbd24ef5d8f99f2b24ef /drivers
parentbe7b9ce20d645c2c9293441830ee33a0a5fc489f (diff)
video: tegra: cleanup debug syncpt output
In debug prints for stuck WAITs differentiate WAIT_SYNCPT vs. WAIT_SYNCPT_BASE and fix some build warnings. Change-Id: Ia47375614c676a9f93216fbfaaf6856c3df42e2e Signed-off-by: Chris Johnson <cwj@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/host/debug.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/tegra/host/debug.c b/drivers/video/tegra/host/debug.c
index d533310e3999..a1be13eb063c 100644
--- a/drivers/video/tegra/host/debug.c
+++ b/drivers/video/tegra/host/debug.c
@@ -106,7 +106,7 @@ static void nvhost_debug_handle_word(struct seq_file *s, int *state, int *count,
switch (*state) {
case NVHOST_DBG_STATE_CMD:
if (addr)
- seq_printf(s, "%d: %08x: %08x:", channel, addr, val);
+ seq_printf(s, "%d: %08lx: %08x:", channel, addr, val);
else
seq_printf(s, "%d: %08x:", channel, val);
@@ -161,7 +161,7 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
u32 dmaput, dmaget, dmactrl;
u32 cbstat, cbread;
u32 fifostat;
- u32 val, base;
+ u32 val, base, offset;
unsigned start, end;
unsigned wr_ptr, rd_ptr;
int state;
@@ -175,7 +175,7 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
cbstat = readl(m->aperture + HOST1X_SYNC_CBSTAT(i));
seq_printf(s, "%d-%s (%d): ", i, m->channels[i].mod.name,
- m->channels[i].mod.refcount);
+ atomic_read(&m->channels[i].mod.refcount));
if (dmactrl != 0x0 || !m->channels[i].cdma.push_buffer.mapped) {
seq_printf(s, "inactive\n\n");
@@ -183,19 +183,20 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
}
switch (cbstat) {
- case 0x00010008:
+ case 0x00010008: /* HOST_WAIT_SYNCPT */
seq_printf(s, "waiting on syncpt %d val %d\n",
cbread >> 24, cbread & 0xffffff);
break;
- case 0x00010009:
+ case 0x00010009: /* HOST_WAIT_SYNCPT_BASE */
base = cbread >> 15 & 0xf;
+ offset = cbread & 0xffff;
val = readl(m->aperture + HOST1X_SYNC_SYNCPT_BASE(base)) & 0xffff;
- val += cbread & 0xffff;
+ val += offset;
- seq_printf(s, "waiting on syncpt %d val %d\n",
- cbread >> 24, val);
+ seq_printf(s, "waiting on syncpt %d val %d (base %d, offset %d)\n",
+ cbread >> 24, val, base, offset);
break;
default:
@@ -210,7 +211,6 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
* check if we're executing a fetch, and if so dump
* it. */
if (size) {
- u32 offset = dmaget - m->channels[i].cdma.push_buffer.phys;
u32 map_base = phys_addr & PAGE_MASK;
u32 map_size = (size * 4 + PAGE_SIZE - 1) & PAGE_MASK;
u32 map_offset = phys_addr - map_base;