From 2dc6bcd1aed4223ae190ce9ee0114dee339e000f Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Wed, 13 Dec 2023 23:47:28 +0000 Subject: 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 --- gralloc4/src/allocator/mali_gralloc_ion.cpp | 8 +------- 1 file changed, 1 insertion(+), 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 #include -#include #include #include @@ -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); -- cgit v1.2.3