diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2011-11-04 14:00:13 +0200 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-11-15 11:52:34 -0800 |
commit | 2385bc45ef8fb58def46c116673cb11f3ba38c91 (patch) | |
tree | fd391de854ba489faf85257c0b2ea94fadd7ba5b /drivers/video/tegra/host/t20/3dctx_t20.c | |
parent | a9d747c7601d7fbb16658746395717be36b34ef3 (diff) |
video: tegra: host: Enhance FIFO/GATHER debug_dumptegra-l4t-er-2011-11-16
Enhance nvhost_debug_dump() output, as follows:
- Swap FIFO and GATHER dump so that even if GATHER dump blows out
seq_printf 1k buffer, we still have FIFO information;
- Write FIFO signature pattern (0xd???d???) to indirect save input
data to help pinpoint FIFO position within debug dumps;
- Prevent long data sequences from blowing out the seq_printf 1k
buffer, by limiting such sequences to 64 words.
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/62424
(cherry picked from commit cb37e4212b78546411b33b32044f30feb0579b86)
Change-Id: Ia2695c502fa0c7b755ef2ae51260650c7d67bf86
Reviewed-on: http://git-master/r/64061
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/t20/3dctx_t20.c')
-rw-r--r-- | drivers/video/tegra/host/t20/3dctx_t20.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/video/tegra/host/t20/3dctx_t20.c b/drivers/video/tegra/host/t20/3dctx_t20.c index 7ac1b5e118cd..d0609fb61976 100644 --- a/drivers/video/tegra/host/t20/3dctx_t20.c +++ b/drivers/video/tegra/host/t20/3dctx_t20.c @@ -138,8 +138,8 @@ static void save_push_v0(struct nvhost_cdma *cdma, struct nvhost_hwctx *ctx) { nvhost_cdma_push_gather(cdma, - cdma_to_channel(cdma)->dev->nvmap, - nvmap_ref_to_handle(nvhost_3dctx_save_buf), + (void *)NVHOST_CDMA_PUSH_GATHER_CTXSAVE, + (void *)NVHOST_CDMA_PUSH_GATHER_CTXSAVE, nvhost_opcode_gather(save_size), save_phys); } @@ -260,7 +260,17 @@ static void __init setup_save_regs(struct save_info *info, break; } if (ptr) { - memset(ptr, 0, count * 4); + /* SAVE cases only: reserve room for incoming data */ + u32 k = 0; + /* + * Create a signature pattern for indirect data (which + * will be overwritten by true incoming data) for + * better deducing where we are in a long command + * sequence, when given only a FIFO snapshot for debug + * purposes. + */ + for (k = 0; k < count; k++) + *(ptr + k) = 0xd000d000 | (offset << 16) | k; ptr += count; } save_count += count; @@ -332,9 +342,6 @@ static void ctx3d_save_service(struct nvhost_hwctx *ctx) nvhost_syncpt_cpu_incr(&ctx->channel->dev->syncpt, NVSYNCPT_3D); } - -/*** savers ***/ - int __init t20_nvhost_3dctx_handler_init(struct nvhost_hwctx_handler *h) { struct nvhost_channel *ch; |