diff options
author | Hiroshi DOYU <hdoyu@nvidia.com> | 2012-01-23 09:33:47 +0200 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-02-03 05:19:46 -0800 |
commit | 3af758f69e2a5f897de552e0c415a1c4e723be0a (patch) | |
tree | bd05dd8e27c91d642fdd48cfdbbad80578a7ec34 | |
parent | a80bc1238f0d5eccbbd83a879a8332a141bd5647 (diff) |
gpu: ion: Fix with mainline IOMMU API change
The mainline IOMMU API v3.3-rc1 has been changed so that bytes are
used in mapping size instead of page order and page-by-page iteration
is taken care of by iommu core.
Change-Id: Ib331b6f3f7075385499eb13dd040c80444d706a8
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/78139
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
-rw-r--r-- | drivers/gpu/ion/ion_iommu_heap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/ion/ion_iommu_heap.c b/drivers/gpu/ion/ion_iommu_heap.c index b75bb3132a2d..a3d2d726bda5 100644 --- a/drivers/gpu/ion/ion_iommu_heap.c +++ b/drivers/gpu/ion/ion_iommu_heap.c @@ -30,6 +30,7 @@ #include <linux/vmalloc.h> #include <linux/iommu.h> #include <linux/highmem.h> +#include <linux/platform_device.h> #include <asm/cacheflush.h> @@ -61,7 +62,7 @@ static struct scatterlist *iommu_heap_map_dma(struct ion_heap *heap, pa = sg_phys(sg); BUG_ON(!IS_ALIGNED(sg->length, PAGE_SIZE)); - err = iommu_map(h->domain, da, pa, 0, 0); + err = iommu_map(h->domain, da, pa, PAGE_SIZE, 0); if (err) goto err_out; @@ -346,7 +347,7 @@ struct ion_heap *ion_iommu_heap_create(struct ion_platform_heap *data) gen_pool_add(h->pool, data->base, data->size, -1); h->heap.ops = &iommu_heap_ops; - h->domain = iommu_domain_alloc(); + h->domain = iommu_domain_alloc(&platform_bus_type); h->dev = data->priv; if (!h->domain) { err = -ENOMEM; |