summaryrefslogtreecommitdiff
authorjintao xu <jintao.xu@amlogic.com>2017-09-01 11:23:50 (GMT)
committer Jiyu Yang <Jiyu.Yang@amlogic.com>2017-09-11 07:02:41 (GMT)
commit1b6f74774409c9fac0dd9a3c9010e00cc616d6ab (patch)
tree5a027401c009ad2ba2e053da5efe9604c399054f
parent4ba87e8dd26d895d498acb225de3f613acf0d9ce (diff)
downloadgralloc-1b6f74774409c9fac0dd9a3c9010e00cc616d6ab.zip
gralloc-1b6f74774409c9fac0dd9a3c9010e00cc616d6ab.tar.gz
gralloc-1b6f74774409c9fac0dd9a3c9010e00cc616d6ab.tar.bz2
gralloc: omx use dma heap [1/3]
PD#150559 original from PD#150258 omx support osd display Change-Id: Id77bc70250a1f7e0185e18cf0d54fabe62a055d9
Diffstat
-rw-r--r--alloc_ion.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/alloc_ion.cpp b/alloc_ion.cpp
index 1545eda..3bd7bba 100644
--- a/alloc_ion.cpp
+++ b/alloc_ion.cpp
@@ -97,11 +97,18 @@ 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,
- ION_HEAP_CARVEOUT_MASK, ion_flags, &ion_hnd);
+#if PLATFORM_SDK_VERSION < 26
+ ION_HEAP_CARVEOUT_MASK,
+#else
+ ION_HEAP_TYPE_DMA_MASK,
+#endif
+ ion_flags, &ion_hnd);
if (ret != 0)
{
ret = ion_alloc(m->ion_client, size, 0,
1<<ION_HEAP_TYPE_CUSTOM, ion_flags, &ion_hnd);
+ ALOGE("omx alloc from custom%d, errno=%d\n", ret, errno);
+
}
#ifdef GRALLOC_APP_ALLOC_CONTINUOUS_BUF
if (ret == 0) {