• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
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 #pragma once
17 
18 #include <soc/soc.h>
19 #include "dma2d_struct.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 /* REG_0x00 */
25 
dma2d_ll_get_dma2d_control_reg_value(dma2d_hw_t * hw)26 static inline uint32_t dma2d_ll_get_dma2d_control_reg_value(dma2d_hw_t *hw)
27 {
28     return hw->dma2d_control_reg.v;
29 }
30 
dma2d_ll_set_dma2d_control_reg_value(dma2d_hw_t * hw,uint32_t value)31 static inline void dma2d_ll_set_dma2d_control_reg_value(dma2d_hw_t *hw, uint32_t value)
32 {
33     hw->dma2d_control_reg.v = value;
34 }
35 
36 /* REG_0x00:dma2d_control_reg->tran_start:dma2d transfer start.,RW,0x0[       0]*/
dma2d_ll_get_dma2d_control_reg_tran_start(dma2d_hw_t * hw)37 static inline uint32_t dma2d_ll_get_dma2d_control_reg_tran_start(dma2d_hw_t *hw)
38 {
39     return hw->dma2d_control_reg.tran_start;
40 }
41 
dma2d_ll_set_dma2d_control_reg_tran_start(dma2d_hw_t * hw,uint32_t value)42 static inline void dma2d_ll_set_dma2d_control_reg_tran_start(dma2d_hw_t *hw, uint32_t value)
43 {
44     hw->dma2d_control_reg.tran_start = value;
45 }
46 
47 /* REG_0x00:dma2d_control_reg->tran_suspend:dma2d transfer start.,RW,0x0[       1]*/
dma2d_ll_get_dma2d_control_reg_tran_suspend(dma2d_hw_t * hw)48 static inline uint32_t dma2d_ll_get_dma2d_control_reg_tran_suspend(dma2d_hw_t *hw)
49 {
50     return hw->dma2d_control_reg.tran_suspend;
51 }
52 
dma2d_ll_set_dma2d_control_reg_tran_suspend(dma2d_hw_t * hw,uint32_t value)53 static inline void dma2d_ll_set_dma2d_control_reg_tran_suspend(dma2d_hw_t *hw, uint32_t value)
54 {
55     hw->dma2d_control_reg.tran_suspend = value;
56 }
57 
58 /* REG_0x00:dma2d_control_reg->tran_abort:dma2d transfer start.,RW,0x0[       2]*/
dma2d_ll_get_dma2d_control_reg_tran_abort(dma2d_hw_t * hw)59 static inline uint32_t dma2d_ll_get_dma2d_control_reg_tran_abort(dma2d_hw_t *hw)
60 {
61     return hw->dma2d_control_reg.tran_abort;
62 }
63 
dma2d_ll_set_dma2d_control_reg_tran_abort(dma2d_hw_t * hw,uint32_t value)64 static inline void dma2d_ll_set_dma2d_control_reg_tran_abort(dma2d_hw_t *hw, uint32_t value)
65 {
66     hw->dma2d_control_reg.tran_abort = value;
67 }
68 
69 /* REG_0x00:dma2d_control_reg->line_offset_mode:line's offset mode sel: 0:in pixel express; 1: in bytes express.,RW,0x0[       6]*/
dma2d_ll_get_dma2d_control_reg_line_offset_mode(dma2d_hw_t * hw)70 static inline uint32_t dma2d_ll_get_dma2d_control_reg_line_offset_mode(dma2d_hw_t *hw)
71 {
72     return hw->dma2d_control_reg.line_offset_mode;
73 }
74 
dma2d_ll_set_dma2d_control_reg_line_offset_mode(dma2d_hw_t * hw,uint32_t value)75 static inline void dma2d_ll_set_dma2d_control_reg_line_offset_mode(dma2d_hw_t *hw, uint32_t value)
76 {
77     hw->dma2d_control_reg.line_offset_mode = value;
78 }
79 
80 /* REG_0x00:dma2d_control_reg->error_int_en:trabsfer error int ena.,RW,0x0[       8]*/
dma2d_ll_get_dma2d_control_reg_error_int_en(dma2d_hw_t * hw)81 static inline uint32_t dma2d_ll_get_dma2d_control_reg_error_int_en(dma2d_hw_t *hw)
82 {
83     return hw->dma2d_control_reg.error_int_en;
84 }
85 
dma2d_ll_set_dma2d_control_reg_error_int_en(dma2d_hw_t * hw,uint32_t value)86 static inline void dma2d_ll_set_dma2d_control_reg_error_int_en(dma2d_hw_t *hw, uint32_t value)
87 {
88     hw->dma2d_control_reg.error_int_en = value;
89 }
90 
91 /* REG_0x00:dma2d_control_reg->complete_int_en:transfer complete int ena.,RW,0x0[       9]*/
dma2d_ll_get_dma2d_control_reg_complete_int_en(dma2d_hw_t * hw)92 static inline uint32_t dma2d_ll_get_dma2d_control_reg_complete_int_en(dma2d_hw_t *hw)
93 {
94     return hw->dma2d_control_reg.complete_int_en;
95 }
96 
dma2d_ll_set_dma2d_control_reg_complete_int_en(dma2d_hw_t * hw,uint32_t value)97 static inline void dma2d_ll_set_dma2d_control_reg_complete_int_en(dma2d_hw_t *hw, uint32_t value)
98 {
99     hw->dma2d_control_reg.complete_int_en = value;
100 }
101 
102 /* REG_0x00:dma2d_control_reg->waterm_int_en:transfer watermark int ena.,RW,0x0[     10]*/
dma2d_ll_get_dma2d_control_reg_waterm_int_en(dma2d_hw_t * hw)103 static inline uint32_t dma2d_ll_get_dma2d_control_reg_waterm_int_en(dma2d_hw_t *hw)
104 {
105     return hw->dma2d_control_reg.waterm_int_en;
106 }
107 
dma2d_ll_set_dma2d_control_reg_waterm_int_en(dma2d_hw_t * hw,uint32_t value)108 static inline void dma2d_ll_set_dma2d_control_reg_waterm_int_en(dma2d_hw_t *hw, uint32_t value)
109 {
110     hw->dma2d_control_reg.waterm_int_en = value;
111 }
112 
113 /* REG_0x00:dma2d_control_reg->clut_error_int_en:clut transfer error int ena.,RW,0x0[     11]*/
dma2d_ll_get_dma2d_control_reg_clut_error_int_en(dma2d_hw_t * hw)114 static inline uint32_t dma2d_ll_get_dma2d_control_reg_clut_error_int_en(dma2d_hw_t *hw)
115 {
116     return hw->dma2d_control_reg.clut_error_int_en;
117 }
118 
dma2d_ll_set_dma2d_control_reg_clut_error_int_en(dma2d_hw_t * hw,uint32_t value)119 static inline void dma2d_ll_set_dma2d_control_reg_clut_error_int_en(dma2d_hw_t *hw, uint32_t value)
120 {
121     hw->dma2d_control_reg.clut_error_int_en = value;
122 }
123 
124 /* REG_0x00:dma2d_control_reg->clut_cmplt_int_en:clut transfer complete int ena.,RW,0x0[     12]*/
dma2d_ll_get_dma2d_control_reg_clut_cmplt_int_en(dma2d_hw_t * hw)125 static inline uint32_t dma2d_ll_get_dma2d_control_reg_clut_cmplt_int_en(dma2d_hw_t *hw)
126 {
127     return hw->dma2d_control_reg.clut_cmplt_int_en;
128 }
129 
dma2d_ll_set_dma2d_control_reg_clut_cmplt_int_en(dma2d_hw_t * hw,uint32_t value)130 static inline void dma2d_ll_set_dma2d_control_reg_clut_cmplt_int_en(dma2d_hw_t *hw, uint32_t value)
131 {
132     hw->dma2d_control_reg.clut_cmplt_int_en = value;
133 }
134 
135 /* REG_0x00:dma2d_control_reg->config_error_int_en:config error int ena,,RW,0x0[     13]*/
dma2d_ll_get_dma2d_control_reg_config_error_int_en(dma2d_hw_t * hw)136 static inline uint32_t dma2d_ll_get_dma2d_control_reg_config_error_int_en(dma2d_hw_t *hw)
137 {
138     return hw->dma2d_control_reg.config_error_int_en;
139 }
140 
dma2d_ll_set_dma2d_control_reg_config_error_int_en(dma2d_hw_t * hw,uint32_t value)141 static inline void dma2d_ll_set_dma2d_control_reg_config_error_int_en(dma2d_hw_t *hw, uint32_t value)
142 {
143     hw->dma2d_control_reg.config_error_int_en = value;
144 }
145 
146 /* REG_0x00:dma2d_control_reg->mode:DMA2D mode sel: 000:m2m; 001:m2m pixel convert with fg; 010:m2m blend; 011:r2m.only with output; 100: m2m blend fix fg; 101:m2m blend fix bg;,RW,0x0[18:16]*/
dma2d_ll_get_dma2d_control_reg_mode(dma2d_hw_t * hw)147 static inline uint32_t dma2d_ll_get_dma2d_control_reg_mode(dma2d_hw_t *hw)
148 {
149     return hw->dma2d_control_reg.mode;
150 }
151 
dma2d_ll_set_dma2d_control_reg_mode(dma2d_hw_t * hw,uint32_t value)152 static inline void dma2d_ll_set_dma2d_control_reg_mode(dma2d_hw_t *hw, uint32_t value)
153 {
154     hw->dma2d_control_reg.mode = value;
155 }
156 
157 /* REG_0x00:[19:20] max transfer length:00:256bytes; 01:192 bytes;  10:128bytes;  11:64bytes;*/
dma2d_ll_get_dma2d_control_reg_master_tran_length(dma2d_hw_t * hw)158 static inline uint32_t dma2d_ll_get_dma2d_control_reg_master_tran_length(dma2d_hw_t *hw)
159 {
160     return hw->dma2d_control_reg.master_tran_length;
161 }
162 
163 /* REG_0x00:[19:20] dma2dmax transfer length:00:256bytes; 01:192 bytes;  10:128bytes;  11:64bytes;*/
dma2d_ll_set_dma2d_control_reg_master_tran_length(dma2d_hw_t * hw,uint32_t value)164 static inline void dma2d_ll_set_dma2d_control_reg_master_tran_length(dma2d_hw_t *hw, uint32_t value)
165 {
166     hw->dma2d_control_reg.master_tran_length = value;
167 }
168 
169 /* REG_0x00:[21] in output rgb888 formart, reverse data byte by byte.;*/
dma2d_ll_get_dma2d_control_reg_out_byte_revese(dma2d_hw_t * hw)170 static inline uint32_t dma2d_ll_get_dma2d_control_reg_out_byte_revese(dma2d_hw_t *hw)
171 {
172     return hw->dma2d_control_reg.out_byte_revese;
173 }
174 
175 /* REG_0x00:[21] in output rgb888 formart, reverse data byte by byte.*/
dma2d_ll_set_dma2d_control_reg_out_byte_revese(dma2d_hw_t * hw,uint32_t value)176 static inline void dma2d_ll_set_dma2d_control_reg_out_byte_revese(dma2d_hw_t *hw, uint32_t value)
177 {
178     hw->dma2d_control_reg.out_byte_revese = value;
179 }
180 
181 /* REG_0x01 */
182 
183 /* REG_0x01 */
184 
dma2d_ll_get_dma2d_int_status_value(dma2d_hw_t * hw)185 static inline uint32_t dma2d_ll_get_dma2d_int_status_value(dma2d_hw_t *hw)
186 {
187     return hw->dma2d_int_status.v;
188 }
189 
190 /* REG_0x01:dma2d_int_status->error_int:transfer error int flag.,R,0x1[       0]*/
dma2d_ll_get_dma2d_int_status_error_int(dma2d_hw_t * hw)191 static inline uint32_t dma2d_ll_get_dma2d_int_status_error_int(dma2d_hw_t *hw)
192 {
193     return hw->dma2d_int_status.error_int;
194 }
195 
196 /* REG_0x01:dma2d_int_status->complete_int:transfer complete int flag.,R,0x1[       1]*/
dma2d_ll_get_dma2d_int_status_complete_int(dma2d_hw_t * hw)197 static inline uint32_t dma2d_ll_get_dma2d_int_status_complete_int(dma2d_hw_t *hw)
198 {
199     return hw->dma2d_int_status.complete_int;
200 }
201 
202 /* REG_0x01:dma2d_int_status->waterm_int:transfer watermark intt flag.,R,0x1[       2]*/
dma2d_ll_get_dma2d_int_status_waterm_int(dma2d_hw_t * hw)203 static inline uint32_t dma2d_ll_get_dma2d_int_status_waterm_int(dma2d_hw_t *hw)
204 {
205     return hw->dma2d_int_status.waterm_int;
206 }
207 
208 /* REG_0x01:dma2d_int_status->clut_error_int:clut transfer error intt flag.,R,0x1[       3]*/
dma2d_ll_get_dma2d_int_status_clut_error_int(dma2d_hw_t * hw)209 static inline uint32_t dma2d_ll_get_dma2d_int_status_clut_error_int(dma2d_hw_t *hw)
210 {
211     return hw->dma2d_int_status.clut_error_int;
212 }
213 
214 /* REG_0x01:dma2d_int_status->clut_cmplt_int:clut transfer complete intt flag.,R,0x1[       4]*/
dma2d_ll_get_dma2d_int_status_clut_cmplt_int(dma2d_hw_t * hw)215 static inline uint32_t dma2d_ll_get_dma2d_int_status_clut_cmplt_int(dma2d_hw_t *hw)
216 {
217     return hw->dma2d_int_status.clut_cmplt_int;
218 }
219 
220 /* REG_0x01:dma2d_int_status->config_error_int:config error int t flag.,R,0x1[       5]*/
dma2d_ll_get_dma2d_int_status_config_error_int(dma2d_hw_t * hw)221 static inline uint32_t dma2d_ll_get_dma2d_int_status_config_error_int(dma2d_hw_t *hw)
222 {
223     return hw->dma2d_int_status.config_error_int;
224 }
225 
226 /* REG_0x02 */
227 
228 /* REG_0x02 */
229 
dma2d_ll_set_dma2d_int_clear_value(dma2d_hw_t * hw,uint32_t value)230 static inline void dma2d_ll_set_dma2d_int_clear_value(dma2d_hw_t *hw, uint32_t value)
231 {
232     hw->dma2d_int_clear.v = value;
233 }
234 
235 /* REG_0x02:dma2d_int_clear->clr_error_int:clear transfer error int flag.,W,0x2[       0]*/
dma2d_ll_set_dma2d_int_clear_clr_error_int(dma2d_hw_t * hw,uint32_t value)236 static inline void dma2d_ll_set_dma2d_int_clear_clr_error_int(dma2d_hw_t *hw, uint32_t value)
237 {
238     hw->dma2d_int_clear.clr_error_int = value;
239 }
240 
241 /* REG_0x02:dma2d_int_clear->clr_complete_int:clear transfer complete int flag.,W,0x2[       1]*/
dma2d_ll_set_dma2d_int_clear_clr_complete_int(dma2d_hw_t * hw,uint32_t value)242 static inline void dma2d_ll_set_dma2d_int_clear_clr_complete_int(dma2d_hw_t *hw, uint32_t value)
243 {
244     hw->dma2d_int_clear.clr_complete_int = value;
245 }
246 
247 /* REG_0x02:dma2d_int_clear->clr_waterm_int:clear transfer watermark intt flag.,W,0x2[       2]*/
dma2d_ll_set_dma2d_int_clear_clr_waterm_int(dma2d_hw_t * hw,uint32_t value)248 static inline void dma2d_ll_set_dma2d_int_clear_clr_waterm_int(dma2d_hw_t *hw, uint32_t value)
249 {
250     hw->dma2d_int_clear.clr_waterm_int = value;
251 }
252 
253 /* REG_0x02:dma2d_int_clear->clr_clut_error_int:clear clut transfer error intt flag.,W,0x2[       3]*/
dma2d_ll_set_dma2d_int_clear_clr_clut_error_int(dma2d_hw_t * hw,uint32_t value)254 static inline void dma2d_ll_set_dma2d_int_clear_clr_clut_error_int(dma2d_hw_t *hw, uint32_t value)
255 {
256     hw->dma2d_int_clear.clr_clut_error_int = value;
257 }
258 
259 /* REG_0x02:dma2d_int_clear->clr_clut_cmplt_int:clear clut transfer complete intt flag.,W,0x2[       4]*/
dma2d_ll_set_dma2d_int_clear_clr_clut_cmplt_int(dma2d_hw_t * hw,uint32_t value)260 static inline void dma2d_ll_set_dma2d_int_clear_clr_clut_cmplt_int(dma2d_hw_t *hw, uint32_t value)
261 {
262     hw->dma2d_int_clear.clr_clut_cmplt_int = value;
263 }
264 
265 /* REG_0x02:dma2d_int_clear->clr_config_error_int:clear config error int t flag.,W,0x2[       5]*/
dma2d_ll_set_dma2d_int_clear_clr_config_error_int(dma2d_hw_t * hw,uint32_t value)266 static inline void dma2d_ll_set_dma2d_int_clear_clr_config_error_int(dma2d_hw_t *hw, uint32_t value)
267 {
268     hw->dma2d_int_clear.clr_config_error_int = value;
269 }
270 
271 /* REG_0x03 */
272 
dma2d_ll_get_dma2d_fg_address_value(dma2d_hw_t * hw)273 static inline uint32_t dma2d_ll_get_dma2d_fg_address_value(dma2d_hw_t *hw)
274 {
275     return hw->dma2d_fg_address.v;
276 }
277 
dma2d_ll_set_dma2d_fg_address_value(dma2d_hw_t * hw,uint32_t value)278 static inline void dma2d_ll_set_dma2d_fg_address_value(dma2d_hw_t *hw, uint32_t value)
279 {
280     hw->dma2d_fg_address.v = value;
281 }
282 
283 /* REG_0x03:dma2d_fg_address->fg_address:foreground mem address, written when transfer disable.,RW,0x3[31:  0]*/
dma2d_ll_get_dma2d_fg_address_fg_address(dma2d_hw_t * hw)284 static inline uint32_t dma2d_ll_get_dma2d_fg_address_fg_address(dma2d_hw_t *hw)
285 {
286     return hw->dma2d_fg_address.v;
287 }
288 
dma2d_ll_set_dma2d_fg_address_fg_address(dma2d_hw_t * hw,uint32_t value)289 static inline void dma2d_ll_set_dma2d_fg_address_fg_address(dma2d_hw_t *hw, uint32_t value)
290 {
291     hw->dma2d_fg_address.v = value;
292 }
293 
294 /* REG_0x04 */
295 
dma2d_ll_get_dma2d_fg_offset_value(dma2d_hw_t * hw)296 static inline uint32_t dma2d_ll_get_dma2d_fg_offset_value(dma2d_hw_t *hw)
297 {
298     return hw->dma2d_fg_offset.v;
299 }
300 
dma2d_ll_set_dma2d_fg_offset_value(dma2d_hw_t * hw,uint32_t value)301 static inline void dma2d_ll_set_dma2d_fg_offset_value(dma2d_hw_t *hw, uint32_t value)
302 {
303     hw->dma2d_fg_offset.v = value;
304 }
305 
306 /* REG_0x04:dma2d_fg_offset->fg_line_offset:line offset for fg, offset In pixel or bytes.,RW,0x4[15:  0]*/
dma2d_ll_get_dma2d_fg_offset_fg_line_offset(dma2d_hw_t * hw)307 static inline uint32_t dma2d_ll_get_dma2d_fg_offset_fg_line_offset(dma2d_hw_t *hw)
308 {
309     return hw->dma2d_fg_offset.fg_line_offset;
310 }
311 
dma2d_ll_set_dma2d_fg_offset_fg_line_offset(dma2d_hw_t * hw,uint32_t value)312 static inline void dma2d_ll_set_dma2d_fg_offset_fg_line_offset(dma2d_hw_t *hw, uint32_t value)
313 {
314     hw->dma2d_fg_offset.fg_line_offset = value;
315 }
316 
317 /* REG_0x05 */
318 
dma2d_ll_get_dma2d_bg_address_value(dma2d_hw_t * hw)319 static inline uint32_t dma2d_ll_get_dma2d_bg_address_value(dma2d_hw_t *hw)
320 {
321     return hw->dma2d_bg_address.v;
322 }
323 
dma2d_ll_set_dma2d_bg_address_value(dma2d_hw_t * hw,uint32_t value)324 static inline void dma2d_ll_set_dma2d_bg_address_value(dma2d_hw_t *hw, uint32_t value)
325 {
326     hw->dma2d_bg_address.v = value;
327 }
328 
329 /* REG_0x05:dma2d_bg_address->bg_address:background mem address, written when transfer disable.,RW,0x5[31:  0]*/
dma2d_ll_get_dma2d_bg_address_bg_address(dma2d_hw_t * hw)330 static inline uint32_t dma2d_ll_get_dma2d_bg_address_bg_address(dma2d_hw_t *hw)
331 {
332     return hw->dma2d_bg_address.v;
333 }
334 
dma2d_ll_set_dma2d_bg_address_bg_address(dma2d_hw_t * hw,uint32_t value)335 static inline void dma2d_ll_set_dma2d_bg_address_bg_address(dma2d_hw_t *hw, uint32_t value)
336 {
337     hw->dma2d_bg_address.v = value;
338 }
339 
340 /* REG_0x06 */
341 
dma2d_ll_get_dma2d_bg_offset_value(dma2d_hw_t * hw)342 static inline uint32_t dma2d_ll_get_dma2d_bg_offset_value(dma2d_hw_t *hw)
343 {
344     return hw->dma2d_bg_offset.v;
345 }
346 
dma2d_ll_set_dma2d_bg_offset_value(dma2d_hw_t * hw,uint32_t value)347 static inline void dma2d_ll_set_dma2d_bg_offset_value(dma2d_hw_t *hw, uint32_t value)
348 {
349     hw->dma2d_bg_offset.v = value;
350 }
351 
352 /* REG_0x06:dma2d_bg_offset->bg_line_offset:line offset for bg, offset In pixel or bytes.,RW,0x6[15:  0]*/
dma2d_ll_get_dma2d_bg_offset_bg_line_offset(dma2d_hw_t * hw)353 static inline uint32_t dma2d_ll_get_dma2d_bg_offset_bg_line_offset(dma2d_hw_t *hw)
354 {
355     return hw->dma2d_bg_offset.bg_line_offset;
356 }
357 
dma2d_ll_set_dma2d_bg_offset_bg_line_offset(dma2d_hw_t * hw,uint32_t value)358 static inline void dma2d_ll_set_dma2d_bg_offset_bg_line_offset(dma2d_hw_t *hw, uint32_t value)
359 {
360     hw->dma2d_bg_offset.bg_line_offset = value;
361 }
362 
363 /* REG_0x07 */
364 
dma2d_ll_get_dma2d_fg_pfc_ctrl_value(dma2d_hw_t * hw)365 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_value(dma2d_hw_t *hw)
366 {
367     return hw->dma2d_fg_pfc_ctrl.v;
368 }
369 
dma2d_ll_set_dma2d_fg_pfc_ctrl_value(dma2d_hw_t * hw,uint32_t value)370 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_value(dma2d_hw_t *hw, uint32_t value)
371 {
372     hw->dma2d_fg_pfc_ctrl.v = value;
373 }
374 
375 /* REG_0x07:dma2d_fg_pfc_ctrl->fg_color_mode:foreground image color mode.; 0000:ARGB888;0001:RGB888;0010:RGB565;0011:ARGB1555;0100:ARGB4444; 0101:L8;0110:AL44; 0111:AL88; 1000:L4; 1001:A8;1010:A4;,RW,0x7[  3:  0]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_color_mode(dma2d_hw_t * hw)376 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_color_mode(dma2d_hw_t *hw)
377 {
378     return hw->dma2d_fg_pfc_ctrl.fg_color_mode;
379 }
380 
dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_color_mode(dma2d_hw_t * hw,uint32_t value)381 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_color_mode(dma2d_hw_t *hw, uint32_t value)
382 {
383     hw->dma2d_fg_pfc_ctrl.fg_color_mode = value;
384 }
385 
386 /* REG_0x07:dma2d_fg_pfc_ctrl->fg_clut_color_mode:color mode for clut. 0:argb8888; 1:rgb888.,RW,0x7[       4]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_clut_color_mode(dma2d_hw_t * hw)387 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_clut_color_mode(dma2d_hw_t *hw)
388 {
389     return hw->dma2d_fg_pfc_ctrl.fg_clut_color_mode;
390 }
391 
dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_clut_color_mode(dma2d_hw_t * hw,uint32_t value)392 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_clut_color_mode(dma2d_hw_t *hw, uint32_t value)
393 {
394     hw->dma2d_fg_pfc_ctrl.fg_clut_color_mode = value;
395 }
396 
397 /* REG_0x07:dma2d_fg_pfc_ctrl->fg_start_clut:automatic load the clut. Automatic reset.,RW,0x7[       5]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_start_clut(dma2d_hw_t * hw)398 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_start_clut(dma2d_hw_t *hw)
399 {
400     return hw->dma2d_fg_pfc_ctrl.fg_start_clut;
401 }
402 
dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_start_clut(dma2d_hw_t * hw,uint32_t value)403 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_start_clut(dma2d_hw_t *hw, uint32_t value)
404 {
405     hw->dma2d_fg_pfc_ctrl.fg_start_clut = value;
406 }
407 
408 /* REG_0x07:dma2d_fg_pfc_ctrl->fg_clut_size:the size of clut used for foreground image. Size = fg_clut_size + 1;,RW,0x7[15:  8]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_clut_size(dma2d_hw_t * hw)409 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_clut_size(dma2d_hw_t *hw)
410 {
411     return hw->dma2d_fg_pfc_ctrl.fg_clut_size;
412 }
413 
dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_clut_size(dma2d_hw_t * hw,uint32_t value)414 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_clut_size(dma2d_hw_t *hw, uint32_t value)
415 {
416     hw->dma2d_fg_pfc_ctrl.fg_clut_size = value;
417 }
418 
419 /* REG_0x07:dma2d_fg_pfc_ctrl->fg_alpha_mode:alpha value use for fg image. 00: nochange; 01:replace orginal, 10: alpha[7:0] multipied with orginal value.,RW,0x7[17:16]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_alpha_mode(dma2d_hw_t * hw)420 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_alpha_mode(dma2d_hw_t *hw)
421 {
422     return hw->dma2d_fg_pfc_ctrl.fg_alpha_mode;
423 }
424 
dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_alpha_mode(dma2d_hw_t * hw,uint32_t value)425 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_alpha_mode(dma2d_hw_t *hw, uint32_t value)
426 {
427     hw->dma2d_fg_pfc_ctrl.fg_alpha_mode = value;
428 }
429 
430 /* REG_0x07:dma2d_fg_pfc_ctrl->alpha_invert:invert alpha value.,RW,0x7[     20]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_alpha_invert(dma2d_hw_t * hw)431 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_alpha_invert(dma2d_hw_t *hw)
432 {
433     return hw->dma2d_fg_pfc_ctrl.alpha_invert;
434 }
435 
dma2d_ll_set_dma2d_fg_pfc_ctrl_alpha_invert(dma2d_hw_t * hw,uint32_t value)436 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_alpha_invert(dma2d_hw_t *hw, uint32_t value)
437 {
438     hw->dma2d_fg_pfc_ctrl.alpha_invert = value;
439 }
440 
441 /* REG_0x07:dma2d_fg_pfc_ctrl->fg_rb_swap:red blue swap to support rgb or argb. 0: regular mode.1:swap_mode.,RW,0x7[     21]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_rb_swap(dma2d_hw_t * hw)442 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_rb_swap(dma2d_hw_t *hw)
443 {
444     return hw->dma2d_fg_pfc_ctrl.fg_rb_swap;
445 }
446 
dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_rb_swap(dma2d_hw_t * hw,uint32_t value)447 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_rb_swap(dma2d_hw_t *hw, uint32_t value)
448 {
449     hw->dma2d_fg_pfc_ctrl.fg_rb_swap = value;
450 }
451 
452 /* REG_0x07:dma2d_fg_pfc_ctrl->fg_alpha:fg alpha value set. Use with fg_alpha_mode.,RW,0x7[31:24]*/
dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_alpha(dma2d_hw_t * hw)453 static inline uint32_t dma2d_ll_get_dma2d_fg_pfc_ctrl_fg_alpha(dma2d_hw_t *hw)
454 {
455     return hw->dma2d_fg_pfc_ctrl.fg_alpha;
456 }
457 
dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_alpha(dma2d_hw_t * hw,uint32_t value)458 static inline void dma2d_ll_set_dma2d_fg_pfc_ctrl_fg_alpha(dma2d_hw_t *hw, uint32_t value)
459 {
460     hw->dma2d_fg_pfc_ctrl.fg_alpha = value;
461 }
462 
463 /* REG_0x08 */
464 
dma2d_ll_get_dma2d_fg_color_reg_value(dma2d_hw_t * hw)465 static inline uint32_t dma2d_ll_get_dma2d_fg_color_reg_value(dma2d_hw_t *hw)
466 {
467     return hw->dma2d_fg_color_reg.v;
468 }
469 
dma2d_ll_set_dma2d_fg_color_reg_value(dma2d_hw_t * hw,uint32_t value)470 static inline void dma2d_ll_set_dma2d_fg_color_reg_value(dma2d_hw_t *hw, uint32_t value)
471 {
472     hw->dma2d_fg_color_reg.v = value;
473 }
474 
475 /* REG_0x08:dma2d_fg_color_reg->blue_value:blue_value in a4 or a8 mode of fg,,RW,0x8[  7:  0]*/
dma2d_ll_get_dma2d_fg_color_reg_blue_value(dma2d_hw_t * hw)476 static inline uint32_t dma2d_ll_get_dma2d_fg_color_reg_blue_value(dma2d_hw_t *hw)
477 {
478     return hw->dma2d_fg_color_reg.blue_value;
479 }
480 
dma2d_ll_set_dma2d_fg_color_reg_blue_value(dma2d_hw_t * hw,uint32_t value)481 static inline void dma2d_ll_set_dma2d_fg_color_reg_blue_value(dma2d_hw_t *hw, uint32_t value)
482 {
483     hw->dma2d_fg_color_reg.blue_value = value;
484 }
485 
486 /* REG_0x08:dma2d_fg_color_reg->green_value:green_value in a4 or a8 mode of fg,,RW,0x8[15:  8]*/
dma2d_ll_get_dma2d_fg_color_reg_green_value(dma2d_hw_t * hw)487 static inline uint32_t dma2d_ll_get_dma2d_fg_color_reg_green_value(dma2d_hw_t *hw)
488 {
489     return hw->dma2d_fg_color_reg.green_value;
490 }
491 
dma2d_ll_set_dma2d_fg_color_reg_green_value(dma2d_hw_t * hw,uint32_t value)492 static inline void dma2d_ll_set_dma2d_fg_color_reg_green_value(dma2d_hw_t *hw, uint32_t value)
493 {
494     hw->dma2d_fg_color_reg.green_value = value;
495 }
496 
497 /* REG_0x08:dma2d_fg_color_reg->red_value:red_value in a4 or a8 mode of fg,,RW,0x8[23:16]*/
dma2d_ll_get_dma2d_fg_color_reg_red_value(dma2d_hw_t * hw)498 static inline uint32_t dma2d_ll_get_dma2d_fg_color_reg_red_value(dma2d_hw_t *hw)
499 {
500     return hw->dma2d_fg_color_reg.red_value;
501 }
502 
dma2d_ll_set_dma2d_fg_color_reg_red_value(dma2d_hw_t * hw,uint32_t value)503 static inline void dma2d_ll_set_dma2d_fg_color_reg_red_value(dma2d_hw_t *hw, uint32_t value)
504 {
505     hw->dma2d_fg_color_reg.red_value = value;
506 }
507 
508 /* REG_0x09 */
509 
dma2d_ll_get_dma2d_bg_pfc_ctrl_value(dma2d_hw_t * hw)510 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_value(dma2d_hw_t *hw)
511 {
512     return hw->dma2d_bg_pfc_ctrl.v;
513 }
514 
dma2d_ll_set_dma2d_bg_pfc_ctrl_value(dma2d_hw_t * hw,uint32_t value)515 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_value(dma2d_hw_t *hw, uint32_t value)
516 {
517     hw->dma2d_bg_pfc_ctrl.v = value;
518 }
519 
520 /* REG_0x09:dma2d_bg_pfc_ctrl->bg_color_mode:background image color mode.; 0000:ARGB888;0001:RGB888;0010:RGB565;0011:ARGB1555;0100:ARGB4444; 0101:L8;0110:AL44; 0111:AL88; 1000:L4; 1001:A8;1010:A4;,RW,0x9[  3:  0]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_color_mode(dma2d_hw_t * hw)521 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_color_mode(dma2d_hw_t *hw)
522 {
523     return hw->dma2d_bg_pfc_ctrl.bg_color_mode;
524 }
525 
dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_color_mode(dma2d_hw_t * hw,uint32_t value)526 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_color_mode(dma2d_hw_t *hw, uint32_t value)
527 {
528     hw->dma2d_bg_pfc_ctrl.bg_color_mode = value;
529 }
530 
531 /* REG_0x09:dma2d_bg_pfc_ctrl->bg_clut_color_mode:color mode for clut. 0:argb8888; 1:rgb888.,RW,0x9[       4]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_clut_color_mode(dma2d_hw_t * hw)532 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_clut_color_mode(dma2d_hw_t *hw)
533 {
534     return hw->dma2d_bg_pfc_ctrl.bg_clut_color_mode;
535 }
536 
dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_clut_color_mode(dma2d_hw_t * hw,uint32_t value)537 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_clut_color_mode(dma2d_hw_t *hw, uint32_t value)
538 {
539     hw->dma2d_bg_pfc_ctrl.bg_clut_color_mode = value;
540 }
541 
542 /* REG_0x09:dma2d_bg_pfc_ctrl->bg_start_clut:automatic load the clut. Automatic reset.,RW,0x9[       5]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_start_clut(dma2d_hw_t * hw)543 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_start_clut(dma2d_hw_t *hw)
544 {
545     return hw->dma2d_bg_pfc_ctrl.bg_start_clut;
546 }
547 
dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_start_clut(dma2d_hw_t * hw,uint32_t value)548 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_start_clut(dma2d_hw_t *hw, uint32_t value)
549 {
550     hw->dma2d_bg_pfc_ctrl.bg_start_clut = value;
551 }
552 
553 /* REG_0x09:dma2d_bg_pfc_ctrl->bg_clut_size:the size of clut used for background image. Size = fg_clut_size + 1;,RW,0x9[15:  8]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_clut_size(dma2d_hw_t * hw)554 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_clut_size(dma2d_hw_t *hw)
555 {
556     return hw->dma2d_bg_pfc_ctrl.bg_clut_size;
557 }
558 
dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_clut_size(dma2d_hw_t * hw,uint32_t value)559 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_clut_size(dma2d_hw_t *hw, uint32_t value)
560 {
561     hw->dma2d_bg_pfc_ctrl.bg_clut_size = value;
562 }
563 
564 /* REG_0x09:dma2d_bg_pfc_ctrl->bg_alpha_mode:alpha value use for fg image. 00: nochange; 01:replace orginal, 10: alpha[7:0] multipied with orginal value.,RW,0x9[17:16]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_alpha_mode(dma2d_hw_t * hw)565 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_alpha_mode(dma2d_hw_t *hw)
566 {
567     return hw->dma2d_bg_pfc_ctrl.bg_alpha_mode;
568 }
569 
dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_alpha_mode(dma2d_hw_t * hw,uint32_t value)570 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_alpha_mode(dma2d_hw_t *hw, uint32_t value)
571 {
572     hw->dma2d_bg_pfc_ctrl.bg_alpha_mode = value;
573 }
574 
575 /* REG_0x09:dma2d_bg_pfc_ctrl->alpha_invert:invert alpha value.,RW,0x9[     20]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_alpha_invert(dma2d_hw_t * hw)576 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_alpha_invert(dma2d_hw_t *hw)
577 {
578     return hw->dma2d_bg_pfc_ctrl.alpha_invert;
579 }
580 
dma2d_ll_set_dma2d_bg_pfc_ctrl_alpha_invert(dma2d_hw_t * hw,uint32_t value)581 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_alpha_invert(dma2d_hw_t *hw, uint32_t value)
582 {
583     hw->dma2d_bg_pfc_ctrl.alpha_invert = value;
584 }
585 
586 /* REG_0x09:dma2d_bg_pfc_ctrl->bg_rb_swap:red blue swap to support rgb or argb. 0: regular mode.1:swap_mode.,RW,0x9[     21]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_rb_swap(dma2d_hw_t * hw)587 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_rb_swap(dma2d_hw_t *hw)
588 {
589     return hw->dma2d_bg_pfc_ctrl.bg_rb_swap;
590 }
591 
dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_rb_swap(dma2d_hw_t * hw,uint32_t value)592 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_rb_swap(dma2d_hw_t *hw, uint32_t value)
593 {
594     hw->dma2d_bg_pfc_ctrl.bg_rb_swap = value;
595 }
596 
597 /* REG_0x09:dma2d_bg_pfc_ctrl->bg_alpha:bg alpha value set. Use withbg_alpha_mode.,RW,0x9[31:24]*/
dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_alpha(dma2d_hw_t * hw)598 static inline uint32_t dma2d_ll_get_dma2d_bg_pfc_ctrl_bg_alpha(dma2d_hw_t *hw)
599 {
600     return hw->dma2d_bg_pfc_ctrl.bg_alpha;
601 }
602 
dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_alpha(dma2d_hw_t * hw,uint32_t value)603 static inline void dma2d_ll_set_dma2d_bg_pfc_ctrl_bg_alpha(dma2d_hw_t *hw, uint32_t value)
604 {
605     hw->dma2d_bg_pfc_ctrl.bg_alpha = value;
606 }
607 
608 /* REG_0x0a */
609 
dma2d_ll_get_dma2d_bg_color_reg_value(dma2d_hw_t * hw)610 static inline uint32_t dma2d_ll_get_dma2d_bg_color_reg_value(dma2d_hw_t *hw)
611 {
612     return hw->dma2d_bg_color_reg.v;
613 }
614 
dma2d_ll_set_dma2d_bg_color_reg_value(dma2d_hw_t * hw,uint32_t value)615 static inline void dma2d_ll_set_dma2d_bg_color_reg_value(dma2d_hw_t *hw, uint32_t value)
616 {
617     hw->dma2d_bg_color_reg.v = value;
618 }
619 
620 /* REG_0x0a:dma2d_bg_color_reg->blue_value:blue_value in a4 or a8 mode of bg,,RW,0xa[  7:  0]*/
dma2d_ll_get_dma2d_bg_color_reg_blue_value(dma2d_hw_t * hw)621 static inline uint32_t dma2d_ll_get_dma2d_bg_color_reg_blue_value(dma2d_hw_t *hw)
622 {
623     return hw->dma2d_bg_color_reg.blue_value;
624 }
625 
dma2d_ll_set_dma2d_bg_color_reg_blue_value(dma2d_hw_t * hw,uint32_t value)626 static inline void dma2d_ll_set_dma2d_bg_color_reg_blue_value(dma2d_hw_t *hw, uint32_t value)
627 {
628     hw->dma2d_bg_color_reg.blue_value = value;
629 }
630 
631 /* REG_0x0a:dma2d_bg_color_reg->green_value:green_value in a4 or a8 mode of bg,,RW,0xa[15:  8]*/
dma2d_ll_get_dma2d_bg_color_reg_green_value(dma2d_hw_t * hw)632 static inline uint32_t dma2d_ll_get_dma2d_bg_color_reg_green_value(dma2d_hw_t *hw)
633 {
634     return hw->dma2d_bg_color_reg.green_value;
635 }
636 
dma2d_ll_set_dma2d_bg_color_reg_green_value(dma2d_hw_t * hw,uint32_t value)637 static inline void dma2d_ll_set_dma2d_bg_color_reg_green_value(dma2d_hw_t *hw, uint32_t value)
638 {
639     hw->dma2d_bg_color_reg.green_value = value;
640 }
641 
642 /* REG_0x0a:dma2d_bg_color_reg->red_value:red_value in a4 or a8 mode of bg,,RW,0xa[23:16]*/
dma2d_ll_get_dma2d_bg_color_reg_red_value(dma2d_hw_t * hw)643 static inline uint32_t dma2d_ll_get_dma2d_bg_color_reg_red_value(dma2d_hw_t *hw)
644 {
645     return hw->dma2d_bg_color_reg.red_value;
646 }
647 
dma2d_ll_set_dma2d_bg_color_reg_red_value(dma2d_hw_t * hw,uint32_t value)648 static inline void dma2d_ll_set_dma2d_bg_color_reg_red_value(dma2d_hw_t *hw, uint32_t value)
649 {
650     hw->dma2d_bg_color_reg.red_value = value;
651 }
652 
653 /* REG_0x0b */
654 
dma2d_ll_get_fg_clut_mem_address_value(dma2d_hw_t * hw)655 static inline uint32_t dma2d_ll_get_fg_clut_mem_address_value(dma2d_hw_t *hw)
656 {
657     return hw->fg_clut_mem_address.v;
658 }
659 
dma2d_ll_set_fg_clut_mem_address_value(dma2d_hw_t * hw,uint32_t value)660 static inline void dma2d_ll_set_fg_clut_mem_address_value(dma2d_hw_t *hw, uint32_t value)
661 {
662     hw->fg_clut_mem_address.v = value;
663 }
664 
665 /* REG_0x0b:fg_clut_mem_address->fg_clut_address:clut data dedicated to the fg image.,RW,0xb[31: 0]*/
dma2d_ll_get_fg_clut_mem_address_fg_clut_address(dma2d_hw_t * hw)666 static inline uint32_t dma2d_ll_get_fg_clut_mem_address_fg_clut_address(dma2d_hw_t *hw)
667 {
668     return hw->fg_clut_mem_address.v;
669 }
670 
dma2d_ll_set_fg_clut_mem_address_fg_clut_address(dma2d_hw_t * hw,uint32_t value)671 static inline void dma2d_ll_set_fg_clut_mem_address_fg_clut_address(dma2d_hw_t *hw, uint32_t value)
672 {
673     hw->fg_clut_mem_address.v = value;
674 }
675 
676 /* REG_0x0c */
677 
dma2d_ll_get_bg_clut_mem_address_value(dma2d_hw_t * hw)678 static inline uint32_t dma2d_ll_get_bg_clut_mem_address_value(dma2d_hw_t *hw)
679 {
680     return hw->bg_clut_mem_address.v;
681 }
682 
dma2d_ll_set_bg_clut_mem_address_value(dma2d_hw_t * hw,uint32_t value)683 static inline void dma2d_ll_set_bg_clut_mem_address_value(dma2d_hw_t *hw, uint32_t value)
684 {
685     hw->bg_clut_mem_address.v = value;
686 }
687 
688 /* REG_0x0c:bg_clut_mem_address->bg_clut_address:clut data dedicated to the bg image.,RW,0xc[31:  0]*/
dma2d_ll_get_bg_clut_mem_address_bg_clut_address(dma2d_hw_t * hw)689 static inline uint32_t dma2d_ll_get_bg_clut_mem_address_bg_clut_address(dma2d_hw_t *hw)
690 {
691     return hw->bg_clut_mem_address.v;
692 }
693 
dma2d_ll_set_bg_clut_mem_address_bg_clut_address(dma2d_hw_t * hw,uint32_t value)694 static inline void dma2d_ll_set_bg_clut_mem_address_bg_clut_address(dma2d_hw_t *hw, uint32_t value)
695 {
696     hw->bg_clut_mem_address.v = value;
697 }
698 
699 /* REG_0x0d */
700 
dma2d_ll_get_out_pfc_contrl_value(dma2d_hw_t * hw)701 static inline uint32_t dma2d_ll_get_out_pfc_contrl_value(dma2d_hw_t *hw)
702 {
703     return hw->out_pfc_contrl.v;
704 }
705 
dma2d_ll_set_out_pfc_contrl_value(dma2d_hw_t * hw,uint32_t value)706 static inline void dma2d_ll_set_out_pfc_contrl_value(dma2d_hw_t *hw, uint32_t value)
707 {
708     hw->out_pfc_contrl.v = value;
709 }
710 
711 /* REG_0x0d:out_pfc_contrl->out_color_mode:format of output image.0:argb888; 1:rgb888; 010:rgb565; 011:argb1555; 100:argb444,RW,0xd[  2:  0]*/
dma2d_ll_get_out_pfc_contrl_out_color_mode(dma2d_hw_t * hw)712 static inline uint32_t dma2d_ll_get_out_pfc_contrl_out_color_mode(dma2d_hw_t *hw)
713 {
714     return hw->out_pfc_contrl.out_color_mode;
715 }
716 
dma2d_ll_set_out_pfc_contrl_out_color_mode(dma2d_hw_t * hw,uint32_t value)717 static inline void dma2d_ll_set_out_pfc_contrl_out_color_mode(dma2d_hw_t *hw, uint32_t value)
718 {
719     hw->out_pfc_contrl.out_color_mode = value;
720 }
721 
722 /* REG_0x0d:out_pfc_contrl->out_swap_bytes:0:bytes in regular order. 1:bytes swaped two by two in output fifo.,RW,0xd[       9]*/
dma2d_ll_get_out_pfc_contrl_out_swap_bytes(dma2d_hw_t * hw)723 static inline uint32_t dma2d_ll_get_out_pfc_contrl_out_swap_bytes(dma2d_hw_t *hw)
724 {
725     return hw->out_pfc_contrl.out_swap_bytes;
726 }
727 
dma2d_ll_set_out_pfc_contrl_out_swap_bytes(dma2d_hw_t * hw,uint32_t value)728 static inline void dma2d_ll_set_out_pfc_contrl_out_swap_bytes(dma2d_hw_t *hw, uint32_t value)
729 {
730     hw->out_pfc_contrl.out_swap_bytes = value;
731 }
732 
733 /* REG_0x0d:out_pfc_contrl->out_alpha_invert.:invert alpha value.,RW,0xd[     20]*/
dma2d_ll_get_out_pfc_contrl_out_alpha_invert(dma2d_hw_t * hw)734 static inline uint32_t dma2d_ll_get_out_pfc_contrl_out_alpha_invert(dma2d_hw_t *hw)
735 {
736     return hw->out_pfc_contrl.out_alpha_invert;
737 }
738 
dma2d_ll_set_out_pfc_contrl_out_alpha_invert(dma2d_hw_t * hw,uint32_t value)739 static inline void dma2d_ll_set_out_pfc_contrl_out_alpha_invert(dma2d_hw_t *hw, uint32_t value)
740 {
741     hw->out_pfc_contrl.out_alpha_invert = value;
742 }
743 
744 /* REG_0x0d:out_pfc_contrl->out_rb_swap:ed blue swap to support rgb or argb. 0: regular mode.1:swap_mode.,RW,0xd[     21]*/
dma2d_ll_get_out_pfc_contrl_out_rb_swap(dma2d_hw_t * hw)745 static inline uint32_t dma2d_ll_get_out_pfc_contrl_out_rb_swap(dma2d_hw_t *hw)
746 {
747     return hw->out_pfc_contrl.out_rb_swap;
748 }
749 
dma2d_ll_set_out_pfc_contrl_out_rb_swap(dma2d_hw_t * hw,uint32_t value)750 static inline void dma2d_ll_set_out_pfc_contrl_out_rb_swap(dma2d_hw_t *hw, uint32_t value)
751 {
752     hw->out_pfc_contrl.out_rb_swap = value;
753 }
754 
755 /* REG_0x0e */
756 
dma2d_ll_get_out_color_reg_value(dma2d_hw_t * hw)757 static inline uint32_t dma2d_ll_get_out_color_reg_value(dma2d_hw_t *hw)
758 {
759     return hw->out_color_reg.v;
760 }
761 
dma2d_ll_set_out_color_reg_value(dma2d_hw_t * hw,uint32_t value)762 static inline void dma2d_ll_set_out_color_reg_value(dma2d_hw_t *hw, uint32_t value)
763 {
764     hw->out_color_reg.v = value;
765 }
766 
767 /* REG_0x0e:out_color_reg->output_clor_reg:output reg, in different color mode. Output is different.; Argb888 or rgb888: alpha[31:24];red[23:16]; green[15:8];blue[7:0].; Rgb565:red[15:11]; green[12:5]; blue[4:0];; argb1555:a[15];red[14:10]; green[4:0]; blue[4:0];; argb4444:alpha[15:12];red[11:8];green[7:4];blue[3;0].,RW,0xe[31:  0]*/
dma2d_ll_get_out_color_reg_output_clor_reg(dma2d_hw_t * hw)768 static inline uint32_t dma2d_ll_get_out_color_reg_output_clor_reg(dma2d_hw_t *hw)
769 {
770     return hw->out_color_reg.v;
771 }
772 
dma2d_ll_set_out_color_reg_output_clor_reg(dma2d_hw_t * hw,uint32_t value)773 static inline void dma2d_ll_set_out_color_reg_output_clor_reg(dma2d_hw_t *hw, uint32_t value)
774 {
775     hw->out_color_reg.v = value;
776 }
777 
778 /* REG_0x0f */
779 
dma2d_ll_get_dma2d_out_mem_address_value(dma2d_hw_t * hw)780 static inline uint32_t dma2d_ll_get_dma2d_out_mem_address_value(dma2d_hw_t *hw)
781 {
782     return hw->dma2d_out_mem_address.v;
783 }
784 
dma2d_ll_set_dma2d_out_mem_address_value(dma2d_hw_t * hw,uint32_t value)785 static inline void dma2d_ll_set_dma2d_out_mem_address_value(dma2d_hw_t *hw, uint32_t value)
786 {
787     hw->dma2d_out_mem_address.v = value;
788 }
789 
790 /* REG_0x0f:dma2d_out_mem_address->out_mem_address:address of data output fifo.,RW,0xf[31:  0]*/
dma2d_ll_get_dma2d_out_mem_address_out_mem_address(dma2d_hw_t * hw)791 static inline uint32_t dma2d_ll_get_dma2d_out_mem_address_out_mem_address(dma2d_hw_t *hw)
792 {
793     return hw->dma2d_out_mem_address.v;
794 }
795 
dma2d_ll_set_dma2d_out_mem_address_out_mem_address(dma2d_hw_t * hw,uint32_t value)796 static inline void dma2d_ll_set_dma2d_out_mem_address_out_mem_address(dma2d_hw_t *hw, uint32_t value)
797 {
798     hw->dma2d_out_mem_address.v = value;
799 }
800 
801 /* REG_0x10 */
802 
dma2d_ll_get_output_offset_value(dma2d_hw_t * hw)803 static inline uint32_t dma2d_ll_get_output_offset_value(dma2d_hw_t *hw)
804 {
805     return hw->output_offset.v;
806 }
807 
dma2d_ll_set_output_offset_value(dma2d_hw_t * hw,uint32_t value)808 static inline void dma2d_ll_set_output_offset_value(dma2d_hw_t *hw, uint32_t value)
809 {
810     hw->output_offset.v = value;
811 }
812 
813 /* REG_0x10:output_offset->out_line_offset:output line offset. Offfset with bytes or pixel.in pixel[15:14] ignored.,RW,0x10[15:  0]*/
dma2d_ll_get_output_offset_out_line_offset(dma2d_hw_t * hw)814 static inline uint32_t dma2d_ll_get_output_offset_out_line_offset(dma2d_hw_t *hw)
815 {
816     return hw->output_offset.out_line_offset;
817 }
818 
dma2d_ll_set_output_offset_out_line_offset(dma2d_hw_t * hw,uint32_t value)819 static inline void dma2d_ll_set_output_offset_out_line_offset(dma2d_hw_t *hw, uint32_t value)
820 {
821     hw->output_offset.out_line_offset = value;
822 }
823 
824 /* REG_0x11 */
825 
dma2d_ll_get_dma2d_number_of_line_value(dma2d_hw_t * hw)826 static inline uint32_t dma2d_ll_get_dma2d_number_of_line_value(dma2d_hw_t *hw)
827 {
828     return hw->dma2d_number_of_line.v;
829 }
830 
dma2d_ll_set_dma2d_number_of_line_value(dma2d_hw_t * hw,uint32_t value)831 static inline void dma2d_ll_set_dma2d_number_of_line_value(dma2d_hw_t *hw, uint32_t value)
832 {
833     hw->dma2d_number_of_line.v = value;
834 }
835 
836 /* REG_0x11:dma2d_number_of_line->number_line:X PIXEL.,RW,0x11[15:  0]*/
dma2d_ll_get_dma2d_number_of_line_number_line(dma2d_hw_t * hw)837 static inline uint32_t dma2d_ll_get_dma2d_number_of_line_number_line(dma2d_hw_t *hw)
838 {
839     return hw->dma2d_number_of_line.number_line;
840 }
841 
dma2d_ll_set_dma2d_number_of_line_number_line(dma2d_hw_t * hw,uint32_t value)842 static inline void dma2d_ll_set_dma2d_number_of_line_number_line(dma2d_hw_t *hw, uint32_t value)
843 {
844     hw->dma2d_number_of_line.number_line = value;
845 }
846 
847 /* REG_0x11:dma2d_number_of_line->pixel_line:Y_PIXEL.,RW,0x11[29:16]*/
dma2d_ll_get_dma2d_number_of_line_pixel_line(dma2d_hw_t * hw)848 static inline uint32_t dma2d_ll_get_dma2d_number_of_line_pixel_line(dma2d_hw_t *hw)
849 {
850     return hw->dma2d_number_of_line.pixel_line;
851 }
852 
dma2d_ll_set_dma2d_number_of_line_pixel_line(dma2d_hw_t * hw,uint32_t value)853 static inline void dma2d_ll_set_dma2d_number_of_line_pixel_line(dma2d_hw_t *hw, uint32_t value)
854 {
855     hw->dma2d_number_of_line.pixel_line = value;
856 }
857 
858 /* REG_0x12 */
859 
dma2d_ll_get_dma2d_line_watermark_value(dma2d_hw_t * hw)860 static inline uint32_t dma2d_ll_get_dma2d_line_watermark_value(dma2d_hw_t *hw)
861 {
862     return hw->dma2d_line_watermark.v;
863 }
864 
dma2d_ll_set_dma2d_line_watermark_value(dma2d_hw_t * hw,uint32_t value)865 static inline void dma2d_ll_set_dma2d_line_watermark_value(dma2d_hw_t *hw, uint32_t value)
866 {
867     hw->dma2d_line_watermark.v = value;
868 }
869 
870 /* REG_0x12:dma2d_line_watermark->line_watermark:config the line watermark int generation, transfer reach the watermark, int hold on.,RW,0x12[15:  0]*/
dma2d_ll_get_dma2d_line_watermark_line_watermark(dma2d_hw_t * hw)871 static inline uint32_t dma2d_ll_get_dma2d_line_watermark_line_watermark(dma2d_hw_t *hw)
872 {
873     return hw->dma2d_line_watermark.line_watermark;
874 }
875 
dma2d_ll_set_dma2d_line_watermark_line_watermark(dma2d_hw_t * hw,uint32_t value)876 static inline void dma2d_ll_set_dma2d_line_watermark_line_watermark(dma2d_hw_t *hw, uint32_t value)
877 {
878     hw->dma2d_line_watermark.line_watermark = value;
879 }
880 
881 /* REG_0x13 */
882 
dma2d_ll_get_dma2d_master_time_config_value(dma2d_hw_t * hw)883 static inline uint32_t dma2d_ll_get_dma2d_master_time_config_value(dma2d_hw_t *hw)
884 {
885     return hw->dma2d_master_time_config.v;
886 }
887 
dma2d_ll_set_dma2d_master_time_config_value(dma2d_hw_t * hw,uint32_t value)888 static inline void dma2d_ll_set_dma2d_master_time_config_value(dma2d_hw_t *hw, uint32_t value)
889 {
890     hw->dma2d_master_time_config.v = value;
891 }
892 
893 /* REG_0x13:dma2d_master_time_config->master_time_ena:enable dead time function.,RW,0x18[       0]*/
dma2d_ll_get_dma2d_master_time_config_master_time_ena(dma2d_hw_t * hw)894 static inline uint32_t dma2d_ll_get_dma2d_master_time_config_master_time_ena(dma2d_hw_t *hw)
895 {
896     return hw->dma2d_master_time_config.master_time_en;
897 }
898 
dma2d_ll_set_dma2d_master_time_config_master_time_ena(dma2d_hw_t * hw,uint32_t value)899 static inline void dma2d_ll_set_dma2d_master_time_config_master_time_ena(dma2d_hw_t *hw, uint32_t value)
900 {
901     hw->dma2d_master_time_config.master_time_en = value;
902 }
903 
904 /* REG_0x18:dma2d_master_time_config->dead_time:dead time value in ahb clock cycle inserted between two consecutive accesses on ahb master.,RW,0x18[15:  8]*/
dma2d_ll_get_dma2d_master_time_config_dead_time(dma2d_hw_t * hw)905 static inline uint32_t dma2d_ll_get_dma2d_master_time_config_dead_time(dma2d_hw_t *hw)
906 {
907     return hw->dma2d_master_time_config.dead_time;
908 }
909 
dma2d_ll_set_dma2d_master_time_config_dead_time(dma2d_hw_t * hw,uint32_t value)910 static inline void dma2d_ll_set_dma2d_master_time_config_dead_time(dma2d_hw_t *hw, uint32_t value)
911 {
912     hw->dma2d_master_time_config.dead_time = value;
913 }
914 
915 /* REG_0x100 */
916 
dma2d_ll_get_dma2d_fg_clut0_value(dma2d_hw_t * hw)917 static inline uint32_t dma2d_ll_get_dma2d_fg_clut0_value(dma2d_hw_t *hw)
918 {
919     return hw->dma2d_fg_clut0.v;
920 }
921 
dma2d_ll_set_dma2d_fg_clut0_value(dma2d_hw_t * hw,uint32_t value)922 static inline void dma2d_ll_set_dma2d_fg_clut0_value(dma2d_hw_t *hw, uint32_t value)
923 {
924     hw->dma2d_fg_clut0.v = value;
925 }
926 
927 /* REG_0x100:dma2d_fg_clut0->blue:blue value foe index<y>for the fg.,RW,0x100[  7:  0]*/
dma2d_ll_get_dma2d_fg_clut0_blue(dma2d_hw_t * hw)928 static inline uint32_t dma2d_ll_get_dma2d_fg_clut0_blue(dma2d_hw_t *hw)
929 {
930     return hw->dma2d_fg_clut0.blue;
931 }
932 
dma2d_ll_set_dma2d_fg_clut0_blue(dma2d_hw_t * hw,uint32_t value)933 static inline void dma2d_ll_set_dma2d_fg_clut0_blue(dma2d_hw_t *hw, uint32_t value)
934 {
935     hw->dma2d_fg_clut0.blue = value;
936 }
937 
938 /* REG_0x100:dma2d_fg_clut0->green:green value foe index<y>for the fg.,RW,0x100[15:  8]*/
dma2d_ll_get_dma2d_fg_clut0_green(dma2d_hw_t * hw)939 static inline uint32_t dma2d_ll_get_dma2d_fg_clut0_green(dma2d_hw_t *hw)
940 {
941     return hw->dma2d_fg_clut0.green;
942 }
943 
dma2d_ll_set_dma2d_fg_clut0_green(dma2d_hw_t * hw,uint32_t value)944 static inline void dma2d_ll_set_dma2d_fg_clut0_green(dma2d_hw_t *hw, uint32_t value)
945 {
946     hw->dma2d_fg_clut0.green = value;
947 }
948 
949 /* REG_0x100:dma2d_fg_clut0->red:red value foe index<y>for the fg.,RW,0x100[23:16]*/
dma2d_ll_get_dma2d_fg_clut0_red(dma2d_hw_t * hw)950 static inline uint32_t dma2d_ll_get_dma2d_fg_clut0_red(dma2d_hw_t *hw)
951 {
952     return hw->dma2d_fg_clut0.red;
953 }
954 
dma2d_ll_set_dma2d_fg_clut0_red(dma2d_hw_t * hw,uint32_t value)955 static inline void dma2d_ll_set_dma2d_fg_clut0_red(dma2d_hw_t *hw, uint32_t value)
956 {
957     hw->dma2d_fg_clut0.red = value;
958 }
959 
960 /* REG_0x100:dma2d_fg_clut0->alpha:alpha value foe index<y>for the fg.,RW,0x100[31:24]*/
dma2d_ll_get_dma2d_fg_clut0_alpha(dma2d_hw_t * hw)961 static inline uint32_t dma2d_ll_get_dma2d_fg_clut0_alpha(dma2d_hw_t *hw)
962 {
963     return hw->dma2d_fg_clut0.alpha;
964 }
965 
dma2d_ll_set_dma2d_fg_clut0_alpha(dma2d_hw_t * hw,uint32_t value)966 static inline void dma2d_ll_set_dma2d_fg_clut0_alpha(dma2d_hw_t *hw, uint32_t value)
967 {
968     hw->dma2d_fg_clut0.alpha = value;
969 }
970 
971 /* REG_0x200 */
dma2d_ll_get_dma2d_bg_clut0_value(dma2d_hw_t * hw)972 static inline uint32_t dma2d_ll_get_dma2d_bg_clut0_value(dma2d_hw_t *hw)
973 {
974     return hw->dma2d_bg_clut0.v;
975 }
976 
dma2d_ll_set_dma2d_bg_clut0_value(dma2d_hw_t * hw,uint32_t value)977 static inline void dma2d_ll_set_dma2d_bg_clut0_value(dma2d_hw_t *hw, uint32_t value)
978 {
979     hw->dma2d_bg_clut0.v = value;
980 }
981 
982 /* REG_0x200:dma2d_bg_clut0->blue:blue value foe index<y>for the bg.,RW,0x200[  7:  0]*/
dma2d_ll_get_dma2d_bg_clut0_blue(dma2d_hw_t * hw)983 static inline uint32_t dma2d_ll_get_dma2d_bg_clut0_blue(dma2d_hw_t *hw)
984 {
985     return hw->dma2d_bg_clut0.blue;
986 }
987 
dma2d_ll_set_dma2d_bg_clut0_blue(dma2d_hw_t * hw,uint32_t value)988 static inline void dma2d_ll_set_dma2d_bg_clut0_blue(dma2d_hw_t *hw, uint32_t value)
989 {
990     hw->dma2d_bg_clut0.blue = value;
991 }
992 
993 /* REG_0x200:dma2d_bg_clut0->green:green value foe index<y>for the bg.,RW,0x200[15:  8]*/
dma2d_ll_get_dma2d_bg_clut0_green(dma2d_hw_t * hw)994 static inline uint32_t dma2d_ll_get_dma2d_bg_clut0_green(dma2d_hw_t *hw)
995 {
996     return hw->dma2d_bg_clut0.green;
997 }
998 
dma2d_ll_set_dma2d_bg_clut0_green(dma2d_hw_t * hw,uint32_t value)999 static inline void dma2d_ll_set_dma2d_bg_clut0_green(dma2d_hw_t *hw, uint32_t value)
1000 {
1001     hw->dma2d_bg_clut0.green = value;
1002 }
1003 
1004 /* REG_0x200:dma2d_bg_clut0->red:red value foe index<y>for the bg.,RW,0x200[23:16]*/
dma2d_ll_get_dma2d_bg_clut0_red(dma2d_hw_t * hw)1005 static inline uint32_t dma2d_ll_get_dma2d_bg_clut0_red(dma2d_hw_t *hw)
1006 {
1007     return hw->dma2d_bg_clut0.red;
1008 }
1009 
dma2d_ll_set_dma2d_bg_clut0_red(dma2d_hw_t * hw,uint32_t value)1010 static inline void dma2d_ll_set_dma2d_bg_clut0_red(dma2d_hw_t *hw, uint32_t value)
1011 {
1012     hw->dma2d_bg_clut0.red = value;
1013 }
1014 
1015 /* REG_0x200:dma2d_bg_clut0->alpha:alpha value foe index<y>for the bg.,RW,0x200[31:24]*/
dma2d_ll_get_dma2d_bg_clut0_alpha(dma2d_hw_t * hw)1016 static inline uint32_t dma2d_ll_get_dma2d_bg_clut0_alpha(dma2d_hw_t *hw)
1017 {
1018     return hw->dma2d_bg_clut0.alpha;
1019 }
1020 
dma2d_ll_set_dma2d_bg_clut0_alpha(dma2d_hw_t * hw,uint32_t value)1021 static inline void dma2d_ll_set_dma2d_bg_clut0_alpha(dma2d_hw_t *hw, uint32_t value)
1022 {
1023     hw->dma2d_bg_clut0.alpha = value;
1024 }
1025 
1026 #ifdef __cplusplus
1027 }
1028 #endif
1029