Merge "gralloc: Limit fallback case for SMI" into ics

This commit is contained in:
Linux Build Service Account 2011-12-08 05:58:55 -08:00 committed by QuIC Gerrit Code Review
commit 0414780dfd

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");
}
}
}