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:
Saurabh Shah
2012-07-19 18:18:20 -07:00
parent 8352773d2d
commit 421b3b9bf1
2 changed files with 2 additions and 2 deletions

View File

@@ -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));

View File

@@ -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;