gpu: ion: Add ADSP heap
The ADSP heap is intended to be used for post processing
on the dsp. Add the definiton of the heap to allow clients
to have dedicated access
Change-Id: I80040b0cf3311df90970c156aa3329f07fc9a990
CRs-Fixed: 438281
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8930.c b/arch/arm/mach-msm/board-8930.c
index 22c2b7d..e7ea95f 100644
--- a/arch/arm/mach-msm/board-8930.c
+++ b/arch/arm/mach-msm/board-8930.c
@@ -149,7 +149,7 @@
#define MSM_ION_MM_SIZE 0x3800000 /* Need to be multiple of 64K */
#define MSM_ION_SF_SIZE 0x0
#define MSM_ION_QSECOM_SIZE 0x780000 /* (7.5MB) */
-#define MSM_ION_HEAP_NUM 7
+#define MSM_ION_HEAP_NUM 8
#else
#define MSM_ION_SF_SIZE MSM_PMEM_SIZE
#define MSM_ION_MM_SIZE MSM_PMEM_ADSP_SIZE
@@ -169,6 +169,7 @@
HOLE_SIZE))
#define MAX_FIXED_AREA_SIZE 0x10000000
#define MSM8930_FW_START MSM8930_FIXED_AREA_START
+#define MSM_ION_ADSP_SIZE SZ_8M
#else
#define MSM_CONTIG_MEM_SIZE 0x110C000
@@ -382,6 +383,14 @@
}
};
+static struct platform_device ion_adsp_heap_device = {
+ .name = "ion-adsp-heap-device",
+ .id = -1,
+ .dev = {
+ .dma_mask = &msm_dmamask,
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ }
+};
/**
* These heaps are listed in the order they will be allocated. Due to
* video hardware restrictions and content protection the FW heap has to
@@ -456,6 +465,15 @@
.memory_type = ION_EBI_TYPE,
.extra_data = (void *) &co_msm8930_ion_pdata,
},
+ {
+ .id = ION_ADSP_HEAP_ID,
+ .type = ION_HEAP_TYPE_DMA,
+ .name = ION_ADSP_HEAP_NAME,
+ .size = MSM_ION_ADSP_SIZE,
+ .memory_type = ION_EBI_TYPE,
+ .extra_data = (void *) &co_msm8930_ion_pdata,
+ .priv = &ion_adsp_heap_device.dev,
+ },
#endif
};