summaryrefslogtreecommitdiff
path: root/drivers/gpu/ion/ion_heap.c
diff options
context:
space:
mode:
authorHiroshi DOYU <hdoyu@nvidia.com>2011-12-23 14:10:33 +0200
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-12 09:14:10 -0800
commit609eb320c69b130eb7bbd4b0398ea6ce6c85bbfc (patch)
tree16a2b029d3f76db87a8d427d64eba4700e49fc19 /drivers/gpu/ion/ion_heap.c
parent1638b56014450dce1c04895ecf9da7305294760d (diff)
gpu: ion: Add IOMMU heap allocator with IOMMU API
Implemented IOMMU heap allocator("ion_iommu_heap_ops") with IOMMU API. This implementation is independenf of SoC because the standard IOMMU API is used in the backend implementation of this heap_ops. [Krishna Reddy: Refactored the original version heavily, especially making "allocation" and "mapping" features independent with "struct page" based mapping functions.] Change-Id: Ia692d9a0dc00424fa3e95a830f557808351b1ad7 Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/72217 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/gpu/ion/ion_heap.c')
-rw-r--r--drivers/gpu/ion/ion_heap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/ion/ion_heap.c b/drivers/gpu/ion/ion_heap.c
index 8ce3c1907bad..6d09778745c6 100644
--- a/drivers/gpu/ion/ion_heap.c
+++ b/drivers/gpu/ion/ion_heap.c
@@ -32,6 +32,9 @@ struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data)
case ION_HEAP_TYPE_CARVEOUT:
heap = ion_carveout_heap_create(heap_data);
break;
+ case ION_HEAP_TYPE_IOMMU:
+ heap = ion_iommu_heap_create(heap_data);
+ break;
default:
pr_err("%s: Invalid heap type %d\n", __func__,
heap_data->type);
@@ -65,6 +68,9 @@ void ion_heap_destroy(struct ion_heap *heap)
case ION_HEAP_TYPE_CARVEOUT:
ion_carveout_heap_destroy(heap);
break;
+ case ION_HEAP_TYPE_IOMMU:
+ ion_iommu_heap_destroy(heap);
+ break;
default:
pr_err("%s: Invalid heap type %d\n", __func__,
heap->type);