overlay: Secure playback add missing flag.
Add the missing GRALLOC_USAGE_PRIVATE_CP_BUFFER while allocating secure memory Change the O_SYNC to O_DSYNC flag. Change-Id: Ida014018be111a7904ff07c206a673b2abf52d05
This commit is contained in:
@@ -85,8 +85,7 @@ int IonAlloc::alloc_buffer(alloc_data& data)
|
||||
if(data.uncached) {
|
||||
// Use the sync FD to alloc and map
|
||||
// when we need uncached memory
|
||||
// XXX: Change O_SYNC to O_DSYNC when available in bionic
|
||||
ionSyncFd = open(ION_DEVICE, O_RDONLY|O_SYNC);
|
||||
ionSyncFd = open(ION_DEVICE, O_RDONLY|O_DSYNC);
|
||||
if(ionSyncFd < 0) {
|
||||
ALOGE("%s: Failed to open ion device - %s",
|
||||
__FUNCTION__, strerror(errno));
|
||||
|
@@ -122,6 +122,7 @@ inline bool OvMem::open(uint32_t numbufs,
|
||||
if(isSecure) {
|
||||
allocFlags |= GRALLOC_USAGE_PRIVATE_MM_HEAP;
|
||||
allocFlags |= GRALLOC_USAGE_PRIVATE_DO_NOT_MAP;
|
||||
allocFlags |= GRALLOC_USAGE_PRIVATE_CP_BUFFER;
|
||||
}
|
||||
|
||||
int err = 0;
|
||||
|
Reference in New Issue
Block a user