gralloc: Make all pmem buffers cacheable by default
If an uncached buffer is needed from gralloc, the client must use the flag GRALLOC_USAGE_PRIVATE_UNCACHED Change-Id: Ie3fcfee1071a87fa0440600f4ca3e2d7ff6243ed
This commit is contained in:
parent
dadd73f13f
commit
0322ae55d3
@ -256,16 +256,8 @@ int PmemAshmemController::allocate(alloc_data& data, int usage,
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
// Decide caching
|
||||
// Decide based on usage
|
||||
uint32_t uread = usage & GRALLOC_USAGE_SW_READ_MASK;
|
||||
uint32_t uwrite = usage & GRALLOC_USAGE_SW_WRITE_MASK;
|
||||
if (uread == GRALLOC_USAGE_SW_READ_OFTEN ||
|
||||
uwrite == GRALLOC_USAGE_SW_WRITE_OFTEN) {
|
||||
// Make buffers cacheable by default
|
||||
data.uncached = false;
|
||||
} else {
|
||||
data.uncached = true;
|
||||
}
|
||||
|
||||
// Override if we explicitly need uncached buffers
|
||||
if (usage & GRALLOC_USAGE_PRIVATE_UNCACHED)
|
||||
|
Loading…
Reference in New Issue
Block a user