summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/debug.c
diff options
context:
space:
mode:
authorAndrew Howe <ahowe@nvidia.com>2010-12-09 17:09:50 +0200
committerDan Willemsen <dwillemsen@nvidia.com>2011-04-26 15:48:47 -0700
commit06821e83c319cc9186f4179244e53fd918efe036 (patch)
treefa858dbf7045b65d5262b397f36f3c004a6cb79c /drivers/video/tegra/host/debug.c
parent2748a5a013aaedf41dc1dda8fe817bfa85ec770e (diff)
[ARM/tegra] nvhost: Merge NVIDIA changes into Google's nvhost
Google's 2.6.36 nvhost driver branched from NVIDIA's 2.6.32 nvhost at some point before it was actually committed to 2.6.32, but the former's original commit included some fixes that were added to the latter after that. Confusing... Also Google's version has some changes that we like so they will remain, but that makes merging difficult. Anyway, this commit brings the rest of our 2.6.32 changes into 2.6.36 and cleans it up a bit. It might be nicer to break this up into a load of smaller commits but it turned out to be very difficult to do that. Original-Change-Id: I828b624b089b811d6130173e55258da8f52a5cc2 Reviewed-on: http://git-master/r/12563 Tested-by: Jussi Rasanen <jrasanen@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Tested-by: Wei Sun <wsun@nvidia.com> Change-Id: I72fbcff16ec6df62cc7299052a84b91db252c8d1
Diffstat (limited to 'drivers/video/tegra/host/debug.c')
-rw-r--r--drivers/video/tegra/host/debug.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/video/tegra/host/debug.c b/drivers/video/tegra/host/debug.c
index 4f0b941a7ab1..1277c1bc8324 100644
--- a/drivers/video/tegra/host/debug.c
+++ b/drivers/video/tegra/host/debug.c
@@ -1,5 +1,5 @@
/*
- * drivers/video/tegra/dc/dc.c
+ * drivers/video/tegra/host/debug.c
*
* Copyright (C) 2010 Google, Inc.
* Author: Erik Gilling <konkers@android.com>
@@ -66,7 +66,7 @@ static int nvhost_debug_handle_cmd(struct seq_file *s, u32 val, int *count)
case 0x4:
seq_printf(s, "IMM(offset=%03x, data=%03x)\n",
- val >> 16 & 0x3ff, val & 0xffff);
+ val >> 16 & 0xfff, val & 0xffff);
return NVHOST_DBG_STATE_CMD;
case 0x5:
@@ -101,7 +101,7 @@ static int nvhost_debug_handle_cmd(struct seq_file *s, u32 val, int *count)
}
static void nvhost_debug_handle_word(struct seq_file *s, int *state, int *count,
- unsigned long addr, int channel, u32 val)
+ u32 addr, int channel, u32 val)
{
switch (*state) {
case NVHOST_DBG_STATE_CMD:
@@ -210,14 +210,14 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
break;
case 0x00010009: /* HOST_WAIT_SYNCPT_BASE */
- base = cbread >> 15 & 0xf;
+ base = cbread >> 16 & 0xf;
offset = cbread & 0xffff;
val = readl(m->aperture + HOST1X_SYNC_SYNCPT_BASE(base)) & 0xffff;
val += offset;
- seq_printf(s, "waiting on syncpt %d val %d (base %d, offset %d)\n",
- cbread >> 24, val, base, offset);
+ seq_printf(s, "waiting on syncpt %d val %d (base %d = %d, offset %d)\n",
+ cbread >> 24, val, base, val - offset, offset);
break;
default:
@@ -233,7 +233,7 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
* it. */
if (size) {
u32 map_base = phys_addr & PAGE_MASK;
- u32 map_size = (size * 4 + PAGE_SIZE - 1) & PAGE_MASK;
+ u32 map_size = ((phys_addr + size * 4 + PAGE_SIZE - 1) & PAGE_MASK) - map_base;
u32 map_offset = phys_addr - map_base;
void *map_addr = ioremap_nocache(map_base, map_size);
@@ -244,7 +244,7 @@ static int nvhost_debug_show(struct seq_file *s, void *unused)
state = NVHOST_DBG_STATE_CMD;
for (ii = 0; ii < size; ii++) {
val = readl(map_addr + map_offset + ii*sizeof(u32));
- nvhost_debug_handle_word(s, &state, &count, phys_addr + ii, i, val);
+ nvhost_debug_handle_word(s, &state, &count, phys_addr + ii * 4, i, val);
}
iounmap(map_addr);
}