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

Commit 1aea8607 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "staging: android: ion: Use the MSM dmabuf ops when possible""

parents 4f857060 2e94d445
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;
+0 −5
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
#include <linux/vmalloc.h>

#include "ion_private.h"
#include "heaps/msm_ion_priv.h"

static struct sg_table *dup_sg_table(struct sg_table *table)
{
@@ -348,11 +347,7 @@ struct dma_buf *ion_dmabuf_alloc(struct ion_device *dev, size_t len,
	if (IS_ERR(buffer))
		return ERR_CAST(buffer);

#if IS_ENABLED(CONFIG_ION_MSM_HEAPS)
	exp_info.ops = &msm_ion_dma_buf_ops;
#else
	exp_info.ops = &dma_buf_ops;
#endif
	exp_info.size = buffer->size;
	exp_info.flags = O_RDWR;
	exp_info.priv = buffer;