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

Commit 12ae5281 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "gpu: ion: Remove allocate_contiguous_ebi call for carveouts"

parents 854d5b61 3e033da2
Loading
Loading
Loading
Loading
+2 −29
Original line number Diff line number Diff line
@@ -365,39 +365,12 @@ int ion_do_cache_op(struct ion_client *client, struct ion_handle *handle,

}

static ion_phys_addr_t msm_ion_get_base(unsigned long size, unsigned int align)
{
	return allocate_contiguous_ebi_nomap(size, align);
}

static void msm_ion_allocate(struct ion_platform_heap *heap)
{

	if (!heap->base && heap->extra_data) {
		unsigned int align = 0;
		switch ((int) heap->type) {
		case ION_HEAP_TYPE_CARVEOUT:
			align =
			((struct ion_co_heap_pdata *) heap->extra_data)->align;
			break;
		case ION_HEAP_TYPE_CP:
		{
			struct ion_cp_heap_pdata *data =
				(struct ion_cp_heap_pdata *)
				heap->extra_data;
			align = data->align;
			break;
		}
		default:
			break;
		}
		if (align && !heap->base) {
			heap->base = msm_ion_get_base(heap->size,
						      align);
			if (!heap->base)
				pr_err("%s: could not get memory for heap %s "
				   "(id %x)\n", __func__, heap->name, heap->id);
		}
		WARN(1, "Specifying carveout heaps without a base is deprecated. Convert to the DMA heap type instead");
		return;
	}
}

+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ struct ion_buffer;
 * @name:	used for debug purposes
 * @base:	base address of heap in physical memory if applicable
 * @size:	size of the heap in bytes if applicable
 * @memory_type:Memory type used for the heap
 * @has_outer_cache:    set to 1 if outer cache is used, 0 otherwise.
 * @extra_data:	Extra data specific to each heap type
 * @priv:	heap private data
+0 −1
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ enum ion_permission_type {
 * @release_region:	function to be called when the number of allocations
 *			goes from 1 -> 0
 * @setup_region:	function to be called upon ion registration
 * @memory_type:Memory type used for the heap
 * @allow_nonsecure_alloc: allow non-secure allocations from this heap. For
 *			secure heaps, this flag must be set so allow non-secure
 *			allocations. For non-secure heaps, this flag is ignored.