xref: /rockchip-linux_mpp/osal/inc/mpp_dev_defs.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 __MPP_DEV_DEFS_H__
7 #define __MPP_DEV_DEFS_H__
8 
9 #include "rk_type.h"
10 
11 /*
12  * Platform video codec hardware feature
13  */
14 typedef enum MppClientType_e {
15     VPU_CLIENT_VDPU1        = 0,    /* 0x00000001 */
16     VPU_CLIENT_VDPU2        = 1,    /* 0x00000002 */
17     VPU_CLIENT_VDPU1_PP     = 2,    /* 0x00000004 */
18     VPU_CLIENT_VDPU2_PP     = 3,    /* 0x00000008 */
19     VPU_CLIENT_AV1DEC       = 4,    /* 0x00000010 */
20 
21     VPU_CLIENT_HEVC_DEC     = 8,    /* 0x00000100 */
22     VPU_CLIENT_RKVDEC       = 9,    /* 0x00000200 */
23     VPU_CLIENT_AVSPLUS_DEC  = 12,   /* 0x00001000 */
24     VPU_CLIENT_JPEG_DEC     = 13,   /* 0x00002000 */
25 
26     VPU_CLIENT_RKVENC       = 16,   /* 0x00010000 */
27     VPU_CLIENT_VEPU1        = 17,   /* 0x00020000 */
28     VPU_CLIENT_VEPU2        = 18,   /* 0x00040000 */
29     VPU_CLIENT_VEPU2_JPEG   = 19,   /* 0x00080000 */
30     VPU_CLIENT_JPEG_ENC     = 20,   /* 0x00100000 */
31 
32     VPU_CLIENT_VEPU22       = 24,   /* 0x01000000 */
33 
34     IEP_CLIENT_TYPE         = 28,   /* 0x10000000 */
35     VDPP_CLIENT_TYPE        = 29,   /* 0x20000000 */
36 
37     VPU_CLIENT_BUTT,
38 } MppClientType;
39 
40 #define CLIENT_TYPE_MASK_DEC    0x0000ffff
41 #define CLIENT_TYPE_MASK_ENC    0x0fff0000
42 #define CLIENT_TYPE_MASK_VPROC  0xf0000000
43 
44 /* RK combined codec */
45 #define HAVE_VDPU1          (1 << VPU_CLIENT_VDPU1)         /* 0x00000001 */
46 #define HAVE_VDPU2          (1 << VPU_CLIENT_VDPU2)         /* 0x00000002 */
47 #define HAVE_VDPU1_PP       (1 << VPU_CLIENT_VDPU1_PP)      /* 0x00000004 */
48 #define HAVE_VDPU2_PP       (1 << VPU_CLIENT_VDPU2_PP)      /* 0x00000008 */
49 #define HAVE_AV1DEC         (1 << VPU_CLIENT_AV1DEC)        /* 0x00000008 */
50 /* RK standalone decoder */
51 #define HAVE_HEVC_DEC       (1 << VPU_CLIENT_HEVC_DEC)      /* 0x00000100 */
52 #define HAVE_RKVDEC         (1 << VPU_CLIENT_RKVDEC)        /* 0x00000200 */
53 #define HAVE_AVSDEC         (1 << VPU_CLIENT_AVSPLUS_DEC)   /* 0x00001000 */
54 #define HAVE_JPEG_DEC       (1 << VPU_CLIENT_JPEG_DEC)      /* 0x00002000 */
55 /* RK standalone encoder */
56 #define HAVE_RKVENC         (1 << VPU_CLIENT_RKVENC)        /* 0x00010000 */
57 #define HAVE_VEPU1          (1 << VPU_CLIENT_VEPU1)         /* 0x00020000 */
58 #define HAVE_VEPU2          (1 << VPU_CLIENT_VEPU2)         /* 0x00040000 */
59 #define HAVE_VEPU2_JPEG     (1 << VPU_CLIENT_VEPU2_JPEG)    /* 0x00080000 */
60 #define HAVE_JPEG_ENC       (1 << VPU_CLIENT_JPEG_ENC)      /* 0x00100000 */
61 /* External encoder */
62 #define HAVE_VEPU22         (1 << VPU_CLIENT_VEPU22)        /* 0x01000000 */
63 /* RK Image Enhance Processor for deinterlacing */
64 #define HAVE_IEP            (1 << IEP_CLIENT_TYPE)          /* 0x10000000 */
65 /* RK Image Enhance Processor for dispaly */
66 #define HAVE_VDPP           (1 << VDPP_CLIENT_TYPE)         /* 0x20000000 */
67 
68 /* Platform image process hardware feature */
69 #define HAVE_IPP            (0x00000001)
70 #define HAVE_RGA            (0x00000002)
71 #define HAVE_RGA2           (0x00000004)
72 
73 #endif /*__MPP_DEV_DEFS_H__*/
74