gralloc: Allow non-contiguous allocations for secure buffers
Pass a flag to ion to allow non-contiguous allocations with a sg (scatter gather) list of 1MB chunks for all secure buffers except secure display. Change-Id: Ife2709e94571ab7603b29da17805a857ba73fd72
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
c18558644f
commit
13cdf813ab
@@ -292,6 +292,11 @@ int IonController::allocate(alloc_data& data, int usage)
|
||||
if (usage & GRALLOC_USAGE_PRIVATE_MM_HEAP) {
|
||||
ionFlags |= ION_HEAP(ION_CP_MM_HEAP_ID);
|
||||
ionFlags |= ION_SECURE;
|
||||
#ifdef ION_FLAG_ALLOW_NON_CONTIG
|
||||
if (!(usage & GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY)) {
|
||||
ionFlags |= ION_FLAG_ALLOW_NON_CONTIG;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
// for targets/OEMs which do not need HW level protection
|
||||
// do not set ion secure flag & MM heap. Fallback to IOMMU heap.
|
||||
|
||||
Reference in New Issue
Block a user