summaryrefslogtreecommitdiff
authorbinqi.zhang <binqi.zhang@amlogic.com>2017-11-17 12:32:27 (GMT)
committer Binqi Zhang <binqi.zhang@amlogic.com>2017-11-17 12:37:13 (GMT)
commit31b1f2f247a9693d4e7dbf7d1baa19196322038a (patch)
tree460f1db4f4eeeb15ddf19aec0c845587443c4f73
parent63416c95d45936730cc3b951c7e7d8d21d1bfbd3 (diff)
downloadgralloc-31b1f2f247a9693d4e7dbf7d1baa19196322038a.zip
gralloc-31b1f2f247a9693d4e7dbf7d1baa19196322038a.tar.gz
gralloc-31b1f2f247a9693d4e7dbf7d1baa19196322038a.tar.bz2
garalloc: limit condition to allocat frome cma heap. [1/1]
PD#154793 avoid allocating buffer from cma heap when the buffer size is larger than 1920*1080*4 Change-Id: Ic65b43a5b4661293a57a4ff222a31e8e3c3b43ab
Diffstat
-rw-r--r--alloc_ion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alloc_ion.cpp b/alloc_ion.cpp
index fd6418b..f92104c 100644
--- a/alloc_ion.cpp
+++ b/alloc_ion.cpp
@@ -125,7 +125,7 @@ int alloc_backend_alloc(alloc_device_t* dev, size_t size, int usage, buffer_hand
}
#endif
#ifdef GRALLOC_APP_ALLOC_CONTINUOUS_BUF
- else if (usage & GRALLOC_USAGE_HW_COMPOSER
+ else if ((size <= 8294400) && usage & GRALLOC_USAGE_HW_COMPOSER
&& !(usage & GRALLOC_USAGE_AML_VIDEO_OVERLAY
|| usage & GRALLOC_USAGE_AML_OMX_OVERLAY)) {
layerAllocContinousBuf = true;