• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2019 The Android Open Source Project
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 EXYNOS_RESOURCE_RESTRICTION_H_
18 #define EXYNOS_RESOURCE_RESTRICTION_H_
19 
20 #include "ExynosHWCModule.h"
21 
22 /*******************************************************************
23  * Structures for restrictions
24  * ****************************************************************/
25 #define RESTRICTION_NONE 0
26 
27 namespace gs101 {
28 
29 /* Basic supported features */
30 static feature_support_t feature_table[] = {
31     {MPP_DPP_GF,
32         MPP_ATTR_AFBC | MPP_ATTR_BLOCK_MODE | MPP_ATTR_WINDOW_UPDATE |
33         MPP_ATTR_FLIP_H | MPP_ATTR_FLIP_V |
34         MPP_ATTR_DIM |
35         MPP_ATTR_WCG | MPP_ATTR_HDR10 |
36         MPP_ATTR_LAYER_TRANSFORM
37     },
38 
39     {MPP_DPP_VGRFS,
40         MPP_ATTR_AFBC | MPP_ATTR_BLOCK_MODE | MPP_ATTR_WINDOW_UPDATE | MPP_ATTR_SCALE |
41         MPP_ATTR_FLIP_H | MPP_ATTR_FLIP_V | MPP_ATTR_ROT_90 |
42         MPP_ATTR_DIM |
43         MPP_ATTR_WCG | MPP_ATTR_HDR10 | MPP_ATTR_HDR10PLUS |
44         MPP_ATTR_LAYER_TRANSFORM
45     },
46 
47     {MPP_G2D,
48         MPP_ATTR_AFBC | MPP_ATTR_SCALE |
49         MPP_ATTR_FLIP_H | MPP_ATTR_FLIP_V | MPP_ATTR_ROT_90 |
50         MPP_ATTR_WCG | MPP_ATTR_HDR10 | MPP_ATTR_HDR10PLUS | MPP_ATTR_USE_CAPA |
51         MPP_ATTR_LAYER_TRANSFORM
52     }
53 };
54 
55 /**************************************************************************************
56  * HAL_PIXEL_FORMATs
57 enum {
58     HAL_PIXEL_FORMAT_RGBA_8888          = 1,
59     HAL_PIXEL_FORMAT_RGBX_8888          = 2,
60     HAL_PIXEL_FORMAT_RGB_888            = 3,
61     HAL_PIXEL_FORMAT_RGB_565            = 4,
62     HAL_PIXEL_FORMAT_BGRA_8888          = 5,
63     HAL_PIXEL_FORMAT_YV12   = 0x32315659, // YCrCb 4:2:0 Planar
64     HAL_PIXEL_FORMAT_YCbCr_422_SP       = 0x10, // NV16
65     HAL_PIXEL_FORMAT_YCrCb_420_SP       = 0x11, // NV21
66     HAL_PIXEL_FORMAT_YCbCr_422_I        = 0x14, // YUY2
67     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_P_M       = 0x101,
68     HAL_PIXEL_FORMAT_EXYNOS_CbYCrY_422_I        = 0x103,
69     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M      = 0x105,
70     HAL_PIXEL_FORMAT_EXYNOS_YCrCb_422_SP        = 0x106,
71     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_TILED= 0x107,
72     HAL_PIXEL_FORMAT_EXYNOS_ARGB_8888           = 0x108,
73     HAL_PIXEL_FORMAT_EXYNOS_YCrCb_422_I         = 0x116,
74     HAL_PIXEL_FORMAT_EXYNOS_CrYCbY_422_I        = 0x118,
75     HAL_PIXEL_FORMAT_EXYNOS_YV12_M              = 0x11C,
76     HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M      = 0x11D,
77     HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M_FULL = 0x11E,
78     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_P         = 0x11F,
79     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP        = 0x120,
80     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV = 0x121,
81     // contiguous(single fd) custom formats
82     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_PN        = 0x122,
83     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN       = 0x123,
84     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_TILED = 0x124,
85     // 10-bit format (8bit + separated 2bit)
86     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B = 0x125,
87     // 10-bit contiguous(single fd, 8bit + separated 2bit) custom formats
88     HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B  = 0x126,
89 };
90 *************************************************************************************/
91 
92 static const restriction_key_t restriction_format_table[] = {
93     {MPP_DPP_GF, NODE_NONE, HAL_PIXEL_FORMAT_RGB_565, 0},
94     {MPP_DPP_GF, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_8888, 0},
95     {MPP_DPP_GF, NODE_NONE, HAL_PIXEL_FORMAT_RGBX_8888, 0},
96     {MPP_DPP_GF, NODE_NONE, HAL_PIXEL_FORMAT_BGRA_8888, 0},
97     {MPP_DPP_GF, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_1010102, 0},
98     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_RGB_565, 0},
99     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_8888, 0},
100     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_RGBX_8888, 0},
101     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_BGRA_8888, 0},
102     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_1010102, 0},
103     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M, 0},
104     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV, 0},
105     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M, 0},
106     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M_FULL, 0},
107     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN, 0},
108     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B, 0},
109     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B, 0},
110     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_M, 0},
111     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_YCBCR_P010, 0},
112     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP, 0},
113     {MPP_DPP_VG, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP_10B, 0},
114     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_RGB_565, 0},
115     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_8888, 0},
116     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_RGBX_8888, 0},
117     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_BGRA_8888, 0},
118     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_1010102, 0},
119     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M, 0},
120     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV, 0},
121     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M, 0},
122     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M_FULL, 0},
123     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN, 0},
124     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B, 0},
125     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B, 0},
126     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_M, 0},
127     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_YCBCR_P010, 0},
128     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP, 0},
129     {MPP_DPP_VGS, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP_10B, 0},
130     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_RGB_565, 0},
131     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_8888, 0},
132     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_RGBX_8888, 0},
133     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_BGRA_8888, 0},
134     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_1010102, 0},
135     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M, 0},
136     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV, 0},
137     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M, 0},
138     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M_FULL, 0},
139     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN, 0},
140     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B, 0},
141     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B, 0},
142     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_M, 0},
143     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_YCBCR_P010, 0},
144     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP, 0},
145     {MPP_DPP_VGF, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP_10B, 0},
146     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_RGB_565, 0},
147     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_8888, 0},
148     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_RGBX_8888, 0},
149     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_BGRA_8888, 0},
150     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_1010102, 0},
151     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M, 0},
152     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV, 0},
153     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M, 0},
154     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M_FULL, 0},
155     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN, 0},
156     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B, 0},
157     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B, 0},
158     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_M, 0},
159     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_SPN, 0},
160     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_YCBCR_P010, 0},
161     {MPP_DPP_VGRFS, NODE_NONE, MALI_GRALLOC_FORMAT_INTERNAL_P010, 0},
162     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP, 0},
163     {MPP_DPP_VGRFS, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP_10B, 0},
164     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_RGB_565, 0},
165     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_RGB_888, 0},
166     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_8888, 0},
167     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_RGBX_8888, 0},
168     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_BGRA_8888, 0},
169     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_RGBA_1010102, 0},
170     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M, 0},
171     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV, 0},
172     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_TILED, 0},
173     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M, 0},
174     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCrCb_420_SP_M_FULL, 0},
175     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN, 0},
176     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B, 0},
177     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B, 0},
178     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_M, 0},
179     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_P010_SPN, 0},
180     {MPP_G2D, NODE_NONE, MALI_GRALLOC_FORMAT_INTERNAL_P010, 0},
181     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_YCrCb_420_SP, 0},
182     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_TILED, 0},
183     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP, 0},
184     {MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_GOOGLE_NV12_SP_10B, 0},
185 };
186 
187 static ppc_table ppc_table_map = {
188     /* G2D support only 2 plane YUV, so all YUV format should use YUV2P PPC table */
189     /* In case of Scale-Up, G2D should use same PPC table */
190     {PPC_IDX(MPP_G2D,PPC_FORMAT_YUV420,PPC_ROT_NO),   {3.5, 3.6, 4.3, 4.3, 3.5, 3.7, 3.7}},
191     {PPC_IDX(MPP_G2D,PPC_FORMAT_YUV420,PPC_ROT),      {2.8, 3.2, 3.9, 4.3, 3.6, 2.6, 2.6}},
192 
193     {PPC_IDX(MPP_G2D,PPC_FORMAT_YUV422,PPC_ROT_NO),   {3.5, 3.6, 4.3, 4.3, 3.5, 3.7, 3.7}},
194     {PPC_IDX(MPP_G2D,PPC_FORMAT_YUV422,PPC_ROT),      {2.8, 3.2, 3.9, 4.3, 3.6, 2.6, 2.6}},
195 
196     {PPC_IDX(MPP_G2D,PPC_FORMAT_P010,PPC_ROT_NO),     {3.5, 3.6, 4.3, 4.3, 3.5, 3.7, 3.7}},
197     {PPC_IDX(MPP_G2D,PPC_FORMAT_P010,PPC_ROT),        {2.8, 3.2, 3.9, 4.3, 3.6, 2.6, 2.6}},
198 
199     {PPC_IDX(MPP_G2D,PPC_FORMAT_RGB32,PPC_ROT_NO),    {3.2, 2.1, 2.6, 3.3, 3.6, 3.8, 3.8}},
200     {PPC_IDX(MPP_G2D,PPC_FORMAT_RGB32,PPC_ROT),       {3.6, 2.1, 2.7, 3.3, 3.8, 3.5, 3.5}},
201 
202     {PPC_IDX(MPP_G2D,PPC_FORMAT_SBWC,PPC_ROT_NO),     {2.6, 1.4, 0.9, 1.0, 1.0, 3.6, 3.6}},
203     {PPC_IDX(MPP_G2D,PPC_FORMAT_SBWC,PPC_ROT),        {2.6, 1.4, 0.9, 1.0, 1.0, 2.6, 2.6}},
204 
205     {PPC_IDX(MPP_G2D,PPC_FORMAT_AFBC_RGB,PPC_ROT_NO), {3.4, 0.3, 0.5, 0.8, 0.7, 1.6, 1.6}},
206     {PPC_IDX(MPP_G2D,PPC_FORMAT_AFBC_RGB,PPC_ROT),    {3.6, 0.3, 0.8, 0.9, 0.9, 1.4, 1.4}},
207 
208     {PPC_IDX(MPP_G2D,PPC_FORMAT_AFBC_YUV,PPC_ROT_NO), {2.0, 0.8, 0.3, 0.3, 0.4, 2.9, 2.9}},
209     {PPC_IDX(MPP_G2D,PPC_FORMAT_AFBC_YUV,PPC_ROT),    {2.0, 0.8, 0.3, 0.3, 0.4, 2.6, 2.6}},
210 };
211 
212 } // namespace gs101
213 
214 const restriction_size_element restriction_size_table_rgb[] =
215         {{{MPP_DPP_GF, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
216           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
217          {{MPP_DPP_VG, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
218           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
219          {{MPP_DPP_VGS, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
220           {{2, 8, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
221          {{MPP_DPP_VGF, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
222           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
223          {{MPP_DPP_VGRFS, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
224           {{2, 8, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
225          {{MPP_DPP_GF, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
226           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
227          {{MPP_DPP_VG, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
228           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
229          {{MPP_DPP_VGS, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
230           {{2, 8, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
231          {{MPP_DPP_VGF, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
232           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
233          {{MPP_DPP_VGRFS, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
234           {{2, 8, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
235          /* MPP_G2D maxUpScale = max crop size / min crop size */
236          {{MPP_G2D, NODE_NONE, HAL_PIXEL_FORMAT_NONE, 0},
237           {{8192, 8192, 8192, 8192, 1, 1, 1, 1, 8192, 8192, 1, 1, 1, 1, 1, 1}}}};
238 
239 const restriction_size_element restriction_size_table_yuv[] =
240         {{{MPP_DPP_GF, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
241           {{1, 1, 65534, 8190, 32, 32, 2, 2, 4096, 4096, 32, 32, 2, 2, 2, 2}}},
242          {{MPP_DPP_VG, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
243           {{1, 1, 65534, 8190, 32, 32, 2, 2, 4096, 4096, 32, 32, 2, 2, 2, 2}}},
244          {{MPP_DPP_VGS, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
245           {{2, 8, 65534, 8190, 32, 32, 2, 2, 4096, 4096, 32, 32, 2, 2, 2, 2}}},
246          {{MPP_DPP_VGF, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
247           {{1, 1, 65534, 8190, 32, 32, 2, 2, 4096, 4096, 32, 32, 2, 2, 2, 2}}},
248          {{MPP_DPP_VGRFS, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
249           {{2, 8, 65534, 8190, 32, 32, 2, 2, 4096, 4096, 32, 32, 2, 2, 2, 2}}},
250          /* MPP_G2D maxUpScale = max crop size / min crop size */
251          {{MPP_G2D, NODE_SRC, HAL_PIXEL_FORMAT_NONE, 0},
252           {{4, 8192, 8192, 8192, 2, 2, 2, 2, 8192, 8192, 1, 1, 1, 1, 1, 1}}},
253          {{MPP_DPP_GF, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
254           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
255          {{MPP_DPP_VG, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
256           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
257          {{MPP_DPP_VGS, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
258           {{2, 8, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
259          {{MPP_DPP_VGF, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
260           {{1, 1, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
261          {{MPP_DPP_VGRFS, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
262           {{2, 8, 65535, 8191, 16, 16, 1, 1, 4096, 4096, 16, 16, 1, 1, 1, 1}}},
263          /* MPP_G2D maxUpScale = max crop size / min crop size */
264          {{MPP_G2D, NODE_DST, HAL_PIXEL_FORMAT_NONE, 0},
265           {{8192, 8192, 8192, 8192, 2, 2, 2, 2, 8192, 8192, 2, 2, 2, 2, 2, 2}}}};
266 
267 const restriction_table_element restriction_tables[RESTRICTION_MAX] =
268 {
269     {RESTRICTION_RGB, restriction_size_table_rgb, sizeof(restriction_size_table_rgb)/sizeof(restriction_size_element)},
270     {RESTRICTION_YUV, restriction_size_table_yuv, sizeof(restriction_size_table_yuv)/sizeof(restriction_size_element)}
271 };
272 
273 #define USE_MODULE_DPU_ATTR_MAP
274 const dpu_attr_map_t dpu_attr_map_table [] =
275 {
276     {DPP_ATTR_AFBC, MPP_ATTR_AFBC},
277     {DPP_ATTR_BLOCK, MPP_ATTR_BLOCK_MODE},
278     {DPP_ATTR_FLIP, MPP_ATTR_FLIP_H | MPP_ATTR_FLIP_V},
279     {DPP_ATTR_ROT, MPP_ATTR_ROT_90},
280     {DPP_ATTR_SCALE, MPP_ATTR_SCALE},
281     {DPP_ATTR_HDR, MPP_ATTR_HDR10 | MPP_ATTR_WCG | MPP_ATTR_LAYER_TRANSFORM},
282     {DPP_ATTR_HDR10_PLUS, MPP_ATTR_HDR10PLUS | MPP_ATTR_HDR10 | MPP_ATTR_WCG | MPP_ATTR_LAYER_TRANSFORM},
283     {DPP_ATTR_C_HDR, MPP_ATTR_HDR10},
284     {DPP_ATTR_C_HDR10_PLUS, MPP_ATTR_HDR10PLUS},
285     {DPP_ATTR_WCG, MPP_ATTR_WCG},
286 };
287 
288 #endif
289