gpu: ion: Add support for carveout heaps on msm targets

Add infrastructure for supporting ion carveout heaps.
The memory type should be specified in the board file using
mach/ion.h. The ion platform driver will be responsible for
allocating the correct memory.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
This commit is contained in:
Laura Abbott
2011-08-19 13:36:32 -07:00
committed by Bryan Huntsman
parent 302911d5ba
commit a2e9363f06
4 changed files with 76 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#define _LINUX_ION_H
#include <linux/types.h>
#include <mach/ion.h>
struct ion_handle;
/**
@@ -42,6 +43,25 @@ enum ion_heap_type {
#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
/**
* These are the only ids that should be used for Ion heap ids.
* The ids listed are the order in which allocation will be attempted
* if specified. Don't swap the order of heap ids unless you know what
* you are doing!
*/
enum ion_heap_ids {
ION_HEAP_SYSTEM_ID,
ION_HEAP_SYSTEM_CONTIG_ID,
ION_HEAP_EBI_ID,
ION_HEAP_SMI_ID,
};
#define ION_KMALLOC_HEAP_NAME "kmalloc"
#define ION_VMALLOC_HEAP_NAME "vmalloc"
#define ION_EBI1_HEAP_NAME "EBI1"
#ifdef __KERNEL__
struct ion_device;
struct ion_heap;
@@ -72,6 +92,7 @@ struct ion_platform_heap {
const char *name;
ion_phys_addr_t base;
size_t size;
enum ion_memory_types memory_type;
};
/**