1 /*
2  * Copyright (c) 2021 Rockchip Electronics 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 MPP_PLATFORM
17 #define MPP_PLATFORM
18 
19 #include "rk_type.h"
20 #include "mpp_soc.h"
21 
22 /*
23  * Platform flag detection is for rockchip hardware platform detection
24  */
25 typedef enum MppIoctlVersion_e {
26     IOCTL_VCODEC_SERVICE,
27     IOCTL_MPP_SERVICE_V1,
28     IOCTL_VERSION_BUTT,
29 } MppIoctlVersion;
30 
31 typedef enum MppKernelVersion_e {
32     KERNEL_UNKNOWN,
33     KERNEL_3_10,
34     KERNEL_4_4,
35     KERNEL_4_19,
36     KERNEL_VERSION_BUTT,
37 } MppKernelVersion;
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 MppIoctlVersion mpp_get_ioctl_version(void);
44 MppKernelVersion mpp_get_kernel_version(void);
45 RK_U32 mpp_get_2d_hw_flag(void);
46 RK_U32 mpp_get_client_hw_id(RK_S32 client_type);
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* __MPP_PLATFORM__ */
53