gralloc: set ION_SECURE to flags instead of heap_mask during

ion alloc.

  This is required for Secure Playback usecase.

Change-Id: I590bf126a35465286a9487490a114af82732e262
This commit is contained in:
Amara Venkata Mastan Manoj Kumar
2012-10-09 10:13:55 -07:00
committed by Mitchel Humpherys
parent d95c4083cc
commit c180c4eba4

View File

@@ -69,14 +69,18 @@ int IonAlloc::alloc_buffer(alloc_data& data)
struct ion_handle_data handle_data;
struct ion_fd_data fd_data;
struct ion_allocation_data ionAllocData;
void *base = 0;
ionAllocData.len = data.size;
ionAllocData.align = data.align;
ionAllocData.heap_mask = data.flags;
ionAllocData.heap_mask = data.flags & ~ION_SECURE;
ionAllocData.flags = data.uncached ? 0 : ION_FLAG_CACHED;
// ToDo: replace usage of alloc data structure with
// ionallocdata structure.
if (data.flags & ION_SECURE)
ionAllocData.flags |= ION_SECURE;
err = open_device();
if (err)
return err;