• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Unionman Technology Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef AML_GE2D_H_
17 #define AML_GE2D_H_
18 
19 #include "ge2d_port.h"
20 
21 #if defined (__cplusplus)
22 extern "C" {
23 #endif
24 
25 typedef struct aml_ge2d {
26     aml_ge2d_info_t ge2dinfo;
27     char *src_data[GE2D_MAX_PLANE];
28     char *src2_data[GE2D_MAX_PLANE];
29     char *dst_data[GE2D_MAX_PLANE];
30     unsigned int src_size[GE2D_MAX_PLANE];
31     unsigned int src2_size[GE2D_MAX_PLANE];
32     unsigned int dst_size[GE2D_MAX_PLANE];
33     void *cmemParm_src[GE2D_MAX_PLANE];
34     void *cmemParm_src2[GE2D_MAX_PLANE];
35     void *cmemParm_dst[GE2D_MAX_PLANE];
36 } aml_ge2d_t;
37 
38 int aml_ge2d_init(aml_ge2d_t *pge2d);
39 void aml_ge2d_exit(aml_ge2d_t *pge2d);
40 
41 int aml_ge2d_mem_alloc_ion(aml_ge2d_t *pge2d);
42 void aml_ge2d_mem_free_ion(aml_ge2d_t *pge2d);
43 
44 /* support dma_buf */
45 int aml_ge2d_mem_alloc(aml_ge2d_t *pge2d);
46 void aml_ge2d_mem_free(aml_ge2d_t *pge2d);
47 int aml_ge2d_process(aml_ge2d_info_t *pge2dinfo);
48 int aml_ge2d_process_ion(aml_ge2d_info_t *pge2dinfo);
49 int aml_ge2d_invalid_cache(aml_ge2d_info_t *pge2dinfo);
50 
51 #if defined (__cplusplus)
52 }
53 #endif
54 
55 #endif
56