• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 __VCODEC_SERVICE_H__
17 #define __VCODEC_SERVICE_H__
18 
19 #include "rk_type.h"
20 
21 #define EXTRA_INFO_MAGIC (0x4C4A46)
22 
23 #define VPU_IOC_MAGIC 'l'
24 
25 #define VPU_IOC_SET_CLIENT_TYPE _IOW(VPU_IOC_MAGIC, 1, unsigned long)
26 #define VPU_IOC_GET_HW_FUSE_STATUS _IOW(VPU_IOC_MAGIC, 2, unsigned long)
27 #define VPU_IOC_SET_REG _IOW(VPU_IOC_MAGIC, 3, unsigned long)
28 #define VPU_IOC_GET_REG _IOW(VPU_IOC_MAGIC, 4, unsigned long)
29 
30 #define VPU_IOC_SET_CLIENT_TYPE_U32 _IOW(VPU_IOC_MAGIC, 1, unsigned int)
31 
32 #define VPU_IOC_WRITE(nr, size) _IOC(_IOC_WRITE, VPU_IOC_MAGIC, (nr), (size))
33 
34 #define VDPU1_REGISTERS (101)
35 #define VDPU2_REGISTERS (159)
36 #define VDPU1_PP_REGISTERS (164)
37 #define VDPU2_PP_REGISTERS (184)
38 #define RKHEVC_REGISTERS (68)
39 #define RKVDEC_REGISTERS (78)
40 #define AVSD_REGISTERS (60)
41 
42 #define VEPU1_REGISTERS (164)
43 #define VEPU2_REGISTERS (184)
44 #define RKVENC_REGISTERS (140)
45 
46 #define EXTRA_INFO_SIZE (sizeof(unsigned int) * 34)
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 const char *mpp_get_vcodec_dev_name(MppCtxType type, MppCodingType coding);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif /* __VCODEC_SERVICE_H__ */