gralloc: Limit fallback case for SMI

For pmem, do not fall back to the ADSP heap if
SMI was requested explicitly

Change-Id: I31d85aa7bef3db53ca9ba108170df7ef4841843b
This commit is contained in:
Naseer Ahmed 2011-12-06 12:14:55 +05:30
parent f2dbabe786
commit c421c6ac19

View File

@ -164,6 +164,8 @@ int PmemKernelController::allocate(alloc_data& data, int usage,
{
int ret = 0;
bool adspFallback = false;
if (!(usage & GRALLOC_USAGE_PRIVATE_SMI_HEAP))
adspFallback = true;
// Try SMI first
if ((usage & GRALLOC_USAGE_PRIVATE_SMI_HEAP) ||
@ -179,8 +181,8 @@ int PmemKernelController::allocate(alloc_data& data, int usage,
if(ret >= 0)
return ret;
else {
adspFallback = true;
LOGW("Allocation from SMI failed, trying ADSP");
if(adspFallback)
LOGW("Allocation from SMI failed, trying ADSP");
}
}
}