diff options
author | Sean Callanan <spyffe@google.com> | 2023-12-13 23:47:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-12-13 23:47:31 +0000 |
commit | 2dc6bcd1aed4223ae190ce9ee0114dee339e000f (patch) | |
tree | 14874814745675faf5957db4edf97ecf1666938d | |
parent | 299507996fa4f1a8c9dfa1eaee8b0c23d2802eed (diff) | |
download | gchips-2dc6bcd1aed4223ae190ce9ee0114dee339e000f.tar.gz |
Revert "Use memfd on placeholder buffers"
Revert submission 25548829-placeholder-use-memfd
Reason for revert: b/315351672
Reverted changes: /q/submissionid:25548829-placeholder-use-memfd
Change-Id: Ia09a914932b585ebba0b38fbfebdf75d6d9a7a76
-rw-r--r-- | gralloc4/src/allocator/mali_gralloc_ion.cpp | 8 |
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); |