1 /* 2 * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef _TDE_ADP_H_ 20 #define _TDE_ADP_H_ 21 22 #ifndef HI_BUILD_IN_BOOT 23 #if defined(CONFIG_GFX_STB_SDK) 24 #include "hi_drv_mmz.h" 25 #include "hi_drv_dev.h" 26 #endif 27 #endif 28 #include "hi_defines.h" 29 #include "hi_type.h" 30 31 #ifdef __cplusplus 32 #if __cplusplus 33 extern "C" { 34 #endif /* __cplusplus */ 35 #endif /* __cplusplus */ 36 37 #define SIZE_256BYTE_ALIGN 38 39 #define TDE_NODE_HEAD_BYTE 16 40 41 #define TDE_NODE_TAIL_BYTE 12 42 43 #ifndef SIZE_256BYTE_ALIGN 44 #define CMD_SIZE 64 45 #define JOB_SIZE 96 46 #define NODE_SIZE 208 47 #define FILTER_SIZE 960 48 #else 49 #define CMD_SIZE 64 50 #define JOB_SIZE 96 51 #define NODE_SIZE ((sizeof(tde_hw_node) + TDE_NODE_HEAD_BYTE + TDE_NODE_TAIL_BYTE + 0x0F) & (~0x0F)) 52 #define FILTER_SIZE 1792 53 #endif 54 55 #define HI_TDE_FILTER_NUM 3 56 57 #if (HICHIP == HI3519A_V100) 58 #define TDE_INTNUM 85 59 #define TDE_REG_BASEADDR 0x04ad0000 60 #define TDE_REG_CLOCK 0x04510140 61 62 #define TDE_CTRL 0x0500 63 #define TDE_INT 0x0504 64 #define TDE_INTCLR 0x0508 65 #define TDE_AQ_NADDR_LOW 0x04fc 66 #define TDE_AQ_NADDR_HI 0x04f8 67 68 #define TDE_STA 0x4000 69 70 #define TDE_AQ_ADDR_LOW 0x4098 71 #define TDE_AQ_ADDR_HI 0x4094 72 73 #define TDE_MISCELLANEOUS 0x0514 74 #define MAX_LINE_BUFFER 1920 75 76 #elif (HICHIP == HI3516C_V500) 77 #define TDE_INTNUM 35 + 32 78 #define TDE_REG_BASEADDR 0x11210000 79 #define TDE_REG_CLOCK 0x120100b8 80 81 #define TDE_CTRL 0x0500 82 #define TDE_INT 0x0514 83 #define TDE_INTCLR 0x0510 84 #define TDE_AQ_NADDR_LOW 0x00f8 85 #define TDE_AQ_NADDR_HI 0x00fc 86 87 #define TDE_STA 0x4000 88 89 #define TDE_AQ_ADDR_LOW 0x4010 90 #define TDE_AQ_ADDR_HI 0x4014 91 92 #define TDE_MISCELLANEOUS 0x0530 93 94 #define MAX_LINE_BUFFER 1024 95 #else 96 #define TDE_INTNUM 85 97 #define TDE_REG_BASEADDR 0x11230000 98 #define TDE_REG_CLOCK 0x12010140 99 100 #define TDE_CTRL 0x0500 101 #define TDE_INT 0x0504 102 #define TDE_INTCLR 0x0508 103 #define TDE_AQ_NADDR_LOW 0x04fc 104 #define TDE_AQ_NADDR_HI 0x04f8 105 106 #define TDE_STA 0x4000 107 108 #define TDE_AQ_ADDR_LOW 0x4098 109 #define TDE_AQ_ADDR_HI 0x4094 110 #define MAX_LINE_BUFFER 4096 111 112 #define TDE_MISCELLANEOUS 0x0514 113 #endif 114 115 #ifndef __HuaweiLite__ 116 #define TDE_IRQ_NAME "tde_osr_isr" 117 #else 118 #define TDE_IRQ_NAME "tde" 119 #endif 120 121 #ifndef __RTOS__ 122 #define DESCRIPTION "Hisilicon TDE Device driver" 123 #define AUTHOR "Digital Media Team, Hisilicon crop." 124 #define TDE_VERSION "V1.0.0.0" 125 #endif 126 127 #if (HICHIP == HI3519A_V100) 128 typedef union { 129 /* Define the struct bits */ 130 struct { 131 hi_u32 src1_fmt : 6; /* [5..0] */ 132 hi_u32 src1_argb_order : 5; /* [10..6] */ 133 hi_u32 src1_cbcr_order : 1; /* [11] */ 134 hi_u32 src1_rgb_exp : 2; /* [13..12] */ 135 hi_u32 reserved_0 : 1; /* [14] */ 136 hi_u32 src1_rgb_mode : 1; /* [15] */ 137 hi_u32 reserved_1 : 2; /* [17..16] */ 138 hi_u32 src1_alpha_range : 1; /* [18] */ 139 hi_u32 src1_v_scan_ord : 1; /* [19] */ 140 hi_u32 src1_h_scan_ord : 1; /* [20] */ 141 hi_u32 src1_422v_pro : 1; /* [21] */ 142 hi_u32 reserved_2 : 7; /* [28..22] */ 143 hi_u32 src1_dma : 1; /* [29] */ 144 hi_u32 src1_mode : 1; /* [30] */ 145 hi_u32 src1_en : 1; /* [31] */ 146 } bits; 147 148 /* Define an unsigned member */ 149 hi_u32 all; 150 } u_src1_ctrl; 151 #else 152 typedef union { 153 /* Define the struct bits */ 154 struct { 155 hi_u32 src1_fmt : 6; /* [5..0] */ 156 hi_u32 src1_argb_order : 5; /* [10..6] */ 157 hi_u32 src1_cbcr_order : 1; /* [11] */ 158 hi_u32 src1_rgb_exp : 2; /* [13..12] */ 159 hi_u32 reserved_0 : 4; /* [17..14] */ 160 hi_u32 src1_alpha_range : 1; /* [18] */ 161 hi_u32 src1_v_scan_ord : 1; /* [19] */ 162 hi_u32 src1_h_scan_ord : 1; /* [20] */ 163 hi_u32 src1_422v_pro : 1; /* [21] */ 164 hi_u32 reserved_1 : 7; /* [28..22] */ 165 hi_u32 src1_dma : 1; /* [29] */ 166 hi_u32 src1_mode : 1; /* [30] */ 167 hi_u32 src1_en : 1; /* [31] */ 168 } bits; 169 170 /* Define an unsigned member */ 171 hi_u32 all; 172 } u_src1_ctrl; 173 #endif 174 175 typedef union { 176 /* Define the struct bits */ 177 struct { 178 hi_u32 src1_ch0_addr_high : 32; /* [31..0] */ 179 } bits; 180 181 /* Define an unsigned member */ 182 hi_u32 all; 183 } u_src1_ch0_addr_high; 184 185 typedef union { 186 /* Define the struct bits */ 187 struct { 188 hi_u32 src1_ch0_addr_low : 32; /* [31..0] */ 189 } bits; 190 191 /* Define an unsigned member */ 192 hi_u32 all; 193 } u_src1_ch0_addr_low; 194 195 typedef union { 196 /* Define the struct bits */ 197 struct { 198 hi_u32 src1_ch1_addr_high : 32; /* [31..0] */ 199 } bits; 200 201 /* Define an unsigned member */ 202 hi_u32 all; 203 } u_src1_ch1_addr_high; 204 205 typedef union { 206 /* Define the struct bits */ 207 struct { 208 hi_u32 src1_ch1_addr_low : 32; /* [31..0] */ 209 } bits; 210 211 /* Define an unsigned member */ 212 hi_u32 all; 213 } u_src1_ch1_addr_low; 214 215 typedef union { 216 /* Define the struct bits */ 217 struct { 218 hi_u32 src1_ch0_stride : 20; /* [19..0] */ 219 hi_u32 reserved : 12; /* [31..20] */ 220 } bits; 221 222 /* Define an unsigned member */ 223 hi_u32 all; 224 } u_src1_ch0_stride; 225 226 typedef union { 227 /* Define the struct bits */ 228 struct { 229 hi_u32 src1_ch1_stride : 20; /* [19..0] */ 230 hi_u32 reserved : 12; /* [31..20] */ 231 } bits; 232 233 /* Define an unsigned member */ 234 hi_u32 all; 235 } u_src1_ch1_stride; 236 237 typedef union { 238 /* Define the struct bits */ 239 struct { 240 hi_u32 src1_width : 16; /* [15..0] */ 241 hi_u32 src1_height : 16; /* [31..16] */ 242 } bits; 243 244 /* Define an unsigned member */ 245 hi_u32 all; 246 } u_src1_imgsize; 247 248 typedef union { 249 /* Define the struct bits */ 250 struct { 251 hi_u32 src1_color_fill : 32; /* [31..0] */ 252 } bits; 253 254 /* Define an unsigned member */ 255 hi_u32 all; 256 } u_src1_fill; 257 258 typedef union { 259 /* Define the struct bits */ 260 struct { 261 hi_u32 src1_alpha0 : 8; /* [7..0] */ 262 hi_u32 src1_alpha1 : 8; /* [15..8] */ 263 hi_u32 reserved_0 : 16; /* [31..16] */ 264 } bits; 265 266 /* Define an unsigned member */ 267 hi_u32 all; 268 } u_src1_alpha; 269 270 typedef union { 271 /* Define the struct bits */ 272 struct { 273 hi_u32 src1_hoffset_pix : 16; /* [15..0] */ 274 hi_u32 reserved_0 : 16; /* [31..16] */ 275 } bits; 276 277 /* Define an unsigned member */ 278 hi_u32 all; 279 } u_src1_pix_offset; 280 281 #if (HICHIP == HI3519A_V100) 282 typedef union { 283 /* Define the struct bits */ 284 struct { 285 hi_u32 src2_fmt : 6; /* [5..0] */ 286 hi_u32 src2_argb_order : 5; /* [10..6] */ 287 hi_u32 src2_cbcr_order : 1; /* [11] */ 288 hi_u32 src2_rgb_exp : 2; /* [13..12] */ 289 hi_u32 src2_clut_mode : 1; /* [14] */ 290 hi_u32 src2_rgb_mode : 1; /* [15] */ 291 hi_u32 reserved_0 : 2; /* [17..16] */ 292 hi_u32 src2_alpha_range : 1; /* [18] */ 293 hi_u32 src2_v_scan_ord : 1; /* [19] */ 294 hi_u32 src2_h_scan_ord : 1; /* [20] */ 295 hi_u32 src2_422v_pro : 1; /* [21] */ 296 hi_u32 src2_dcmp_en : 1; /* [22] */ 297 hi_u32 src2_is_lossless : 1; /* [23] */ 298 hi_u32 src2_is_lossless_a : 1; /* [24] */ 299 hi_u32 src2_cmp_mode : 1; /* [25] */ 300 hi_u32 src2_top_pred_en : 1; /* [26] */ 301 hi_u32 reserved_1 : 2; /* [28..27] */ 302 hi_u32 src2_mode : 2; /* [30..29] */ 303 hi_u32 src2_en : 1; /* [31] */ 304 } bits; 305 306 /* Define an unsigned member */ 307 hi_u32 all; 308 } u_src2_ctrl; 309 #else 310 typedef union { 311 /* Define the struct bits */ 312 struct { 313 hi_u32 src2_fmt : 6; /* [5..0] */ 314 hi_u32 src2_argb_order : 5; /* [10..6] */ 315 hi_u32 src2_cbcr_order : 1; /* [11] */ 316 hi_u32 src2_rgb_exp : 2; /* [13..12] */ 317 hi_u32 src2_clut_mode : 1; /* [14] */ 318 hi_u32 reserved_0 : 3; /* [17..15] */ 319 hi_u32 src2_alpha_range : 1; /* [18] */ 320 hi_u32 src2_v_scan_ord : 1; /* [19] */ 321 hi_u32 src2_h_scan_ord : 1; /* [20] */ 322 hi_u32 src2_422v_pro : 1; /* [21] */ 323 hi_u32 src2_dcmp_en : 1; /* [22] */ 324 hi_u32 src2_is_lossless : 1; /* [23] */ 325 hi_u32 src2_is_lossless_a : 1; /* [24] */ 326 hi_u32 src2_cmp_mode : 1; /* [25] */ 327 hi_u32 src2_top_pred_en : 1; /* [26] */ 328 hi_u32 reserved_1 : 2; /* [28..27] */ 329 hi_u32 src2_mode : 2; /* [30..29] */ 330 hi_u32 src2_en : 1; /* [31] */ 331 } bits; 332 333 /* Define an unsigned member */ 334 hi_u32 all; 335 } u_src2_ctrl; 336 #endif 337 338 typedef union { 339 /* Define the struct bits */ 340 struct { 341 hi_u32 des_start_x : 16; /* [15..0] */ 342 hi_u32 des_start_y : 16; /* [31..16] */ 343 } bits; 344 345 /* Define an unsigned member */ 346 hi_u32 all; 347 } u_des_sur_xy; 348 349 typedef union { 350 /* Define the struct bits */ 351 struct { 352 hi_u32 src2_ch0_addr_high : 32; /* [31..0] */ 353 } bits; 354 355 /* Define an unsigned member */ 356 hi_u32 all; 357 } u_src2_ch0_addr_high; 358 359 typedef union { 360 /* Define the struct bits */ 361 struct { 362 hi_u32 src2_ch0_addr_low : 32; /* [31..0] */ 363 } bits; 364 365 /* Define an unsigned member */ 366 hi_u32 all; 367 } u_src2_ch0_addr_low; 368 369 typedef union { 370 /* Define the struct bits */ 371 struct { 372 hi_u32 src2_ch1_addr_high : 32; /* [31..0] */ 373 } bits; 374 375 /* Define an unsigned member */ 376 hi_u32 all; 377 } u_src2_ch1_addr_high; 378 379 typedef union { 380 /* Define the struct bits */ 381 struct { 382 hi_u32 src2_ch1_addr_low : 32; /* [31..0] */ 383 } bits; 384 385 /* Define an unsigned member */ 386 hi_u32 all; 387 } u_src2_ch1_addr_low; 388 389 typedef union { 390 /* Define the struct bits */ 391 struct { 392 hi_u32 src2_ch0_stride : 20; /* [19..0] */ 393 hi_u32 reserved : 12; /* [31..20] */ 394 } bits; 395 396 /* Define an unsigned member */ 397 hi_u32 all; 398 } u_src2_ch0_stride; 399 400 typedef union { 401 /* Define the struct bits */ 402 struct { 403 hi_u32 src2_ch1_stride : 20; /* [19..0] */ 404 hi_u32 reserved : 12; /* [31..20] */ 405 } bits; 406 407 /* Define an unsigned member */ 408 hi_u32 all; 409 } u_src2_ch1_stride; 410 411 typedef union { 412 /* Define the struct bits */ 413 struct { 414 hi_u32 src2_width : 16; /* [15..0] */ 415 hi_u32 src2_height : 16; /* [31..16] */ 416 } bits; 417 418 /* Define an unsigned member */ 419 hi_u32 all; 420 } u_src2_imgsize; 421 422 typedef union { 423 /* Define the struct bits */ 424 struct { 425 hi_u32 src2_color_fill : 32; /* [31..0] */ 426 } bits; 427 428 /* Define an unsigned member */ 429 hi_u32 all; 430 } u_src2_fill; 431 432 typedef union { 433 /* Define the struct bits */ 434 struct { 435 hi_u32 src2_alpha0 : 8; /* [7..0] */ 436 hi_u32 src2_alpha1 : 8; /* [15..8] */ 437 hi_u32 reserved_0 : 16; /* [31..16] */ 438 } bits; 439 440 /* Define an unsigned member */ 441 hi_u32 all; 442 } u_src2_alpha; 443 444 typedef union { 445 /* Define the struct bits */ 446 struct { 447 hi_u32 src2_hoffset_pix : 16; /* [15..0] */ 448 hi_u32 reserved_0 : 16; /* [31..16] */ 449 } bits; 450 451 /* Define an unsigned member */ 452 hi_u32 all; 453 } u_src2_pix_offset; 454 455 typedef union { 456 struct { 457 hi_u32 x : 12; /* First X coordinate */ 458 hi_u32 reserve1 : 4; /* Reserve */ 459 hi_u32 y : 12; /* First Y coordinate */ 460 hi_u32 reserve2 : 4; /* Reserve */ 461 } bits; 462 hi_u32 all; 463 } u_sur_xy; 464 465 typedef union { 466 /* Define the struct bits */ 467 struct { 468 unsigned int des_fmt : 6; /* [5..0] */ 469 unsigned int des_argb_order : 5; /* [10..6] */ 470 unsigned int des_cbcr_order : 1; /* [11] */ 471 unsigned int des_bind_en : 1; /* [12] */ 472 unsigned int des_bind_mode : 1; /* [13] */ 473 unsigned int reserved_0 : 3; /* [16..14] */ 474 unsigned int des_rgb_round : 1; /* [17] */ 475 unsigned int des_alpha_range : 1; /* [18] */ 476 unsigned int des_v_scan_ord : 1; /* [19] */ 477 unsigned int des_h_scan_ord : 1; /* [20] */ 478 unsigned int reserved_1 : 2; /* [22..21] */ 479 unsigned int cmp_en : 1; /* [23] */ 480 unsigned int cmp_addr_chg : 1; /* [24] */ 481 unsigned int reserved_2 : 6; /* [30..25] */ 482 unsigned int des_en : 1; /* [31] */ 483 } bits; 484 485 /* Define an unsigned member */ 486 hi_u32 all; 487 } u_des_ctrl; 488 489 typedef union { 490 /* Define the struct bits */ 491 struct { 492 hi_u32 head_ar_addr_hi : 32; /* [31..0] */ 493 } bits; 494 495 /* Define an unsigned member */ 496 hi_u32 all; 497 } u_head_ar_addr_hi; 498 499 typedef union { 500 /* Define the struct bits */ 501 struct { 502 hi_u32 head_ar_addr_low : 32; /* [31..0] */ 503 } bits; 504 505 /* Define an unsigned member */ 506 hi_u32 all; 507 } u_head_ar_addr_low; 508 509 typedef union { 510 /* Define the struct bits */ 511 struct { 512 hi_u32 head_gb_addr_hi : 32; /* [31..0] */ 513 } bits; 514 515 /* Define an unsigned member */ 516 hi_u32 all; 517 } u_head_gb_addr_hi; 518 519 typedef union { 520 /* Define the struct bits */ 521 struct { 522 hi_u32 head_gb_addr_low : 32; /* [31..0] */ 523 } bits; 524 525 /* Define an unsigned member */ 526 hi_u32 all; 527 } u_head_gb_addr_low; 528 529 typedef union { 530 /* Define the struct bits */ 531 struct { 532 hi_u32 des_ch0_addr_high : 32; /* [31..0] */ 533 } bits; 534 535 /* Define an unsigned member */ 536 hi_u32 all; 537 } u_des_ch0_addr_high; 538 539 typedef union { 540 /* Define the struct bits */ 541 struct { 542 hi_u32 des_ch0_addr_low : 32; /* [31..0] */ 543 } bits; 544 545 /* Define an unsigned member */ 546 hi_u32 all; 547 } u_des_ch0_addr_low; 548 549 typedef union { 550 /* Define the struct bits */ 551 struct { 552 hi_u32 des_ch1_addr_hi : 32; /* [31..0] */ 553 } bits; 554 555 /* Define an unsigned member */ 556 hi_u32 all; 557 } u_des_ch1_addr_high; 558 559 typedef union { 560 /* Define the struct bits */ 561 struct { 562 hi_u32 des_ch1_addr_low : 32; /* [31..0] */ 563 } bits; 564 565 /* Define an unsigned member */ 566 hi_u32 all; 567 } u_des_ch1_addr_low; 568 569 typedef union { 570 /* Define the struct bits */ 571 struct { 572 hi_u32 des_ch0_stride : 20; /* [19..0] */ 573 hi_u32 reserved : 12; /* [31..20] */ 574 } bits; 575 576 /* Define an unsigned member */ 577 hi_u32 all; 578 } u_des_ch0_stride; 579 580 typedef union { 581 /* Define the struct bits */ 582 struct { 583 hi_u32 des_ch1_stride : 20; /* [19..0] */ 584 hi_u32 reserved : 12; /* [31..20] */ 585 } bits; 586 587 /* Define an unsigned member */ 588 hi_u32 all; 589 } u_des_ch1_stride; 590 591 typedef union { 592 /* Define the struct bits */ 593 struct { 594 hi_u32 des_width : 16; /* [15..0] */ 595 hi_u32 des_height : 16; /* [31..16] */ 596 } bits; 597 598 /* Define an unsigned member */ 599 hi_u32 all; 600 } u_des_imgsize; 601 602 typedef union { 603 /* Define the struct bits */ 604 struct { 605 hi_u32 des_alpha_thd : 8; /* [7..0] */ 606 hi_u32 des_crop_mode : 1; /* [8] */ 607 hi_u32 des_crop_en : 1; /* [9] */ 608 hi_u32 reserved_0 : 22; /* [31..10] */ 609 } bits; 610 611 /* Define an unsigned member */ 612 hi_u32 all; 613 } u_des_alpha; 614 615 typedef union { 616 /* Define the struct bits */ 617 struct { 618 hi_u32 des_crop_start_x : 16; /* [15..0] */ 619 hi_u32 des_crop_start_y : 16; /* [31..16] */ 620 } bits; 621 622 /* Define an unsigned member */ 623 hi_u32 all; 624 } u_des_crop_pos_st; 625 626 typedef union { 627 /* Define the struct bits */ 628 struct { 629 hi_u32 des_crop_end_x : 16; /* [15..0] */ 630 hi_u32 des_crop_end_y : 16; /* [31..16] */ 631 } bits; 632 633 /* Define an unsigned member */ 634 hi_u32 all; 635 } u_des_crop_pos_ed; 636 637 typedef union { 638 /* Define the struct bits */ 639 struct { 640 hi_u32 src1_ch0_mmu_bypass : 1; /* [0] */ 641 hi_u32 src1_ch1_mmu_bypass : 1; /* [1] */ 642 hi_u32 src2_ch0_mmu_bypass : 1; /* [2] */ 643 hi_u32 src2_ch1_mmu_bypass : 1; /* [3] */ 644 hi_u32 gdc3_mmu_bypass : 1; /* [4] */ 645 hi_u32 gdc4_mmu_bypass : 1; /* [5] */ 646 hi_u32 gdc5_mmu_bypass : 1; /* [6] */ 647 hi_u32 gdc6_mmu_bypass : 1; /* [7] */ 648 hi_u32 gdc7_mmu_bypass : 1; /* [8] */ 649 hi_u32 clut_mmu_bypass : 1; /* [9] */ 650 hi_u32 reserved_0 : 6; /* [15..10] */ 651 hi_u32 src1_ch0_prot : 1; /* [16] */ 652 hi_u32 src1_ch1_prot : 1; /* [17] */ 653 hi_u32 src2_ch0_prot : 1; /* [18] */ 654 hi_u32 src2_ch1_prot : 1; /* [19] */ 655 hi_u32 gdc3_prot : 1; /* [20] */ 656 hi_u32 gdc4_prot : 1; /* [21] */ 657 hi_u32 gdc5_prot : 1; /* [22] */ 658 hi_u32 gdc6_prot : 1; /* [23] */ 659 hi_u32 gdc7_prot : 1; /* [24] */ 660 hi_u32 reserved_1 : 7; /* [31..25] */ 661 } bits; 662 663 /* Define an unsigned member */ 664 hi_u32 all; 665 } u_mmu_prot_ctrl; 666 667 typedef union { 668 /* Define the struct bits */ 669 struct { 670 hi_u32 des_hoffset_pix : 16; /* [15..0] */ 671 hi_u32 reserved_0 : 16; /* [31..16] */ 672 } bits; 673 674 /* Define an unsigned member */ 675 hi_u32 all; 676 } u_des_pix_offset; 677 678 typedef union { 679 /* Define the struct bits */ 680 struct { 681 hi_u32 des_safe_dist : 32; /* [31..0] */ 682 } bits; 683 684 /* Define an unsigned member */ 685 hi_u32 all; 686 } u_des_safe_dist; 687 688 typedef union { 689 /* Define the struct bits */ 690 struct { 691 hi_u32 des_safe_dist_inverse : 32; /* [31..0] */ 692 } bits; 693 694 /* Define an unsigned member */ 695 hi_u32 all; 696 } u_des_safe_dist_inverse; 697 698 typedef union { 699 /* Define the struct bits */ 700 struct { 701 hi_u32 hratio : 24; /* [23..0] */ 702 hi_u32 hfir_order : 1; /* [24] */ 703 hi_u32 hchfir_en : 1; /* [25] */ 704 hi_u32 hlfir_en : 1; /* [26] */ 705 hi_u32 hafir_en : 1; /* [27] */ 706 hi_u32 hchmid_en : 1; /* [28] */ 707 hi_u32 hlmid_en : 1; /* [29] */ 708 hi_u32 hchmsc_en : 1; /* [30] */ 709 hi_u32 hlmsc_en : 1; /* [31] */ 710 } bits; 711 712 /* Define an unsigned member */ 713 hi_u32 all; 714 } u_src1_hsp; 715 716 typedef union { 717 /* Define the struct bits */ 718 struct { 719 hi_u32 hor_loffset : 28; /* [27..0] */ 720 hi_u32 reserved_0 : 4; /* [31..28] */ 721 } bits; 722 723 /* Define an unsigned member */ 724 hi_u32 all; 725 } u_src1_hloffset; 726 727 typedef union { 728 /* Define the struct bits */ 729 struct { 730 hi_u32 hor_coffset : 28; /* [27..0] */ 731 hi_u32 reserved_0 : 4; /* [31..28] */ 732 } bits; 733 734 /* Define an unsigned member */ 735 hi_u32 all; 736 } u_src1_hcoffset; 737 738 typedef union { 739 /* Define the struct bits */ 740 struct { 741 hi_u32 reserved_0 : 19; /* [18..0] */ 742 hi_u32 zme_in_fmt : 2; /* [20..19] */ 743 hi_u32 zme_out_fmt : 2; /* [22..21] */ 744 hi_u32 vchfir_en : 1; /* [23] */ 745 hi_u32 vlfir_en : 1; /* [24] */ 746 hi_u32 vafir_en : 1; /* [25] */ 747 hi_u32 vsc_chroma_tap : 1; /* [26] */ 748 hi_u32 reserved_1 : 1; /* [27] */ 749 hi_u32 vchmid_en : 1; /* [28] */ 750 hi_u32 vlmid_en : 1; /* [29] */ 751 hi_u32 vchmsc_en : 1; /* [30] */ 752 hi_u32 vlmsc_en : 1; /* [31] */ 753 } bits; 754 755 /* Define an unsigned member */ 756 hi_u32 all; 757 } u_src1_vsp; 758 759 typedef union { 760 /* Define the struct bits */ 761 struct { 762 hi_u32 vratio : 16; /* [15..0] */ 763 hi_u32 reserved_0 : 16; /* [31..16] */ 764 } bits; 765 766 /* Define an unsigned member */ 767 hi_u32 all; 768 } u_src1_vsr; 769 770 typedef union { 771 /* Define the struct bits */ 772 struct { 773 hi_u32 vchroma_offset : 16; /* [15..0] */ 774 hi_u32 vluma_offset : 16; /* [31..16] */ 775 } bits; 776 777 /* Define an unsigned member */ 778 hi_u32 all; 779 } u_src1_voffset; 780 781 typedef union { 782 /* Define the struct bits */ 783 struct { 784 hi_u32 ow : 16; /* [15..0] */ 785 hi_u32 oh : 16; /* [31..16] */ 786 } bits; 787 788 /* Define an unsigned member */ 789 hi_u32 all; 790 } u_src1_zmeoreso; 791 792 typedef union { 793 /* Define the struct bits */ 794 struct { 795 hi_u32 iw : 16; /* [15..0] */ 796 hi_u32 ih : 16; /* [31..16] */ 797 } bits; 798 799 /* Define an unsigned member */ 800 hi_u32 all; 801 } u_src1_zmeireso; 802 803 typedef union { 804 /* Define the struct bits */ 805 struct { 806 hi_u32 src1_crop_x : 13; /* [12..0] */ 807 hi_u32 reserved_0 : 3; /* [15..13] */ 808 hi_u32 src1_crop_y : 13; /* [28..16] */ 809 hi_u32 reserved_1 : 2; /* [30..29] */ 810 hi_u32 src1_crop_en : 1; /* [31] */ 811 } bits; 812 813 /* Define an unsigned member */ 814 hi_u32 all; 815 } u_src1_crop_pos; 816 817 typedef union { 818 /* Define the struct bits */ 819 struct { 820 hi_u32 src1_crop_width : 13; /* [12..0] */ 821 hi_u32 reserved_0 : 3; /* [15..13] */ 822 hi_u32 src1_crop_height : 13; /* [28..16] */ 823 hi_u32 reserved_1 : 3; /* [31..29] */ 824 } bits; 825 826 /* Define an unsigned member */ 827 hi_u32 all; 828 } u_src1_crop_size; 829 830 typedef union { 831 /* Define the struct bits */ 832 struct { 833 hi_u32 src1_hpzme_en : 1; /* [0] */ 834 hi_u32 reserved_0 : 3; /* [3..1] */ 835 hi_u32 src1_hpzme_mode : 4; /* [7..4] */ 836 hi_u32 reserved_1 : 24; /* [31..8] */ 837 } bits; 838 839 /* Define an unsigned member */ 840 hi_u32 all; 841 } u_src1_hpzme; 842 843 typedef union { 844 /* Define the struct bits */ 845 struct { 846 hi_u32 src1_hpzme_width : 16; /* [15..0] */ 847 hi_u32 reserved_0 : 16; /* [31..16] */ 848 } bits; 849 850 /* Define an unsigned member */ 851 hi_u32 all; 852 } u_src1_hpzme_size; 853 854 #if ((HICHIP == HI3519A_V100) || (HICHIP == HI3516C_V500)) 855 typedef union { 856 /* Define the struct bits */ 857 struct { 858 hi_u32 cscidc0 : 11; /* [10..0] */ 859 hi_u32 reserved_0 : 5; /* [15..11] */ 860 hi_u32 cscidc1 : 11; /* [26..16] */ 861 hi_u32 reserved_1 : 4; /* [30..27] */ 862 hi_u32 csc_en : 1; /* [31] */ 863 } bits; 864 865 /* Define an unsigned member */ 866 hi_u32 all; 867 } u_src1_csc_idc0; 868 869 typedef union { 870 /* Define the struct bits */ 871 struct { 872 hi_u32 cscidc2 : 11; /* [10..0] */ 873 hi_u32 reserved_0 : 20; /* [31..11] */ 874 } bits; 875 876 /* Define an unsigned member */ 877 hi_u32 all; 878 } u_src1_csc_idc1; 879 880 typedef union { 881 /* Define the struct bits */ 882 struct { 883 hi_u32 cscodc0 : 11; /* [10..0] */ 884 hi_u32 reserved_0 : 5; /* [15..11] */ 885 hi_u32 cscodc1 : 11; /* [26..16] */ 886 hi_u32 reserved_1 : 5; /* [31..27] */ 887 } bits; 888 889 /* Define an unsigned member */ 890 hi_u32 all; 891 } u_src1_csc_odc0; 892 893 typedef union { 894 /* Define the struct bits */ 895 struct { 896 hi_u32 cscodc2 : 11; /* [10..0] */ 897 hi_u32 reserved_0 : 20; /* [31..11] */ 898 } bits; 899 900 /* Define an unsigned member */ 901 hi_u32 all; 902 } u_src1_csc_odc1; 903 #else 904 typedef union { 905 /* Define the struct bits */ 906 struct { 907 hi_u32 cscidc0 : 9; /* [8..0] */ 908 hi_u32 cscidc1 : 9; /* [17..9] */ 909 hi_u32 cscidc2 : 9; /* [26..18] */ 910 hi_u32 csc_en : 1; /* [27] */ 911 hi_u32 reserved_0 : 4; /* [31..28] */ 912 } bits; 913 914 /* Define an unsigned member */ 915 hi_u32 all; 916 } u_src1_csc_idc; 917 918 typedef union { 919 /* Define the struct bits */ 920 struct { 921 hi_u32 cscodc0 : 9; /* [8..0] */ 922 hi_u32 cscodc1 : 9; /* [17..9] */ 923 hi_u32 cscodc2 : 9; /* [26..18] */ 924 hi_u32 reserved_0 : 5; /* [31..27] */ 925 } bits; 926 927 /* Define an unsigned member */ 928 hi_u32 all; 929 } u_src1_csc_odc; 930 #endif 931 932 typedef union { 933 /* Define the struct bits */ 934 struct { 935 hi_u32 cscp00 : 15; /* [14..0] */ 936 hi_u32 reserved_0 : 1; /* [15] */ 937 hi_u32 cscp01 : 15; /* [30..16] */ 938 hi_u32 reserved_1 : 1; /* [31] */ 939 } bits; 940 941 /* Define an unsigned member */ 942 hi_u32 all; 943 } u_src1_csc_p0; 944 945 typedef union { 946 /* Define the struct bits */ 947 struct { 948 hi_u32 cscp02 : 15; /* [14..0] */ 949 hi_u32 reserved_0 : 1; /* [15] */ 950 hi_u32 cscp10 : 15; /* [30..16] */ 951 hi_u32 reserved_1 : 1; /* [31] */ 952 } bits; 953 954 /* Define an unsigned member */ 955 hi_u32 all; 956 } u_src1_csc_p1; 957 958 typedef union { 959 /* Define the struct bits */ 960 struct { 961 hi_u32 cscp11 : 15; /* [14..0] */ 962 hi_u32 reserved_0 : 1; /* [15] */ 963 hi_u32 cscp12 : 15; /* [30..16] */ 964 hi_u32 reserved_1 : 1; /* [31] */ 965 } bits; 966 967 /* Define an unsigned member */ 968 hi_u32 all; 969 } u_src1_csc_p2; 970 971 typedef union { 972 /* Define the struct bits */ 973 struct { 974 hi_u32 cscp20 : 15; /* [14..0] */ 975 hi_u32 reserved_0 : 1; /* [15] */ 976 hi_u32 cscp21 : 15; /* [30..16] */ 977 hi_u32 reserved_1 : 1; /* [31] */ 978 } bits; 979 980 /* Define an unsigned member */ 981 hi_u32 all; 982 } u_src1_csc_p3; 983 984 typedef union { 985 /* Define the struct bits */ 986 struct { 987 hi_u32 cscp22 : 15; /* [14..0] */ 988 hi_u32 reserved_0 : 17; /* [31..15] */ 989 } bits; 990 991 /* Define an unsigned member */ 992 hi_u32 all; 993 } u_src1_csc_p4; 994 995 typedef union { 996 /* Define the struct bits */ 997 struct { 998 hi_u32 reserved_0 : 29; /* [28..0] */ 999 hi_u32 dither_round : 1; /* [29] */ 1000 hi_u32 reserved_1 : 1; /* [30] */ 1001 hi_u32 dither_en : 1; /* [31] */ 1002 } bits; 1003 1004 /* Define an unsigned member */ 1005 hi_u32 all; 1006 } u_src1_dither_ctrl; 1007 1008 typedef union { 1009 /* Define the struct bits */ 1010 struct { 1011 hi_u32 hratio : 24; /* [23..0] */ 1012 hi_u32 hfir_order : 1; /* [24] */ 1013 hi_u32 hchfir_en : 1; /* [25] */ 1014 hi_u32 hlfir_en : 1; /* [26] */ 1015 hi_u32 hafir_en : 1; /* [27] */ 1016 hi_u32 hchmid_en : 1; /* [28] */ 1017 hi_u32 hlmid_en : 1; /* [29] */ 1018 hi_u32 hchmsc_en : 1; /* [30] */ 1019 hi_u32 hlmsc_en : 1; /* [31] */ 1020 } bits; 1021 1022 /* Define an unsigned member */ 1023 hi_u32 all; 1024 } u_src2_hsp; 1025 1026 typedef union { 1027 /* Define the struct bits */ 1028 struct { 1029 hi_s32 hor_loffset : 28; /* [27..0] */ 1030 hi_u32 reserved_0 : 4; /* [31..28] */ 1031 } bits; 1032 1033 /* Define an unsigned member */ 1034 hi_u32 all; 1035 } u_src2_hloffset; 1036 1037 typedef union { 1038 /* Define the struct bits */ 1039 struct { 1040 hi_s32 hor_coffset : 28; /* [27..0] */ 1041 hi_u32 reserved_0 : 4; /* [31..28] */ 1042 } bits; 1043 1044 /* Define an unsigned member */ 1045 hi_u32 all; 1046 } u_src2_hcoffset; 1047 1048 typedef union { 1049 /* Define the struct bits */ 1050 struct { 1051 hi_u32 reserved_0 : 19; /* [18..0] */ 1052 hi_u32 zme_in_fmt : 2; /* [20..19] */ 1053 hi_u32 zme_out_fmt : 2; /* [22..21] */ 1054 hi_u32 vchfir_en : 1; /* [23] */ 1055 hi_u32 vlfir_en : 1; /* [24] */ 1056 hi_u32 vafir_en : 1; /* [25] */ 1057 hi_u32 vsc_chroma_tap : 1; /* [26] */ 1058 hi_u32 reserved_1 : 1; /* [27] */ 1059 hi_u32 vchmid_en : 1; /* [28] */ 1060 hi_u32 vlmid_en : 1; /* [29] */ 1061 hi_u32 vchmsc_en : 1; /* [30] */ 1062 hi_u32 vlmsc_en : 1; /* [31] */ 1063 } bits; 1064 1065 /* Define an unsigned member */ 1066 hi_u32 all; 1067 } u_src2_vsp; 1068 1069 typedef union { 1070 /* Define the struct bits */ 1071 struct { 1072 hi_u32 vratio : 16; /* [15..0] */ 1073 hi_u32 reserved_0 : 16; /* [31..16] */ 1074 } bits; 1075 1076 /* Define an unsigned member */ 1077 hi_u32 all; 1078 } u_src2_vsr; 1079 1080 typedef union { 1081 /* Define the struct bits */ 1082 struct { 1083 hi_s32 vchroma_offset : 16; /* [15..0] */ 1084 hi_s32 vluma_offset : 16; /* [31..16] */ 1085 } bits; 1086 1087 /* Define an unsigned member */ 1088 hi_u32 all; 1089 } u_src2_voffset; 1090 1091 typedef union { 1092 /* Define the struct bits */ 1093 struct { 1094 hi_u32 ow : 16; /* [15..0] */ 1095 hi_u32 oh : 16; /* [31..16] */ 1096 } bits; 1097 1098 /* Define an unsigned member */ 1099 hi_u32 all; 1100 } u_src2_zmeoreso; 1101 1102 typedef union { 1103 /* Define the struct bits */ 1104 struct { 1105 hi_u32 iw : 16; /* [15..0] */ 1106 hi_u32 ih : 16; /* [31..16] */ 1107 } bits; 1108 1109 /* Define an unsigned member */ 1110 hi_u32 all; 1111 } u_src2_zmeireso; 1112 1113 typedef union { 1114 /* Define the struct bits */ 1115 struct { 1116 hi_u32 src2_crop_x : 13; /* [12..0] */ 1117 hi_u32 reserved_0 : 3; /* [15..13] */ 1118 hi_u32 src2_crop_y : 13; /* [28..16] */ 1119 hi_u32 reserved_1 : 2; /* [30..29] */ 1120 hi_u32 src2_crop_en : 1; /* [31] */ 1121 } bits; 1122 1123 /* Define an unsigned member */ 1124 hi_u32 all; 1125 } u_src2_crop_pos; 1126 1127 typedef union { 1128 /* Define the struct bits */ 1129 struct { 1130 hi_u32 src2_crop_width : 13; /* [12..0] */ 1131 hi_u32 reserved_0 : 3; /* [15..13] */ 1132 hi_u32 src2_crop_height : 13; /* [28..16] */ 1133 hi_u32 reserved_1 : 3; /* [31..29] */ 1134 } bits; 1135 1136 /* Define an unsigned member */ 1137 hi_u32 all; 1138 } u_src2_crop_size; 1139 1140 typedef union { 1141 /* Define the struct bits */ 1142 struct { 1143 hi_u32 src2_hpzme_en : 1; /* [0] */ 1144 hi_u32 reserved_0 : 3; /* [3..1] */ 1145 hi_u32 src2_hpzme_mode : 4; /* [7..4] */ 1146 hi_u32 reserved_1 : 24; /* [31..8] */ 1147 } bits; 1148 1149 /* Define an unsigned member */ 1150 hi_u32 all; 1151 } u_src2_hpzme; 1152 1153 typedef union { 1154 /* Define the struct bits */ 1155 struct { 1156 hi_u32 src2_hpzme_width : 16; /* [15..0] */ 1157 hi_u32 reserved_0 : 16; /* [31..16] */ 1158 } bits; 1159 1160 /* Define an unsigned member */ 1161 hi_u32 all; 1162 } u_src2_hpzme_size; 1163 1164 typedef union { 1165 /* Define the struct bits */ 1166 struct { 1167 hi_u32 src2_csc_mode : 1; /* [0] */ 1168 hi_u32 des_premulten : 1; /* [1] */ 1169 hi_u32 src_premulten : 1; /* [2] */ 1170 hi_u32 reserved_0 : 29; /* [31..3] */ 1171 } bits; 1172 1173 /* Define an unsigned member */ 1174 hi_u32 all; 1175 } u_src2_csc_mux; 1176 1177 #if ((HICHIP == HI3519A_V100) || (HICHIP == HI3516C_V500)) 1178 typedef union { 1179 /* Define the struct bits */ 1180 struct { 1181 hi_u32 cscidc0 : 11; /* [10..0] */ 1182 hi_u32 reserved_0 : 5; /* [15..11] */ 1183 hi_u32 cscidc1 : 11; /* [26..16] */ 1184 hi_u32 reserved_1 : 4; /* [30..27] */ 1185 hi_u32 csc_en : 1; /* [31] */ 1186 } bits; 1187 1188 /* Define an unsigned member */ 1189 hi_u32 all; 1190 } u_des_csc_idc0; 1191 1192 typedef union { 1193 /* Define the struct bits */ 1194 struct { 1195 hi_u32 cscidc2 : 11; /* [10..0] */ 1196 hi_u32 reserved_0 : 20; /* [31..11] */ 1197 } bits; 1198 1199 /* Define an unsigned member */ 1200 hi_u32 all; 1201 } u_des_csc_idc1; 1202 1203 typedef union { 1204 /* Define the struct bits */ 1205 struct { 1206 hi_u32 cscodc0 : 11; /* [10..0] */ 1207 hi_u32 reserved_0 : 5; /* [15..11] */ 1208 hi_u32 cscodc1 : 11; /* [26..16] */ 1209 hi_u32 reserved_1 : 5; /* [31..27] */ 1210 } bits; 1211 1212 /* Define an unsigned member */ 1213 hi_u32 all; 1214 } u_des_csc_odc0; 1215 1216 typedef union { 1217 /* Define the struct bits */ 1218 struct { 1219 hi_u32 cscodc2 : 11; /* [10..0] */ 1220 hi_u32 reserved_0 : 20; /* [31..11] */ 1221 } bits; 1222 1223 /* Define an unsigned member */ 1224 hi_u32 all; 1225 } u_des_csc_odc1; 1226 #else 1227 typedef union { 1228 /* Define the struct bits */ 1229 struct { 1230 hi_u32 cscidc0 : 9; /* [8..0] */ 1231 hi_u32 cscidc1 : 9; /* [17..9] */ 1232 hi_u32 cscidc2 : 9; /* [26..18] */ 1233 hi_u32 csc_en : 1; /* [27] */ 1234 hi_u32 reserved_0 : 4; /* [31..28] */ 1235 } bits; 1236 1237 /* Define an unsigned member */ 1238 hi_u32 all; 1239 } u_des_csc_idc; 1240 1241 typedef union { 1242 /* Define the struct bits */ 1243 struct { 1244 hi_u32 cscodc0 : 9; /* [8..0] */ 1245 hi_u32 cscodc1 : 9; /* [17..9] */ 1246 hi_u32 cscodc2 : 9; /* [26..18] */ 1247 hi_u32 reserved_0 : 5; /* [31..27] */ 1248 } bits; 1249 1250 /* Define an unsigned member */ 1251 hi_u32 all; 1252 } u_des_csc_odc; 1253 #endif 1254 1255 typedef union { 1256 /* Define the struct bits */ 1257 struct { 1258 hi_u32 cscp00 : 15; /* [14..0] */ 1259 hi_u32 reserved_0 : 1; /* [15] */ 1260 hi_u32 cscp01 : 15; /* [30..16] */ 1261 hi_u32 reserved_1 : 1; /* [31] */ 1262 } bits; 1263 1264 /* Define an unsigned member */ 1265 hi_u32 all; 1266 } u_des_csc_p0; 1267 1268 typedef union { 1269 /* Define the struct bits */ 1270 struct { 1271 hi_u32 cscp02 : 15; /* [14..0] */ 1272 hi_u32 reserved_0 : 1; /* [15] */ 1273 hi_u32 cscp10 : 15; /* [30..16] */ 1274 hi_u32 reserved_1 : 1; /* [31] */ 1275 } bits; 1276 1277 /* Define an unsigned member */ 1278 hi_u32 all; 1279 } u_des_csc_p1; 1280 1281 typedef union { 1282 /* Define the struct bits */ 1283 struct { 1284 hi_u32 cscp11 : 15; /* [14..0] */ 1285 hi_u32 reserved_0 : 1; /* [15] */ 1286 hi_u32 cscp12 : 15; /* [30..16] */ 1287 hi_u32 reserved_1 : 1; /* [31] */ 1288 } bits; 1289 1290 /* Define an unsigned member */ 1291 hi_u32 all; 1292 } u_des_csc_p2; 1293 1294 typedef union { 1295 /* Define the struct bits */ 1296 struct { 1297 hi_u32 cscp20 : 15; /* [14..0] */ 1298 hi_u32 reserved_0 : 1; /* [15] */ 1299 hi_u32 cscp21 : 15; /* [30..16] */ 1300 hi_u32 reserved_1 : 1; /* [31] */ 1301 } bits; 1302 1303 /* Define an unsigned member */ 1304 hi_u32 all; 1305 } u_des_csc_p3; 1306 1307 typedef union { 1308 /* Define the struct bits */ 1309 struct { 1310 hi_u32 cscp22 : 15; /* [14..0] */ 1311 hi_u32 reserved_0 : 17; /* [31..15] */ 1312 } bits; 1313 1314 /* Define an unsigned member */ 1315 hi_u32 all; 1316 } u_des_csc_p4; 1317 1318 typedef union { 1319 /* Define the struct bits */ 1320 struct { 1321 hi_u32 reserved_0 : 29; /* [28..0] */ 1322 hi_u32 dither_round : 1; /* [29] */ 1323 hi_u32 reserved_1 : 1; /* [30] */ 1324 hi_u32 dither_en : 1; /* [31] */ 1325 } bits; 1326 1327 /* Define an unsigned member */ 1328 hi_u32 all; 1329 } u_des_dither_ctrl; 1330 1331 typedef union { 1332 /* Define the struct bits */ 1333 struct { 1334 hi_u32 des_h_dswm_mode : 2; /* [1..0] */ 1335 hi_u32 reserved_0 : 2; /* [3..2] */ 1336 hi_u32 des_v_dswm_mode : 1; /* [4] */ 1337 hi_u32 des_alpha_detect_clear : 1; /* [5] */ 1338 hi_u32 reserved_1 : 26; /* [31..6] */ 1339 } bits; 1340 1341 /* Define an unsigned member */ 1342 hi_u32 all; 1343 } u_des_dswm; 1344 1345 typedef union { 1346 /* Define the struct bits */ 1347 struct { 1348 hi_u32 reserved_0 : 8; /* [7..0] */ 1349 hi_u32 src1_rcopy_pixel_num : 8; /* [15..8] */ 1350 hi_u32 reserved_1 : 14; /* [29..16] */ 1351 hi_u32 src1_rcopy_en : 1; /* [30] */ 1352 hi_u32 src1_copy_cfg_from : 1; /* [31] */ 1353 } bits; 1354 1355 /* Define an unsigned member */ 1356 hi_u32 all; 1357 } u_src1_befor_zme_copy; 1358 1359 typedef union { 1360 /* Define the struct bits */ 1361 struct { 1362 hi_u32 reserved_0 : 8; /* [7..0] */ 1363 hi_u32 src1_rcrop_pixel_num : 8; /* [15..8] */ 1364 hi_u32 reserved_1 : 14; /* [29..16] */ 1365 hi_u32 src1_rcrop_en : 1; /* [30] */ 1366 hi_u32 src1_crop_cfg_from : 1; /* [31] */ 1367 } bits; 1368 1369 /* Define an unsigned member */ 1370 hi_u32 all; 1371 } u_src1_after_zme_crop; 1372 1373 typedef union { 1374 /* Define the struct bits */ 1375 struct { 1376 hi_u32 reserved_0 : 8; /* [7..0] */ 1377 hi_u32 src2_rcopy_pixel_num : 8; /* [15..8] */ 1378 hi_u32 reserved_1 : 14; /* [29..16] */ 1379 hi_u32 src2_rcopy_en : 1; /* [30] */ 1380 hi_u32 src2_copy_cfg_from : 1; /* [31] */ 1381 } bits; 1382 1383 /* Define an unsigned member */ 1384 hi_u32 all; 1385 } u_src2_befor_zme_copy; 1386 1387 typedef union { 1388 /* Define the struct bits */ 1389 struct { 1390 hi_u32 reserved_0 : 8; /* [7..0] */ 1391 hi_u32 src2_rcrop_pixel_num : 8; /* [15..8] */ 1392 hi_u32 reserved_1 : 14; /* [29..16] */ 1393 hi_u32 src2_rcrop_en : 1; /* [30] */ 1394 hi_u32 src2_crop_cfg_from : 1; /* [31] */ 1395 } bits; 1396 1397 /* Define an unsigned member */ 1398 hi_u32 all; 1399 } u_src2_after_zme_crop; 1400 1401 typedef union { 1402 /* Define the struct bits */ 1403 struct { 1404 hi_u32 mix_prio0 : 3; /* [2..0] */ 1405 hi_u32 mix_prio1 : 3; /* [5..3] */ 1406 hi_u32 mix_prio2 : 3; /* [8..6] */ 1407 hi_u32 mix_prio3 : 3; /* [11..9] */ 1408 hi_u32 mix_prio4 : 3; /* [14..12] */ 1409 hi_u32 mix_prio5 : 3; /* [17..15] */ 1410 hi_u32 mix_prio6 : 3; /* [20..18] */ 1411 hi_u32 alu_mode : 4; /* [24..21] */ 1412 hi_u32 cbm_mode : 1; /* [25] */ 1413 hi_u32 reserved_0 : 5; /* [30..26] */ 1414 hi_u32 cbm_en : 1; /* [31] */ 1415 } bits; 1416 1417 /* Define an unsigned member */ 1418 hi_u32 all; 1419 } u_cbmctrl; 1420 1421 typedef union { 1422 /* Define the struct bits */ 1423 struct { 1424 hi_u32 bkgb : 8; /* [7..0] */ 1425 hi_u32 bkgg : 8; /* [15..8] */ 1426 hi_u32 bkgr : 8; /* [23..16] */ 1427 hi_u32 bkga : 8; /* [31..24] */ 1428 } bits; 1429 1430 /* Define an unsigned member */ 1431 hi_u32 all; 1432 } u_cbmbkg; 1433 1434 typedef union { 1435 /* Define the struct bits */ 1436 struct { 1437 hi_u32 colorizeb : 8; /* [7..0] */ 1438 hi_u32 colorizeg : 8; /* [15..8] */ 1439 hi_u32 colorizer : 8; /* [23..16] */ 1440 hi_u32 reserved_0 : 7; /* [30..24] */ 1441 hi_u32 colorizeen : 1; /* [31] */ 1442 } bits; 1443 1444 /* Define an unsigned member */ 1445 hi_u32 all; 1446 } u_cbmcolorize; 1447 1448 typedef union { 1449 /* Define the struct bits */ 1450 struct { 1451 hi_u32 rgb_rop : 4; /* [3..0] */ 1452 hi_u32 rop : 4; /* [7..4] */ 1453 hi_u32 reserved_0 : 8; /* [15..8] */ 1454 hi_u32 alpha_from : 2; /* [17..16] */ 1455 hi_u32 alpha_border_en : 2; /* [19..18] */ 1456 hi_u32 reserved_1 : 11; /* [30..20] */ 1457 hi_u32 blendropen : 1; /* [31] */ 1458 } bits; 1459 1460 /* Define an unsigned member */ 1461 hi_u32 all; 1462 } u_cbmalupara; 1463 1464 typedef union { 1465 /* Define the struct bits */ 1466 struct { 1467 hi_u32 keybmode : 2; /* [1..0] */ 1468 hi_u32 keygmode : 2; /* [3..2] */ 1469 hi_u32 keyrmode : 2; /* [5..4] */ 1470 hi_u32 keyamode : 2; /* [7..6] */ 1471 hi_u32 keysel : 2; /* [9..8] */ 1472 hi_u32 reserved_0 : 21; /* [30..10] */ 1473 hi_u32 keyen : 1; /* [31] */ 1474 } bits; 1475 1476 /* Define an unsigned member */ 1477 hi_u32 all; 1478 } u_cbmkeypara; 1479 1480 typedef union { 1481 /* Define the struct bits */ 1482 struct { 1483 hi_u8 keybmin : 8; /* [7..0] */ 1484 hi_u8 keygmin : 8; /* [15..8] */ 1485 hi_u8 keyrmin : 8; /* [23..16] */ 1486 hi_u8 keyamin : 8; /* [31..24] */ 1487 } bits; 1488 1489 /* Define an unsigned member */ 1490 hi_u32 all; 1491 } u_cbmkeymin; 1492 1493 typedef union { 1494 /* Define the struct bits */ 1495 struct { 1496 hi_u8 keybmax : 8; /* [7..0] */ 1497 hi_u8 keygmax : 8; /* [15..8] */ 1498 hi_u8 keyrmax : 8; /* [23..16] */ 1499 hi_u8 keyamax : 8; /* [31..24] */ 1500 } bits; 1501 1502 /* Define an unsigned member */ 1503 hi_u32 all; 1504 } u_cbmkeymax; 1505 1506 typedef union { 1507 /* Define the struct bits */ 1508 struct { 1509 hi_u8 keybmask : 8; /* [7..0] */ 1510 hi_u8 keygmask : 8; /* [15..8] */ 1511 hi_u8 keyrmask : 8; /* [23..16] */ 1512 hi_u8 keyamask : 8; /* [31..24] */ 1513 } bits; 1514 1515 /* Define an unsigned member */ 1516 hi_u32 all; 1517 } u_cbmkeymask; 1518 1519 typedef union { 1520 /* Define the struct bits */ 1521 struct { 1522 hi_u32 s1_galphaen : 1; /* [0] */ 1523 hi_u32 s1_palphaen : 1; /* [1] */ 1524 hi_u32 s1_premulten : 1; /* [2] */ 1525 hi_u32 s1_multiglobalen : 1; /* [3] */ 1526 hi_u32 s1_blendmode : 4; /* [7..4] */ 1527 hi_u32 s1_galpha : 8; /* [15..8] */ 1528 hi_u32 reserved_0 : 15; /* [30..16] */ 1529 hi_u32 s1_coverblenden : 1; /* [31] */ 1530 } bits; 1531 1532 /* Define an unsigned member */ 1533 hi_u32 all; 1534 } u_src1_cbmpara; 1535 1536 typedef union { 1537 /* Define the struct bits */ 1538 struct { 1539 hi_u32 s1_xfpos : 16; /* [15..0] */ 1540 hi_u32 s1_yfpos : 16; /* [31..16] */ 1541 } bits; 1542 1543 /* Define an unsigned member */ 1544 hi_u32 all; 1545 } u_src1_cbmstpos; 1546 1547 typedef union { 1548 /* Define the struct bits */ 1549 struct { 1550 hi_u32 s2_galphaen : 1; /* [0] */ 1551 hi_u32 s2_palphaen : 1; /* [1] */ 1552 hi_u32 s2_premulten : 1; /* [2] */ 1553 hi_u32 s2_multiglobalen : 1; /* [3] */ 1554 hi_u32 s2_blendmode : 4; /* [7..4] */ 1555 hi_u32 s2_galpha : 8; /* [15..8] */ 1556 hi_u32 reserved_0 : 15; /* [30..16] */ 1557 hi_u32 s2_coverblenden : 1; /* [31] */ 1558 } bits; 1559 1560 /* Define an unsigned member */ 1561 hi_u32 all; 1562 } u_src2_cbmpara; 1563 1564 typedef union { 1565 /* Define the struct bits */ 1566 struct { 1567 hi_u32 s2_rtt_en : 1; /* [0] */ 1568 hi_u32 s2_rtt_dir : 1; /* [1] */ 1569 hi_u32 s2_rtt_fmt : 2; /* [2] */ 1570 hi_u32 reserved_0 : 28; /* [31..3] */ 1571 } bits; 1572 1573 /* Define an unsigned member */ 1574 hi_u32 all; 1575 } u_src2_rtt_ctrl; 1576 1577 typedef union { 1578 /* Define the struct bits */ 1579 struct { 1580 hi_u32 s2_xfpos : 16; /* [15..0] */ 1581 hi_u32 s2_yfpos : 16; /* [31..16] */ 1582 } bits; 1583 1584 /* Define an unsigned member */ 1585 hi_u32 all; 1586 } u_src2_cbmstpos; 1587 1588 typedef union { 1589 /* Define the struct bits */ 1590 struct { 1591 hi_u32 src1_scl_lh : 32; /* [31..0] */ 1592 } bits; 1593 1594 /* Define an unsigned member */ 1595 hi_u32 all; 1596 } u_tde_src1_zme_lhaddr; 1597 1598 typedef union { 1599 /* Define the struct bits */ 1600 struct { 1601 hi_u32 src1_scl_lv : 32; /* [31..0] */ 1602 } bits; 1603 1604 /* Define an unsigned member */ 1605 hi_u32 all; 1606 } u_tde_src1_zme_lvaddr; 1607 1608 typedef union { 1609 /* Define the struct bits */ 1610 struct { 1611 hi_u32 src1_scl_ch : 32; /* [31..0] */ 1612 } bits; 1613 1614 /* Define an unsigned member */ 1615 hi_u32 all; 1616 } u_tde_src1_zme_chaddr; 1617 1618 typedef union { 1619 /* Define the struct bits */ 1620 struct { 1621 hi_u32 src1_scl_cv : 32; /* [31..0] */ 1622 } bits; 1623 1624 /* Define an unsigned member */ 1625 hi_u32 all; 1626 } u_tde_src1_zme_cvaddr; 1627 1628 typedef union { 1629 /* Define the struct bits */ 1630 struct { 1631 hi_u32 src2_scl_lh : 32; /* [31..0] */ 1632 } bits; 1633 1634 /* Define an unsigned member */ 1635 hi_u32 all; 1636 } u_tde_src2_zme_lhaddr; 1637 1638 typedef union { 1639 /* Define the struct bits */ 1640 struct { 1641 hi_u32 src2_scl_lv : 32; /* [31..0] */ 1642 } bits; 1643 1644 /* Define an unsigned member */ 1645 hi_u32 all; 1646 } u_tde_src2_zme_lvaddr; 1647 1648 typedef union { 1649 /* Define the struct bits */ 1650 struct { 1651 hi_u32 src2_scl_ch : 32; /* [31..0] */ 1652 } bits; 1653 1654 /* Define an unsigned member */ 1655 hi_u32 all; 1656 } u_tde_src2_zme_chaddr; 1657 1658 typedef union { 1659 /* Define the struct bits */ 1660 struct { 1661 hi_u32 src2_scl_cv : 32; /* [31..0] */ 1662 } bits; 1663 1664 /* Define an unsigned member */ 1665 hi_u32 all; 1666 } u_tde_src2_zme_cvaddr; 1667 1668 typedef union { 1669 /* Define the struct bits */ 1670 struct { 1671 hi_u32 clut_addr : 32; /* [31..0] */ 1672 } bits; 1673 1674 /* Define an unsigned member */ 1675 hi_u32 all; 1676 } u_tde_clut_addr; 1677 1678 typedef union { 1679 /* Define the struct bits */ 1680 struct { 1681 hi_u32 reserved_0 : 20; /* [19..0] */ 1682 hi_u32 awid_cfg0 : 4; /* [23..20] */ 1683 hi_u32 reserved_1 : 4; /* [27..24] */ 1684 hi_u32 arid_cfg0 : 4; /* [31..28] */ 1685 } bits; 1686 1687 /* Define an unsigned member */ 1688 hi_u32 all; 1689 } u_tde_axiid; 1690 1691 typedef union { 1692 /* Define the struct bits */ 1693 struct { 1694 hi_u32 nodeid : 32; /* [31..0] */ 1695 } bits; 1696 1697 /* Define an unsigned member */ 1698 hi_u32 all; 1699 } u_tde_nodeid; 1700 1701 typedef union { 1702 /* Define the struct bits */ 1703 struct { 1704 hi_u32 eof_mask : 1; /* [0] */ 1705 hi_u32 timeout_mask : 1; /* [1] */ 1706 hi_u32 bus_err_mask : 1; /* [2] */ 1707 hi_u32 eof_end_mask : 1; /* [3] */ 1708 hi_u32 reserved_0 : 28; /* [31..4] */ 1709 } bits; 1710 1711 /* Define an unsigned member */ 1712 hi_u32 all; 1713 } u_tde_intmask; 1714 1715 typedef union { 1716 /* Define the struct bits */ 1717 struct { 1718 hi_u32 next_hi : 32; /* [31..0] */ 1719 } bits; 1720 1721 /* Define an unsigned member */ 1722 hi_u32 all; 1723 } u_tde_pnext_hi; 1724 1725 typedef union { 1726 /* Define the struct bits */ 1727 struct { 1728 hi_u32 next_low : 32; /* [31..0] */ 1729 } bits; 1730 1731 /* Define an unsigned member */ 1732 hi_u32 all; 1733 } u_tde_pnext_low; 1734 1735 typedef union { 1736 /* Define the struct bits */ 1737 struct { 1738 hi_u32 start : 1; /* [0] */ 1739 hi_u32 reserved_0 : 31; /* [31..1] */ 1740 } bits; 1741 1742 /* Define an unsigned member */ 1743 hi_u32 all; 1744 } u_tde_start; 1745 1746 typedef union { 1747 /* Define the struct bits */ 1748 struct { 1749 hi_u32 eof_state : 1; /* [0] */ 1750 hi_u32 timeout_state : 1; /* [1] */ 1751 hi_u32 bus_err : 1; /* [2] */ 1752 hi_u32 eof_end_state : 1; /* [3] */ 1753 hi_u32 reserved_0 : 28; /* [31..4] */ 1754 } bits; 1755 1756 /* Define an unsigned member */ 1757 hi_u32 all; 1758 } u_tde_intstate; 1759 1760 typedef union { 1761 /* Define the struct bits */ 1762 struct { 1763 hi_u32 eof_clr : 1; /* [0] */ 1764 hi_u32 timeout_clr : 1; /* [1] */ 1765 hi_u32 bus_err_clr : 1; /* [2] */ 1766 hi_u32 eof_end_clr : 1; /* [3] */ 1767 hi_u32 reserved_0 : 28; /* [31..4] */ 1768 } bits; 1769 1770 /* Define an unsigned member */ 1771 hi_u32 all; 1772 } u_tde_intclr; 1773 1774 typedef union { 1775 /* Define the struct bits */ 1776 struct { 1777 hi_u32 raw_eof : 1; /* [0] */ 1778 hi_u32 raw_timeout : 1; /* [1] */ 1779 hi_u32 raw_bus_err : 1; /* [2] */ 1780 hi_u32 raw_eof_end : 1; /* [3] */ 1781 hi_u32 reserved_0 : 28; /* [31..4] */ 1782 } bits; 1783 1784 /* Define an unsigned member */ 1785 hi_u32 all; 1786 } u_tde_rawint; 1787 1788 typedef union { 1789 /* Define the struct bits */ 1790 struct { 1791 hi_u32 pfcnt : 32; /* [31..0] */ 1792 } bits; 1793 1794 /* Define an unsigned member */ 1795 hi_u32 u32; 1796 } u_tde_pfcnt; 1797 1798 typedef union { 1799 /* Define the struct bits */ 1800 struct { 1801 hi_u32 routstanding : 4; /* [3..0] */ 1802 hi_u32 woutstanding : 4; /* [7..4] */ 1803 hi_u32 init_timer : 16; /* [23..8] */ 1804 hi_u32 ck_gt_en : 1; /* [24] */ 1805 hi_u32 ck_gt_en_calc : 1; /* [25] */ 1806 hi_u32 split_128b_en : 1; /* [26] */ 1807 hi_u32 split_256b_en : 1; /* [27] */ 1808 hi_u32 split_1k_en : 1; /* [28] */ 1809 hi_u32 split_2k_en : 1; /* [29] */ 1810 hi_u32 reserved_0 : 2; /* [31..30] */ 1811 } bits; 1812 1813 /* Define an unsigned member */ 1814 hi_u32 u32; 1815 } u_tde_miscellaneous; 1816 1817 typedef union { 1818 /* Define the struct bits */ 1819 struct { 1820 hi_u32 mac_ch_prio : 32; /* [31..0] */ 1821 } bits; 1822 1823 /* Define an unsigned member */ 1824 hi_u32 u32; 1825 } u_tde_maccfg; 1826 1827 typedef union { 1828 /* Define the struct bits */ 1829 struct { 1830 hi_u32 timeout : 32; /* [31..0] */ 1831 } bits; 1832 1833 /* Define an unsigned member */ 1834 hi_u32 u32; 1835 } u_tde_timeout; 1836 1837 typedef union { 1838 /* Define the struct bits */ 1839 struct { 1840 hi_u32 eof_cnt : 32; /* [31..0] */ 1841 } bits; 1842 1843 /* Define an unsigned member */ 1844 hi_u32 u32; 1845 } u_tde_eofcnt; 1846 1847 typedef union { 1848 /* Define the struct bits */ 1849 struct { 1850 hi_u32 emab : 3; /* [2..0] */ 1851 hi_u32 emaa : 3; /* [5..3] */ 1852 hi_u32 emasa : 1; /* [6] */ 1853 hi_u32 emaw : 2; /* [8..7] */ 1854 hi_u32 ema : 3; /* [11..9] */ 1855 hi_u32 rfsuhd_wtsel : 2; /* [13..12] */ 1856 hi_u32 rfsuhd_rtsel : 2; /* [15..14] */ 1857 hi_u32 rfs_wtsel : 2; /* [17..16] */ 1858 hi_u32 rfs_rtsel : 2; /* [19..18] */ 1859 hi_u32 rfts_wct : 2; /* [21..20] */ 1860 hi_u32 rfts_rct : 2; /* [23..22] */ 1861 hi_u32 rfts_kp : 3; /* [26..24] */ 1862 hi_u32 rftf_wct : 2; /* [28..27] */ 1863 hi_u32 rftf_rct : 2; /* [30..29] */ 1864 hi_u32 reserved : 1; /* [31] */ 1865 } bits; 1866 1867 /* Define an unsigned member */ 1868 hi_u32 u32; 1869 } u_tde_memctrl; 1870 1871 #if (HICHIP == HI3519A_V100) 1872 typedef union { 1873 /* Define the struct bits */ 1874 struct { 1875 unsigned int is_lossless : 1; /* [0] */ 1876 unsigned int is_lossless_alpha : 1; /* [1] */ 1877 unsigned int cmp_mode : 1; /* [2] */ 1878 unsigned int osd_mode : 2; /* [4..3] */ 1879 unsigned int partition_en : 1; /* [5] */ 1880 unsigned int part_num : 3; /* [8..6] */ 1881 unsigned int reserved_0 : 23; /* [31..9] */ 1882 } bits; 1883 1884 /* Define an unsigned member */ 1885 unsigned int u32; 1886 } u_tde_od_pic_osd_glb_info; 1887 1888 typedef union { 1889 /* Define the struct bits */ 1890 struct { 1891 unsigned int frame_width : 13; /* [12..0] */ 1892 unsigned int reserved_0 : 3; /* [15..13] */ 1893 unsigned int frame_height : 13; /* [28..16] */ 1894 unsigned int reserved_1 : 3; /* [31..29] */ 1895 } bits; 1896 1897 /* Define an unsigned member */ 1898 unsigned int u32; 1899 } u_tde_od_pic_osd_frame_size; 1900 1901 typedef union { 1902 /* Define the struct bits */ 1903 struct { 1904 unsigned int budget_bits_mb : 10; /* [9..0] */ 1905 unsigned int reserved_0 : 6; /* [15..10] */ 1906 unsigned int min_mb_bits : 10; /* [25..16] */ 1907 unsigned int reserved_1 : 6; /* [31..26] */ 1908 } bits; 1909 1910 /* Define an unsigned member */ 1911 unsigned int u32; 1912 } u_tde_od_pic_osd_rc_cfg0; 1913 1914 typedef union { 1915 /* Define the struct bits */ 1916 struct { 1917 unsigned int budget_bits_mb_cap : 10; /* [9..0] */ 1918 unsigned int reserved_0 : 22; /* [31..10] */ 1919 } bits; 1920 1921 /* Define an unsigned member */ 1922 unsigned int u32; 1923 } u_tde_od_pic_osd_rc_cfg1; 1924 1925 typedef union { 1926 /* Define the struct bits */ 1927 struct { 1928 unsigned int max_qp : 4; /* [3..0] */ 1929 unsigned int smth_qp : 4; /* [7..4] */ 1930 unsigned int sad_bits_ngain : 4; /* [11..8] */ 1931 unsigned int reserved_0 : 4; /* [15..12] */ 1932 unsigned int rc_smth_ngain : 3; /* [18..16] */ 1933 unsigned int reserved_1 : 5; /* [23..19] */ 1934 unsigned int special_bits_gain : 4; /* [27..24] */ 1935 unsigned int reserved_2 : 4; /* [31..28] */ 1936 } bits; 1937 1938 /* Define an unsigned member */ 1939 unsigned int u32; 1940 } u_tde_od_pic_osd_rc_cfg2; 1941 1942 typedef union { 1943 /* Define the struct bits */ 1944 struct { 1945 unsigned int max_sad_thr : 7; /* [6..0] */ 1946 unsigned int reserved_0 : 9; /* [15..7] */ 1947 unsigned int min_sad_thr : 7; /* [22..16] */ 1948 unsigned int reserved_1 : 9; /* [31..23] */ 1949 } bits; 1950 1951 /* Define an unsigned member */ 1952 unsigned int u32; 1953 } u_tde_od_pic_osd_rc_cfg3; 1954 1955 typedef union { 1956 /* Define the struct bits */ 1957 struct { 1958 unsigned int smth_thr : 7; /* [6..0] */ 1959 unsigned int reserved_0 : 1; /* [7] */ 1960 unsigned int still_thr : 7; /* [14..8] */ 1961 unsigned int reserved_1 : 1; /* [15] */ 1962 unsigned int big_grad_thr : 10; /* [25..16] */ 1963 unsigned int reserved_2 : 6; /* [31..26] */ 1964 } bits; 1965 1966 /* Define an unsigned member */ 1967 unsigned int u32; 1968 } u_tde_od_pic_osd_rc_cfg4; 1969 1970 typedef union { 1971 /* Define the struct bits */ 1972 struct { 1973 unsigned int smth_pix_num_thr : 6; /* [5..0] */ 1974 unsigned int reserved_0 : 2; /* [7..6] */ 1975 unsigned int still_pix_num_thr : 6; /* [13..8] */ 1976 unsigned int reserved_1 : 2; /* [15..14] */ 1977 unsigned int noise_pix_num_thr : 6; /* [21..16] */ 1978 unsigned int reserved_2 : 2; /* [23..22] */ 1979 unsigned int large_smth_pix_num_thr : 6; /* [29..24] */ 1980 unsigned int reserved_3 : 2; /* [31..30] */ 1981 } bits; 1982 1983 /* Define an unsigned member */ 1984 unsigned int u32; 1985 } u_tde_od_pic_osd_rc_cfg5; 1986 1987 typedef union { 1988 /* Define the struct bits */ 1989 struct { 1990 unsigned int noise_sad : 7; /* [6..0] */ 1991 unsigned int reserved_0 : 9; /* [15..7] */ 1992 unsigned int pix_diff_thr : 9; /* [24..16] */ 1993 unsigned int reserved_1 : 7; /* [31..25] */ 1994 } bits; 1995 1996 /* Define an unsigned member */ 1997 unsigned int u32; 1998 } u_tde_od_pic_osd_rc_cfg6; 1999 2000 typedef union { 2001 /* Define the struct bits */ 2002 struct { 2003 unsigned int adj_sad_bits_thr : 7; /* [6..0] */ 2004 unsigned int reserved_0 : 1; /* [7] */ 2005 unsigned int max_trow_bits : 8; /* [15..8] */ 2006 unsigned int reserved_1 : 16; /* [31..16] */ 2007 } bits; 2008 2009 /* Define an unsigned member */ 2010 unsigned int u32; 2011 } u_tde_od_pic_osd_rc_cfg7; 2012 2013 typedef union { 2014 /* Define the struct bits */ 2015 struct { 2016 unsigned int qp_inc1_bits_thr : 8; /* [7..0] */ 2017 unsigned int qp_dec1_bits_thr : 8; /* [15..8] */ 2018 unsigned int qp_dec2_bits_thr : 8; /* [23..16] */ 2019 unsigned int qp_dec3_bits_thr : 8; /* [31..24] */ 2020 } bits; 2021 2022 /* Define an unsigned member */ 2023 unsigned int u32; 2024 } u_tde_od_pic_osd_rc_cfg8; 2025 2026 typedef union { 2027 /* Define the struct bits */ 2028 struct { 2029 unsigned int force_qp_thr : 10; /* [9..0] */ 2030 unsigned int reserved_0 : 6; /* [15..10] */ 2031 unsigned int force_qp_thr_cap : 10; /* [25..16] */ 2032 unsigned int reserved_1 : 6; /* [31..26] */ 2033 } bits; 2034 2035 /* Define an unsigned member */ 2036 unsigned int u32; 2037 } u_tde_od_pic_osd_rc_cfg9; 2038 2039 typedef union { 2040 /* Define the struct bits */ 2041 struct { 2042 unsigned int max_row_len : 10; /* [9..0] */ 2043 unsigned int reserved_0 : 22; /* [31..10] */ 2044 } bits; 2045 2046 /* Define an unsigned member */ 2047 unsigned int u32; 2048 } u_tde_od_pic_osd_rc_cfg10; 2049 #else 2050 typedef union { 2051 /* Define the struct bits */ 2052 struct { 2053 unsigned int is_lossless : 1; /* [0] */ 2054 unsigned int is_lossless_a : 1; /* [1] */ 2055 unsigned int cmp_mode : 1; /* [2] */ 2056 unsigned int source_mode : 3; /* [5..3] */ 2057 unsigned int part_cmp_en : 1; /* [6] */ 2058 unsigned int top_pred_en : 1; /* [7] */ 2059 unsigned int graphic_en : 1; /* [8] */ 2060 unsigned int hq_cmp_en : 1; /* [9] */ 2061 unsigned int reserved_0 : 22; /* [31..10] */ 2062 } bits; 2063 2064 /* Define an unsigned member */ 2065 unsigned int u32; 2066 } u_tde_od_pic_osd_glb_info; 2067 2068 typedef union { 2069 /* Define the struct bits */ 2070 struct { 2071 unsigned int frame_width : 13; /* [12..0] */ 2072 unsigned int reserved_0 : 3; /* [15..13] */ 2073 unsigned int frame_height : 13; /* [28..16] */ 2074 unsigned int reserved_1 : 3; /* [31..29] */ 2075 } bits; 2076 2077 /* Define an unsigned member */ 2078 unsigned int u32; 2079 } u_tde_od_pic_osd_frame_size; 2080 2081 typedef union { 2082 /* Define the struct bits */ 2083 struct { 2084 unsigned int mb_bits : 10; /* [9..0] */ 2085 unsigned int reserved_0 : 6; /* [15..10] */ 2086 unsigned int min_mb_bits : 10; /* [25..16] */ 2087 unsigned int reserved_1 : 6; /* [31..26] */ 2088 } bits; 2089 2090 /* Define an unsigned member */ 2091 unsigned int u32; 2092 } u_tde_od_pic_osd_rc_cfg0; 2093 2094 typedef union { 2095 /* Define the struct bits */ 2096 struct { 2097 unsigned int max_qp : 4; /* [3..0] */ 2098 unsigned int reserved_0 : 4; /* [7..4] */ 2099 unsigned int sad_bits_gain : 4; /* [11..8] */ 2100 unsigned int reserved_1 : 4; /* [15..12] */ 2101 unsigned int rc_smth_ngain : 3; /* [18..16] */ 2102 unsigned int reserved_2 : 5; /* [23..19] */ 2103 unsigned int max_trow_bits : 8; /* [31..24] */ 2104 } bits; 2105 2106 /* Define an unsigned member */ 2107 unsigned int u32; 2108 } u_tde_od_pic_osd_rc_cfg1; 2109 2110 typedef union { 2111 /* Define the struct bits */ 2112 struct { 2113 unsigned int max_sad_thr : 7; /* [6..0] */ 2114 unsigned int reserved_0 : 9; /* [15..7] */ 2115 unsigned int min_sad_thr : 7; /* [22..16] */ 2116 unsigned int reserved_1 : 9; /* [31..23] */ 2117 } bits; 2118 2119 /* Define an unsigned member */ 2120 unsigned int u32; 2121 } u_tde_od_pic_osd_rc_cfg2; 2122 2123 typedef union { 2124 /* Define the struct bits */ 2125 struct { 2126 unsigned int smth_thr : 7; /* [6..0] */ 2127 unsigned int reserved_0 : 1; /* [7] */ 2128 unsigned int still_thr : 7; /* [14..8] */ 2129 unsigned int reserved_1 : 1; /* [15] */ 2130 unsigned int big_grad_thr : 10; /* [25..16] */ 2131 unsigned int reserved_2 : 6; /* [31..26] */ 2132 } bits; 2133 2134 /* Define an unsigned member */ 2135 unsigned int u32; 2136 } u_tde_od_pic_osd_rc_cfg3; 2137 2138 typedef union { 2139 /* Define the struct bits */ 2140 struct { 2141 unsigned int smth_pix_num_thr : 6; /* [5..0] */ 2142 unsigned int reserved_0 : 2; /* [7..6] */ 2143 unsigned int still_pix_num_thr : 6; /* [13..8] */ 2144 unsigned int reserved_1 : 2; /* [15..14] */ 2145 unsigned int noise_pix_num_thr : 6; /* [21..16] */ 2146 unsigned int reserved_2 : 10; /* [31..22] */ 2147 } bits; 2148 2149 /* Define an unsigned member */ 2150 unsigned int u32; 2151 } u_tde_od_pic_osd_rc_cfg4; 2152 2153 typedef union { 2154 /* Define the struct bits */ 2155 struct { 2156 unsigned int noise_sad : 7; /* [6..0] */ 2157 unsigned int reserved_0 : 9; /* [15..7] */ 2158 unsigned int pix_diff_thr : 10; /* [25..16] */ 2159 unsigned int reserved_1 : 6; /* [31..26] */ 2160 } bits; 2161 2162 /* Define an unsigned member */ 2163 unsigned int u32; 2164 } u_tde_od_pic_osd_rc_cfg5; 2165 2166 typedef union { 2167 /* Define the struct bits */ 2168 struct { 2169 unsigned int adj_sad_bits_thr : 7; /* [6..0] */ 2170 unsigned int reserved_0 : 25; /* [31..7] */ 2171 } bits; 2172 2173 /* Define an unsigned member */ 2174 unsigned int u32; 2175 } u_tde_od_pic_osd_rc_cfg6; 2176 2177 typedef union { 2178 /* Define the struct bits */ 2179 struct { 2180 unsigned int qp_inc1_bits_thr : 8; /* [7..0] */ 2181 unsigned int qp_inc2_bits_thr : 8; /* [15..8] */ 2182 unsigned int qp_dec1_bits_thr : 8; /* [23..16] */ 2183 unsigned int qp_dec2_bits_thr : 8; /* [31..24] */ 2184 } bits; 2185 2186 /* Define an unsigned member */ 2187 unsigned int u32; 2188 } u_tde_od_pic_osd_rc_cfg7; 2189 2190 typedef union { 2191 /* Define the struct bits */ 2192 struct { 2193 unsigned int est_err_gain : 5; /* [4..0] */ 2194 unsigned int reserved_0 : 11; /* [15..5] */ 2195 unsigned int max_est_err_level : 9; /* [24..16] */ 2196 unsigned int reserved_1 : 7; /* [31..25] */ 2197 } bits; 2198 2199 /* Define an unsigned member */ 2200 unsigned int u32; 2201 } u_tde_od_pic_osd_rc_cfg8; 2202 2203 typedef union { 2204 /* Define the struct bits */ 2205 struct { 2206 unsigned int reserved_0 : 16; /* [15..0] */ 2207 unsigned int vbv_buf_loss1_thr : 7; /* [22..16] */ 2208 unsigned int reserved_1 : 1; /* [23] */ 2209 unsigned int vbv_buf_loss2_thr : 7; /* [30..24] */ 2210 unsigned int reserved_2 : 1; /* [31] */ 2211 } bits; 2212 2213 /* Define an unsigned member */ 2214 unsigned int u32; 2215 } u_tde_od_pic_osd_rc_cfg9; 2216 2217 typedef union { 2218 /* Define the struct bits */ 2219 struct { 2220 unsigned int qp_thr0 : 3; /* [2..0] */ 2221 unsigned int reserved_0 : 5; /* [7..3] */ 2222 unsigned int qp_thr1 : 3; /* [10..8] */ 2223 unsigned int reserved_1 : 5; /* [15..11] */ 2224 unsigned int qp_thr2 : 3; /* [19..16] */ 2225 unsigned int reserved_2 : 13; /* [31..20] */ 2226 } bits; 2227 2228 /* Define an unsigned member */ 2229 unsigned int u32; 2230 } u_tde_od_pic_osd_rc_cfg10; 2231 2232 typedef union { 2233 /* Define the struct bits */ 2234 struct { 2235 unsigned int grph_bias_bit_thr0 : 8; /* [7..0] */ 2236 unsigned int grph_bias_bit_thr1 : 8; /* [15..8] */ 2237 unsigned int grph_ideal_bit_thr : 10; /* [25..16] */ 2238 unsigned int reserved_0 : 6; /* [31..26] */ 2239 } bits; 2240 2241 /* Define an unsigned member */ 2242 unsigned int u32; 2243 } u_tde_od_pic_osd_rc_cfg11; 2244 2245 typedef union { 2246 /* Define the struct bits */ 2247 struct { 2248 unsigned int force_rc_en : 1; /* [0] */ 2249 unsigned int reserved_0 : 7; /* [7..1] */ 2250 unsigned int forcerc_bits_diff_thr : 8; /* [15..8] */ 2251 unsigned int reserved_1 : 16; /* [31..16] */ 2252 } bits; 2253 2254 /* Define an unsigned member */ 2255 unsigned int u32; 2256 } u_tde_od_pic_osd_rc_cfg12; 2257 2258 typedef union { 2259 /* Define the struct bits */ 2260 struct { 2261 unsigned int maxdiff_ctrl_en : 1; /* [0] */ 2262 unsigned int reserved_0 : 31; /* [31..1] */ 2263 } bits; 2264 2265 /* Define an unsigned member */ 2266 unsigned int u32; 2267 } u_tde_od_pic_osd_rc_cfg13; 2268 2269 typedef union { 2270 /* Define the struct bits */ 2271 struct { 2272 unsigned int mb_bits_cap : 10; /* [9..0] */ 2273 unsigned int reserved_0 : 6; /* [15..10] */ 2274 unsigned int init_buf_bits_cap : 16; /* [31..16] */ 2275 } bits; 2276 2277 /* Define an unsigned member */ 2278 unsigned int u32; 2279 } u_tde_od_pic_osd_rc_cfg14; 2280 2281 typedef union { 2282 /* Define the struct bits */ 2283 struct { 2284 unsigned int lfw_mb_len : 7; /* [6..0] */ 2285 unsigned int reserved_0 : 1; /* [7] */ 2286 unsigned int cmplx_sad_thr : 4; /* [11..8] */ 2287 unsigned int reserved_1 : 4; /* [15..12] */ 2288 unsigned int err_thr0 : 4; /* [19..16] */ 2289 unsigned int reserved_2 : 4; /* [23..20] */ 2290 unsigned int err_thr1 : 4; /* [27..24] */ 2291 unsigned int reserved_3 : 4; /* [31..28] */ 2292 } bits; 2293 2294 /* Define an unsigned member */ 2295 unsigned int u32; 2296 } u_tde_od_pic_osd_rc_cfg15; 2297 2298 typedef union { 2299 /* Define the struct bits */ 2300 struct { 2301 unsigned int sim_num_thr : 3; /* [2..0] */ 2302 unsigned int reserved_0 : 5; /* [7..3] */ 2303 unsigned int sum_y_err_thr : 7; /* [14..8] */ 2304 unsigned int reserved_1 : 1; /* [15] */ 2305 unsigned int sum_c_err_thr : 7; /* [22..16] */ 2306 unsigned int reserved_2 : 9; /* [31..23] */ 2307 } bits; 2308 2309 /* Define an unsigned member */ 2310 unsigned int u32; 2311 } u_tde_od_pic_osd_rc_cfg16; 2312 2313 typedef union { 2314 /* Define the struct bits */ 2315 struct { 2316 unsigned int cpmlx_sad_thr_y : 4; /* [3..0] */ 2317 unsigned int reserved_0 : 4; /* [7..4] */ 2318 unsigned int smpl_sad_thr_c : 4; /* [11..8] */ 2319 unsigned int reserved_1 : 4; /* [15..12] */ 2320 unsigned int smpl_sumsad_thr_y : 8; /* [23..16] */ 2321 unsigned int smpl_sumsad_thr_c : 8; /* [31..24] */ 2322 } bits; 2323 2324 /* Define an unsigned member */ 2325 unsigned int u32; 2326 } u_tde_od_pic_osd_rc_cfg17; 2327 2328 typedef union { 2329 /* Define the struct bits */ 2330 struct { 2331 unsigned int future_sad_y_thr0 : 4; /* [3..0] */ 2332 unsigned int reserved_0 : 4; /* [7..4] */ 2333 unsigned int future_sad_c_thr0 : 4; /* [11..8] */ 2334 unsigned int reserved_1 : 4; /* [15..12] */ 2335 unsigned int future_sad_y_thr1 : 4; /* [19..16] */ 2336 unsigned int reserved_2 : 4; /* [23..20] */ 2337 unsigned int future_sad_c_thr1 : 4; /* [27..24] */ 2338 unsigned int reserved_3 : 4; /* [31..28] */ 2339 } bits; 2340 2341 /* Define an unsigned member */ 2342 unsigned int u32; 2343 } u_tde_od_pic_osd_rc_cfg18; 2344 2345 typedef union { 2346 /* Define the struct bits */ 2347 struct { 2348 unsigned int cmplx_sumsad_thr_y : 8; /* [7..0] */ 2349 unsigned int cmplx_sumsad_thr_c : 8; /* [15..8] */ 2350 unsigned int reserved_0 : 16; /* [31..16] */ 2351 } bits; 2352 2353 /* Define an unsigned member */ 2354 unsigned int u32; 2355 } u_tde_od_pic_osd_rc_cfg19; 2356 2357 typedef union { 2358 /* Define the struct bits */ 2359 struct { 2360 unsigned int buffer_up_lmt_thr : 12; /* [11..0] */ 2361 unsigned int reserved0 : 4; /* [15..12] */ 2362 unsigned int buffer_low_lmt_thr : 12; /* [27..16] */ 2363 unsigned int reserved1 : 4; /* [31..27] */ 2364 } bits; 2365 2366 /* Define an unsigned member */ 2367 unsigned int u32; 2368 } u_tde_od_pic_osd_rc_cfg20; 2369 2370 typedef union { 2371 /* Define the struct bits */ 2372 struct { 2373 unsigned int buffer_adj_qp_thr0 : 4; /* [3..0] */ 2374 unsigned int reserved0 : 4; /* [7..4] */ 2375 unsigned int buffer_adj_qp_thr1 : 4; /* [11..8] */ 2376 unsigned int reserved1 : 4; /* [15..12] */ 2377 unsigned int buffer_adj_qp_thr2 : 4; /* [19..16] */ 2378 unsigned int reserved2 : 12; /* [31..20] */ 2379 } bits; 2380 2381 /* Define an unsigned member */ 2382 unsigned int u32; 2383 } u_tde_od_pic_osd_rc_cfg21; 2384 2385 typedef union { 2386 /* Define the struct bits */ 2387 struct { 2388 unsigned int buffer_surplus_thr0 : 8; /* [7..0] */ 2389 unsigned int buffer_surplus_thr1 : 8; /* [15..8] */ 2390 unsigned int buffer_surplus_thr2 : 8; /* [23..16] */ 2391 unsigned int reserved0 : 8; /* [31..24] */ 2392 } bits; 2393 2394 /* Define an unsigned member */ 2395 unsigned int u32; 2396 } u_tde_od_pic_osd_rc_cfg22; 2397 2398 typedef union { 2399 /* Define the struct bits */ 2400 struct { 2401 unsigned int offset_bits_thr : 10; /* [9..0] */ 2402 unsigned int reserved0 : 22; /* [31..10] */ 2403 } bits; 2404 2405 /* Define an unsigned member */ 2406 unsigned int u32; 2407 } u_tde_od_pic_osd_rc_cfg23; 2408 2409 typedef union { 2410 /* Define the struct bits */ 2411 struct { 2412 unsigned int max_gap_bw_row_len_thr : 7; /* [6..0] */ 2413 unsigned int reserved_0 : 25; /* [31..7] */ 2414 } bits; 2415 2416 /* Define an unsigned member */ 2417 unsigned int u32; 2418 } u_tde_od_pic_osd_stat_thr; 2419 2420 typedef union { 2421 /* Define the struct bits */ 2422 struct { 2423 unsigned int pcmp_start_hpos : 13; /* [12..0] */ 2424 unsigned int reserved_0 : 3; /* [15..13] */ 2425 unsigned int pcmp_end_hpos : 13; /* [28..16] */ 2426 unsigned int reserved_1 : 3; /* [31..29] */ 2427 } bits; 2428 2429 /* Define an unsigned member */ 2430 unsigned int u32; 2431 } u_tde_od_pic_osd_pcmp; 2432 2433 typedef union { 2434 /* Define the struct bits */ 2435 struct { 2436 unsigned int frame_size_reg : 22; /* [21..0] */ 2437 unsigned int reserved_0 : 10; /* [31..22] */ 2438 } bits; 2439 2440 /* Define an unsigned member */ 2441 unsigned int u32; 2442 } u_des_osd_bs_size; 2443 2444 typedef union { 2445 /* Define the struct bits */ 2446 struct { 2447 unsigned int max_frm_row_len : 16; /* [15..0] */ 2448 unsigned int reserved_0 : 16; /* [31..16] */ 2449 } bits; 2450 2451 /* Define an unsigned member */ 2452 unsigned int u32; 2453 } u_des_osd_worst_row; 2454 2455 typedef union { 2456 /* Define the struct bits */ 2457 struct { 2458 unsigned int min_frm_row_len : 16; /* [15..0] */ 2459 unsigned int reserved_0 : 16; /* [31..16] */ 2460 } bits; 2461 2462 /* Define an unsigned member */ 2463 unsigned int u32; 2464 } u_des_osd_best_row; 2465 2466 typedef union { 2467 /* Define the struct bits */ 2468 struct { 2469 unsigned int max_gap_bw_row_len_cnt : 16; /* [15..0] */ 2470 unsigned int reserved_0 : 16; /* [31..16] */ 2471 } bits; 2472 2473 /* Define an unsigned member */ 2474 unsigned int u32; 2475 } u_des_osd_stat_info; 2476 2477 typedef union { 2478 /* Define the struct bits */ 2479 struct { 2480 unsigned int glb_st : 32; /* [31..0] */ 2481 } bits; 2482 2483 /* Define an unsigned member */ 2484 unsigned int u32; 2485 } u_des_osd_debug0; 2486 2487 typedef union { 2488 /* Define the struct bits */ 2489 struct { 2490 unsigned int bitsmux_st : 32; /* [31..0] */ 2491 } bits; 2492 2493 /* Define an unsigned member */ 2494 unsigned int u32; 2495 } u_des_osd_debug1; 2496 #endif 2497 2498 typedef union { 2499 /* Define the struct bits */ 2500 struct { 2501 hi_u32 debug0 : 32; /* [31..0] */ 2502 } bits; 2503 2504 /* Define an unsigned member */ 2505 hi_u32 u32; 2506 } u_tde_debug0; 2507 2508 typedef union { 2509 /* Define the struct bits */ 2510 struct { 2511 hi_u32 debug1 : 32; /* [31..0] */ 2512 } bits; 2513 2514 /* Define an unsigned member */ 2515 hi_u32 u32; 2516 } u_tde_debug1; 2517 2518 typedef union { 2519 /* Define the struct bits */ 2520 struct { 2521 hi_u32 debug2 : 32; /* [31..0] */ 2522 } bits; 2523 2524 /* Define an unsigned member */ 2525 hi_u32 u32; 2526 } u_tde_debug2; 2527 2528 typedef union { 2529 /* Define the struct bits */ 2530 struct { 2531 hi_u32 debug3 : 32; /* [31..0] */ 2532 } bits; 2533 2534 /* Define an unsigned member */ 2535 hi_u32 u32; 2536 } u_tde_debug3; 2537 2538 typedef union { 2539 /* Define the struct bits */ 2540 struct { 2541 hi_u32 debug4 : 32; /* [31..0] */ 2542 } bits; 2543 2544 /* Define an unsigned member */ 2545 hi_u32 u32; 2546 } u_tde_debug4; 2547 2548 typedef union { 2549 /* Define the struct bits */ 2550 struct { 2551 hi_u32 debug5 : 32; /* [31..0] */ 2552 } bits; 2553 2554 /* Define an unsigned member */ 2555 hi_u32 u32; 2556 } u_tde_debug5; 2557 2558 typedef union { 2559 /* Define the struct bits */ 2560 struct { 2561 hi_u32 debug6 : 32; /* [31..0] */ 2562 } bits; 2563 2564 /* Define an unsigned member */ 2565 hi_u32 u32; 2566 } u_tde_debug6; 2567 2568 typedef union { 2569 /* Define the struct bits */ 2570 struct { 2571 hi_u32 debug7 : 32; /* [31..0] */ 2572 } bits; 2573 2574 /* Define an unsigned member */ 2575 hi_u32 u32; 2576 } u_tde_debug7; 2577 2578 typedef union { 2579 /* Define the struct bits */ 2580 struct { 2581 hi_u32 debug8 : 32; /* [31..0] */ 2582 } bits; 2583 2584 /* Define an unsigned member */ 2585 hi_u32 u32; 2586 } u_tde_debug8; 2587 2588 typedef union { 2589 /* Define the struct bits */ 2590 struct { 2591 hi_u32 debug9 : 32; /* [31..0] */ 2592 } bits; 2593 2594 /* Define an unsigned member */ 2595 hi_u32 u32; 2596 } u_tde_debug9; 2597 2598 typedef union { 2599 /* Define the struct bits */ 2600 struct { 2601 hi_u32 debug10 : 32; /* [31..0] */ 2602 } bits; 2603 2604 /* Define an unsigned member */ 2605 hi_u32 u32; 2606 } u_tde_debug10; 2607 2608 typedef union { 2609 /* Define the struct bits */ 2610 struct { 2611 hi_u32 debug11 : 32; /* [31..0] */ 2612 } bits; 2613 2614 /* Define an unsigned member */ 2615 hi_u32 u32; 2616 } u_tde_debug11; 2617 2618 typedef union { 2619 /* Define the struct bits */ 2620 struct { 2621 unsigned int cmp1_frame_size_reg : 22; /* [21..0] */ 2622 unsigned int reserved_0 : 10; /* [31..22] */ 2623 } bits; 2624 2625 /* Define an unsigned member */ 2626 unsigned int u32; 2627 } u_tde_od_pic_osd_bs_size_cmp1; 2628 2629 typedef union { 2630 /* Define the struct bits */ 2631 struct { 2632 unsigned int cmp1_max_frm_row_len : 16; /* [15..0] */ 2633 unsigned int reserved_0 : 16; /* [31..16] */ 2634 } bits; 2635 2636 /* Define an unsigned member */ 2637 unsigned int u32; 2638 } u_tde_od_pic_osd_worst_row_cmp1; 2639 2640 typedef union { 2641 /* Define the struct bits */ 2642 struct { 2643 unsigned int cmp1_min_frm_row_len : 16; /* [15..0] */ 2644 unsigned int reserved_0 : 16; /* [31..16] */ 2645 } bits; 2646 2647 /* Define an unsigned member */ 2648 unsigned int u32; 2649 } u_tde_od_pic_osd_best_row_cmp1; 2650 2651 typedef union { 2652 /* Define the struct bits */ 2653 struct { 2654 unsigned int cmp1_max_gap_bw_row_len_cnt : 16; /* [15..0] */ 2655 unsigned int reserved_0 : 16; /* [31..16] */ 2656 } bits; 2657 2658 /* Define an unsigned member */ 2659 unsigned int u32; 2660 } u_tde_od_pic_osd_stat_info_cmp1; 2661 2662 typedef union { 2663 /* Define the struct bits */ 2664 struct { 2665 unsigned int cmp1_glb_st : 32; /* [31..0] */ 2666 } bits; 2667 2668 /* Define an unsigned member */ 2669 unsigned int u32; 2670 } u_tde_od_pic_osd_debug0_cmp1; 2671 2672 typedef union { 2673 /* Define the struct bits */ 2674 struct { 2675 unsigned int cmp1_bitsmux_st : 32; /* [31..0] */ 2676 } bits; 2677 2678 /* Define an unsigned member */ 2679 unsigned int u32; 2680 } u_tde_od_pic_osd_debug1_cmp1; 2681 2682 typedef union { 2683 /* Define the struct bits */ 2684 struct { 2685 unsigned int special_max_row_len : 16; /* [15..0] */ 2686 unsigned int cmp1_special_max_row_len : 16; /* [31..16] */ 2687 } bits; 2688 2689 /* Define an unsigned member */ 2690 unsigned int u32; 2691 } u_tde_od_pic_osd_special_worst_row_cmp1; 2692 2693 #if (HICHIP == HI3516C_V500) 2694 typedef struct { 2695 hi_u32 tde_src1_zme_lhaddr_high; /* 0x0 */ 2696 hi_u32 tde_src1_zme_lhaddr_low; /* 0x4 */ 2697 hi_u32 tde_src1_zme_lvaddr_high; /* 0x8 */ 2698 hi_u32 tde_src1_zme_lvaddr_low; /* 0xc */ 2699 hi_u32 tde_src1_zme_chaddr_high; /* 0x10 */ 2700 hi_u32 tde_src1_zme_chaddr_low; /* 0x14 */ 2701 hi_u32 tde_src1_zme_cvaddr_high; /* 0x18 */ 2702 hi_u32 tde_src1_zme_cvaddr_low; /* 0x1c */ 2703 hi_u32 tde_src2_zme_lhaddr_high; /* 0x20 */ 2704 hi_u32 tde_src2_zme_lhaddr_low; /* 0x24 */ 2705 hi_u32 tde_src2_zme_lvaddr_high; /* 0x28 */ 2706 hi_u32 tde_src2_zme_lvaddr_low; /* 0x2c */ 2707 hi_u32 tde_src2_zme_chaddr_high; /* 0x30 */ 2708 hi_u32 tde_src2_zme_chaddr_low; /* 0x34 */ 2709 hi_u32 tde_src2_zme_cvaddr_high; /* 0x38 */ 2710 hi_u32 tde_src2_zme_cvaddr_low; /* 0x3c */ 2711 hi_u32 tde_clut_addr_high; /* 0x40 */ 2712 hi_u32 tde_clut_addr_low; /* 0x44 */ 2713 u_tde_axiid tde_axiid; /* 0x48 */ 2714 hi_u32 reserved_0[41]; /* 0x4c~0xec 41 is the length of the resources */ 2715 u_tde_intmask tde_intmask; /* 0xf0 */ 2716 u_tde_nodeid tde_nodeid; /* 0xf4 */ 2717 u_tde_pnext_low tde_pnext_low; /* 0xf8 */ 2718 u_tde_pnext_hi tde_pnext_hi; /* 0xfc */ 2719 u_src1_ctrl src1_ctrl; /* 0x100 */ 2720 u_src1_ch0_addr_high src1_ch0_addr_high; /* 0x104 */ 2721 u_src1_ch0_addr_low src1_ch0_addr_low; /* 0x108 */ 2722 u_src1_ch1_addr_high src1_ch1_addr_high; /* 0x10c */ 2723 u_src1_ch1_addr_low src1_ch1_addr_low; /* 0x110 */ 2724 u_src1_ch0_stride src1_ch0_stride; /* 0x114 */ 2725 u_src1_ch1_stride src1_ch1_stride; /* 0x118 */ 2726 u_src1_imgsize src1_imgsize; /* 0x11c */ 2727 u_src1_fill src1_fill; /* 0x120 */ 2728 u_src1_alpha src1_alpha; /* 0x124 */ 2729 u_src1_pix_offset src1_pix_offset; /* 0x128 */ 2730 hi_u32 reserved_1[9]; /* 0x12c~0x14c 9 is the length of the resources */ 2731 u_src2_ctrl src2_ctrl; /* 0x150 */ 2732 u_src2_ch0_addr_high src2_ch0_addr_high; /* 0x154 */ 2733 u_src2_ch0_addr_low src2_ch0_addr_low; /* 0x158 */ 2734 u_src2_ch1_addr_high src2_ch1_addr_high; /* 0x15c */ 2735 u_src2_ch1_addr_low src2_ch1_addr_low; /* 0x160 */ 2736 u_src2_ch0_stride src2_ch0_stride; /* 0x164 */ 2737 u_src2_ch1_stride src2_ch1_stride; /* 0x168 */ 2738 u_src2_imgsize src2_imgsize; /* 0x16c */ 2739 u_src2_fill src2_fill; /* 0x170 */ 2740 u_src2_alpha src2_alpha; /* 0x174 */ 2741 u_src2_pix_offset src2_pix_offset; /* 0x178 */ 2742 hi_u32 reserved_2[33]; /* 0x17c~0x1fc 33 is the length of the resources */ 2743 hi_u32 gdc3_ctrl; /* 0x200 */ 2744 hi_u32 gdc3_addr_high; /* 0x204 */ 2745 hi_u32 gdc3_addr_low; /* 0x208 */ 2746 hi_u32 gdc3_stride; /* 0x20c */ 2747 hi_u32 gdc3_imgsize; /* 0x210 */ 2748 hi_u32 gdc3_fill; /* 0x214 */ 2749 hi_u32 gdc3_alpha; /* 0x218 */ 2750 hi_u32 gdc3_pix_offset; /* 0x21c */ 2751 hi_u32 gdc4_ctrl; /* 0x220 */ 2752 hi_u32 gdc4_addr_high; /* 0x224 */ 2753 hi_u32 gdc4_addr_low; /* 0x228 */ 2754 hi_u32 gdc4_stride; /* 0x22c */ 2755 hi_u32 gdc4_imgsize; /* 0x230 */ 2756 hi_u32 gdc4_fill; /* 0x234 */ 2757 hi_u32 gdc4_alpha; /* 0x238 */ 2758 hi_u32 gdc4_pix_offset; /* 0x23c */ 2759 hi_u32 gdc5_ctrl; /* 0x240 */ 2760 hi_u32 gdc5_addr_high; /* 0x244 */ 2761 hi_u32 gdc5_addr_low; /* 0x248 */ 2762 hi_u32 gdc5_stride; /* 0x24c */ 2763 hi_u32 gdc5_imgsize; /* 0x250 */ 2764 hi_u32 gdc5_fill; /* 0x254 */ 2765 hi_u32 gdc5_alpha; /* 0x258 */ 2766 hi_u32 gdc5_pix_offset; /* 0x25c */ 2767 hi_u32 gdc6_ctrl; /* 0x260 */ 2768 hi_u32 gdc6_addr_high; /* 0x264 */ 2769 hi_u32 gdc6_addr_low; /* 0x268 */ 2770 hi_u32 gdc6_stride; /* 0x26c */ 2771 hi_u32 gdc6_imgsize; /* 0x270 */ 2772 hi_u32 gdc6_fill; /* 0x274 */ 2773 hi_u32 gdc6_alpha; /* 0x278 */ 2774 hi_u32 gdc6_pix_offset; /* 0x27c */ 2775 hi_u32 gdc7_ctrl; /* 0x280 */ 2776 hi_u32 gdc7_addr_high; /* 0x284 */ 2777 hi_u32 gdc7_addr_low; /* 0x288 */ 2778 hi_u32 gdc7_stride; /* 0x28c */ 2779 hi_u32 gdc7_imgsize; /* 0x290 */ 2780 hi_u32 gdc7_fill; /* 0x294 */ 2781 hi_u32 gdc7_alpha; /* 0x298 */ 2782 hi_u32 gdc7_pix_offset; /* 0x29c */ 2783 u_des_ctrl des_ctrl; /* 0x2a0 */ 2784 u_des_ch0_addr_high des_ch0_addr_high; /* 0x2a4 */ 2785 u_des_ch0_addr_low des_ch0_addr_low; /* 0x2a8 */ 2786 u_des_ch1_addr_high des_ch1_addr_high; /* 0x2ac */ 2787 u_des_ch1_addr_low des_ch1_addr_low; /* 0x2b0 */ 2788 u_des_ch0_stride des_ch0_stride; /* 0x2b4 */ 2789 u_des_ch1_stride des_ch1_stride; /* 0x2b8 */ 2790 u_des_imgsize des_imgsize; /* 0x2bc */ 2791 u_des_alpha des_alpha; /* 0x2c0 */ 2792 u_des_crop_pos_st des_crop_pos_st; /* 0x2c4 */ 2793 u_des_crop_pos_ed des_crop_pos_ed; /* 0x2c8 */ 2794 u_des_pix_offset des_pix_offset; /* 0x2cc */ 2795 hi_u32 reserved_3[12]; /* 0x2d0~0x2fc 12 is the length of the resources */ 2796 u_src1_hsp src1_hsp; /* 0x300 */ 2797 u_src1_hloffset src1_hloffset; /* 0x304 */ 2798 u_src1_hcoffset src1_hcoffset; /* 0x308 */ 2799 u_src1_vsp src1_vsp; /* 0x30c */ 2800 u_src1_vsr src1_vsr; /* 0x310 */ 2801 u_src1_voffset src1_voffset; /* 0x314 */ 2802 u_src1_zmeoreso src1_zmeoreso; /* 0x318 */ 2803 u_src1_zmeireso src1_zmeireso; /* 0x31c */ 2804 u_src1_hpzme src1_hpzme; /* 0x320 */ 2805 u_src1_hpzme_size src1_hpzme_size; /* 0x324 */ 2806 u_src1_csc_idc0 src1_csc_idc0; /* 0x328 */ 2807 u_src1_csc_idc1 src1_csc_idc1; /* 0x32c */ 2808 u_src1_csc_odc0 src1_csc_odc0; /* 0x330 */ 2809 u_src1_csc_odc1 src1_csc_odc1; /* 0x334 */ 2810 u_src1_csc_p0 src1_csc_p0; /* 0x338 */ 2811 u_src1_csc_p1 src1_csc_p1; /* 0x33c */ 2812 u_src1_csc_p2 src1_csc_p2; /* 0x340 */ 2813 u_src1_csc_p3 src1_csc_p3; /* 0x344 */ 2814 u_src1_csc_p4 src1_csc_p4; /* 0x348 */ 2815 u_src1_dither_ctrl src1_dither_ctrl; /* 0x34c */ 2816 u_src2_hsp src2_hsp; /* 0x350 */ 2817 hi_s32 src2_hloffset; /* 0x354 */ 2818 hi_s32 src2_hcoffset; /* 0x358 */ 2819 u_src2_vsp src2_vsp; /* 0x35c */ 2820 u_src2_vsr src2_vsr; /* 0x360 */ 2821 u_src2_voffset src2_voffset; /* 0x364 */ 2822 u_src2_zmeoreso src2_zmeoreso; /* 0x368 */ 2823 u_src2_zmeireso src2_zmeireso; /* 0x36c */ 2824 u_src2_hpzme src2_hpzme; /* 0x370 */ 2825 u_src2_hpzme_size src2_hpzme_size; /* 0x374 */ 2826 u_src2_csc_mux src2_csc_mux; /* 0x378 */ 2827 u_des_csc_idc0 des_csc_idc0; /* 0x37c */ 2828 u_des_csc_idc1 des_csc_idc1; /* 0x380 */ 2829 u_des_csc_odc0 des_csc_odc0; /* 0x384 */ 2830 u_des_csc_odc1 des_csc_odc1; /* 0x388 */ 2831 u_des_csc_p0 des_csc_p0; /* 0x38c */ 2832 u_des_csc_p1 des_csc_p1; /* 0x390 */ 2833 u_des_csc_p2 des_csc_p2; /* 0x394 */ 2834 u_des_csc_p3 des_csc_p3; /* 0x398 */ 2835 u_des_csc_p4 des_csc_p4; /* 0x39c */ 2836 u_des_dither_ctrl dst_dither_ctrl; /* 0x3a0 */ 2837 u_des_dswm des_dswm; /* 0x3a4 */ 2838 hi_u32 reserved_4[18]; /* 0x3a8~0x3ec 18 is the length of the resources */ 2839 u_src2_rtt_ctrl src2_rtt_ctrl; /* 0x3f0 */ 2840 hi_u32 reserved_5[3]; /* 0x3f4~0x3fc 3 is the length of the resources */ 2841 u_cbmctrl cbmctrl; /* 0x400 */ 2842 u_cbmbkg cbmbkg; /* 0x404 */ 2843 u_cbmcolorize cbmcolorize; /* 0x408 */ 2844 u_cbmalupara cbmalupara; /* 0x40c */ 2845 u_cbmkeypara cbmkeypara; /* 0x410 */ 2846 u_cbmkeymin cbmkeymin; /* 0x414 */ 2847 u_cbmkeymax cbmkeymax; /* 0x418 */ 2848 u_cbmkeymask cbmkeymask; /* 0x41c */ 2849 u_src1_cbmpara src1_cbmpara; /* 0x420 */ 2850 u_src1_cbmstpos src1_cbmstpos; /* 0x424 */ 2851 u_src2_cbmpara src2_cbmpara; /* 0x428 */ 2852 } tde_hw_node; 2853 2854 #else 2855 typedef struct { 2856 u_src1_ctrl src1_ctrl; /* 0x0 */ 2857 u_src1_ch0_addr_high src1_ch0_addr_high; /* 0x4 */ 2858 u_src1_ch0_addr_low src1_ch0_addr_low; /* 0x8 */ 2859 u_src1_ch1_addr_high src1_ch1_addr_high; /* 0xc */ 2860 u_src1_ch1_addr_low src1_ch1_addr_low; /* 0x10 */ 2861 u_src1_ch0_stride src1_ch0_stride; /* 0x14 */ 2862 u_src1_ch1_stride src1_ch1_stride; /* 0x18 */ 2863 u_src1_imgsize src1_imgsize; /* 0x1c */ 2864 u_src1_fill src1_fill; /* 0x20 */ 2865 u_src1_alpha src1_alpha; /* 0x24 */ 2866 u_src1_pix_offset src1_pix_offset; /* 0x28 */ 2867 u_src2_ctrl src2_ctrl; /* 0x2c */ 2868 u_src2_ch0_addr_high src2_ch0_addr_high; /* 0x30 */ 2869 u_src2_ch0_addr_low src2_ch0_addr_low; /* 0x34 */ 2870 u_src2_ch1_addr_high src2_ch1_addr_high; /* 0x38 */ 2871 u_src2_ch1_addr_low src2_ch1_addr_low; /* 0x3c */ 2872 u_src2_ch0_stride src2_ch0_stride; /* 0x40 */ 2873 u_src2_ch1_stride src2_ch1_stride; /* 0x44 */ 2874 u_src2_imgsize src2_imgsize; /* 0x48 */ 2875 u_src2_fill src2_fill; /* 0x4c */ 2876 u_src2_alpha src2_alpha; /* 0x50 */ 2877 u_src2_pix_offset src2_pix_offset; /* 0x54 */ 2878 hi_u32 gdc3_ctrl; /* 0x58 */ 2879 hi_u32 gdc3_addr_high; /* 0x5c */ 2880 hi_u32 gdc3_addr_low; /* 0x60 */ 2881 hi_u32 gdc3_stride; /* 0x64 */ 2882 hi_u32 gdc3_imgsize; /* 0x68 */ 2883 hi_u32 gdc3_fill; /* 0x6c */ 2884 hi_u32 gdc3_alpha; /* 0x70 */ 2885 hi_u32 gdc3_pix_offset; /* 0x74 */ 2886 hi_u32 gdc4_ctrl; /* 0x78 */ 2887 hi_u32 gdc4_addr_high; /* 0x7c */ 2888 hi_u32 gdc4_addr_low; /* 0x80 */ 2889 hi_u32 gdc4_stride; /* 0x84 */ 2890 hi_u32 gdc4_imgsize; /* 0x88 */ 2891 hi_u32 gdc4_fill; /* 0x8c */ 2892 hi_u32 gdc4_alpha; /* 0x90 */ 2893 hi_u32 gdc4_pix_offset; /* 0x94 */ 2894 hi_u32 gdc5_ctrl; /* 0x98 */ 2895 hi_u32 gdc5_addr_high; /* 0x9C */ 2896 hi_u32 gdc5_addr_low; /* 0xA0 */ 2897 hi_u32 gdc5_stride; /* 0xA4 */ 2898 hi_u32 gdc5_imgsize; /* 0xA8 */ 2899 hi_u32 gdc5_fill; /* 0xAC */ 2900 hi_u32 gdc5_alpha; /* 0xB0 */ 2901 hi_u32 gdc5_pix_offset; /* 0xB4 */ 2902 hi_u32 gdc6_ctrl; /* 0xB8 */ 2903 hi_u32 gdc6_addr_high; /* 0xBC */ 2904 hi_u32 gdc6_addr_low; /* 0xC0 */ 2905 hi_u32 gdc6_stride; /* 0xC4 */ 2906 hi_u32 gdc6_imgsize; /* 0xC8 */ 2907 hi_u32 gdc6_fill; /* 0xCc */ 2908 hi_u32 gdc6_alpha; /* 0xD0 */ 2909 hi_u32 gdc6_pix_offset; /* 0xD4 */ 2910 hi_u32 gdc7_ctrl; /* 0xD8 */ 2911 hi_u32 gdc7_addr_high; /* 0xDC */ 2912 hi_u32 gdc7_addr_low; /* 0xE0 */ 2913 hi_u32 gdc7_stride; /* 0xE4 */ 2914 hi_u32 gdc7_imgsize; /* 0xE8 */ 2915 hi_u32 gdc7_fill; /* 0xEC */ 2916 hi_u32 gdc7_alpha; /* 0xF0 */ 2917 hi_u32 gdc7_pix_offset; /* 0xF4 */ 2918 u_des_ctrl des_ctrl; /* 0xF8 */ 2919 u_des_ch0_addr_high des_ch0_addr_high; /* 0xFC */ 2920 u_des_ch0_addr_low des_ch0_addr_low; /* 0x100 */ 2921 u_des_ch1_addr_high des_ch1_addr_high; /* 0x104 */ 2922 u_des_ch1_addr_low des_ch1_addr_low; /* 0x108 */ 2923 u_des_ch0_stride des_ch0_stride; /* 0x10C */ 2924 u_des_ch1_stride des_ch1_stride; /* 0x110 */ 2925 u_des_imgsize des_imgsize; /* 0x114 */ 2926 u_des_alpha des_alpha; /* 0x118 */ 2927 u_des_crop_pos_st des_crop_pos_st; /* 0x11c */ 2928 u_des_crop_pos_ed des_crop_pos_ed; /* 0x120 */ 2929 u_des_pix_offset des_pix_offset; /* 0x124 */ 2930 hi_u32 reserved_1[54]; /* 0x128~0x1fc 54 is the length of the resources */ 2931 u_src1_hsp src1_hsp; /* 0x200 */ 2932 hi_s32 src1_hloffset; /* 0x204 */ 2933 hi_s32 src1_hcoffset; /* 0x208 */ 2934 u_src1_vsp src1_vsp; /* 0x20c */ 2935 u_src1_vsr src1_vsr; /* 0x210 */ 2936 u_src1_voffset src1_voffset; /* 0x214 */ 2937 u_src1_zmeoreso src1_zmeoreso; /* 0x218 */ 2938 u_src1_zmeireso src1_zmeireso; /* 0x21c */ 2939 hi_u32 reserved_2[2]; /* 0x220~0x224 2 is the length of the resources */ 2940 u_src1_hpzme src1_hpzme; /* 0x228 */ 2941 u_src1_hpzme_size src1_hpzme_size; /* 0x22c */ 2942 2943 #if (HICHIP == HI3519A_V100) 2944 u_src1_csc_idc0 src1_csc_idc0; /* 0x230 */ 2945 u_src1_csc_idc1 src1_csc_idc1; /* 0x234 */ 2946 u_src1_csc_odc0 src1_csc_odc0; /* 0x238 */ 2947 u_src1_csc_odc1 src1_csc_odc1; /* 0x23c */ 2948 u_src1_csc_p0 src1_csc_p0; /* 0x240 */ 2949 u_src1_csc_p1 src1_csc_p1; /* 0x244 */ 2950 u_src1_csc_p2 src1_csc_p2; /* 0x248 */ 2951 u_src1_csc_p3 src1_csc_p3; /* 0x24c */ 2952 u_src1_csc_p4 src1_csc_p4; /* 0x250 */ 2953 u_src1_dither_ctrl src1_dither_ctrl; /* 0x254 */ 2954 hi_u32 reserved_3[10]; /* 0x258~0x27c 10 is the length of the resources */ 2955 #else 2956 u_src1_csc_idc src1_csc_idc; /* 0x230 */ 2957 u_src1_csc_odc src1_csc_odc; /* 0x234 */ 2958 u_src1_csc_p0 src1_csc_p0; /* 0x238 */ 2959 u_src1_csc_p1 src1_csc_p1; /* 0x23c */ 2960 u_src1_csc_p2 src1_csc_p2; /* 0x240 */ 2961 u_src1_csc_p3 src1_csc_p3; /* 0x244 */ 2962 u_src1_csc_p4 src1_csc_p4; /* 0x248 */ 2963 hi_u32 reserved_3[13]; /* 0x24c~0x27c 13 is the length of the resources */ 2964 #endif 2965 u_src2_hsp src2_hsp; /* 0x280 */ 2966 hi_s32 src2_hloffset; /* 0x284 */ 2967 hi_s32 src2_hcoffset; /* 0x288 */ 2968 u_src2_vsp src2_vsp; /* 0x28c */ 2969 u_src2_vsr src2_vsr; /* 0x290 */ 2970 u_src2_voffset src2_voffset; /* 0x294 */ 2971 u_src2_zmeoreso src2_zmeoreso; /* 0x298 */ 2972 u_src2_zmeireso src2_zmeireso; /* 0x29c */ 2973 hi_u32 reserved_4[2]; /* 0x2a0~0x2a4 2 is the length of the resources */ 2974 u_src2_hpzme src2_hpzme; /* 0x2a8 */ 2975 u_src2_hpzme_size src2_hpzme_size; /* 0x2ac */ 2976 u_src2_csc_mux src2_csc_mux; /* 0x2b0 */ 2977 2978 #if (HICHIP == HI3519A_V100) 2979 u_des_csc_idc0 des_csc_idc0; /* 0x2b4 */ 2980 u_des_csc_idc1 des_csc_idc1; /* 0x2b8 */ 2981 u_des_csc_odc0 des_csc_odc0; /* 0x2bc */ 2982 u_des_csc_odc1 des_csc_odc1; /* 0x2c0 */ 2983 u_des_csc_p0 des_csc_p0; /* 0x2c4 */ 2984 u_des_csc_p1 des_csc_p1; /* 0x2c8 */ 2985 u_des_csc_p2 des_csc_p2; /* 0x2cc */ 2986 u_des_csc_p3 des_csc_p3; /* 0x2d0 */ 2987 u_des_csc_p4 des_csc_p4; /* 0x2d4 */ 2988 u_des_dither_ctrl dst_dither_ctrl; /* 0x2d8 */ 2989 #else 2990 hi_u32 reserved_5[3]; /* 0x2b4~0x2bc 3 is the length of the resources */ 2991 u_des_csc_idc des_csc_idc; /* 0x2c0 */ 2992 u_des_csc_odc des_csc_odc; /* 0x2c4 */ 2993 u_des_csc_p0 des_csc_p0; /* 0x2c8 */ 2994 u_des_csc_p1 des_csc_p1; /* 0x2cc */ 2995 u_des_csc_p2 des_csc_p2; /* 0x2d0 */ 2996 u_des_csc_p3 des_csc_p3; /* 0x2d4 */ 2997 u_des_csc_p4 des_csc_p4; /* 0x2d8 */ 2998 #endif 2999 u_des_dswm des_dswm; /* 0x2dc */ 3000 hi_u32 reserved_6[8]; /* 0x2e0~0x2fc 8 is the length of the resources */ 3001 u_cbmctrl cbmctrl; /* 0x300 */ 3002 u_cbmbkg cbmbkg; /* 0x304 */ 3003 u_cbmcolorize cbmcolorize; /* 0x308 */ 3004 u_cbmalupara cbmalupara; /* 0x30c */ 3005 u_cbmkeypara cbmkeypara; /* 0x310 */ 3006 u_cbmkeymin cbmkeymin; /* 0x314 */ 3007 u_cbmkeymax cbmkeymax; /* 0x318 */ 3008 u_cbmkeymask cbmkeymask; /* 0x31c */ 3009 u_src1_cbmpara src1_cbmpara; /* 0x320 */ 3010 hi_u32 src1_cbmstpos; /* 0x324 */ 3011 u_src2_cbmpara src2_cbmpara; /* 0x328 */ 3012 hi_u32 src2_cbmstpos; /* 0x32c */ 3013 hi_u32 gdc3_cbmpara; /* 0x330 */ 3014 hi_u32 gdc3_cbmstpos; /* 0x334 */ 3015 hi_u32 gdc4_cbmpara; /* 0x338 */ 3016 hi_u32 gdc4_cbmstpos; /* 0x33c */ 3017 hi_u32 gdc5_cbmpara; /* 0x340 */ 3018 hi_u32 gdc5_cbmstpos; /* 0x344 */ 3019 hi_u32 gdc6_cbmpara; /* 0x348 */ 3020 hi_u32 gdc6_cbmstpos; /* 0x34c */ 3021 hi_u32 gdc7_cbmpara; /* 0x350 */ 3022 hi_u32 gdc7_cbmstpos; /* 0x354 */ 3023 hi_u32 reserved_7[38]; /* 0x358~0x3ec 38 is the length of the resources */ 3024 u_src2_rtt_ctrl src2_rtt_ctrl; /* 0x3f0 */ 3025 hi_u32 reserved_8[35]; /* 0x3f4~0x47c 35 is the length of the resources */ 3026 hi_u32 tde_src1_zme_lhaddr_high; /* 0x480 */ 3027 hi_u32 tde_src1_zme_lhaddr_low; /* 0x484 */ 3028 hi_u32 tde_src1_zme_lvaddr_high; /* 0x488 */ 3029 hi_u32 tde_src1_zme_lvaddr_low; /* 0x48C */ 3030 hi_u32 tde_src1_zme_chaddr_high; /* 0x490 */ 3031 hi_u32 tde_src1_zme_chaddr_low; /* 0x494 */ 3032 hi_u32 tde_src1_zme_cvaddr_high; /* 0x498 */ 3033 hi_u32 tde_src1_zme_cvaddr_low; /* 0x49c */ 3034 hi_u32 tde_src2_zme_lhaddr_high; /* 0x4A0 */ 3035 hi_u32 tde_src2_zme_lhaddr_low; /* 0x4A4 */ 3036 hi_u32 tde_src2_zme_lvaddr_high; /* 0x4A8 */ 3037 hi_u32 tde_src2_zme_lvaddr_low; /* 0x4AC */ 3038 hi_u32 tde_src2_zme_chaddr_high; /* 0x4B0 */ 3039 hi_u32 tde_src2_zme_chaddr_low; /* 0x4B4 */ 3040 hi_u32 tde_src2_zme_cvaddr_high; /* 0x4B8 */ 3041 hi_u32 tde_src2_zme_cvaddr_low; /* 0x4Bc */ 3042 hi_u32 tde_clut_addr_high; /* 0x4C0 */ 3043 hi_u32 tde_clut_addr_low; /* 0x4C4 */ 3044 hi_u32 tde_axiid; /* 0x4C8 */ 3045 hi_u32 tde_nodeid; /* 0x4CC */ 3046 u_tde_intmask tde_intmask; /* 0x4D0 */ 3047 3048 hi_u32 reserved_9[9]; /* 0x3D4~0x4F4 9 is the length of the resources */ 3049 u_tde_pnext_hi tde_pnext_hi; /* 0x4f8 */ 3050 u_tde_pnext_low tde_pnext_low; /* 0x4fc */ 3051 u_tde_start tde_start; /* 0x500 */ 3052 u_tde_intstate tde_intstate; /* 0x504 */ 3053 u_tde_intclr tde_intclr_; /* 0x508 */ 3054 u_tde_rawint tde_rawint; /* 0x50c */ 3055 u_tde_pfcnt tde_pfcnt; /* 0x510 */ 3056 u_tde_miscellaneous tde_miscellaneous_; /* 0x514 */ 3057 u_tde_maccfg tde_maccfg; /* 0x518 */ 3058 u_tde_timeout tde_timeout; /* 0x51c */ 3059 u_tde_eofcnt tde_eofcnt; /* 0x520 */ 3060 u_tde_memctrl tde_memctrl; /* 0x524 */ 3061 hi_u32 tde_memctrl1; /* 0x528 */ 3062 3063 hi_u32 reserved_10[53]; /* 0x528~0x3ffc 53 is the length of the resources */ 3064 3065 u_tde_od_pic_osd_glb_info tde_od_pic_osd_glb_info; /* 0x600 */ 3066 u_tde_od_pic_osd_frame_size tde_od_pic_osd_frame_size; /* 0x604 */ 3067 u_tde_od_pic_osd_rc_cfg0 tde_od_pic_osd_rc_cfg0; /* 0x608 */ 3068 u_tde_od_pic_osd_rc_cfg1 tde_od_pic_osd_rc_cfg1; /* 0x60c */ 3069 u_tde_od_pic_osd_rc_cfg2 tde_od_pic_osd_rc_cfg2; /* 0x610 */ 3070 u_tde_od_pic_osd_rc_cfg3 tde_od_pic_osd_rc_cfg3; /* 0x614 */ 3071 u_tde_od_pic_osd_rc_cfg4 tde_od_pic_osd_rc_cfg4; /* 0x618 */ 3072 u_tde_od_pic_osd_rc_cfg5 tde_od_pic_osd_rc_cfg5; /* 0x61c */ 3073 u_tde_od_pic_osd_rc_cfg6 tde_od_pic_osd_rc_cfg6; /* 0x620 */ 3074 u_tde_od_pic_osd_rc_cfg7 tde_od_pic_osd_rc_cfg7; /* 0x624 */ 3075 u_tde_od_pic_osd_rc_cfg8 tde_od_pic_osd_rc_cfg8; /* 0x628 */ 3076 u_tde_od_pic_osd_rc_cfg9 tde_od_pic_osd_rc_cfg9; /* 0x62c */ 3077 u_tde_od_pic_osd_rc_cfg10 tde_od_pic_osd_rc_cfg10; /* 0x630 */ 3078 #if (HICHIP != HI3519A_V100) 3079 u_tde_od_pic_osd_rc_cfg11 tde_od_pic_osd_rc_cfg11; /* 0x634 */ 3080 u_tde_od_pic_osd_rc_cfg12 tde_od_pic_osd_rc_cfg12; /* 0x638 */ 3081 u_tde_od_pic_osd_rc_cfg13 tde_od_pic_osd_rc_cfg13; /* 0x63c */ 3082 u_tde_od_pic_osd_rc_cfg14 tde_od_pic_osd_rc_cfg14; /* 0x640 */ 3083 u_tde_od_pic_osd_rc_cfg15 tde_od_pic_osd_rc_cfg15; /* 0x644 */ 3084 u_tde_od_pic_osd_rc_cfg16 tde_od_pic_osd_rc_cfg16; /* 0x648 */ 3085 u_tde_od_pic_osd_rc_cfg17 tde_od_pic_osd_rc_cfg17; /* 0x64c */ 3086 u_tde_od_pic_osd_rc_cfg18 tde_od_pic_osd_rc_cfg18; /* 0x650 */ 3087 u_tde_od_pic_osd_rc_cfg19 tde_od_pic_osd_rc_cfg19; /* 0x654 */ 3088 hi_u32 reserved_11[2]; /* 0x658~0x65c 2 is the length of the resources */ 3089 u_tde_od_pic_osd_stat_thr tde_od_pic_osd_stat_thr; /* 0x660 */ 3090 u_tde_od_pic_osd_pcmp tde_od_pic_osd_pcmp; /* 0x664 */ 3091 u_tde_od_pic_osd_rc_cfg20 tde_od_pic_osd_rc_cfg20; /* 0x668 */ 3092 u_tde_od_pic_osd_rc_cfg21 tde_od_pic_osd_rc_cfg21; /* 0x66c */ 3093 u_tde_od_pic_osd_rc_cfg22 tde_od_pic_osd_rc_cfg22; /* 0x670 */ 3094 u_tde_od_pic_osd_rc_cfg23 tde_od_pic_osd_rc_cfg23; /* 0x674 */ 3095 #endif 3096 } tde_hw_node; 3097 #endif 3098 3099 typedef enum { 3100 TDE_DRV_INT_NODE = 0x1, 3101 TDE_DRV_INT_TIMEOUT = 0x2, 3102 TDE_DRV_INT_ERROR = 0x4, 3103 TDE_DRV_INT_NODE_COMP_AQ = 0x8, 3104 } tde_drv_int; 3105 3106 typedef enum { 3107 HIGFX_TDE_ID = 0, /* < TDE ID */ 3108 HIGFX_JPGDEC_ID, /* < JPEG DECODE ID */ 3109 HIGFX_JPGENC_ID, /* < JPEG_ENCODE ID */ 3110 HIGFX_FB_ID, /* < FRAMEBUFFER ID */ 3111 HIGFX_PNG_ID, /* < PNG ID */ 3112 HIGFX_HIGO_ID, 3113 HIGFX_GFX2D_ID, 3114 HIGFX_BUTT_ID, 3115 } higfx_mode_id; 3116 3117 #define conver_id(module_id) ((module_id) + HI_ID_TDE - HIGFX_TDE_ID) 3118 3119 #define CONFIG_TDE_TDE_EXPORT_FUNC 3120 3121 #define TDE_NO_SCALE_VSTEP 0x1000 3122 #define TDE_NO_SCALE_HSTEP 0x100000 3123 #define TDE_FLOAT_BITLEN 12 3124 #define TDE_HAL_HSTEP_FLOATLEN 20 3125 #define TDE_HAL_VSTEP_FLOATLEN 12 3126 #define TDE_MAX_SLICE_WIDTH 256 3127 #define TDE_MAX_SLICE_NUM 20 3128 #define TDE_MAX_SURFACE_PITCH 0xffff 3129 #define TDE_MAX_ZOOM_OUT_STEP 8 3130 #define TDE_MAX_RECT_WIDTH_EX 0x2000 3131 #define TDE_MAX_RECT_HEIGHT_EX 0x2000 3132 3133 #define TDE_MAX_RECT_WIDTH 0x1000 3134 #define TDE_MAX_RECT_HEIGHT 0x1000 3135 3136 #define TDE_MAX_SLICE_RECT_WIDTH 0xfff 3137 #define TDE_MAX_SLICE_RECT_HEIGHT 0xfff 3138 3139 #define TDE_MAX_MINIFICATION_H 255 3140 #define TDE_MAX_MINIFICATION_V 255 3141 3142 #define ROP 0x1 /* Rop */ 3143 #define ALPHABLEND (0x1 << 1) /* AlphaBlend */ 3144 #define COLORIZE (0x1 << 2) /* Colorize */ 3145 #define CLUT (0x1 << 3) /* Clut */ 3146 #define COLORKEY (0x1 << 4) /* ColorKey */ 3147 #define CLIP (0x1 << 5) /* Clip */ 3148 #define DEFLICKER (0x1 << 6) /* Deflicker */ 3149 #define RESIZE (0x1 << 7) /* Resize */ 3150 #define MIRROR (0x1 << 8) /* Mirror */ 3151 #define CSCCOVERT (0x1 << 9) /* CSC */ 3152 #define QUICKCOPY (0x1 << 10) /* Quick copy */ 3153 #define QUICKFILL (0x1 << 11) /* Rapid filling */ 3154 #define PATTERFILL (0x1 << 12) /* Pattern fill */ 3155 #define MASKROP (0x1 << 13) /* MaskRop */ 3156 #define MASKBLEND (0x1 << 14) /* MaskBlend */ 3157 #define ROTATE (0x1 << 15) /* Rotate */ 3158 #define COMPRESS (0x1 << 16) /* Compress */ 3159 #define SYNC (0x1 << 17) /* Sync */ 3160 #define SLICE (0x1 << 18) /* Slice */ 3161 3162 hi_s32 tde_hal_get_capability(hi_u32 *capability); 3163 3164 #if (HICHIP == HI3516C_V500) 3165 #define TDE_CAPABILITY \ 3166 (ALPHABLEND | CLUT | COLORKEY | COLORIZE | RESIZE | CLIP | MIRROR | CSCCOVERT | QUICKFILL | QUICKCOPY | \ 3167 PATTERFILL | ROTATE | ROP) 3168 #else 3169 #define TDE_CAPABILITY \ 3170 (ALPHABLEND | CLUT | COLORKEY | DEFLICKER | COLORIZE | RESIZE | CLIP | MIRROR | CSCCOVERT | QUICKFILL | \ 3171 QUICKCOPY | PATTERFILL | ROTATE | ROP | MASKROP | MASKBLEND | COMPRESS) 3172 #endif 3173 3174 #ifdef __cplusplus 3175 #if __cplusplus 3176 } 3177 #endif /* __cplusplus */ 3178 #endif /* __cplusplus */ 3179 3180 #endif /* _TDE_ADP_H_ */ 3181