exynos4: gralloc: actually disable ION allocations

This reverts commit 6cec77e050.

Change-Id: I87ea925c33ecfe7f2728b84cc5a316530d7d8765
This commit is contained in:
Shilin Victor 2019-03-02 00:10:19 +03:00
parent 9c4bb20ab5
commit 8b1d6eb487
1 changed files with 8 additions and 1 deletions

View File

@ -296,11 +296,18 @@ static int gralloc_alloc_buffer(alloc_device_t* dev, size_t size, int usage,
}
ret = -1;
if (usage & (GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE)) {
#if 0
if (usage & (GRALLOC_USAGE_HW_COMPOSER | GRALLOC_USAGE_HW_ION)) {
ALOGV("%s: Allocating for HWC via ION...", __func__);
// the handle is guaranteed to have this usage flag set
// if it is going to be used as an HWC layer (see hwcomposer.h in hardware/libhardware)
ret = gralloc_alloc_ion(dev, size, usage, format, &ion_fd, &ion_paddr, &priv_alloc_flag, &ump_mem_handle);
} else if (usage & (GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE)) {
ALOGV("%s: Allocating graphicbuffer via ION...", __func__);
priv_alloc_flag = priv_alloc_flag | private_handle_t::PRIV_FLAGS_GRAPHICBUFFER;
ret = gralloc_alloc_ion(dev, size, usage, format, &ion_fd, &ion_paddr, &priv_alloc_flag, &ump_mem_handle);
}
#endif
if (ret < 0) {
// may happen if ion carveout is out of memory, or if the