ion: Update the heaps to use the MSM ION dmabuf ops for CMO

Since the dmabuf portion of the ION core now allows for heaps
to specify their own dmabuf ops for cache maintenance, update
the heaps so that they specify the MSM ION dmabuf ops.

Change-Id: I98d9f2fa3e3ab8288e481c72e18e5d2f14a8a400
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres 2019-09-18 09:59:47 -07:00
commit a641971d26
4 changed files with 6 additions and 0 deletions

View file

@ -200,6 +200,7 @@ __ion_carveout_heap_create(struct ion_platform_heap *heap_data,
gen_pool_add(carveout_heap->pool, carveout_heap->base, heap_data->size,
-1);
carveout_heap->heap.ion_heap.ops = &carveout_heap_ops;
carveout_heap->heap.ion_heap.buf_ops = msm_ion_dma_buf_ops;
carveout_heap->heap.ion_heap.type = ION_HEAP_TYPE_CARVEOUT;
carveout_heap->heap.ion_heap.flags = ION_HEAP_FLAG_DEFER_FREE;
@ -395,6 +396,7 @@ ion_secure_carveout_heap_create(struct ion_platform_heap *heap_data)
}
manager->heap.ion_heap.ops = &ion_sc_heap_ops;
manager->heap.ion_heap.buf_ops = msm_ion_dma_buf_ops;
manager->heap.ion_heap.type =
(enum ion_heap_type)ION_HEAP_TYPE_SECURE_CARVEOUT;
return &manager->heap.ion_heap;

View file

@ -127,6 +127,7 @@ struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data)
return ERR_PTR(-ENOMEM);
cma_heap->heap.ion_heap.ops = &ion_cma_ops;
cma_heap->heap.ion_heap.buf_ops = msm_ion_dma_buf_ops;
/*
* get device from private heaps data, later it will be
* used to make the link with reserved CMA memory
@ -199,6 +200,7 @@ struct ion_heap *ion_cma_secure_heap_create(struct ion_platform_heap *data)
return ERR_PTR(-ENOMEM);
cma_heap->heap.ion_heap.ops = &ion_secure_cma_ops;
cma_heap->heap.ion_heap.buf_ops = msm_ion_dma_buf_ops;
/*
* get device from private heaps data, later it will be
* used to make the link with reserved CMA memory

View file

@ -720,6 +720,7 @@ struct ion_heap *ion_system_heap_create(struct ion_platform_heap *data)
return ERR_PTR(-ENOMEM);
heap->heap.dev = data->priv;
heap->heap.ion_heap.ops = &system_heap_ops;
heap->heap.ion_heap.buf_ops = msm_ion_dma_buf_ops;
heap->heap.ion_heap.type = ION_HEAP_TYPE_SYSTEM;
heap->heap.ion_heap.flags = ION_HEAP_FLAG_DEFER_FREE;

View file

@ -334,6 +334,7 @@ struct ion_heap *ion_system_secure_heap_create(struct ion_platform_heap *unused)
if (!heap)
return ERR_PTR(-ENOMEM);
heap->heap.ion_heap.ops = &system_secure_heap_ops;
heap->heap.ion_heap.buf_ops = msm_ion_dma_buf_ops;
heap->heap.ion_heap.type =
(enum ion_heap_type)ION_HEAP_TYPE_SYSTEM_SECURE;
heap->sys_heap = sys_heap;