summaryrefslogtreecommitdiff
path: root/msm8909/libgralloc/ionalloc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'msm8909/libgralloc/ionalloc.cpp')
-rw-r--r--msm8909/libgralloc/ionalloc.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/msm8909/libgralloc/ionalloc.cpp b/msm8909/libgralloc/ionalloc.cpp
index 5329e880..329e30f7 100644
--- a/msm8909/libgralloc/ionalloc.cpp
+++ b/msm8909/libgralloc/ionalloc.cpp
@@ -35,8 +35,8 @@
#include <fcntl.h>
#include <cutils/log.h>
#include <errno.h>
-#include <string.h>
#include <utils/Trace.h>
+#include <cutils/trace.h>
#include "gralloc_priv.h"
#include "ionalloc.h"
@@ -77,13 +77,9 @@ int IonAlloc::alloc_buffer(alloc_data& data)
ionAllocData.len = data.size;
ionAllocData.align = data.align;
- ionAllocData.heap_id_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;
-
+ ionAllocData.heap_id_mask = data.heapId;
+ ionAllocData.flags = data.flags;
+ ionAllocData.flags |= data.uncached ? 0 : ION_FLAG_CACHED;
err = open_device();
if (err)
return err;