HACK: gpu: ion: tegra: Implement nvmap_alloc_iovm.
Krishna Reddy [Mon, 23 Jan 2012 07:38:03 +0000 (23:38 -0800)]
Change-Id: Ida720a6b27f2df11e6381dc0eb5306df3b768f22
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/76785
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>

drivers/gpu/ion/tegra/tegra_ion.c

index 65335d2..f686269 100644 (file)
@@ -572,8 +572,11 @@ void _nvmap_handle_free(struct nvmap_handle *h)
 struct nvmap_handle_ref *nvmap_alloc_iovm(struct nvmap_client *client,
        size_t size, size_t align, unsigned int flags, unsigned int iova_start)
 {
-       /* FIXME: */
-       return NULL;
+       struct ion_handle *h;
+
+       h = ion_alloc(client, size, align, 0xFF);
+       ion_remap_dma(client, h, iova_start);
+       return h;
 }
 
 void nvmap_free_iovm(struct nvmap_client *client, struct nvmap_handle_ref *r)