• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /*
3  * Copyright (C) 2016-2017 ARM Limited. All rights reserved.
4  *
5  * Copyright (C) 2008 The Android Open Source Project
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * You may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 #ifndef MALI_GRALLOC_BUFFERACCESS_H_
20 #define MALI_GRALLOC_BUFFERACCESS_H_
21 
22 #include "gralloc_priv.h"
23 #include "mali_gralloc_module.h"
24 
25 int mali_gralloc_lock(const mali_gralloc_module *m, buffer_handle_t buffer, uint64_t usage, int l, int t, int w, int h,
26                       void **vaddr);
27 int mali_gralloc_lock_ycbcr(const mali_gralloc_module *m, buffer_handle_t buffer, uint64_t usage, int l, int t, int w,
28                             int h, android_ycbcr *ycbcr);
29 int mali_gralloc_unlock(const mali_gralloc_module *m, buffer_handle_t buffer);
30 
31 int mali_gralloc_get_num_flex_planes(const mali_gralloc_module *m, buffer_handle_t buffer, uint32_t *num_planes);
32 int mali_gralloc_lock_async(const mali_gralloc_module *m, buffer_handle_t buffer, uint64_t usage, int l, int t, int w,
33                             int h, void **vaddr, int32_t fence_fd);
34 int mali_gralloc_lock_ycbcr_async(const mali_gralloc_module *m, buffer_handle_t buffer, uint64_t usage, int l, int t,
35                                   int w, int h, android_ycbcr *ycbcr, int32_t fence_fd);
36 int mali_gralloc_lock_flex_async(const mali_gralloc_module *m, buffer_handle_t buffer, uint64_t usage, int l, int t,
37                                  int w, int h, struct android_flex_layout *flex_layout, int32_t fence_fd);
38 int mali_gralloc_unlock_async(const mali_gralloc_module *m, buffer_handle_t buffer, int32_t *fence_fd);
39 
40 #endif /* MALI_GRALLOC_BUFFERACCESS_H_ */
41