Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a641971d authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

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: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 18fe5215
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
+2 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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;

+1 −0
Original line number Diff line number Diff line
@@ -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;