summaryrefslogtreecommitdiff
authorjintao xu <jintao.xu@amlogic.com>2017-10-19 09:03:08 (GMT)
committer jintao xu <jintao.xu@amlogic.com>2017-10-19 09:03:32 (GMT)
commit63416c95d45936730cc3b951c7e7d8d21d1bfbd3 (patch)
tree4385672cd7fb7627a87a2e408d059b61dfd478be
parent85fc029295b223b7c46c355dfce4cbb74f7e9c54 (diff)
downloadgralloc-63416c95d45936730cc3b951c7e7d8d21d1bfbd3.zip
gralloc-63416c95d45936730cc3b951c7e7d8d21d1bfbd3.tar.gz
gralloc-63416c95d45936730cc3b951c7e7d8d21d1bfbd3.tar.bz2
gralloc: omx dma buffer alloc from codec_mm. [1/3]
PD#152137: omx dma buffer alloc from codec_mm Change-Id: I4cd30d701a46ddfb1974656b68e653dd7d15dbd6
Diffstat
-rw-r--r--alloc_ion.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/alloc_ion.cpp b/alloc_ion.cpp
index aefdb2f..fd6418b 100644
--- a/alloc_ion.cpp
+++ b/alloc_ion.cpp
@@ -99,14 +99,12 @@ int alloc_backend_alloc(alloc_device_t* dev, size_t size, int usage, buffer_hand
if (usage & GRALLOC_USAGE_AML_DMA_BUFFER) //alloc from carveout heap.
{
- ret = ion_alloc(m->ion_client, size, 0,
#if PLATFORM_SDK_VERSION < 26
+ ret = ion_alloc(m->ion_client, size, 0,
ION_HEAP_CARVEOUT_MASK,
-#else
- ION_HEAP_TYPE_DMA_MASK,
-#endif
ion_flags, &ion_hnd);
if (ret != 0)
+#endif
{
ret = ion_alloc(m->ion_client, size, 0,
1<<ION_HEAP_TYPE_CUSTOM, ion_flags, &ion_hnd);