summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Callanan <spyffe@google.com>2023-12-14 01:26:44 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2023-12-14 01:26:44 +0000
commitb0eb37f8d49caa86f61fee461addb20503914947 (patch)
treea508cb65119b65346d5fdef28bec836659e434b5
parentb3f0912eb7bd661c5ed210d6dc69e7e0c3712e9c (diff)
parent2dc6bcd1aed4223ae190ce9ee0114dee339e000f (diff)
downloadgchips-b0eb37f8d49caa86f61fee461addb20503914947.tar.gz
Merge "Revert "Use memfd on placeholder buffers"" into main
-rw-r--r--gralloc4/src/allocator/mali_gralloc_ion.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/gralloc4/src/allocator/mali_gralloc_ion.cpp b/gralloc4/src/allocator/mali_gralloc_ion.cpp
index c66c54a..3a955d9 100644
--- a/gralloc4/src/allocator/mali_gralloc_ion.cpp
+++ b/gralloc4/src/allocator/mali_gralloc_ion.cpp
@@ -30,7 +30,6 @@
#include <utils/Trace.h>
#include <linux/dma-buf.h>
-#include <linux/memfd.h>
#include <vector>
#include <sys/ioctl.h>
@@ -223,12 +222,7 @@ int alloc_from_dmabuf_heap(uint64_t usage, size_t size, const std::string& buffe
std::stringstream tag;
tag << "heap: " << heap_name << ", bytes: " << size;
ATRACE_NAME(tag.str().c_str());
- int shared_fd = -1;
-
- // memfd requires matching sepolicy allowing r/w access to tmpfs.
- if (use_placeholder) shared_fd = memfd_create(heap_name.c_str(), 0);
- else shared_fd = get_allocator().Alloc(heap_name, size, 0);
-
+ int shared_fd = get_allocator().Alloc(heap_name, size, 0);
if (shared_fd < 0)
{
ALOGE("Allocation failed for heap %s error: %d\n", heap_name.c_str(), shared_fd);