diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2011-07-29 09:09:43 +0300 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-08-17 16:23:19 -0700 |
commit | f8c80f4ea8930af9e2e93765e635d84fe6e22575 (patch) | |
tree | e6c6aa1733c800b5dbb8662097b6407d53650283 /drivers/video/tegra/host/t20/channel_t20.c | |
parent | b6aad8653ca8bbdd964c8fafcb1faab96c88f9af (diff) |
nvhost: Fix tegra_host/status debug output
Add tracking of mapping between push buffer gathers and nvmap handles.
Use the mapping to access contents of gather buffers.
Bug 840976
Change-Id: Ic6fe2fc7a83e8f14cd606a9e638b6420aa714495
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/44779
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/t20/channel_t20.c')
-rw-r--r-- | drivers/video/tegra/host/t20/channel_t20.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/video/tegra/host/t20/channel_t20.c b/drivers/video/tegra/host/t20/channel_t20.c index a3fb15212820..fdbf6ba7355d 100644 --- a/drivers/video/tegra/host/t20/channel_t20.c +++ b/drivers/video/tegra/host/t20/channel_t20.c @@ -232,7 +232,8 @@ static int t20_channel_submit(struct nvhost_channel *channel, /* gather restore buffer */ if (need_restore) - nvhost_cdma_push(&channel->cdma, + nvhost_cdma_push_gather(&channel->cdma, + nvmap_ref_to_handle(channel->cur_ctx->restore), nvhost_opcode_gather(channel->cur_ctx->restore_size), channel->cur_ctx->restore_phys); @@ -269,10 +270,13 @@ static int t20_channel_submit(struct nvhost_channel *channel, } else { /* push user gathers */ - for ( ; gather != gather_end; gather += 2) - nvhost_cdma_push(&channel->cdma, - nvhost_opcode_gather(gather[0]), - gather[1]); + int i = 0; + for ( ; i < gather_end-gather; i += 2) { + nvhost_cdma_push_gather(&channel->cdma, + unpins[i/2], + nvhost_opcode_gather(gather[i]), + gather[i+1]); + } } /* end CDMA submit & stash pinned hMems into sync queue */ |