xref: /rockchip-linux_mpp/osal/inc/vcodec_service.h (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /* SPDX-License-Identifier: Apache-2.0 OR MIT */
2 /*
3  * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
4  */
5 
6 #ifndef __VCODEC_SERVICE_H__
7 #define __VCODEC_SERVICE_H__
8 
9 #include "rk_type.h"
10 
11 #define EXTRA_INFO_MAGIC                    (0x4C4A46)
12 
13 #define VPU_IOC_MAGIC                       'l'
14 
15 #define VPU_IOC_SET_CLIENT_TYPE             _IOW(VPU_IOC_MAGIC, 1, unsigned long)
16 #define VPU_IOC_GET_HW_FUSE_STATUS          _IOW(VPU_IOC_MAGIC, 2, unsigned long)
17 #define VPU_IOC_SET_REG                     _IOW(VPU_IOC_MAGIC, 3, unsigned long)
18 #define VPU_IOC_GET_REG                     _IOW(VPU_IOC_MAGIC, 4, unsigned long)
19 
20 #define VPU_IOC_SET_CLIENT_TYPE_U32         _IOW(VPU_IOC_MAGIC, 1, unsigned int)
21 
22 #define VPU_IOC_WRITE(nr, size)             _IOC(_IOC_WRITE, VPU_IOC_MAGIC, (nr), (size))
23 
24 #define VDPU1_REGISTERS                     (101)
25 #define VDPU2_REGISTERS                     (159)
26 #define VDPU1_PP_REGISTERS                  (164)
27 #define VDPU2_PP_REGISTERS                  (184)
28 #define RKHEVC_REGISTERS                    (68)
29 #define RKVDEC_REGISTERS                    (78)
30 #define AVSD_REGISTERS                      (60)
31 
32 #define VEPU1_REGISTERS                     (164)
33 #define VEPU2_REGISTERS                     (184)
34 #define RKVENC_REGISTERS                    (140)
35 
36 #define EXTRA_INFO_SIZE                     (sizeof(RK_U32) * 34)
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 const char *mpp_get_vcodec_dev_name(MppCtxType type, MppCodingType coding);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /* __VCODEC_SERVICE_H__ */
49