xref: /OK3568_Linux_fs/external/linux-rga/core/NormalRgaContext.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (C) 2016 Rockchip Electronics Co., Ltd.
3  * Authors:
4  *  Zhiqin Wei <wzq@rock-chips.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef _rockchip_normal_rga_context_h_
20 #define _rockchip_normal_rga_context_h_
21 
22 #include "rga_ioctl.h"
23 
24 #ifndef ANDROID
25 #define ALOGD(...) { printf(__VA_ARGS__); printf("\n"); }
26 #define ALOGE(...) { printf(__VA_ARGS__); printf("\n"); }
27 #endif
28 
29 typedef enum {
30     RGA_DRIVER_IOC_UNKONW = 0,
31     RGA_DRIVER_IOC_RGA2,
32     RGA_DRIVER_IOC_MULTI_RGA,
33 
34     RGA_DRIVER_IOC_DEFAULT = RGA_DRIVER_IOC_MULTI_RGA,
35 } RGA_DRIVER_IOC_TYPE;
36 
37 struct rgaContext {
38     int rgaFd;
39     int mLogAlways;
40     int mLogOnce;
41     float mVersion;
42     int Is_debug;
43     struct rga_hw_versions_t mHwVersions;
44     struct rga_version_t mDriverVersion;
45     RGA_DRIVER_IOC_TYPE driver = RGA_DRIVER_IOC_DEFAULT;
46 };
47 #endif
48