summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/nvhost_cdma.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2011-08-17 14:36:51 +0300
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:10 -0800
commit8cbed0f1c144bbb20b3d1dcf74d4caca7af0c620 (patch)
tree36d59f938c11341d752829661c63a8bc212bc740 /drivers/video/tegra/host/nvhost_cdma.h
parentab7815ed3c05a87b6a1b9d09ebe373ef2f784e54 (diff)
tegra: nvhost: Retrieve phys address from nvmap
Debug code used to rely on being able to calculate the base address of a pinned page by masking it. Now we always retrieve the physical address from nvmap and find the correct command buffer using that. Bug 840976 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/48105 Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> (cherry picked from commit 0ef5f2d4d94464b8d5562327c9cf5b56fe93fff5) Change-Id: I1a17665cf19d8758f154d4fd05f6a5ec6c07caff Reviewed-on: http://git-master/r/56266 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R12cdbf7b335ca46cd063cdf9dd7783b18255a3f1
Diffstat (limited to 'drivers/video/tegra/host/nvhost_cdma.h')
-rw-r--r--drivers/video/tegra/host/nvhost_cdma.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/tegra/host/nvhost_cdma.h b/drivers/video/tegra/host/nvhost_cdma.h
index 8bdc18b90220..e5e1d5f88701 100644
--- a/drivers/video/tegra/host/nvhost_cdma.h
+++ b/drivers/video/tegra/host/nvhost_cdma.h
@@ -48,6 +48,10 @@ struct nvhost_userctx_timeout;
* update - call to update sync queue and push buffer, unpin memory
*/
+struct nvmap_client_handle {
+ struct nvmap_client *client;
+ struct nvmap_handle *handle;
+};
struct push_buffer {
struct nvmap_handle_ref *mem; /* handle to pushbuffer memory */
@@ -55,7 +59,8 @@ struct push_buffer {
u32 phys; /* physical address of pushbuffer */
u32 fence; /* index we've written */
u32 cur; /* index to write to */
- struct nvmap_handle **handles; /* nvmap handle for each opcode pair */
+ struct nvmap_client_handle *nvmap;
+ /* nvmap handle for each opcode pair */
};
struct syncpt_buffer {
@@ -131,6 +136,7 @@ int nvhost_cdma_begin(struct nvhost_cdma *cdma,
struct nvhost_userctx_timeout *timeout);
void nvhost_cdma_push(struct nvhost_cdma *cdma, u32 op1, u32 op2);
void nvhost_cdma_push_gather(struct nvhost_cdma *cdma,
+ struct nvmap_client *client,
struct nvmap_handle *handle, u32 op1, u32 op2);
void nvhost_cdma_end(struct nvhost_cdma *cdma,
struct nvmap_client *user_nvmap,