summaryrefslogtreecommitdiff
path: root/gralloc4/src/allocator/mali_gralloc_ion.h
diff options
context:
space:
mode:
authorSeYeong Byeon <sy.byeon@samsung.com>2020-10-07 16:04:38 +0900
committerAnkit Goyal <layog@google.com>2020-12-21 15:55:15 +0800
commit0fddf7d4a323917438f2fa475e25e0f0fccf1336 (patch)
treeeecfd1a34c92e6b524e1d49a7a94dd4296774e35 /gralloc4/src/allocator/mali_gralloc_ion.h
parent0cfc5e0193d520252f2c7132b6fc5fec3247eaa2 (diff)
downloadgchips-0fddf7d4a323917438f2fa475e25e0f0fccf1336.tar.gz
gralloc4: initial code
Bug: 173320140 Test: Builds successfully with gralloc3 and gralloc4 Test: Device boots to home with gralloc3 No-Typo-Check: Typos in comments from upstream Signed-off-by: SeYeong Byeon <sy.byeon@samsung.com> Change-Id: I1df105fd0358a0d1ee9c0266acafc4f7192ebc92
Diffstat (limited to 'gralloc4/src/allocator/mali_gralloc_ion.h')
-rw-r--r--gralloc4/src/allocator/mali_gralloc_ion.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/gralloc4/src/allocator/mali_gralloc_ion.h b/gralloc4/src/allocator/mali_gralloc_ion.h
new file mode 100644
index 0000000..f46cc07
--- /dev/null
+++ b/gralloc4/src/allocator/mali_gralloc_ion.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2016, 2018-2020 ARM Limited. All rights reserved.
+ *
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MALI_GRALLOC_ION_H_
+#define MALI_GRALLOC_ION_H_
+
+#include "core/mali_gralloc_bufferdescriptor.h"
+
+int mali_gralloc_ion_allocate_attr(private_handle_t *hnd);
+int mali_gralloc_ion_allocate(const gralloc_buffer_descriptor_t *descriptors,
+ uint32_t numDescriptors, buffer_handle_t *pHandle, bool *alloc_from_backing_store);
+void mali_gralloc_ion_free(private_handle_t * const hnd);
+int mali_gralloc_ion_sync_start(const private_handle_t * const hnd,
+ const bool read, const bool write);
+int mali_gralloc_ion_sync_end(const private_handle_t * const hnd,
+ const bool read, const bool write);
+int mali_gralloc_ion_map(private_handle_t *hnd);
+void mali_gralloc_ion_unmap(private_handle_t *hnd);
+void mali_gralloc_ion_close(void);
+int mali_gralloc_attr_allocate(void);
+int import_exynos_ion_handles(private_handle_t *hnd);
+void free_exynos_ion_handles(private_handle_t *hnd);
+
+#endif /* MALI_GRALLOC_ION_H_ */