• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __VCODEC_SERVICE_H__
18 #define __VCODEC_SERVICE_H__
19 
20 #include "rk_type.h"
21 
22 #define EXTRA_INFO_MAGIC                    (0x4C4A46)
23 
24 #define VPU_IOC_MAGIC                       'l'
25 
26 #define VPU_IOC_SET_CLIENT_TYPE             _IOW(VPU_IOC_MAGIC, 1, unsigned long)
27 #define VPU_IOC_GET_HW_FUSE_STATUS          _IOW(VPU_IOC_MAGIC, 2, unsigned long)
28 #define VPU_IOC_SET_REG                     _IOW(VPU_IOC_MAGIC, 3, unsigned long)
29 #define VPU_IOC_GET_REG                     _IOW(VPU_IOC_MAGIC, 4, unsigned long)
30 
31 #define VPU_IOC_SET_CLIENT_TYPE_U32         _IOW(VPU_IOC_MAGIC, 1, unsigned int)
32 
33 #define VPU_IOC_WRITE(nr, size)             _IOC(_IOC_WRITE, VPU_IOC_MAGIC, (nr), (size))
34 
35 #define VDPU1_REGISTERS                     (101)
36 #define VDPU2_REGISTERS                     (159)
37 #define VDPU1_PP_REGISTERS                  (164)
38 #define VDPU2_PP_REGISTERS                  (184)
39 #define RKHEVC_REGISTERS                    (68)
40 #define RKVDEC_REGISTERS                    (78)
41 #define AVSD_REGISTERS                      (60)
42 
43 #define VEPU1_REGISTERS                     (164)
44 #define VEPU2_REGISTERS                     (184)
45 #define RKVENC_REGISTERS                    (140)
46 
47 #define EXTRA_INFO_SIZE                     (sizeof(RK_U32) * 34)
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 const char *mpp_get_vcodec_dev_name(MppCtxType type, MppCodingType coding);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif /* __VCODEC_SERVICE_H__ */
60