1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 #ifndef _REG_GOP_H_ 96 #define _REG_GOP_H_ 97 98 //------------------------------------------------------------------------------------------------- 99 // Hardware Capability 100 //------------------------------------------------------------------------------------------------- 101 102 103 //------------------------------------------------------------------------------------------------- 104 // Macro and Define 105 //------------------------------------------------------------------------------------------------- 106 //---------------------------------------------------------------------------- 107 // HW IP Reg Base Adr 108 //---------------------------------------------------------------------------- 109 #define GOP_REG_BASE 0x1F00UL 110 #define GE_REG_BASE 0x2800UL 111 #define SC1_REG_BASE 0x2F00UL 112 #define CKG_REG_BASE 0x0B00UL 113 #define MIU0_REG_BASE 0x0600UL 114 #define MIU_REG_BASE 0x1200UL 115 #define MIU2_REG_BASE 0x162000 116 #define MVOP_REG_BASE 0x1400UL 117 #define SC1_DIRREG_BASE 0x130000UL 118 #define AFBC_REG_BASE 0x113100 119 #define MANUAL_CROP_REG_BASE 0x137000 120 121 //---------------------------------------------------------------------------- 122 // Scaler Reg 123 //---------------------------------------------------------------------------- 124 #define XC_REG(bk, reg) (SC1_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2) 125 126 #define REG_SC_BK00_00_L XC_REG(0x00, 0x00) 127 #define REG_SC_BK00_05_L XC_REG(0x00, 0x05) 128 #define REG_SC_BK00_06_L XC_REG(0x00, 0x06) 129 #define REG_SC_BK01_02_L XC_REG(0x01, 0x02) 130 #define REG_SC_BK01_05_L XC_REG(0x01, 0x05) 131 #define REG_SC_BK01_1E_L XC_REG(0x01, 0x1E) 132 #define REG_SC_BK01_21_L XC_REG(0x01, 0x21) 133 #define REG_SC_BK02_5F_L XC_REG(0x02, 0x5F) 134 #define REG_SC_BK0F_2B_L XC_REG(0x0F, 0x2B) 135 #define REG_SC_BK10_23_L XC_REG(0x10, 0x23) 136 #define REG_SC_BK10_5B_L XC_REG(0x10, 0x5B) 137 #define REG_SC_BK12_03_L XC_REG(0x12, 0x03) 138 #define REG_SC_BK37_22_L XC_REG(0x37, 0x22) 139 #define REG_SC_BK37_24_L XC_REG(0x37, 0x24) 140 #define REG_SC_BK37_28_L XC_REG(0x37, 0x28) 141 #define REG_SC_BK3D_0D_L XC_REG(0x3D, 0x0D) 142 #define REG_SC_BK40_22_L XC_REG(0x40, 0x22) 143 #define REG_SC_BK40_23_L XC_REG(0x40, 0x23) 144 #define REG_SC_BK40_24_L XC_REG(0x40, 0x24) 145 #define REG_SC_BK40_25_L XC_REG(0x40, 0x25) 146 #define REG_SC_BK7F_10_L XC_REG(0x7F, 0x10) 147 #define REG_SC_BK7F_11_L XC_REG(0x7F, 0x11) 148 #define REG_SC_BK7F_18_L XC_REG(0x7F, 0x18) 149 #define REG_SC_BKC9_50_L XC_REG(0xC9, 0x50) 150 #define REG_SC_BKC9_51_L XC_REG(0xC9, 0x51) 151 #define REG_SC_BKC9_52_L XC_REG(0xC9, 0x52) 152 #define REG_SC_BKCB_48_L XC_REG(0xCB, 0x48) 153 154 #define REG_SC_BK80_05_L XC_REG(0x80, 0x05) 155 156 #define GOP_SC_BANKSEL REG_SC_BK00_00_L 157 #define GOP_SC_CHANNELSYNC REG_SC_BK00_05_L 158 #define GOP_SC1_CHANNELSYNC REG_SC_BK80_05_L 159 #define GOP_SC_GOPEN REG_SC_BK00_06_L 160 #define GOP_SC_IP_SYNC REG_SC_BK01_02_L 161 #define GOP_SC_IP_MAIN_HSTART REG_SC_BK01_05_L 162 #define GOP_SC_IP_MAIN_INTERLACE REG_SC_BK01_1E_L 163 #define GOP_SC_IP_MAIN_USR_INTERLACE REG_SC_BK01_21_L 164 #define GOP_SC_IP2GOP_SRCSEL REG_SC_BK02_5F_L 165 #define GOP_SC_OSD_CHECK_ALPHA REG_SC_BK0F_2B_L 166 #define GOP_SC_VOPNBL REG_SC_BK10_23_L 167 #define GOP_SC_GOPENMODE1 REG_SC_BK10_5B_L 168 #define GOP_SC_MIRRORCFG REG_SC_BK12_03_L 169 #define GOP_SC_OCMIXER REG_SC_BK37_22_L 170 #define GOP_SC_OCMISC REG_SC_BK37_24_L 171 #define GOP_SC_OCALPHA REG_SC_BK37_28_L 172 #define GOP_SC_FRC_LAYER1_L_EN REG_SC_BK40_22_L 173 #define GOP_SC_FRC_LAYER1_R_EN REG_SC_BK40_23_L 174 #define GOP_SC_FRC_LAYER2_L_EN REG_SC_BK40_24_L 175 #define GOP_SC_FRC_LAYER2_R_EN REG_SC_BK40_25_L 176 #define GOP_SC_MIU_SEL REG_SC_BK7F_10_L 177 #define GOP_SC_MIU_IP_SEL REG_SC_BK7F_11_L 178 #define GOP_SC_4K120_EN0 REG_SC_BKC9_50_L 179 #define GOP_SC_4K120_EN1 REG_SC_BKC9_51_L 180 #define GOP_SC_4K120_EN2 REG_SC_BKC9_52_L 181 #define GOP_SC_GOP_HSYNC_START REG_SC_BKCB_48_L 182 //---------------------------------------------------------------------------- 183 // MVOP Reg 184 //---------------------------------------------------------------------------- 185 #define GOP_MVOP_MIRRORCFG (MVOP_REG_BASE+0x76) 186 187 188 189 //---------------------------------------------------------------------------- 190 // GE Reg 191 //---------------------------------------------------------------------------- 192 #define GOP_GE_FMT_BLT (GE_REG_BASE+(0x01*2)) 193 #define GOP_GE_EN_CMDQ BIT(0) 194 #define GOP_GE_EN_VCMDQ BIT(1) 195 196 #define GOP_GE_VQ_FIFO_STATUS_L (GE_REG_BASE+(0x04*2)) 197 #define GOP_GE_VQ_FIFO_STATUS_H (GE_REG_BASE+(0x05*2)) 198 199 #define GOP_GE_STATUS (GE_REG_BASE+(0x07*2)) 200 #define GOP_GE_BUSY BIT(0) 201 #define GOP_GE_CMDQ1_STATUS BMASK(7:3) 202 #define GOP_GE_CMDQ2_STATUS BMASK(15:11) 203 204 #define GOP_GE_TAG (GE_REG_BASE+(0x2C*2)) 205 206 #define GOP_GE_DBBASE0 (GE_REG_BASE+(0x26*2)) 207 #define GOP_GE_DBBASE1 (GE_REG_BASE+(0x27*2)) 208 #define GOP_GE_DBPIT (GE_REG_BASE+(0x33*2)) 209 #define GOP_GE_FBFMT (GE_REG_BASE+(0x34*2)) 210 #define GOP_GE_SRCW (GE_REG_BASE+(0x6e*2)) 211 #define GOP_GE_SRCH (GE_REG_BASE+(0x6f*2)) 212 213 214 //---------------------------------------------------------------------------- 215 // ChipTop Reg 216 //---------------------------------------------------------------------------- 217 /* GOP0 and GOP1 CLK */ 218 #define GOP_GOPCLK (CKG_REG_BASE+(0x40<<1)) 219 #define CKG_GOPG0_DISABLE_CLK ~(GOP_BIT0) 220 #define CKG_GOPG0_ODCLK (0<<2) 221 #define CKG_GOPG0_IDCLK2 (1 << 2) 222 #define CKG_GOPG0_IDCLK1 (2 << 2) 223 #define CKG_GOPG0_OCC_FRCCLK (3 << 2) 224 #define CKG_GOPG0_MIXERCLK_VE (4 << 2) 225 #define CKG_GOPG0_FCLK (8 << 2) 226 #define CKG_GOPG0_DISABLE_CLK_MASK (GOP_BIT0) 227 #define CKG_GOPG0_MASK (GOP_BIT5 | GOP_BIT4 | GOP_BIT3 | GOP_BIT2) 228 229 #define CKG_GOPG1_DISABLE_CLK ~(GOP_BIT8) 230 #define CKG_GOPG1_ODCLK (0 << 10) 231 #define CKG_GOPG1_IDCLK2 (1 << 10) 232 #define CKG_GOPG1_IDCLK1 (2 << 10) 233 #define CKG_GOPG1_OCC_FRCCLK (3 << 10) 234 #define CKG_GOPG1_MIXERCLK_VE (4 << 10) 235 #define CKG_GOPG1_FCLK (8 << 10) 236 #define CKG_GOPG1_DISABLE_CLK_MASK (GOP_BIT8) 237 #define CKG_GOPG1_MASK (GOP_BIT13 | GOP_BIT12 | GOP_BIT11 | GOP_BIT10) 238 239 #define CKG_GOPG0_SCALING (CKG_REG_BASE+0x88) 240 #define CKG_GOPG0_MG (CKG_REG_BASE+0xFE) 241 #define CKG_GOPG0_MG_MASK (GOP_BIT3 | GOP_BIT2) 242 #define CKG_GOPG2_MG_MASK (GOP_BIT7 | GOP_BIT6) 243 244 /* GOP2 and GOPDWIN CLK */ 245 #define GOP_GOP2CLK (CKG_REG_BASE+(0x41<<1)) 246 #define CKG_GOPG2_DISABLE_CLK ~(GOP_BIT0) 247 #define CKG_GOPG2_ODCLK (0<<2) 248 #define CKG_GOPG2_IDCLK2 (1 << 2) 249 #define CKG_GOPG2_IDCLK1 (2 << 2) 250 #define CKG_GOPG2_OCC_FRCCLK (3 << 2) 251 #define CKG_GOPG2_MIXERCLK_VE (4 << 2) 252 #define CKG_GOPG2_FCLK (8 << 2) 253 #define CKG_GOPG2_DISABLE_CLK_MASK (GOP_BIT0) 254 #define CKG_GOPG2_MASK (GOP_BIT5 |GOP_BIT4 | GOP_BIT3 | GOP_BIT2) 255 256 #define CKG_GOPD_CLK_IDCLK2 (0 << 10) 257 #define CKG_GOPD_CLK_ODCLK (1 << 10) 258 #define CKG_GOPD_CLK_DC0CLK (2 << 10) 259 #define CKG_GOPD_CLK_SUBDC0CLK (3 << 10) 260 #define CKG_GOPD_CLK_MIXERCLK_VE (4 << 10) 261 #define CKG_GOPD_MASK (GOP_BIT12 | GOP_BIT11 | GOP_BIT10) 262 263 264 /* GOP3 CLK*/ 265 #define GOP_GOP3CLK (CKG_REG_BASE+(0x42<<1)) 266 #define CKG_GOPG3_ODCLK (0<<2) 267 #define CKG_GOPG3_IDCLK2 (1 << 2) 268 #define CKG_GOPG3_IDCLK1 (2 << 2) 269 #define CKG_GOPG3_OCC_FRCCLK (3 << 2) 270 #define CKG_GOPG3_MIXERCLK_VE (4 << 2) 271 #define CKG_GOPG3_FCLK (8 << 2) 272 #define CKG_GOPG3_DISABLE_CLK_MASK (GOP_BIT0) 273 #define CKG_GOPG3_MASK (GOP_BIT5 | GOP_BIT4 | GOP_BIT3 | GOP_BIT2) 274 #define CKG_GOPD_DISABLE_CLK ~(GOP_BIT8) 275 276 277 /* GOP4 CLK*/ 278 #define GOP_GOP4CLK (CKG_REG_BASE+(0x7E<<1)) 279 #define CKG_GOPG4_ODCLK (0 << 10) 280 #define CKG_GOPG4_IDCLK2 (1 << 10) 281 #define CKG_GOPG4_IDCLK1 (2 << 10) 282 #define CKG_GOPG4_OCC_FRCCLK (3 << 10) 283 #define CKG_GOPG4_MIXERCLK_VE (4 << 10) 284 #define CKG_GOPG4_FCLK (9 << 10) 285 #define CKG_GOPG4_DISABLE_CLK_MASK (GOP_BIT8) 286 #define CKG_GOPG4_MASK (GOP_BIT13 |GOP_BIT12 | GOP_BIT11 | GOP_BIT10) 287 288 289 /* SRAM CLK */ 290 #define GOP_SRAMCLK (CKG_REG_BASE+(0x43<<1)) 291 #define CKG_SRAM0_DISABLE_CLK (GOP_BIT0) 292 #define CKG_SRAM1_DISABLE_CLK (GOP_BIT8) 293 #define CKG_SRAM0_MASK (GOP_BIT0|GOP_BIT1) 294 #define CKG_SRAM1_MASK (GOP_BIT8|GOP_BIT9) 295 296 /* LINE BUFFER SRAM CLK */ 297 #define GOP_LB_SRAMCLK (CKG_REG_BASE+(0x45<<1)) 298 #define CKG_LB_SRAM1_DISABLE_CLK (GOP_BIT0) /*GOP1*/ 299 #define CKG_LB_SRAM2_DISABLE_CLK (GOP_BIT4) /*GOP2*/ 300 #define CKG_LB_SRAM1_MASK (GOP_BIT2|GOP_BIT3) 301 #define CKG_LB_SRAM2_MASK (GOP_BIT6|GOP_BIT7) 302 303 /*AFBC CLK*/ 304 #define GOP_AFBCCLK (CKG_REG_BASE+(0x46<<1)) 305 #define CKG_AFBCCLK_DISABLE_CLK (GOP_BIT0) 306 #define CKG_AFBCCLK_432 (0 << 2) 307 #define CKG_AFBCCLK_216 (1 << 2) 308 #define CKG_AFBCCLK_DISABLE_CLK_MASK (GOP_BIT0|GOP_BIT1|GOP_BIT2|GOP_BIT3) 309 310 //---------------------------------------------------------------------------- 311 // MIU Reg 312 //---------------------------------------------------------------------------- 313 #define GOP_CLIENT_REG 0x7E 314 #define GOP_MIU_GROUP (MIU0_REG_BASE+(GOP_CLIENT_REG*2)) 315 316 #define USE_XCBANK_MIU_SELECT 1 317 #if USE_XCBANK_MIU_SELECT==1 318 #define GOP_MIU_GROUP1 REG_SC_BK7F_10_L 319 #define GOP_MIU_GROUP2 REG_SC_BK7F_18_L 320 #else 321 #define GOP_MIU_GROUP1 (MIU_REG_BASE+(GOP_CLIENT_REG*2)) 322 #define GOP_MIU_GROUP2 (MIU2_REG_BASE+(GOP_CLIENT_REG*2)) 323 #endif 324 325 /*Define each gop miu clint bit*/ 326 #define GOP_MIU_CLIENT_DWIN 0xFF 327 #define GOP_MIU_CLIENT_GOP0 0x5 328 #define GOP_MIU_CLIENT_GOP1 0x6 329 #define GOP_MIU_CLIENT_GOP2 0x7 330 #define GOP_MIU_CLIENT_GOP3 0x8 331 #define GOP_MIU_CLIENT_GOP4 0x6 332 #define GOP_MIU_CLIENT_GOP5 0xff 333 334 //---------------------------------------------------------------------------- 335 // VE Reg 336 //---------------------------------------------------------------------------- 337 #define GOP_VE_TVS_OSD_EN 0x60 338 #define GOP_VE_TVS_OSD1_EN 0x61 339 340 //---------------------------------------------------------------------------- 341 // GOP Reg 342 //---------------------------------------------------------------------------- 343 #define GOP_REG(bk, reg) (GOP_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2) 344 #define __GOP_REG(reg) (GOP_REG_BASE+(reg) * 2) 345 #define GOP_REG_DIRECT_BASE (0x120200) 346 #define GOP_REG_GOP4_BK_OFFSET 0x1900 347 #define GOP_REG_GOP4_GW_OFFSET 0x1C00 348 #define GOP_REG_GOP4_ST_OFFSET 0x1D00 349 350 #define GOP_REG_VAL(x) (1<<x) 351 352 //MUX Setting 353 #define GOP_MUX_SHIFT 0x3 354 #define GOP_REGMUX_MASK BMASK((GOP_MUX_SHIFT-1):0) 355 #define GOP_MUX0_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*0)) 356 #define GOP_MUX1_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*1)) 357 #define GOP_MUX2_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*2)) 358 #define GOP_MUX3_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*3)) 359 #define GOP_MUX4_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*4)) 360 361 //IP and VOP MUX Setting 362 #define GOP_IP_MAIN_MUX_SHIFT 0 363 #define GOP_IP_MAIN_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_MAIN_MUX_SHIFT 364 #define GOP_IP_SUB_MUX_SHIFT 3 365 #define GOP_IP_SUB_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_SUB_MUX_SHIFT 366 #define GOP_IP_VOP0_MUX_SHIFT 6 367 #define GOP_IP_VOP0_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP0_MUX_SHIFT 368 #define GOP_IP_VOP1_MUX_SHIFT 9 369 #define GOP_IP_VOP1_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP1_MUX_SHIFT 370 371 372 //IP and VOP MUX Setting 373 #define GOP_Mix_MUX0_SHIFT 0 374 #define GOP_Mix_MUX0_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_Mix_MUX0_SHIFT 375 #define GOP_Mix_MUX1_SHIFT 3 376 #define GOP_Mix_MUX1_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_Mix_MUX1_SHIFT 377 #define GOP_VE0_MUX_SHIFT 6 378 #define GOP_VE0_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_VE0_MUX_SHIFT 379 #define GOP_VE1_MUX_SHIFT 9 380 #define GOP_VE1_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_VE1_MUX_SHIFT 381 382 383 //4k2k FRC MUX Setting 384 #define GOP_FRC_MUX_SHIFT 0x3 385 #define GOP_FRC_REGMUX_MASK BMASK((GOP_MUX_SHIFT-1):0) 386 #define GOP_FRC_MUX0_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*0)) 387 #define GOP_FRC_MUX1_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*1)) 388 #define GOP_FRC_MUX2_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*2)) 389 #define GOP_FRC_MUX3_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*3)) 390 391 //4K@120 MUX Setting 392 #define GOP_4K120_MUX_COUNT 3 393 #define GOP_4K120_MUX_SHIFT 0x2 394 #define GOP_4K120_REGMUX_MASK BMASK((GOP_4K120_MUX_SHIFT-1):0) 395 #define GOP_4K120_MUX0_MASK (GOP_4K120_REGMUX_MASK<<(GOP_4K120_MUX_SHIFT*0)) 396 #define GOP_4K120_MUX1_MASK (GOP_4K120_REGMUX_MASK<<(GOP_4K120_MUX_SHIFT*1)) 397 #define GOP_4K120_MUX2_MASK (GOP_4K120_REGMUX_MASK<<(GOP_4K120_MUX_SHIFT*2)) 398 #define GOP_4K120MUX_MUX0 0 399 #define GOP_4K120MUX_MUX1 1 400 #define GOP_4K120MUX_MUX2 2 401 402 // for gwin color format mask 403 #define GOP_REG_COLORTYPE_MASK BMASK(4:0) 404 #define GOP_REG_COLORTYPE_SHIFT 4 405 406 //DIP Setting 407 #define GOP_DIP_MUX_SHIFT 12 408 #define GOP_DIP_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_DIP_MUX_SHIFT 409 410 #define GOP_BANK_OFFSET 0x3 411 #define GOP_4G_OFST 0x0 412 #define GOP_2G_OFST (0x1*GOP_BANK_OFFSET) 413 #define GOP_1G_OFST (0x2*GOP_BANK_OFFSET) 414 #define GOP_1GX_OFST (0x3*GOP_BANK_OFFSET) 415 #define GOP_DW_OFST (0x4*GOP_BANK_OFFSET) 416 #define GOP_1GS0_OFST 0xE 417 #define GOP_1GS1_OFST 0x11 418 #define GOP_AFBC_OFST 0x31 419 #define GOP_CROP_OFST 0x70 420 421 #define GOP_OFFSET_WR 8 422 #define GOP_VAL_WR GOP_REG_VAL(GOP_OFFSET_WR) 423 #define GOP_OFFSET_FWR 9 424 #define GOP_VAL_FWR GOP_REG_VAL(GOP_OFFSET_FWR) 425 #define GOP_OFFSET_FCLR 11 426 #define GOP_VAL_FCL GOP_REG_VAL(GOP_OFFSET_FCLR) 427 #define GOP4G_OFFSET_WR_ACK 12 428 #define GOP4G_VAL_WR_ACK GOP_REG_VAL(GOP4G_OFFSET_WR_ACK) 429 #define GOP2G_OFFSET_WR_ACK 13 430 #define GOP2G_VAL_WR_ACK GOP_REG_VAL(GOP2G_OFFSET_WR_ACK) 431 #define GOPD_OFFSET_WR_ACK 14 432 #define GOPD_VAL_WR_ACK GOP_REG_VAL(GOPD_OFFSET_WR_ACK) 433 #define GOP1G_OFFSET_WR_ACK 15 434 #define GOP1G_VAL_WR_ACK GOP_REG_VAL(GOPD_OFFSET_WR_ACK) 435 #define GOP_VAL_ACK(x) GOP_REG_VAL(GOP4G_OFFSET_WR_ACK+x) 436 437 #define GOP_4G_CTRL0 GOP_REG(GOP_4G_OFST, 0x00) 438 #define GOP_4G_CTRL1 GOP_REG(GOP_4G_OFST, 0x01) 439 #define GOP_4G_RATE GOP_REG(GOP_4G_OFST, 0x02) 440 #define GOP_4G_PALDATA_L GOP_REG(GOP_4G_OFST, 0x03) 441 #define GOP_4G_PALDATA_H GOP_REG(GOP_4G_OFST, 0x04) 442 #define GOP_4G_PALCTRL GOP_REG(GOP_4G_OFST, 0x05) 443 #define GOP_4G_REGDMA_END GOP_REG(GOP_4G_OFST, 0x06) 444 #define GOP_4G_REGDMA_STR GOP_REG(GOP_4G_OFST, 0x07) 445 #define GOP_4G_INT GOP_REG(GOP_4G_OFST, 0x08) 446 #define GOP_4G_HWSTATE GOP_REG(GOP_4G_OFST, 0x09) 447 #define GOP_4G_SVM_HSTR GOP_REG(GOP_4G_OFST, 0x0a) 448 #define GOP_4G_SVM_HEND GOP_REG(GOP_4G_OFST, 0x0b) 449 #define GOP_4G_SVM_VSTR GOP_REG(GOP_4G_OFST, 0x0c) 450 #define GOP_4G_SVM_VEND GOP_REG(GOP_4G_OFST, 0x0d) 451 #define GOP_4G_RDMA_HT GOP_REG(GOP_4G_OFST, 0x0e) 452 #define GOP_4G_HS_PIPE GOP_REG(GOP_4G_OFST, 0x0f) 453 #define GOP_4G_SLOW GOP_REG(GOP_4G_OFST, 0x10) 454 #define GOP_4G_BRI GOP_REG(GOP_4G_OFST, 0x11) 455 #define GOP_4G_CON GOP_REG(GOP_4G_OFST, 0x12) 456 #define GOP_4G_BW GOP_REG(GOP_4G_OFST, 0x19) 457 #define GOP_4G_NEW_BW GOP_REG(GOP_4G_OFST, 0x1C) 458 #define GOP_4G_SRAM_BORROW GOP_REG(GOP_4G_OFST, 0x1D) 459 #define GOP_4G_3D_MIDDLE GOP_REG(GOP_4G_OFST, 0x1E) 460 #define GOP_4G_MIU_SEL GOP_REG(GOP_4G_OFST, 0x1F) 461 #define GOP_4G_PRI0 GOP_REG(GOP_4G_OFST, 0x20) 462 #define GOP_4G_BOT_HS GOP_REG(GOP_4G_OFST, 0x23) 463 #define GOP_4G_TRSCLR_L GOP_REG(GOP_4G_OFST, 0x24) 464 #define GOP_4G_TRSCLR_H GOP_REG(GOP_4G_OFST, 0x25) 465 #define GOP_4G_TRSCLR_TUV_L GOP_REG(GOP_4G_OFST, 0x26) 466 #define GOP_4G_TRSCLR_TUV_H GOP_REG(GOP_4G_OFST, 0x27) 467 #define GOP_4G_YUV_SWAP GOP_REG(GOP_4G_OFST, 0x28) 468 #define GOP_4G_CROP_HSTART GOP_REG(GOP_4G_OFST, 0x2A) 469 #define GOP_4G_CROP_HEND GOP_REG(GOP_4G_OFST, 0x2B) 470 #define GOP_4G_CROP_VSTART GOP_REG(GOP_4G_OFST, 0x2C) 471 #define GOP_4G_CROP_VEND GOP_REG(GOP_4G_OFST, 0x2D) 472 #define GOP_4G_STRCH_HSZ GOP_REG(GOP_4G_OFST, 0x30) 473 #define GOP_4G_STRCH_VSZ GOP_REG(GOP_4G_OFST, 0x31) 474 #define GOP_4G_STRCH_HSTR GOP_REG(GOP_4G_OFST, 0x32) 475 #define GOP_4G_STRCH_VSTR GOP_REG(GOP_4G_OFST, 0x34) 476 #define GOP_4G_HSTRCH GOP_REG(GOP_4G_OFST, 0x35) 477 #define GOP_4G_VSTRCH GOP_REG(GOP_4G_OFST, 0x36) 478 #define GOP_4G_HSTRCH_INI GOP_REG(GOP_4G_OFST, 0x38) 479 #define GOP_4G_VSTRCH_INI GOP_REG(GOP_4G_OFST, 0x39) 480 #define GOP_4G_HVSTRCHMD GOP_REG(GOP_4G_OFST, 0x3a) 481 #define GOP_4G_OLDADDR GOP_REG(GOP_4G_OFST, 0x3b) 482 #define GOP_4G_MULTI_ALPHA GOP_REG(GOP_4G_OFST, 0x3c) 483 #define GOP_4G_TWO_LINEBUFFER GOP_4G_MULTI_ALPHA 484 #define GOP_4G_VIP_VOP_TIMING_SEL GOP_4G_MULTI_ALPHA 485 #define GOP_4G_SPLIT_LRSZ GOP_REG(GOP_4G_OFST, 0x3E) 486 #define GOP_4G_HW_USAGE GOP_REG(GOP_4G_OFST, 0x40) 487 #define GOP_4G_BANK_FWR GOP_REG(GOP_4G_OFST, 0x50) 488 #define GOP_4G_BANK_HVAILDSIZE GOP_REG(GOP_4G_OFST, 0x52) 489 #define GOP_4G_BANK_VVAILDSIZE GOP_REG(GOP_4G_OFST, 0x53) 490 #define GOP_4G_SCALING_H_OUTPUTSIZE GOP_REG(GOP_4G_OFST, 0x56) 491 #define GOP_4G_SCALING_HRATIO_L GOP_REG(GOP_4G_OFST, 0x59) //GOP scaling down ratio dst / out * 2^20 492 #define GOP_4G_SCALING_HRATIO_H GOP_REG(GOP_4G_OFST, 0x5A) 493 #define GOP_4G_SCALING_CFG GOP_REG(GOP_4G_OFST, 0x5B) 494 #define GOP_4G_SCALING_VRATIO_L GOP_REG(GOP_4G_OFST, 0x5C) //GOP scaling down ratio dst / out * 2^20 495 #define GOP_4G_SCALING_VRATIO_H GOP_REG(GOP_4G_OFST, 0x5D) 496 #define GOP_4G_MANUAL_CROP1 GOP_REG(GOP_4G_OFST, 0x6E) 497 #define GOP_4G_MANUAL_CROP2 GOP_REG(GOP_4G_OFST, 0x6F) 498 499 500 #define GOP_4G_RBLK0_VOFFL GOP_REG(GOP_4G_OFST, 0x60) 501 #define GOP_4G_RBLK0_VOFFH GOP_REG(GOP_4G_OFST, 0x61) 502 #define GOP_4G_RBLK1_VOFFL GOP_REG(GOP_4G_OFST, 0x62) 503 #define GOP_4G_RBLK1_VOFFH GOP_REG(GOP_4G_OFST, 0x63) 504 #define GOP_4G_RBLK2_VOFFL GOP_REG(GOP_4G_OFST, 0x64) 505 #define GOP_4G_RBLK2_VOFFH GOP_REG(GOP_4G_OFST, 0x65) 506 #define GOP_4G_RBLK3_VOFFL GOP_REG(GOP_4G_OFST, 0x66) 507 #define GOP_4G_RBLK3_VOFFH GOP_REG(GOP_4G_OFST, 0x67) 508 #define GOP_4G_SLPIT_GUARDBAND GOP_REG(GOP_4G_OFST, 0x6C) 509 #define GOP_4G_SLPIT_SHIFT_PIPE GOP_REG(GOP_4G_OFST, 0x6D) 510 #define GOP_4G_RBLK0_HOFF GOP_REG(GOP_4G_OFST, 0x70) 511 #define GOP_4G_RBLK1_HOFF GOP_REG(GOP_4G_OFST, 0x71) 512 #define GOP_4G_RBLK2_HOFF GOP_REG(GOP_4G_OFST, 0x72) 513 #define GOP_4G_RBLK3_HOFF GOP_REG(GOP_4G_OFST, 0x73) 514 #define GOP_4G_REGDMA_EN GOP_REG(GOP_4G_OFST, 0x78) 515 #define GOP_4G_SPLIT_LRSZ GOP_REG(GOP_4G_OFST, 0x3E) 516 #define GOP_MUX_IPVOP __GOP_REG(0x77) 517 #define GOP_MUX4_4K120 __GOP_REG(0x7A) 518 #define GOP_MUX4_MIX_VE __GOP_REG(0x7B) 519 #define GOP_BAK_SEL_EX __GOP_REG(0x7C) 520 #define GOP_MUX_4K2K __GOP_REG(0x7D) 521 #define GOP_MUX __GOP_REG(0x7e) 522 #define GOP_BAK_SEL __GOP_REG(0x7f) 523 524 #define GOP_4G_GWIN0_CTRL(id) GOP_REG(GOP_4G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP0_GWIN))) 525 #define GOP_4G_DRAM_RBLK_L(id) GOP_REG(GOP_4G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP0_GWIN))) 526 #define GOP_4G_DRAM_RBLK_H(id) GOP_REG(GOP_4G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP0_GWIN))) 527 #define GOP_4G_DEL_PIXEL(id) GOP_REG(GOP_4G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN))) 528 #define GOP_4G_HSTR(id) GOP_REG(GOP_4G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP0_GWIN))) 529 #define GOP_4G_HEND(id) GOP_REG(GOP_4G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP0_GWIN))) 530 #define GOP_4G_VSTR(id) GOP_REG(GOP_4G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP0_GWIN))) 531 #define GOP_4G_GWIN_MIDDLE(id) GOP_REG(GOP_4G_OFST+1, 0x07 + (0x20*((id)%MAX_GOP0_GWIN))) 532 #define GOP_4G_VEND(id) GOP_REG(GOP_4G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP0_GWIN))) 533 #define GOP_4G_DRAM_RBLK_HSIZE(id) GOP_REG(GOP_4G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP0_GWIN))) 534 #define GOP_4G_GWIN_ALPHA01(id) GOP_REG(GOP_4G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP0_GWIN))) 535 #define GOP_4G_DRAM_VSTR_L(id) GOP_REG(GOP_4G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP0_GWIN))) 536 #define GOP_4G_DRAM_VSTR_H(id) GOP_REG(GOP_4G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP0_GWIN))) 537 #define GOP_4G_DRAM_HSTR(id) GOP_REG(GOP_4G_OFST+1, 0x0E + (0x20*((id)%MAX_GOP0_GWIN))) 538 #define GOP_4G_DRAM_RBLK_SIZE_L(id) GOP_REG(GOP_4G_OFST+1, 0x10 + (0x20*((id)%MAX_GOP0_GWIN))) 539 #define GOP_4G_DRAM_RBLK_SIZE_H(id) GOP_REG(GOP_4G_OFST+1, 0x11 + (0x20*((id)%MAX_GOP0_GWIN))) 540 #define GOP_4G_DRAM_RLEN_L(id) GOP_REG(GOP_4G_OFST+1, 0x12 + (0x20*((id)%MAX_GOP0_GWIN))) 541 #define GOP_4G_DRAM_RLEN_H(id) GOP_REG(GOP_4G_OFST+1, 0x13 + (0x20*((id)%MAX_GOP0_GWIN))) 542 #define GOP_4G_DRAM_HVSTOP_L(id) GOP_REG(GOP_4G_OFST+1, 0x14 + (0x20*((id)%MAX_GOP0_GWIN))) 543 #define GOP_4G_DRAM_HVSTOP_H(id) GOP_REG(GOP_4G_OFST+1, 0x15 + (0x20*((id)%MAX_GOP0_GWIN))) 544 #define GOP_4G_DRAM_FADE(id) GOP_REG(GOP_4G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP0_GWIN))) 545 #define GOP_4G_BG_CLR(id) GOP_REG(GOP_4G_OFST+1, 0x18 + (0x20*((id)%MAX_GOP0_GWIN))) 546 #define GOP_4G_BG_HSTR(id) GOP_REG(GOP_4G_OFST+1, 0x19 + (0x20*((id)%MAX_GOP0_GWIN))) 547 #define GOP_4G_BG_HEND(id) GOP_REG(GOP_4G_OFST+1, 0x1a + (0x20*((id)%MAX_GOP0_GWIN))) 548 #define GOP_4G_BG_VSTR(id) GOP_REG(GOP_4G_OFST+1, 0x1C + (0x20*((id)%MAX_GOP0_GWIN))) 549 #define GOP_4G_BG_VEND(id) GOP_REG(GOP_4G_OFST+1, 0x1D + (0x20*((id)%MAX_GOP0_GWIN))) 550 #define GOP_4G_3DOSD_SUB_RBLK_L(id) GOP_REG(GOP_4G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP0_GWIN))) 551 #define GOP_4G_3DOSD_SUB_RBLK_H(id) GOP_REG(GOP_4G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP0_GWIN))) 552 553 554 #define GOP_2G_CTRL0 GOP_REG(GOP_2G_OFST, 0x00) 555 #define GOP_2G_CTRL1 GOP_REG(GOP_2G_OFST, 0x01) 556 #define GOP_2G_RATE GOP_REG(GOP_2G_OFST, 0x02) 557 #define GOP_2G_PALDATA_L GOP_REG(GOP_2G_OFST, 0x03) 558 #define GOP_2G_PALDATA_H GOP_REG(GOP_2G_OFST, 0x04) 559 #define GOP_2G_PALCTRL GOP_REG(GOP_2G_OFST, 0x05) 560 #define GOP_2G_REGDMA_END GOP_REG(GOP_2G_OFST, 0x06) 561 #define GOP_2G_REGDMA_STR GOP_REG(GOP_2G_OFST, 0x07) 562 #define GOP_2G_INT GOP_REG(GOP_2G_OFST, 0x08) 563 #define GOP_2G_HWSTATE GOP_REG(GOP_2G_OFST, 0x09) 564 #define GOP_2G_RDMA_HT GOP_REG(GOP_2G_OFST, 0x0e) 565 #define GOP_2G_HS_PIPE GOP_REG(GOP_2G_OFST, 0x0f) 566 #define GOP_2G_SLOW GOP_REG(GOP_2G_OFST, 0x10) 567 #define GOP_2G_BRI GOP_REG(GOP_2G_OFST, 0x11) 568 #define GOP_2G_CON GOP_REG(GOP_2G_OFST, 0x12) 569 #define GOP_2G_BW GOP_REG(GOP_2G_OFST, 0x19) 570 #define GOP_2G_3D_MIDDLE GOP_REG(GOP_2G_OFST, 0x1E) 571 #define GOP_2G_PRI0 GOP_REG(GOP_2G_OFST, 0x20) 572 #define GOP_2G_TRSCLR_L GOP_REG(GOP_2G_OFST, 0x24) 573 #define GOP_2G_TRSCLR_H GOP_REG(GOP_2G_OFST, 0x25) 574 #define GOP_2G_STRCH_HSZ GOP_REG(GOP_2G_OFST, 0x30) 575 #define GOP_2G_STRCH_VSZ GOP_REG(GOP_2G_OFST, 0x31) 576 #define GOP_2G_STRCH_HSTR GOP_REG(GOP_2G_OFST, 0x32) 577 #define GOP_2G_STRCH_VSTR GOP_REG(GOP_2G_OFST, 0x34) 578 #define GOP_2G_HSTRCH GOP_REG(GOP_2G_OFST, 0x35) 579 #define GOP_2G_VSTRCH GOP_REG(GOP_2G_OFST, 0x36) 580 #define GOP_2G_HSTRCH_INI GOP_REG(GOP_2G_OFST, 0x38) 581 #define GOP_2G_VSTRCH_INI GOP_REG(GOP_2G_OFST, 0x39) 582 #define GOP_2G_HVStrch_MD GOP_REG(GOP_2G_OFST, 0x3a) 583 #define GOP_2G_OLDADDR GOP_REG(GOP_2G_OFST, 0x3b) 584 #define GOP_2G_MULTI_ALPHA GOP_REG(GOP_2G_OFST, 0x3c) 585 #define GOP_2G_REGDMA_EN GOP_REG(GOP_2G_OFST, 0x78) 586 587 588 #define GOP_2G_GWIN0_CTRL(id) GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN))) 589 #define GOP_2G_GWIN_CTRL(id) GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN))) 590 #define GOP_2G_DRAM_RBLK_L(id) GOP_REG(GOP_2G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP1_GWIN))) 591 #define GOP_2G_DRAM_RBLK_H(id) GOP_REG(GOP_2G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP1_GWIN))) 592 #define GOP_2G_DEL_PIXEL(id) GOP_REG(GOP_2G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN))) 593 #define GOP_2G_HSTR(id) GOP_REG(GOP_2G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP1_GWIN))) 594 #define GOP_2G_HEND(id) GOP_REG(GOP_2G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP1_GWIN))) 595 #define GOP_2G_VSTR(id) GOP_REG(GOP_2G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP1_GWIN))) 596 #define GOP_2G_VEND(id) GOP_REG(GOP_2G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP1_GWIN))) 597 #define GOP_2G_DRAM_RBLK_HSIZE(id) GOP_REG(GOP_2G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP1_GWIN))) 598 #define GOP_2G_GWIN_ALPHA01(id) GOP_REG(GOP_2G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP1_GWIN))) 599 #define GOP_2G_DRAM_VSTR_L(id) GOP_REG(GOP_2G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP1_GWIN))) 600 #define GOP_2G_DRAM_VSTR_H(id) GOP_REG(GOP_2G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP1_GWIN))) 601 #define GOP_2G_DRAM_FADE(id) GOP_REG(GOP_2G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP1_GWIN))) 602 #define GOP_2G_3DOSD_SUB_RBLK_L(id) GOP_REG(GOP_2G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP1_GWIN))) 603 #define GOP_2G_3DOSD_SUB_RBLK_H(id) GOP_REG(GOP_2G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP1_GWIN))) 604 605 // DWIN reg 606 #define GOP_DW_CTL0_EN GOP_REG(GOP_DW_OFST, 0x00) 607 #define GOP_DWIN_EN (0x00) 608 #define GOP_DWIN_EN_VAL GOP_REG_VAL(GOP_DWIN_EN) 609 #define GOP_DWIN_SHOT (0x07) 610 #define GOP_DWIN_SHOT_VAL GOP_REG_VAL(GOP_DWIN_SHOT) 611 612 #define GOP_DW_LSTR_WBE GOP_REG(GOP_DW_OFST, 0x01) 613 #define GOP_DW_INT_MASK GOP_REG(GOP_DW_OFST, 0x02) 614 #define GOP_DW_DEBUG GOP_REG(GOP_DW_OFST, 0x03) 615 #define GOP_DW_ALPHA GOP_REG(GOP_DW_OFST, 0x04) 616 #define GOP_DW_BW GOP_REG(GOP_DW_OFST, 0x05) 617 #define GOP_DW_VSTR GOP_REG(GOP_DW_OFST, 0x10) 618 #define GOP_DW_HSTR GOP_REG(GOP_DW_OFST, 0x11) 619 #define GOP_DW_VEND GOP_REG(GOP_DW_OFST, 0x12) 620 #define GOP_DW_HEND GOP_REG(GOP_DW_OFST, 0x13) 621 #define GOP_DW_HSIZE GOP_REG(GOP_DW_OFST, 0x14) 622 #define GOP_DW_JMPLEN GOP_REG(GOP_DW_OFST, 0x15) 623 #define GOP_DW_DSTR_L GOP_REG(GOP_DW_OFST, 0x16) 624 #define GOP_DW_DSTR_H GOP_REG(GOP_DW_OFST, 0x17) 625 #define GOP_DW_UB_L GOP_REG(GOP_DW_OFST, 0x18) 626 #define GOP_DW_UB_H GOP_REG(GOP_DW_OFST, 0x19) 627 628 #define GOP_DW_PON_DSTR_L GOP_REG(GOP_DW_OFST, 0x1a) 629 #define GOP_DW_PON_DSTR_H GOP_REG(GOP_DW_OFST, 0x1b) 630 #define GOP_DW_PON_UB_L GOP_REG(GOP_DW_OFST, 0x1c) 631 #define GOP_DW_PON_UB_H GOP_REG(GOP_DW_OFST, 0x1d) 632 #define GOP_DW_FRAME_CTRL GOP_REG(GOP_DW_OFST, 0x30) 633 634 #define GOP_1G_CTRL0 GOP_REG(GOP_1G_OFST, 0x00) 635 #define GOP_1G_CTRL1 GOP_REG(GOP_1G_OFST, 0x01) 636 #define GOP_1G_RATE GOP_REG(GOP_1G_OFST, 0x02) 637 #define GOP_1G_PALDATA_L GOP_REG(GOP_1G_OFST, 0x03) 638 #define GOP_1G_PALDATA_H GOP_REG(GOP_1G_OFST, 0x04) 639 #define GOP_1G_PALCTRL GOP_REG(GOP_1G_OFST, 0x05) 640 #define GOP_1G_REGDMA_END GOP_REG(GOP_1G_OFST, 0x06) 641 #define GOP_1G_REGDMA_STR GOP_REG(GOP_1G_OFST, 0x07) 642 #define GOP_1G_INT GOP_REG(GOP_1G_OFST, 0x08) 643 #define GOP_1G_HWSTATE GOP_REG(GOP_1G_OFST, 0x09) 644 #define GOP_1G_RDMA_HT GOP_REG(GOP_1G_OFST, 0x0e) 645 #define GOP_1G_HS_PIPE GOP_REG(GOP_1G_OFST, 0x0f) 646 #define GOP_1G_BRI GOP_REG(GOP_1G_OFST, 0x11) 647 #define GOP_1G_CON GOP_REG(GOP_1G_OFST, 0x12) 648 #define GOP_1G_BW GOP_REG(GOP_1G_OFST, 0x19) 649 #define GOP_1G_3D_MIDDLE GOP_REG(GOP_1G_OFST, 0x1E) 650 #define GOP_1G_TRSCLR_L GOP_REG(GOP_1G_OFST, 0x24) 651 #define GOP_1G_TRSCLR_H GOP_REG(GOP_1G_OFST, 0x25) 652 #define GOP_1G_STRCH_HSZ GOP_REG(GOP_1G_OFST, 0x30) 653 #define GOP_1G_STRCH_VSZ GOP_REG(GOP_1G_OFST, 0x31) 654 #define GOP_1G_STRCH_HSTR GOP_REG(GOP_1G_OFST, 0x32) 655 #define GOP_1G_STRCH_VSTR GOP_REG(GOP_1G_OFST, 0x34) 656 #define GOP_1G_HSTRCH GOP_REG(GOP_1G_OFST, 0x35) 657 #define GOP_1G_HSTRCH_INI GOP_REG(GOP_1G_OFST, 0x38) 658 #define GOP_1G_VSTRCH_INI GOP_REG(GOP_1G_OFST, 0x39) 659 #define GOP_1G_HStrch_MD GOP_REG(GOP_1G_OFST, 0x3a) 660 #define GOP_1G_OLDADDR GOP_REG(GOP_1G_OFST, 0x3b) 661 #define GOP_1G_MULTI_ALPHA GOP_REG(GOP_1G_OFST, 0x3c) 662 663 #define GOP_1G_GWIN0_CTRL GOP_REG(GOP_1G_OFST+1, 0x0) 664 #define GOP_1G_DRAM_RBLK_L GOP_REG(GOP_1G_OFST+1, 0x1) 665 #define GOP_1G_DRAM_RBLK_H GOP_REG(GOP_1G_OFST+1, 0x2) 666 #define GOP_1G_DEL_PIXEL GOP_REG(GOP_1G_OFST+1, 0x3) 667 #define GOP_1G_HSTR GOP_REG(GOP_1G_OFST+1, 0x4) 668 #define GOP_1G_HEND GOP_REG(GOP_1G_OFST+1, 0x5) 669 #define GOP_1G_VSTR GOP_REG(GOP_1G_OFST+1, 0x6) 670 #define GOP_1G_VEND GOP_REG(GOP_1G_OFST+1, 0x8) 671 #define GOP_1G_DRAM_RBLK_HSIZE GOP_REG(GOP_1G_OFST+1, 0x9) 672 #define GOP_1G_GWIN_ALPHA01 GOP_REG(GOP_1G_OFST+1, 0xA) 673 #define GOP_1G_DRAM_VSTR_L GOP_REG(GOP_1G_OFST+1, 0x0C) 674 #define GOP_1G_DRAM_VSTR_H GOP_REG(GOP_1G_OFST+1, 0x0D) 675 #define GOP_1G_DRAM_FADE GOP_REG(GOP_1G_OFST+1, 0x16) 676 #define GOP_1G_3DOSD_SUB_RBLK_L GOP_REG(GOP_1G_OFST+1, 0x1E) 677 #define GOP_1G_3DOSD_SUB_RBLK_H GOP_REG(GOP_1G_OFST+1, 0x1F) 678 679 #define GOP_1GX_CTRL0 GOP_REG(GOP_1GX_OFST, 0x00) 680 #define GOP_1GX_CTRL1 GOP_REG(GOP_1GX_OFST, 0x01) 681 #define GOP_1GX_RATE GOP_REG(GOP_1GX_OFST, 0x02) 682 #define GOP_1GX_PALDATA_L GOP_REG(GOP_1GX_OFST, 0x03) 683 #define GOP_1GX_PALDATA_H GOP_REG(GOP_1GX_OFST, 0x04) 684 #define GOP_1GX_PALCTRL GOP_REG(GOP_1GX_OFST, 0x05) 685 #define GOP_1GX_REGDMA_END GOP_REG(GOP_1GX_OFST, 0x06) 686 #define GOP_1GX_REGDMA_STR GOP_REG(GOP_1GX_OFST, 0x07) 687 #define GOP_1GX_INT GOP_REG(GOP_1GX_OFST, 0x08) 688 #define GOP_1GX_HWSTATE GOP_REG(GOP_1GX_OFST, 0x09) 689 #define GOP_1GX_RDMA_HT GOP_REG(GOP_1GX_OFST, 0x0e) 690 #define GOP_1GX_HS_PIPE GOP_REG(GOP_1GX_OFST, 0x0f) 691 #define GOP_1GX_BRI GOP_REG(GOP_1GX_OFST, 0x11) 692 #define GOP_1GX_CON GOP_REG(GOP_1GX_OFST, 0x12) 693 #define GOP_1GX_BW GOP_REG(GOP_1GX_OFST, 0x19) 694 #define GOP_1GX_3D_MIDDLE GOP_REG(GOP_1GX_OFST, 0x1E) 695 #define GOP_1GX_TRSCLR_L GOP_REG(GOP_1GX_OFST, 0x24) 696 #define GOP_1GX_TRSCLR_H GOP_REG(GOP_1GX_OFST, 0x25) 697 #define GOP_1GX_STRCH_HSZ GOP_REG(GOP_1GX_OFST, 0x30) 698 #define GOP_1GX_STRCH_VSZ GOP_REG(GOP_1GX_OFST, 0x31) 699 #define GOP_1GX_STRCH_HSTR GOP_REG(GOP_1GX_OFST, 0x32) 700 #define GOP_1GX_STRCH_VSTR GOP_REG(GOP_1GX_OFST, 0x34) 701 #define GOP_1GX_HSTRCH GOP_REG(GOP_1GX_OFST, 0x35) 702 #define GOP_1GX_HSTRCH_INI GOP_REG(GOP_1GX_OFST, 0x38) 703 #define GOP_1GX_VSTRCH_INI GOP_REG(GOP_1GX_OFST, 0x39) 704 #define GOP_1GX_HStrch_MD GOP_REG(GOP_1GX_OFST, 0x3a) 705 #define GOP_1GX_OLDADDR GOP_REG(GOP_1GX_OFST, 0x3b) 706 #define GOP_1GX_MULTI_ALPHA GOP_REG(GOP_1GX_OFST, 0x3c) 707 708 #define GOP_1GX_GWIN0_CTRL GOP_REG(GOP_1GX_OFST+1, 0x00) 709 #define GOP_1GX_DRAM_RBLK_L GOP_REG(GOP_1GX_OFST+1, 0x01) 710 #define GOP_1GX_DRAM_RBLK_H GOP_REG(GOP_1GX_OFST+1, 0x02) 711 #define GOP_1GX_DEL_PIXEL GOP_REG(GOP_1GX_OFST+1, 0x03) 712 #define GOP_1GX_HSTR GOP_REG(GOP_1GX_OFST+1, 0x04) 713 #define GOP_1GX_HEND GOP_REG(GOP_1GX_OFST+1, 0x05) 714 #define GOP_1GX_VSTR GOP_REG(GOP_1GX_OFST+1, 0x06) 715 #define GOP_1GX_VEND GOP_REG(GOP_1GX_OFST+1, 0x08) 716 #define GOP_1GX_DRAM_RBLK_HSIZE GOP_REG(GOP_1GX_OFST+1, 0x09) 717 #define GOP_1GX_GWIN_ALPHA01 GOP_REG(GOP_1GX_OFST+1, 0x0A) 718 #define GOP_1GX_DRAM_VSTR_L GOP_REG(GOP_1GX_OFST+1, 0x0C) 719 #define GOP_1GX_DRAM_VSTR_H GOP_REG(GOP_1GX_OFST+1, 0x0D) 720 #define GOP_1GX_DRAM_FADE GOP_REG(GOP_1GX_OFST+1, 0x16) 721 #define GOP_1GX_3DOSD_SUB_RBLK_L GOP_REG(GOP_1GX_OFST+1, 0x1E) 722 #define GOP_1GX_3DOSD_SUB_RBLK_H GOP_REG(GOP_1GX_OFST+1, 0x1F) 723 724 #define GOP_1GS0_CTRL0 GOP_REG(GOP_1GS0_OFST, 0x00) 725 #define GOP_1GS0_CTRL1 GOP_REG(GOP_1GS0_OFST, 0x01) 726 #define GOP_1GS0_RATE GOP_REG(GOP_1GS0_OFST, 0x02) 727 #define GOP_1GS0_PALDATA_L GOP_REG(GOP_1GS0_OFST, 0x03) 728 #define GOP_1GS0_PALDATA_H GOP_REG(GOP_1GS0_OFST, 0x04) 729 #define GOP_1GS0_PALCTRL GOP_REG(GOP_1GS0_OFST, 0x05) 730 #define GOP_1GS0_REGDMA_END GOP_REG(GOP_1GS0_OFST, 0x06) 731 #define GOP_1GS0_REGDMA_STR GOP_REG(GOP_1GS0_OFST, 0x07) 732 #define GOP_1GS0_INT GOP_REG(GOP_1GS0_OFST, 0x08) 733 #define GOP_1GS0_HWSTATE GOP_REG(GOP_1GS0_OFST, 0x09) 734 #define GOP_1GS0_RDMA_HT GOP_REG(GOP_1GS0_OFST, 0x0e) 735 #define GOP_1GS0_HS_PIPE GOP_REG(GOP_1GS0_OFST, 0x0f) 736 #define GOP_1GS0_BRI GOP_REG(GOP_1GS0_OFST, 0x11) 737 #define GOP_1GS0_CON GOP_REG(GOP_1GS0_OFST, 0x12) 738 #define GOP_1GS0_BW GOP_REG(GOP_1GS0_OFST, 0x19) 739 #define GOP_1GS0_TRSCLR_L GOP_REG(GOP_1GS0_OFST, 0x24) 740 #define GOP_1GS0_TRSCLR_H GOP_REG(GOP_1GS0_OFST, 0x25) 741 #define GOP_1GS0_STRCH_HSZ GOP_REG(GOP_1GS0_OFST, 0x30) 742 #define GOP_1GS0_STRCH_VSZ GOP_REG(GOP_1GS0_OFST, 0x31) 743 #define GOP_1GS0_STRCH_HSTR GOP_REG(GOP_1GS0_OFST, 0x32) 744 #define GOP_1GS0_STRCH_VSTR GOP_REG(GOP_1GS0_OFST, 0x34) 745 #define GOP_1GS0_HSTRCH GOP_REG(GOP_1GS0_OFST, 0x35) 746 #define GOP_1GS0_HSTRCH_INI GOP_REG(GOP_1GS0_OFST, 0x38) 747 #define GOP_1GS0_VSTRCH_INI GOP_REG(GOP_1GS0_OFST, 0x39) 748 #define GOP_1GS0_HVStrch_MD GOP_REG(GOP_1GS0_OFST, 0x3a) 749 #define GOP_1GS0_OLDADDR GOP_REG(GOP_1GS0_OFST, 0x3b) 750 #define GOP_1GS0_MULTI_ALPHA GOP_REG(GOP_1GS0_OFST, 0x3c) 751 752 #define GOP_1GS0_GWIN0_CTRL GOP_REG(GOP_1GS0_OFST+1, 0x00) 753 #define GOP_1GS0_DRAM_RBLK_L GOP_REG(GOP_1GS0_OFST+1, 0x01) 754 #define GOP_1GS0_DRAM_RBLK_H GOP_REG(GOP_1GS0_OFST+1, 0x02) 755 #define GOP_1GS0_DEL_PIXEL GOP_REG(GOP_1GS0_OFST+1, 0x03) 756 #define GOP_1GS0_HSTR GOP_REG(GOP_1GS0_OFST+1, 0x04) 757 #define GOP_1GS0_HEND GOP_REG(GOP_1GS0_OFST+1, 0x05) 758 #define GOP_1GS0_VSTR GOP_REG(GOP_1GS0_OFST+1, 0x06) 759 #define GOP_1GS0_VEND GOP_REG(GOP_1GS0_OFST+1, 0x08) 760 #define GOP_1GS0_DRAM_RBLK_HSIZE GOP_REG(GOP_1GS0_OFST+1, 0x09) 761 #define GOP_1GS0_GWIN_ALPHA01 GOP_REG(GOP_1GS0_OFST+1, 0x0A) 762 #define GOP_1GS0_DRAM_VSTR_L GOP_REG(GOP_1GS0_OFST+1, 0x0C) 763 #define GOP_1GS0_DRAM_VSTR_H GOP_REG(GOP_1GS0_OFST+1, 0x0D) 764 #define GOP_1GS0_DRAM_FADE GOP_REG(GOP_1GS0_OFST+1, 0x16) 765 #define GOP_1GS0_3DOSD_SUB_RBLK_L GOP_REG(GOP_1GS0_OFST+1, 0x1E) 766 #define GOP_1GS0_3DOSD_SUB_RBLK_H GOP_REG(GOP_1GS0_OFST+1, 0x1F) 767 768 #define GOP_1GS1_CTRL0 GOP_REG(GOP_1GS1_OFST, 0x00) 769 #define GOP_1GS1_CTRL1 GOP_REG(GOP_1GS1_OFST, 0x01) 770 #define GOP_1GS1_RATE GOP_REG(GOP_1GS1_OFST, 0x02) 771 #define GOP_1GS1_PALDATA_L GOP_REG(GOP_1GS1_OFST, 0x03) 772 #define GOP_1GS1_PALDATA_H GOP_REG(GOP_1GS1_OFST, 0x04) 773 #define GOP_1GS1_PALCTRL GOP_REG(GOP_1GS1_OFST, 0x05) 774 #define GOP_1GS1_REGDMA_END GOP_REG(GOP_1GS1_OFST, 0x06) 775 #define GOP_1GS1_REGDMA_STR GOP_REG(GOP_1GS1_OFST, 0x07) 776 #define GOP_1GS1_INT GOP_REG(GOP_1GS1_OFST, 0x08) 777 #define GOP_1GS1_HWSTATE GOP_REG(GOP_1GS1_OFST, 0x09) 778 #define GOP_1GS1_RDMA_HT GOP_REG(GOP_1GS1_OFST, 0x0e) 779 #define GOP_1GS1_HS_PIPE GOP_REG(GOP_1GS1_OFST, 0x0f) 780 #define GOP_1GS1_BRI GOP_REG(GOP_1GS1_OFST, 0x11) 781 #define GOP_1GS1_CON GOP_REG(GOP_1GS1_OFST, 0x12) 782 #define GOP_1GS1_BW GOP_REG(GOP_1GS1_OFST, 0x19) 783 #define GOP_1GS1_TRSCLR_L GOP_REG(GOP_1GS1_OFST, 0x24) 784 #define GOP_1GS1_TRSCLR_H GOP_REG(GOP_1GS1_OFST, 0x25) 785 #define GOP_1GS1_STRCH_HSZ GOP_REG(GOP_1GS1_OFST, 0x30) 786 #define GOP_1GS1_STRCH_VSZ GOP_REG(GOP_1GS1_OFST, 0x31) 787 #define GOP_1GS1_STRCH_HSTR GOP_REG(GOP_1GS1_OFST, 0x32) 788 #define GOP_1GS1_STRCH_VSTR GOP_REG(GOP_1GS1_OFST, 0x34) 789 #define GOP_1GS1_HSTRCH GOP_REG(GOP_1GS1_OFST, 0x35) 790 #define GOP_1GS1_HSTRCH_INI GOP_REG(GOP_1GS1_OFST, 0x38) 791 #define GOP_1GS1_VSTRCH_INI GOP_REG(GOP_1GS1_OFST, 0x39) 792 #define GOP_1GS1_HVStrch_MD GOP_REG(GOP_1GS1_OFST, 0x3a) 793 #define GOP_1GS1_OLDADDR GOP_REG(GOP_1GS1_OFST, 0x3b) 794 #define GOP_1GS1_MULTI_ALPHA GOP_REG(GOP_1GS1_OFST, 0x3c) 795 796 #define GOP_1GS1_GWIN0_CTRL GOP_REG(GOP_1GS1_OFST+1, 0x00) 797 #define GOP_1GS1_DRAM_RBLK_L GOP_REG(GOP_1GS1_OFST+1, 0x01) 798 #define GOP_1GS1_DRAM_RBLK_H GOP_REG(GOP_1GS1_OFST+1, 0x02) 799 #define GOP_1GS1_DEL_PIXEL GOP_REG(GOP_1GS1_OFST+1, 0x03) 800 #define GOP_1GS1_HSTR GOP_REG(GOP_1GS1_OFST+1, 0x04) 801 #define GOP_1GS1_HEND GOP_REG(GOP_1GS1_OFST+1, 0x05) 802 #define GOP_1GS1_VSTR GOP_REG(GOP_1GS1_OFST+1, 0x06) 803 #define GOP_1GS1_VEND GOP_REG(GOP_1GS1_OFST+1, 0x08) 804 #define GOP_1GS1_DRAM_RBLK_HSIZE GOP_REG(GOP_1GS1_OFST+1, 0x09) 805 #define GOP_1GS1_GWIN_ALPHA01 GOP_REG(GOP_1GS1_OFST+1, 0x0A) 806 #define GOP_1GS1_DRAM_VSTR_L GOP_REG(GOP_1GS1_OFST+1, 0x0C) 807 #define GOP_1GS1_DRAM_VSTR_H GOP_REG(GOP_1GS1_OFST+1, 0x0D) 808 #define GOP_1GS1_DRAM_FADE GOP_REG(GOP_1GS1_OFST+1, 0x16) 809 #define GOP_1GS1_3DOSD_SUB_RBLK_L GOP_REG(GOP_1GS1_OFST+1, 0x1E) 810 #define GOP_1GS1_3DOSD_SUB_RBLK_H GOP_REG(GOP_1GS1_OFST+1, 0x1F) 811 //------------------------------------------------------------------------------------------------- 812 // Type and Structure 813 //------------------------------------------------------------------------------------------------- 814 815 //---------------------------------------------------------------------------- 816 // GOP Test Pattern Reg 817 //---------------------------------------------------------------------------- 818 #define REG_TSTCLR_EN GOP_REG(GOP_4G_OFST, 0x00) 819 #define REG_TSTCLR_ALPHA_EN GOP_REG(GOP_4G_OFST+2, 0x00) 820 #define REG_TLB_TAG_ADDR_L GOP_REG(GOP_4G_OFST+2, 0x2C) 821 #define REG_TLB_TAG_ADDR_H GOP_REG(GOP_4G_OFST+2, 0x2D) 822 #define REG_TLB_TAG_ADDR_RVIEW_L GOP_REG(GOP_4G_OFST+2, 0x2E) 823 #define REG_TLB_TAG_ADDR_RVIEW_H GOP_REG(GOP_4G_OFST+2, 0x2F) 824 #define REG_TSTCLR_ALPHA GOP_REG(GOP_4G_OFST+2, 0x40) 825 #define REG_R_STC GOP_REG(GOP_4G_OFST+2, 0x41) 826 #define REG_G_STC GOP_REG(GOP_4G_OFST+2, 0x48) 827 #define REG_B_STC GOP_REG(GOP_4G_OFST+2, 0x49) 828 #define REG_TSTCLR_HDUP GOP_REG(GOP_4G_OFST+2, 0x01) 829 #define REG_TSTCLR_VDUP GOP_REG(GOP_4G_OFST+2, 0x01) 830 #define REG_HR_INC GOP_REG(GOP_4G_OFST+2, 0x42) 831 #define REG_HR_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x42) 832 #define REG_HG_INC GOP_REG(GOP_4G_OFST+2, 0x43) 833 #define REG_HG_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x43) 834 #define REG_HB_INC GOP_REG(GOP_4G_OFST+2, 0x44) 835 #define REG_HB_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x44) 836 #define REG_HR_STEP GOP_REG(GOP_4G_OFST+2, 0x4A) 837 #define REG_HG_STEP GOP_REG(GOP_4G_OFST+2, 0x4B) 838 #define REG_HB_STEP GOP_REG(GOP_4G_OFST+2, 0x4C) 839 #define REG_VR_INC GOP_REG(GOP_4G_OFST+2, 0x45) 840 #define REG_VR_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x45) 841 #define REG_VG_INC GOP_REG(GOP_4G_OFST+2, 0x46) 842 #define REG_VG_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x46) 843 #define REG_VB_INC GOP_REG(GOP_4G_OFST+2, 0x47) 844 #define REG_VB_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x47) 845 #define REG_VR_STEP GOP_REG(GOP_4G_OFST+2, 0x4D) 846 #define REG_VG_STEP GOP_REG(GOP_4G_OFST+2, 0x4E) 847 #define REG_VB_STEP GOP_REG(GOP_4G_OFST+2, 0x4F) 848 #define REG_TLB_BASE_ADDR_L GOP_REG(GOP_4G_OFST+2, 0x58) 849 #define REG_TLB_BASE_ADDR_H GOP_REG(GOP_4G_OFST+2, 0x59) 850 #define REG_TLB_BASE_ADDR_RVIEW_L GOP_REG(GOP_4G_OFST+2, 0x5A) 851 #define REG_TLB_BASE_ADDR_RVIEW_H GOP_REG(GOP_4G_OFST+2, 0x5B) 852 853 #define MASK_TSTCLR_EN GOP_BIT6 854 #define MASK_TSTCLR_ALPHA_EN GOP_BIT1 855 #define MASK_TSTCLR_ALPHA BMASK(11:8)|BMASK(3:0) 856 #define MASK_RGB_STC_VALID BMASK(7:0) 857 #define MASK_R_STC BMASK(11:8)|BMASK(3:0) 858 #define MASK_G_STC BMASK(11:8)|BMASK(3:0) 859 #define MASK_B_STC BMASK(11:8)|BMASK(3:0) 860 #define MASK_INI_TSTCLR_EN GOP_BIT0 861 #define MASK_TSTCLR_HDUP BMASK(3:2) 862 #define MASK_TSTCLR_VDUP BMASK(1:0) 863 #define MASK_HR_INC BMASK(10:8)|BMASK(3:0) 864 #define MASK_HR_INC_SIGNZ GOP_BIT11 865 #define MASK_HG_INC BMASK(10:8)|BMASK(3:0) 866 #define MASK_HG_INC_SIGNZ GOP_BIT11 867 #define MASK_HB_INC BMASK(10:8)|BMASK(3:0) 868 #define MASK_HB_INC_SIGNZ GOP_BIT11 869 #define MASK_HR_STEP BMASK(11:8)|BMASK(3:0) 870 #define MASK_HG_STEP BMASK(11:8)|BMASK(3:0) 871 #define MASK_HB_STEP BMASK(11:8)|BMASK(3:0) 872 #define MASK_VR_INC BMASK(10:8)|BMASK(3:0) 873 #define MASK_VR_INC_SIGNZ GOP_BIT11 874 #define MASK_VG_INC BMASK(10:8)|BMASK(3:0) 875 #define MASK_VG_INC_SIGNZ GOP_BIT11 876 #define MASK_VB_INC BMASK(10:8)|BMASK(3:0) 877 #define MASK_VB_INC_SIGNZ GOP_BIT11 878 #define MASK_VR_STEP BMASK(11:8)|BMASK(3:0) 879 #define MASK_VG_STEP BMASK(11:8)|BMASK(3:0) 880 #define MASK_VB_STEP BMASK(11:8)|BMASK(3:0) 881 882 #define SHIFT_TSTCLR_EN 6 883 #define SHIFT_TSTCLR_ALPHA_EN 1 884 #define SHIFT_TSTCLR_ALPHA 8 885 #define SHIFT_R_STC 0 886 #define SHIFT_G_STC 0 887 #define SHIFT_B_STC 0 888 #define SHIFT_INI_TSTCLR_EN 0 889 #define SHIFT_TSTCLR_HDUP 2 890 #define SHIFT_TSTCLR_VDUP 0 891 #define SHIFT_HR_INC 0 892 #define SHIFT_HR_INC_SIGNZ 11 893 #define SHIFT_HG_INC 0 894 #define SHIFT_HG_INC_SIGNZ 11 895 #define SHIFT_HB_INC 0 896 #define SHIFT_HB_INC_SIGNZ 11 897 #define SHIFT_HR_STEP 0 898 #define SHIFT_HG_STEP 0 899 #define SHIFT_HB_STEP 0 900 #define SHIFT_VR_INC 0 901 #define SHIFT_VR_INC_SIGNZ 11 902 #define SHIFT_VG_INC 0 903 #define SHIFT_VG_INC_SIGNZ 11 904 #define SHIFT_VB_INC 0 905 #define SHIFT_VB_INC_SIGNZ 11 906 #define SHIFT_VR_STEP 0 907 #define SHIFT_VG_STEP 0 908 #define SHIFT_VB_STEP 0 909 910 //---------------------------------------------------------------------------- 911 // GOP AFBC Reg 912 //---------------------------------------------------------------------------- 913 #define REG_AFBC_CORE_EN(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x00+(0x20*id)) 914 #define REG_AFBC_ADDR_L(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x01+(0x20*id)) 915 #define REG_AFBC_ADDR_H(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x02+(0x20*id)) 916 #define REG_AFBC_FMT(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0C+(0x20*id)) 917 #define REG_AFBC_WIDTH(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0A+(0x20*id)) 918 #define REG_AFBC_HEIGHT(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0B+(0x20*id)) 919 #define REG_AFBC_RESP(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0F+(0x20*id)) 920 #define REG_AFBC_MIU GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x43) 921 #define REG_AFBC_DEBUG(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x44+(0x20*id)) 922 #define REG_AFBC_READCNT(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x4C+(0x20*id)) 923 #define REG_AFBC_TRIGGER GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x50) 924 925 926 #define REG_SC_BK70_00(gop_id) XC_REG(0x70, 0x00 + (0x20 * gop_id)) 927 #define REG_SC_BK70_07(gop_id) XC_REG(0x70, 0x07 + (0x20 * gop_id)) 928 #define REG_SC_BK70_08(gop_id) XC_REG(0x70, 0x08 + (0x20 * gop_id)) 929 930 #define REG_GOP_CROP_PRECALDONE(gop_id) REG_SC_BK70_00(gop_id) 931 #define REG_GOP_CROP_ORIHSTART(gop_id) REG_SC_BK70_07(gop_id) 932 #define REG_GOP_CROP_ORIHEND(gop_id) REG_SC_BK70_08(gop_id) 933 934 #endif // _REG_GOP_H_ 935