From 3af758f69e2a5f897de552e0c415a1c4e723be0a Mon Sep 17 00:00:00 2001 From: Hiroshi DOYU Date: Mon, 23 Jan 2012 09:33:47 +0200 Subject: 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 Reviewed-on: http://git-master/r/78139 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy Reviewed-by: Varun Wadekar --- drivers/gpu/ion/ion_iommu_heap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gpu') 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 #include #include +#include #include @@ -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; -- cgit v1.2.3