1 
2 /*
3  * Copyright (C) 2016-2017, 2020 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 
24 int mali_gralloc_lock(buffer_handle_t buffer, uint64_t usage, int l, int t, int w, int h,
25                       void **vaddr);
26 int mali_gralloc_lock_ycbcr(buffer_handle_t buffer, uint64_t usage, int l, int t, int w,
27                             int h, android_ycbcr *ycbcr);
28 int mali_gralloc_unlock(buffer_handle_t buffer);
29 
30 int mali_gralloc_get_num_flex_planes(buffer_handle_t buffer, uint32_t *num_planes);
31 int mali_gralloc_lock_flex(buffer_handle_t buffer, uint64_t usage, int l, int t,
32                                  int w, int h, struct android_flex_layout *flex_layout);
33 
34 #endif /* MALI_GRALLOC_BUFFERACCESS_H_ */
35