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 VE_REG_BASE 0x3B00UL 118 #define SC1_DIRREG_BASE 0x130000UL 119 120 //---------------------------------------------------------------------------- 121 // Scaler Reg 122 //---------------------------------------------------------------------------- 123 #define XC_REG(bk, reg) (SC1_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2) 124 125 #define REG_SC_BK00_00_L XC_REG(0x00, 0x00) 126 #define REG_SC_BK00_05_L XC_REG(0x00, 0x05) 127 #define REG_SC_BK00_06_L XC_REG(0x00, 0x06) 128 #define REG_SC_BK01_02_L XC_REG(0x01, 0x02) 129 #define REG_SC_BK01_05_L XC_REG(0x01, 0x05) 130 #define REG_SC_BK01_1E_L XC_REG(0x01, 0x1E) 131 #define REG_SC_BK01_21_L XC_REG(0x01, 0x21) 132 #define REG_SC_BK02_5F_L XC_REG(0x02, 0x5F) 133 #define REG_SC_BK0F_2B_L XC_REG(0x0F, 0x2B) 134 #define REG_SC_BK10_23_L XC_REG(0x10, 0x23) 135 #define REG_SC_BK10_5B_L XC_REG(0x10, 0x5B) 136 #define REG_SC_BK12_03_L XC_REG(0x12, 0x03) 137 #define REG_SC_BK2F_27_L XC_REG(0x2F, 0x27) 138 #define REG_SC_BK2F_37_L XC_REG(0x2F, 0x37) 139 #define REG_SC_BK2F_38_L XC_REG(0x2F, 0x38) 140 #define REG_SC_BK2F_3A_L XC_REG(0x2F, 0x3A) 141 #define REG_SC_BK2F_3B_L XC_REG(0x2F, 0x3B) 142 #define REG_SC_BK2F_3C_L XC_REG(0x2F, 0x3C) 143 #define REG_SC_BK37_22_L XC_REG(0x37, 0x22) 144 #define REG_SC_BK37_24_L XC_REG(0x37, 0x24) 145 #define REG_SC_BK37_28_L XC_REG(0x37, 0x28) 146 #define REG_SC_BK3D_0D_L XC_REG(0x3D, 0x0D) 147 #define REG_SC_BK40_22_L XC_REG(0x40, 0x22) 148 #define REG_SC_BK40_23_L XC_REG(0x40, 0x23) 149 #define REG_SC_BK40_24_L XC_REG(0x40, 0x24) 150 #define REG_SC_BK40_25_L XC_REG(0x40, 0x25) 151 #define REG_SC_BK7F_10_L XC_REG(0x7F, 0x10) 152 #define REG_SC_BK7F_11_L XC_REG(0x7F, 0x11) 153 154 #define REG_SC1_BK00_05_L XC_REG(0x80+0x00, 0x05) 155 #define REG_SC1_BK00_06_L XC_REG(0x80+0x00, 0x06) 156 #define REG_SC1_BK10_23_L XC_REG(0x80+0x10, 0x23) 157 158 #define GOP_SC_BANKSEL REG_SC_BK00_00_L 159 #define GOP_SC_CHANNELSYNC REG_SC_BK00_05_L 160 #define GOP_SC_GOPEN REG_SC_BK00_06_L 161 #define GOP_SC_IP_SYNC REG_SC_BK01_02_L 162 #define GOP_SC_IP_MAIN_HSTART REG_SC_BK01_05_L 163 #define GOP_SC_IP_MAIN_INTERLACE REG_SC_BK01_1E_L 164 #define GOP_SC_IP_MAIN_USR_INTERLACE REG_SC_BK01_21_L 165 #define GOP_SC_IP2GOP_SRCSEL REG_SC_BK02_5F_L 166 #define GOP_SC_OSD_CHECK_ALPHA REG_SC_BK0F_2B_L 167 #define GOP_SC_VOPNBL REG_SC_BK10_23_L 168 #define GOP_SC_ALPHAMODE REG_SC_BK10_5B_L 169 #define GOP_SC_GOPENMODE1 REG_SC_BK10_5B_L 170 #define GOP_SC_MIRRORCFG REG_SC_BK12_03_L 171 #define GOP_SC_BLEND0_GOP_SWITCH REG_SC_BK2F_27_L 172 #define GOP_SC_VOP2BLENDING_L REG_SC_BK2F_37_L 173 #define GOP_SC_VOP2BLENDING_H REG_SC_BK2F_38_L 174 #define GOP_SC_VOPVTK REG_SC_BK2F_3A_L 175 #define GOP_SC_VOPVTK_L REG_SC_BK2F_3B_L 176 #define GOP_SC_VOPVTK_H REG_SC_BK2F_3C_L 177 #define GOP_SC_OCMIXER REG_SC_BK37_22_L 178 #define GOP_SC_OCMISC REG_SC_BK37_24_L 179 #define GOP_SC_OCALPHA REG_SC_BK37_28_L 180 #define GOP_SC_GOPSC_SRAM_CTRL REG_SC_BK3D_0D_L 181 #define GOP_SC_FRC_LAYER1_L_EN REG_SC_BK40_22_L 182 #define GOP_SC_FRC_LAYER1_R_EN REG_SC_BK40_23_L 183 #define GOP_SC_FRC_LAYER2_L_EN REG_SC_BK40_24_L 184 #define GOP_SC_FRC_LAYER2_R_EN REG_SC_BK40_25_L 185 #define GOP_SC_MIU_SEL REG_SC_BK7F_10_L 186 #define GOP_SC_MIU_IP_SEL REG_SC_BK7F_11_L 187 188 #define GOP_SC1_CHANNELSYNC REG_SC1_BK00_05_L 189 #define GOP_SC1_GOPEN REG_SC1_BK00_06_L 190 #define GOP_SC1_VOPNBL REG_SC1_BK10_23_L 191 //---------------------------------------------------------------------------- 192 // MVOP Reg 193 //---------------------------------------------------------------------------- 194 #define GOP_MVOP_MIRRORCFG (MVOP_REG_BASE+0x76) 195 196 //---------------------------------------------------------------------------- 197 // VE Reg 198 //---------------------------------------------------------------------------- 199 #define GOP_VE_TVS_CTRL 0x00 200 #define GOP_VE_TVS_OSD_EN 0x55 201 #define GOP_VE_TVS_OSD1_EN 0x60 202 #define GOP_VE_TVE_SWRST 0x07 203 204 //---------------------------------------------------------------------------- 205 // GE Reg 206 //---------------------------------------------------------------------------- 207 #define GOP_GE_FMT_BLT (GE_REG_BASE+(0x01*2)) 208 #define GOP_GE_EN_CMDQ BIT(0) 209 #define GOP_GE_EN_VCMDQ BIT(1) 210 211 #define GOP_GE_VQ_FIFO_STATUS_L (GE_REG_BASE+(0x04*2)) 212 #define GOP_GE_VQ_FIFO_STATUS_H (GE_REG_BASE+(0x05*2)) 213 214 #define GOP_GE_STATUS (GE_REG_BASE+(0x07*2)) 215 #define GOP_GE_BUSY BIT(0) 216 #define GOP_GE_CMDQ1_STATUS BMASK(7:3) 217 #define GOP_GE_CMDQ2_STATUS BMASK(15:11) 218 219 #define GOP_GE_TAG (GE_REG_BASE+(0x2C*2)) 220 221 #define GOP_GE_DBBASE0 (GE_REG_BASE+(0x26*2)) 222 #define GOP_GE_DBBASE1 (GE_REG_BASE+(0x27*2)) 223 #define GOP_GE_DBPIT (GE_REG_BASE+(0x33*2)) 224 #define GOP_GE_FBFMT (GE_REG_BASE+(0x34*2)) 225 #define GOP_GE_SRCW (GE_REG_BASE+(0x6e*2)) 226 #define GOP_GE_SRCH (GE_REG_BASE+(0x6f*2)) 227 228 229 //---------------------------------------------------------------------------- 230 // ChipTop Reg 231 //---------------------------------------------------------------------------- 232 /* GOP0 and GOP1 CLK */ 233 #define GOP_GOPCLK (CKG_REG_BASE+(0x40<<1)) 234 #define CKG_GOPG0_DISABLE_CLK ~(GOP_BIT0) 235 #define CKG_GOPG0_ODCLK (0<<2) 236 #define CKG_GOPG0_OD1CLK (2<<2) 237 #define CKG_GOPG0_IDCLK2 (6 << 2) 238 #define CKG_GOPG0_IDCLK1 (7 << 2) 239 #define CKG_GOPG0_OCC_FRCCLK (3 << 2) 240 #define CKG_GOPG0_MIXERCLK_VE (4 << 2) 241 #define CKG_GOPG0_BYPASS_FRCCLK (5 << 2) 242 #define CKG_GOPG0_FCLK (8 << 2) 243 #define CKG_GOPG0_MVOP (1 << 2) 244 #define CKG_GOPG0_DISABLE_CLK_MASK (GOP_BIT0) 245 #define CKG_GOPG0_MASK (GOP_BIT5 | GOP_BIT4 | GOP_BIT3 | GOP_BIT2) 246 247 #define CKG_GOPG1_DISABLE_CLK ~(GOP_BIT8) 248 #define CKG_GOPG1_ODCLK (0 << 10) 249 #define CKG_GOPG1_OD1CLK (2 << 10) 250 #define CKG_GOPG1_IDCLK2 (6 << 10) 251 #define CKG_GOPG1_IDCLK1 (7 << 10) 252 #define CKG_GOPG1_OCC_FRCCLK (3 << 10) 253 #define CKG_GOPG1_MIXERCLK_VE (4 << 10) 254 #define CKG_GOPG1_BYPASS_FRCCLK (5 << 10) 255 #define CKG_GOPG1_FCLK (8 << 10) 256 #define CKG_GOPG1_MVOP (1 << 10) 257 #define CKG_GOPG1_DISABLE_CLK_MASK (GOP_BIT8) 258 #define CKG_GOPG1_MASK (GOP_BIT13 | GOP_BIT12 | GOP_BIT11 | GOP_BIT10) 259 260 #define CKG_GOPG0_SCALING (CKG_REG_BASE+0x88) 261 #define CKG_GOPG0_MG (CKG_REG_BASE+0xFE) 262 #define CKG_GOPG0_MG_MASK (GOP_BIT3 | GOP_BIT2) 263 #define CKG_GOPG2_MG_MASK (GOP_BIT7 | GOP_BIT6) 264 265 #define CKG_GOPMIXER_CLK (CKG_REG_BASE+0x82) 266 #define CKG_GOPMIXER_ODCLK (4<<2) 267 #define CKG_GOPMIXER_VECLK (6<<2) 268 #define CKG_GOPMIXER_MASK (GOP_BIT4|GOP_BIT3 | GOP_BIT2) 269 270 /* GOP2 and GOPDWIN CLK */ 271 #define GOP_GOP2CLK (CKG_REG_BASE+(0x42<<1)) 272 #define CKG_GOPG2_DISABLE_CLK ~(GOP_BIT0) 273 #define CKG_GOPG2_ODCLK (0 << 2) 274 #define CKG_GOPG2_OD1CLK (2 << 2) 275 #define CKG_GOPG2_IDCLK2 (6 << 2) 276 #define CKG_GOPG2_IDCLK1 (7 << 2) 277 #define CKG_GOPG2_OCC_FRCCLK (3 << 2) 278 #define CKG_GOPG2_MIXERCLK_VE (4 << 2) 279 #define CKG_GOPG2_BYPASS_FRCCLK (5 << 2) 280 #define CKG_GOPG2_FCLK (8 << 2) 281 #define CKG_GOPG2_MVOP (7 << 2) 282 #define CKG_GOPG2_DISABLE_CLK_MASK (GOP_BIT0) 283 #define CKG_GOPG2_MASK (GOP_BIT5 |GOP_BIT4 | GOP_BIT3 | GOP_BIT2) 284 285 #define CKG_GOPD_CLK_IDCLK2 (0 << 10) 286 #define CKG_GOPD_CLK_ODCLK (1 << 10) 287 #define CKG_GOPD_CLK_DC0CLK (2 << 10) 288 #define CKG_GOPD_CLK_SUBDC0CLK (3 << 10) 289 #define CKG_GOPD_CLK_MIXERCLK_VE (4 << 10) 290 #define CKG_GOPD_MASK (GOP_BIT12 | GOP_BIT11 | GOP_BIT10) 291 292 293 /* GOP3 CLK*/ 294 #define GOP_GOP3CLK (CKG_REG_BASE+(0x42<<1)) 295 #define CKG_GOPG3_ODCLK (0<<10) 296 #define CKG_GOPG3_OD1CLK (2<<10) 297 #define CKG_GOPG3_IDCLK2 (6 << 10) 298 #define CKG_GOPG3_IDCLK1 (7 << 10) 299 #define CKG_GOPG3_OCC_FRCCLK (3 << 10) 300 #define CKG_GOPG3_MIXERCLK_VE (4 << 10) 301 #define CKG_GOPG3_BYPASS_FRCCLK (5 << 10) 302 #define CKG_GOPG3_FCLK (8 << 10) 303 #define CKG_GOPG3_MVOP (7 << 10) 304 #define CKG_GOPG3_DISABLE_CLK_MASK (GOP_BIT8) 305 #define CKG_GOPG3_MASK (GOP_BIT13 | GOP_BIT12 | GOP_BIT11 | GOP_BIT10) 306 #define CKG_GOPD_DISABLE_CLK ~(GOP_BIT8) 307 308 309 /* GOP4 CLK*/ 310 #define GOP_GOP4CLK (CKG_REG_BASE+(0x7E<<1)) 311 #define CKG_GOPG4_ODCLK (0 << 10) 312 #define CKG_GOPG4_OD1CLK (2 << 10) 313 #define CKG_GOPG4_IDCLK2 (6 << 10) 314 #define CKG_GOPG4_IDCLK1 (7 << 10) 315 #define CKG_GOPG4_OCC_FRCCLK (3 << 10) 316 #define CKG_GOPG4_MIXERCLK_VE (4 << 10) 317 #define CKG_GOPG4_BYPASS_FRCCLK (5 << 10) 318 #define CKG_GOPG4_FCLK (8 << 10) 319 #define CKG_GOPG4_MVOP (7 << 10) 320 #define CKG_GOPG4_DISABLE_CLK_MASK (GOP_BIT8) 321 #define CKG_GOPG4_MASK (GOP_BIT13 |GOP_BIT12 | GOP_BIT11 | GOP_BIT10) 322 323 324 /* SRAM CLK */ 325 #define GOP_SRAMCLK (CKG_REG_BASE+(0x43<<1)) 326 #define CKG_SRAM0_DISABLE_CLK (GOP_BIT0) 327 #define CKG_SRAM1_DISABLE_CLK (GOP_BIT2) 328 #define CKG_SRAM0_MASK (GOP_BIT0|GOP_BIT1) 329 #define CKG_SRAM1_MASK (GOP_BIT2|GOP_BIT3) 330 331 /* LINE BUFFER SRAM CLK */ 332 #define GOP_LB_SRAMCLK (CKG_REG_BASE+(0x45<<1)) 333 #define CKG_LB_SRAM1_DISABLE_CLK (GOP_BIT0) /*GOP1*/ 334 #define CKG_LB_SRAM2_DISABLE_CLK (GOP_BIT4) /*GOP2*/ 335 #define CKG_LB_SRAM1_MASK (GOP_BIT2|GOP_BIT3) 336 #define CKG_LB_SRAM2_MASK (GOP_BIT6|GOP_BIT7) 337 338 /*AFBC CLK*/ 339 #define GOP_AFBCCLK (CKG_REG_BASE+(0x5F<<1)) 340 #define CKG_AFBCCLK_DISABLE_CLK (GOP_BIT0) 341 #define CKG_AFBCCLK_216 (0 << 2) 342 #define CKG_AFBCCLK_432 (1 << 2) 343 #define CKG_AFBCCLK_DISABLE_CLK_MASK (GOP_BIT0|GOP_BIT1|GOP_BIT2|GOP_BIT3) 344 345 //---------------------------------------------------------------------------- 346 // MIU Reg 347 //---------------------------------------------------------------------------- 348 #define GOP_CLIENT_REG 0x7D 349 #define GOP_MIU_GROUP (MIU0_REG_BASE+(GOP_CLIENT_REG*2)) 350 #define GOP_MIU_GROUP1 (MIU_REG_BASE+(GOP_CLIENT_REG*2)) 351 352 /*Define each gop miu clint bit*/ 353 #define GOP_MIU_CLIENT_DWIN 0xFF 354 #define GOP_MIU_CLIENT_GOP0 0x0 355 #define GOP_MIU_CLIENT_GOP1 0x1 356 #define GOP_MIU_CLIENT_GOP2 0x2 357 #define GOP_MIU_CLIENT_GOP3 0x3 358 #define GOP_MIU_CLIENT_GOP4 0x4 359 #define GOP_MIU_CLIENT_GOP5 0xff 360 361 //---------------------------------------------------------------------------- 362 // GOP Reg 363 //---------------------------------------------------------------------------- 364 #define GOP_REG(bk, reg) (GOP_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2) 365 #define __GOP_REG(reg) (GOP_REG_BASE+(reg) * 2) 366 #define GOP_REG_DIRECT_BASE (0x120200) 367 #define GOP_REG_GOP4_BK_OFFSET 0x1900 368 #define GOP_REG_GOP4_GW_OFFSET 0x1C00 369 #define GOP_REG_GOP4_ST_OFFSET 0x1D00 370 371 #define GOP_REG_VAL(x) (1<<x) 372 373 //MUX Setting 374 #define GOP_MUX_SHIFT 0x3 375 #define GOP_REGMUX_MASK BMASK((GOP_MUX_SHIFT-1):0) 376 #define GOP_MUX0_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*0)) 377 #define GOP_MUX1_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*1)) 378 #define GOP_MUX2_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*2)) 379 #define GOP_MUX3_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*3)) 380 #define GOP_MUX4_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*4)) 381 #define GOP_MUX4_SHIFT 1<<14 382 383 //Priority Setting 384 #define GOP_REGPRI_MASK BMASK(1:0) 385 #define GWIN0_PRI_SHIFT 0 386 #define GWIN0_PRI_MASK (GOP_REGPRI_MASK<<GWIN0_PRI_SHIFT) 387 #define GWIN1_PRI_SHIFT 4 388 #define GWIN1_PRI_MASK (GOP_REGPRI_MASK<<GWIN1_PRI_SHIFT) 389 #define GWIN2_PRI_SHIFT 8 390 #define GWIN2_PRI_MASK (GOP_REGPRI_MASK<<GWIN2_PRI_SHIFT) 391 #define GWIN3_PRI_SHIFT 12 392 #define GWIN3_PRI_MASK (GOP_REGPRI_MASK<<GWIN3_PRI_SHIFT) 393 394 //IP and VOP MUX Setting 395 #define GOP_IP_MAIN_MUX_SHIFT 0 396 #define GOP_IP_MAIN_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_MAIN_MUX_SHIFT 397 #define GOP_IP_SUB_MUX_SHIFT 3 398 #define GOP_IP_SUB_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_SUB_MUX_SHIFT 399 #define GOP_IP_VOP0_MUX_SHIFT 6 400 #define GOP_IP_VOP0_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP0_MUX_SHIFT 401 #define GOP_IP_VOP1_MUX_SHIFT 9 402 #define GOP_IP_VOP1_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP1_MUX_SHIFT 403 404 405 //IP and VOP MUX Setting 406 #define GOP_Mix_MUX0_SHIFT 0 407 #define GOP_Mix_MUX0_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_Mix_MUX0_SHIFT 408 #define GOP_Mix_MUX1_SHIFT 3 409 #define GOP_Mix_MUX1_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_Mix_MUX1_SHIFT 410 #define GOP_VE0_MUX_SHIFT 6 411 #define GOP_VE0_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_VE0_MUX_SHIFT 412 #define GOP_VE1_MUX_SHIFT 9 413 #define GOP_VE1_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_VE1_MUX_SHIFT 414 415 416 //4k2k FRC MUX Setting 417 #define GOP_FRC_MUX_SHIFT 0x3 418 #define GOP_FRC_REGMUX_MASK BMASK((GOP_MUX_SHIFT-1):0) 419 #define GOP_FRC_MUX0_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*0)) 420 #define GOP_FRC_MUX1_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*1)) 421 #define GOP_FRC_MUX2_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*2)) 422 #define GOP_FRC_MUX3_MASK (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*3)) 423 424 // for gwin color format mask 425 #define GOP_REG_COLORTYPE_MASK BMASK(4:0) 426 #define GOP_REG_COLORTYPE_SHIFT 4 427 428 //DIP Setting 429 #define GOP_DIP_MUX_SHIFT 12 430 #define GOP_DIP_MUX_MASK (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_DIP_MUX_SHIFT 431 432 #define GOP_BANK_OFFSET 0x3 433 #define GOP_4G_OFST 0x0 434 #define GOP_2G_OFST (0x1*GOP_BANK_OFFSET) 435 #define GOP_1G_OFST (0x2*GOP_BANK_OFFSET) 436 #define GOP_1GX_OFST (0x3*GOP_BANK_OFFSET) 437 #define GOP_DW_OFST (0x4*GOP_BANK_OFFSET) 438 #define GOP_AFBC_OFST 0xE 439 #define GOP_MIXER_OFST 0xD 440 #define GOP_1GS0_OFST 0xE 441 #define GOP_1GS1_OFST 0x11 442 443 #define GOP_OFFSET_WR 8 444 #define GOP_VAL_WR GOP_REG_VAL(GOP_OFFSET_WR) 445 #define GOP_OFFSET_FWR 9 446 #define GOP_VAL_FWR GOP_REG_VAL(GOP_OFFSET_FWR) 447 #define GOP_OFFSET_FCLR 11 448 #define GOP_VAL_FCL GOP_REG_VAL(GOP_OFFSET_FCLR) 449 #define GOP4G_OFFSET_WR_ACK 12 450 #define GOP4G_VAL_WR_ACK GOP_REG_VAL(GOP4G_OFFSET_WR_ACK) 451 #define GOP2G_OFFSET_WR_ACK 13 452 #define GOP2G_VAL_WR_ACK GOP_REG_VAL(GOP2G_OFFSET_WR_ACK) 453 #define GOPD_OFFSET_WR_ACK 14 454 #define GOPD_VAL_WR_ACK GOP_REG_VAL(GOPD_OFFSET_WR_ACK) 455 #define GOP1G_OFFSET_WR_ACK 15 456 #define GOP1G_VAL_WR_ACK GOP_REG_VAL(GOPD_OFFSET_WR_ACK) 457 #define GOP_VAL_ACK(x) GOP_REG_VAL(GOP4G_OFFSET_WR_ACK+x) 458 459 #define GOP_4G_CTRL0 GOP_REG(GOP_4G_OFST, 0x00) 460 #define GOP_4G_CTRL1 GOP_REG(GOP_4G_OFST, 0x01) 461 #define GOP_4G_RATE GOP_REG(GOP_4G_OFST, 0x02) 462 #define GOP_4G_PALDATA_L GOP_REG(GOP_4G_OFST, 0x03) 463 #define GOP_4G_PALDATA_H GOP_REG(GOP_4G_OFST, 0x04) 464 #define GOP_4G_PALCTRL GOP_REG(GOP_4G_OFST, 0x05) 465 #define GOP_4G_REGDMA_END GOP_REG(GOP_4G_OFST, 0x06) 466 #define GOP_4G_REGDMA_STR GOP_REG(GOP_4G_OFST, 0x07) 467 #define GOP_4G_INT GOP_REG(GOP_4G_OFST, 0x08) 468 #define GOP_4G_HWSTATE GOP_REG(GOP_4G_OFST, 0x09) 469 #define GOP_4G_SVM_HSTR GOP_REG(GOP_4G_OFST, 0x0a) 470 #define GOP_4G_SVM_HEND GOP_REG(GOP_4G_OFST, 0x0b) 471 #define GOP_4G_SVM_VSTR GOP_REG(GOP_4G_OFST, 0x0c) 472 #define GOP_4G_SVM_VEND GOP_REG(GOP_4G_OFST, 0x0d) 473 #define GOP_4G_RDMA_HT GOP_REG(GOP_4G_OFST, 0x0e) 474 #define GOP_4G_HS_PIPE GOP_REG(GOP_4G_OFST, 0x0f) 475 #define GOP_4G_SLOW GOP_REG(GOP_4G_OFST, 0x10) 476 #define GOP_4G_BRI GOP_REG(GOP_4G_OFST, 0x11) 477 #define GOP_4G_CON GOP_REG(GOP_4G_OFST, 0x12) 478 #define GOP_4G_BW GOP_REG(GOP_4G_OFST, 0x19) 479 #define GOP_4G_NEW_BW GOP_REG(GOP_4G_OFST, 0x1C) 480 #define GOP_4G_SRAM_BORROW GOP_REG(GOP_4G_OFST, 0x1D) 481 #define GOP_4G_3D_MIDDLE GOP_REG(GOP_4G_OFST, 0x1E) 482 #define GOP_4G_MIU_SEL GOP_REG(GOP_4G_OFST, 0x1F) 483 #define GOP_4G_PRI0 GOP_REG(GOP_4G_OFST, 0x20) 484 #define GOP_4G_BOT_HS GOP_REG(GOP_4G_OFST, 0x23) 485 #define GOP_4G_TRSCLR_L GOP_REG(GOP_4G_OFST, 0x24) 486 #define GOP_4G_TRSCLR_H GOP_REG(GOP_4G_OFST, 0x25) 487 #define GOP_4G_TRSCLR_TUV_L GOP_REG(GOP_4G_OFST, 0x26) 488 #define GOP_4G_TRSCLR_TUV_H GOP_REG(GOP_4G_OFST, 0x27) 489 #define GOP_4G_YUV_SWAP GOP_REG(GOP_4G_OFST, 0x28) 490 #define GOP_4G_STRCH_HSZ GOP_REG(GOP_4G_OFST, 0x30) 491 #define GOP_4G_STRCH_VSZ GOP_REG(GOP_4G_OFST, 0x31) 492 #define GOP_4G_STRCH_HSTR GOP_REG(GOP_4G_OFST, 0x32) 493 #define GOP_4G_STRCH_VSTR GOP_REG(GOP_4G_OFST, 0x34) 494 #define GOP_4G_HSTRCH GOP_REG(GOP_4G_OFST, 0x35) 495 #define GOP_4G_VSTRCH GOP_REG(GOP_4G_OFST, 0x36) 496 #define GOP_4G_HSTRCH_INI GOP_REG(GOP_4G_OFST, 0x38) 497 #define GOP_4G_VSTRCH_INI GOP_REG(GOP_4G_OFST, 0x39) 498 #define GOP_4G_HVSTRCHMD GOP_REG(GOP_4G_OFST, 0x3a) 499 #define GOP_4G_OLDADDR GOP_REG(GOP_4G_OFST, 0x3b) 500 #define GOP_4G_MULTI_ALPHA GOP_REG(GOP_4G_OFST, 0x3c) 501 #define GOP_4G_TWO_LINEBUFFER GOP_4G_MULTI_ALPHA 502 #define GOP_4G_HW_USAGE GOP_REG(GOP_4G_OFST, 0x40) 503 #define GOP_4G_BANK_FWR GOP_REG(GOP_4G_OFST, 0x50) 504 #define GOP_4G_BANK_HVAILDSIZE GOP_REG(GOP_4G_OFST, 0x52) 505 #define GOP_4G_BANK_VVAILDSIZE GOP_REG(GOP_4G_OFST, 0x53) 506 #define GOP_4G_SCALING_H_OUTPUTSIZE GOP_REG(GOP_4G_OFST, 0x56) 507 #define GOP_4G_SCALING_HRATIO_L GOP_REG(GOP_4G_OFST, 0x59) //GOP scaling down ratio dst / out * 2^20 508 #define GOP_4G_SCALING_HRATIO_H GOP_REG(GOP_4G_OFST, 0x5A) 509 #define GOP_4G_SCALING_CFG GOP_REG(GOP_4G_OFST, 0x5B) 510 #define GOP_4G_SCALING_VRATIO_L GOP_REG(GOP_4G_OFST, 0x5C) //GOP scaling down ratio dst / out * 2^20 511 #define GOP_4G_SCALING_VRATIO_H GOP_REG(GOP_4G_OFST, 0x5D) 512 513 514 #define GOP_4G_RBLK0_VOFFL GOP_REG(GOP_4G_OFST, 0x60) 515 #define GOP_4G_RBLK0_VOFFH GOP_REG(GOP_4G_OFST, 0x61) 516 #define GOP_4G_RBLK1_VOFFL GOP_REG(GOP_4G_OFST, 0x62) 517 #define GOP_4G_RBLK1_VOFFH GOP_REG(GOP_4G_OFST, 0x63) 518 #define GOP_4G_RBLK2_VOFFL GOP_REG(GOP_4G_OFST, 0x64) 519 #define GOP_4G_RBLK2_VOFFH GOP_REG(GOP_4G_OFST, 0x65) 520 #define GOP_4G_RBLK3_VOFFL GOP_REG(GOP_4G_OFST, 0x66) 521 #define GOP_4G_RBLK3_VOFFH GOP_REG(GOP_4G_OFST, 0x67) 522 #define GOP_4G_GOP_INTERNAL_ZORDER GOP_REG(GOP_4G_OFST, 0x6A) 523 #define GOP_4G_GOP_INTERNAL_ZORDER_TRIG GOP_REG(GOP_4G_OFST, 0x6B) 524 #define GOP_4G_RBLK0_HOFF GOP_REG(GOP_4G_OFST, 0x70) 525 #define GOP_4G_RBLK1_HOFF GOP_REG(GOP_4G_OFST, 0x71) 526 #define GOP_4G_RBLK2_HOFF GOP_REG(GOP_4G_OFST, 0x72) 527 #define GOP_4G_RBLK3_HOFF GOP_REG(GOP_4G_OFST, 0x73) 528 #define GOP_4G_REGDMA_EN GOP_REG(GOP_4G_OFST, 0x78) 529 #define GOP_MUX_IPVOP __GOP_REG(0x77) 530 #define GOP_MUX_SC1 __GOP_REG(0x7A) 531 #define GOP_MUX4_MIX_VE __GOP_REG(0x7B) 532 #define GOP_BAK_SEL_EX __GOP_REG(0x7C) 533 #define GOP_MUX_4K2K __GOP_REG(0x7D) 534 #define GOP_MUX __GOP_REG(0x7e) 535 #define GOP_BAK_SEL __GOP_REG(0x7f) 536 537 #define GOP_4G_GWIN0_CTRL(id) GOP_REG(GOP_4G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP0_GWIN))) 538 #define GOP_4G_DRAM_RBLK_L(id) GOP_REG(GOP_4G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP0_GWIN))) 539 #define GOP_4G_DRAM_RBLK_H(id) GOP_REG(GOP_4G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP0_GWIN))) 540 #define GOP_4G_DEL_PIXEL(id) GOP_REG(GOP_4G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN))) 541 #define GOP_4G_HSTR(id) GOP_REG(GOP_4G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP0_GWIN))) 542 #define GOP_4G_HEND(id) GOP_REG(GOP_4G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP0_GWIN))) 543 #define GOP_4G_VSTR(id) GOP_REG(GOP_4G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP0_GWIN))) 544 #define GOP_4G_GWIN_MIDDLE(id) GOP_REG(GOP_4G_OFST+1, 0x07 + (0x20*((id)%MAX_GOP0_GWIN))) 545 #define GOP_4G_VEND(id) GOP_REG(GOP_4G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP0_GWIN))) 546 #define GOP_4G_DRAM_RBLK_HSIZE(id) GOP_REG(GOP_4G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP0_GWIN))) 547 #define GOP_4G_GWIN_ALPHA01(id) GOP_REG(GOP_4G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP0_GWIN))) 548 #define GOP_4G_DRAM_VSTR_L(id) GOP_REG(GOP_4G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP0_GWIN))) 549 #define GOP_4G_DRAM_VSTR_H(id) GOP_REG(GOP_4G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP0_GWIN))) 550 #define GOP_4G_DRAM_HSTR(id) GOP_REG(GOP_4G_OFST+1, 0x0E + (0x20*((id)%MAX_GOP0_GWIN))) 551 #define GOP_4G_DRAM_RBLK_SIZE_L(id) GOP_REG(GOP_4G_OFST+1, 0x10 + (0x20*((id)%MAX_GOP0_GWIN))) 552 #define GOP_4G_DRAM_RBLK_SIZE_H(id) GOP_REG(GOP_4G_OFST+1, 0x11 + (0x20*((id)%MAX_GOP0_GWIN))) 553 #define GOP_4G_DRAM_RLEN_L(id) GOP_REG(GOP_4G_OFST+1, 0x12 + (0x20*((id)%MAX_GOP0_GWIN))) 554 #define GOP_4G_DRAM_RLEN_H(id) GOP_REG(GOP_4G_OFST+1, 0x13 + (0x20*((id)%MAX_GOP0_GWIN))) 555 #define GOP_4G_DRAM_HVSTOP_L(id) GOP_REG(GOP_4G_OFST+1, 0x14 + (0x20*((id)%MAX_GOP0_GWIN))) 556 #define GOP_4G_DRAM_HVSTOP_H(id) GOP_REG(GOP_4G_OFST+1, 0x15 + (0x20*((id)%MAX_GOP0_GWIN))) 557 #define GOP_4G_DRAM_FADE(id) GOP_REG(GOP_4G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP0_GWIN))) 558 #define GOP_4G_BG_CLR(id) GOP_REG(GOP_4G_OFST+1, 0x18 + (0x20*((id)%MAX_GOP0_GWIN))) 559 #define GOP_4G_BG_HSTR(id) GOP_REG(GOP_4G_OFST+1, 0x19 + (0x20*((id)%MAX_GOP0_GWIN))) 560 #define GOP_4G_BG_HEND(id) GOP_REG(GOP_4G_OFST+1, 0x1a + (0x20*((id)%MAX_GOP0_GWIN))) 561 #define GOP_4G_BG_VSTR(id) GOP_REG(GOP_4G_OFST+1, 0x1C + (0x20*((id)%MAX_GOP0_GWIN))) 562 #define GOP_4G_BG_VEND(id) GOP_REG(GOP_4G_OFST+1, 0x1D + (0x20*((id)%MAX_GOP0_GWIN))) 563 #define GOP_4G_3DOSD_SUB_RBLK_L(id) GOP_REG(GOP_4G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP0_GWIN))) 564 #define GOP_4G_3DOSD_SUB_RBLK_H(id) GOP_REG(GOP_4G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP0_GWIN))) 565 566 567 #define GOP_2G_CTRL0 GOP_REG(GOP_2G_OFST, 0x00) 568 #define GOP_2G_CTRL1 GOP_REG(GOP_2G_OFST, 0x01) 569 #define GOP_2G_RATE GOP_REG(GOP_2G_OFST, 0x02) 570 #define GOP_2G_PALDATA_L GOP_REG(GOP_2G_OFST, 0x03) 571 #define GOP_2G_PALDATA_H GOP_REG(GOP_2G_OFST, 0x04) 572 #define GOP_2G_PALCTRL GOP_REG(GOP_2G_OFST, 0x05) 573 #define GOP_2G_REGDMA_END GOP_REG(GOP_2G_OFST, 0x06) 574 #define GOP_2G_REGDMA_STR GOP_REG(GOP_2G_OFST, 0x07) 575 #define GOP_2G_INT GOP_REG(GOP_2G_OFST, 0x08) 576 #define GOP_2G_HWSTATE GOP_REG(GOP_2G_OFST, 0x09) 577 #define GOP_2G_RDMA_HT GOP_REG(GOP_2G_OFST, 0x0e) 578 #define GOP_2G_HS_PIPE GOP_REG(GOP_2G_OFST, 0x0f) 579 #define GOP_2G_SLOW GOP_REG(GOP_2G_OFST, 0x10) 580 #define GOP_2G_BRI GOP_REG(GOP_2G_OFST, 0x11) 581 #define GOP_2G_CON GOP_REG(GOP_2G_OFST, 0x12) 582 #define GOP_2G_BW GOP_REG(GOP_2G_OFST, 0x19) 583 #define GOP_2G_3D_MIDDLE GOP_REG(GOP_2G_OFST, 0x1E) 584 #define GOP_2G_PRI0 GOP_REG(GOP_2G_OFST, 0x20) 585 #define GOP_2G_TRSCLR_L GOP_REG(GOP_2G_OFST, 0x24) 586 #define GOP_2G_TRSCLR_H GOP_REG(GOP_2G_OFST, 0x25) 587 #define GOP_2G_STRCH_HSZ GOP_REG(GOP_2G_OFST, 0x30) 588 #define GOP_2G_STRCH_VSZ GOP_REG(GOP_2G_OFST, 0x31) 589 #define GOP_2G_STRCH_HSTR GOP_REG(GOP_2G_OFST, 0x32) 590 #define GOP_2G_STRCH_VSTR GOP_REG(GOP_2G_OFST, 0x34) 591 #define GOP_2G_HSTRCH GOP_REG(GOP_2G_OFST, 0x35) 592 #define GOP_2G_VSTRCH GOP_REG(GOP_2G_OFST, 0x36) 593 #define GOP_2G_HSTRCH_INI GOP_REG(GOP_2G_OFST, 0x38) 594 #define GOP_2G_VSTRCH_INI GOP_REG(GOP_2G_OFST, 0x39) 595 #define GOP_2G_HVStrch_MD GOP_REG(GOP_2G_OFST, 0x3a) 596 #define GOP_2G_OLDADDR GOP_REG(GOP_2G_OFST, 0x3b) 597 #define GOP_2G_MULTI_ALPHA GOP_REG(GOP_2G_OFST, 0x3c) 598 #define GOP_2G_REGDMA_EN GOP_REG(GOP_2G_OFST, 0x78) 599 600 601 #define GOP_2G_GWIN0_CTRL(id) GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN))) 602 #define GOP_2G_GWIN_CTRL(id) GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN))) 603 #define GOP_2G_DRAM_RBLK_L(id) GOP_REG(GOP_2G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP1_GWIN))) 604 #define GOP_2G_DRAM_RBLK_H(id) GOP_REG(GOP_2G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP1_GWIN))) 605 #define GOP_2G_DEL_PIXEL(id) GOP_REG(GOP_2G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN))) 606 #define GOP_2G_HSTR(id) GOP_REG(GOP_2G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP1_GWIN))) 607 #define GOP_2G_HEND(id) GOP_REG(GOP_2G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP1_GWIN))) 608 #define GOP_2G_VSTR(id) GOP_REG(GOP_2G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP1_GWIN))) 609 #define GOP_2G_VEND(id) GOP_REG(GOP_2G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP1_GWIN))) 610 #define GOP_2G_DRAM_RBLK_HSIZE(id) GOP_REG(GOP_2G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP1_GWIN))) 611 #define GOP_2G_GWIN_ALPHA01(id) GOP_REG(GOP_2G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP1_GWIN))) 612 #define GOP_2G_DRAM_VSTR_L(id) GOP_REG(GOP_2G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP1_GWIN))) 613 #define GOP_2G_DRAM_VSTR_H(id) GOP_REG(GOP_2G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP1_GWIN))) 614 #define GOP_2G_DRAM_FADE(id) GOP_REG(GOP_2G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP1_GWIN))) 615 #define GOP_2G_3DOSD_SUB_RBLK_L(id) GOP_REG(GOP_2G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP1_GWIN))) 616 #define GOP_2G_3DOSD_SUB_RBLK_H(id) GOP_REG(GOP_2G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP1_GWIN))) 617 618 // DWIN reg 619 #define GOP_DW_CTL0_EN GOP_REG(GOP_DW_OFST, 0x00) 620 #define GOP_DWIN_EN (0x00) 621 #define GOP_DWIN_EN_VAL GOP_REG_VAL(GOP_DWIN_EN) 622 #define GOP_DWIN_SHOT (0x07) 623 #define GOP_DWIN_SHOT_VAL GOP_REG_VAL(GOP_DWIN_SHOT) 624 625 #define GOP_DW_LSTR_WBE GOP_REG(GOP_DW_OFST, 0x01) 626 #define GOP_DW_INT_MASK GOP_REG(GOP_DW_OFST, 0x02) 627 #define GOP_DW_DEBUG GOP_REG(GOP_DW_OFST, 0x03) 628 #define GOP_DW_ALPHA GOP_REG(GOP_DW_OFST, 0x04) 629 #define GOP_DW_BW GOP_REG(GOP_DW_OFST, 0x05) 630 #define GOP_DW_VSTR GOP_REG(GOP_DW_OFST, 0x10) 631 #define GOP_DW_HSTR GOP_REG(GOP_DW_OFST, 0x11) 632 #define GOP_DW_VEND GOP_REG(GOP_DW_OFST, 0x12) 633 #define GOP_DW_HEND GOP_REG(GOP_DW_OFST, 0x13) 634 #define GOP_DW_HSIZE GOP_REG(GOP_DW_OFST, 0x14) 635 #define GOP_DW_JMPLEN GOP_REG(GOP_DW_OFST, 0x15) 636 #define GOP_DW_DSTR_L GOP_REG(GOP_DW_OFST, 0x16) 637 #define GOP_DW_DSTR_H GOP_REG(GOP_DW_OFST, 0x17) 638 #define GOP_DW_UB_L GOP_REG(GOP_DW_OFST, 0x18) 639 #define GOP_DW_UB_H GOP_REG(GOP_DW_OFST, 0x19) 640 641 #define GOP_DW_PON_DSTR_L GOP_REG(GOP_DW_OFST, 0x1a) 642 #define GOP_DW_PON_DSTR_H GOP_REG(GOP_DW_OFST, 0x1b) 643 #define GOP_DW_PON_UB_L GOP_REG(GOP_DW_OFST, 0x1c) 644 #define GOP_DW_PON_UB_H GOP_REG(GOP_DW_OFST, 0x1d) 645 #define GOP_DW_FRAME_CTRL GOP_REG(GOP_DW_OFST, 0x30) 646 647 #define GOP_VE_DATA_MUX GOP_REG(GOP_MIXER_OFST, 0x30) 648 649 #define GOP_1G_CTRL0 GOP_REG(GOP_1G_OFST, 0x00) 650 #define GOP_1G_CTRL1 GOP_REG(GOP_1G_OFST, 0x01) 651 #define GOP_1G_RATE GOP_REG(GOP_1G_OFST, 0x02) 652 #define GOP_1G_PALDATA_L GOP_REG(GOP_1G_OFST, 0x03) 653 #define GOP_1G_PALDATA_H GOP_REG(GOP_1G_OFST, 0x04) 654 #define GOP_1G_PALCTRL GOP_REG(GOP_1G_OFST, 0x05) 655 #define GOP_1G_REGDMA_END GOP_REG(GOP_1G_OFST, 0x06) 656 #define GOP_1G_REGDMA_STR GOP_REG(GOP_1G_OFST, 0x07) 657 #define GOP_1G_INT GOP_REG(GOP_1G_OFST, 0x08) 658 #define GOP_1G_HWSTATE GOP_REG(GOP_1G_OFST, 0x09) 659 #define GOP_1G_RDMA_HT GOP_REG(GOP_1G_OFST, 0x0e) 660 #define GOP_1G_HS_PIPE GOP_REG(GOP_1G_OFST, 0x0f) 661 #define GOP_1G_BRI GOP_REG(GOP_1G_OFST, 0x11) 662 #define GOP_1G_CON GOP_REG(GOP_1G_OFST, 0x12) 663 #define GOP_1G_BW GOP_REG(GOP_1G_OFST, 0x19) 664 #define GOP_1G_3D_MIDDLE GOP_REG(GOP_1G_OFST, 0x1E) 665 #define GOP_1G_TRSCLR_L GOP_REG(GOP_1G_OFST, 0x24) 666 #define GOP_1G_TRSCLR_H GOP_REG(GOP_1G_OFST, 0x25) 667 #define GOP_1G_STRCH_HSZ GOP_REG(GOP_1G_OFST, 0x30) 668 #define GOP_1G_STRCH_VSZ GOP_REG(GOP_1G_OFST, 0x31) 669 #define GOP_1G_STRCH_HSTR GOP_REG(GOP_1G_OFST, 0x32) 670 #define GOP_1G_STRCH_VSTR GOP_REG(GOP_1G_OFST, 0x34) 671 #define GOP_1G_HSTRCH GOP_REG(GOP_1G_OFST, 0x35) 672 #define GOP_1G_HSTRCH_INI GOP_REG(GOP_1G_OFST, 0x38) 673 #define GOP_1G_VSTRCH_INI GOP_REG(GOP_1G_OFST, 0x39) 674 #define GOP_1G_HStrch_MD GOP_REG(GOP_1G_OFST, 0x3a) 675 #define GOP_1G_OLDADDR GOP_REG(GOP_1G_OFST, 0x3b) 676 #define GOP_1G_MULTI_ALPHA GOP_REG(GOP_1G_OFST, 0x3c) 677 678 #define GOP_1G_GWIN0_CTRL GOP_REG(GOP_1G_OFST+1, 0x0) 679 #define GOP_1G_DRAM_RBLK_L GOP_REG(GOP_1G_OFST+1, 0x1) 680 #define GOP_1G_DRAM_RBLK_H GOP_REG(GOP_1G_OFST+1, 0x2) 681 #define GOP_1G_DEL_PIXEL GOP_REG(GOP_1G_OFST+1, 0x3) 682 #define GOP_1G_HSTR GOP_REG(GOP_1G_OFST+1, 0x4) 683 #define GOP_1G_HEND GOP_REG(GOP_1G_OFST+1, 0x5) 684 #define GOP_1G_VSTR GOP_REG(GOP_1G_OFST+1, 0x6) 685 #define GOP_1G_VEND GOP_REG(GOP_1G_OFST+1, 0x8) 686 #define GOP_1G_DRAM_RBLK_HSIZE GOP_REG(GOP_1G_OFST+1, 0x9) 687 #define GOP_1G_GWIN_ALPHA01 GOP_REG(GOP_1G_OFST+1, 0xA) 688 #define GOP_1G_DRAM_VSTR_L GOP_REG(GOP_1G_OFST+1, 0x0C) 689 #define GOP_1G_DRAM_VSTR_H GOP_REG(GOP_1G_OFST+1, 0x0D) 690 #define GOP_1G_DRAM_FADE GOP_REG(GOP_1G_OFST+1, 0x16) 691 #define GOP_1G_3DOSD_SUB_RBLK_L GOP_REG(GOP_1G_OFST+1, 0x1E) 692 #define GOP_1G_3DOSD_SUB_RBLK_H GOP_REG(GOP_1G_OFST+1, 0x1F) 693 694 #define GOP_1GX_CTRL0 GOP_REG(GOP_1GX_OFST, 0x00) 695 #define GOP_1GX_CTRL1 GOP_REG(GOP_1GX_OFST, 0x01) 696 #define GOP_1GX_RATE GOP_REG(GOP_1GX_OFST, 0x02) 697 #define GOP_1GX_PALDATA_L GOP_REG(GOP_1GX_OFST, 0x03) 698 #define GOP_1GX_PALDATA_H GOP_REG(GOP_1GX_OFST, 0x04) 699 #define GOP_1GX_PALCTRL GOP_REG(GOP_1GX_OFST, 0x05) 700 #define GOP_1GX_REGDMA_END GOP_REG(GOP_1GX_OFST, 0x06) 701 #define GOP_1GX_REGDMA_STR GOP_REG(GOP_1GX_OFST, 0x07) 702 #define GOP_1GX_INT GOP_REG(GOP_1GX_OFST, 0x08) 703 #define GOP_1GX_HWSTATE GOP_REG(GOP_1GX_OFST, 0x09) 704 #define GOP_1GX_RDMA_HT GOP_REG(GOP_1GX_OFST, 0x0e) 705 #define GOP_1GX_HS_PIPE GOP_REG(GOP_1GX_OFST, 0x0f) 706 #define GOP_1GX_BRI GOP_REG(GOP_1GX_OFST, 0x11) 707 #define GOP_1GX_CON GOP_REG(GOP_1GX_OFST, 0x12) 708 #define GOP_1GX_BW GOP_REG(GOP_1GX_OFST, 0x19) 709 #define GOP_1GX_3D_MIDDLE GOP_REG(GOP_1GX_OFST, 0x1E) 710 #define GOP_1GX_TRSCLR_L GOP_REG(GOP_1GX_OFST, 0x24) 711 #define GOP_1GX_TRSCLR_H GOP_REG(GOP_1GX_OFST, 0x25) 712 #define GOP_1GX_STRCH_HSZ GOP_REG(GOP_1GX_OFST, 0x30) 713 #define GOP_1GX_STRCH_VSZ GOP_REG(GOP_1GX_OFST, 0x31) 714 #define GOP_1GX_STRCH_HSTR GOP_REG(GOP_1GX_OFST, 0x32) 715 #define GOP_1GX_STRCH_VSTR GOP_REG(GOP_1GX_OFST, 0x34) 716 #define GOP_1GX_HSTRCH GOP_REG(GOP_1GX_OFST, 0x35) 717 #define GOP_1GX_HSTRCH_INI GOP_REG(GOP_1GX_OFST, 0x38) 718 #define GOP_1GX_VSTRCH_INI GOP_REG(GOP_1GX_OFST, 0x39) 719 #define GOP_1GX_HStrch_MD GOP_REG(GOP_1GX_OFST, 0x3a) 720 #define GOP_1GX_OLDADDR GOP_REG(GOP_1GX_OFST, 0x3b) 721 #define GOP_1GX_MULTI_ALPHA GOP_REG(GOP_1GX_OFST, 0x3c) 722 723 #define GOP_1GX_GWIN0_CTRL GOP_REG(GOP_1GX_OFST+1, 0x00) 724 #define GOP_1GX_DRAM_RBLK_L GOP_REG(GOP_1GX_OFST+1, 0x01) 725 #define GOP_1GX_DRAM_RBLK_H GOP_REG(GOP_1GX_OFST+1, 0x02) 726 #define GOP_1GX_DEL_PIXEL GOP_REG(GOP_1GX_OFST+1, 0x03) 727 #define GOP_1GX_HSTR GOP_REG(GOP_1GX_OFST+1, 0x04) 728 #define GOP_1GX_HEND GOP_REG(GOP_1GX_OFST+1, 0x05) 729 #define GOP_1GX_VSTR GOP_REG(GOP_1GX_OFST+1, 0x06) 730 #define GOP_1GX_VEND GOP_REG(GOP_1GX_OFST+1, 0x08) 731 #define GOP_1GX_DRAM_RBLK_HSIZE GOP_REG(GOP_1GX_OFST+1, 0x09) 732 #define GOP_1GX_GWIN_ALPHA01 GOP_REG(GOP_1GX_OFST+1, 0x0A) 733 #define GOP_1GX_DRAM_VSTR_L GOP_REG(GOP_1GX_OFST+1, 0x0C) 734 #define GOP_1GX_DRAM_VSTR_H GOP_REG(GOP_1GX_OFST+1, 0x0D) 735 #define GOP_1GX_DRAM_FADE GOP_REG(GOP_1GX_OFST+1, 0x16) 736 #define GOP_1GX_3DOSD_SUB_RBLK_L GOP_REG(GOP_1GX_OFST+1, 0x1E) 737 #define GOP_1GX_3DOSD_SUB_RBLK_H GOP_REG(GOP_1GX_OFST+1, 0x1F) 738 739 #define GOP_MIXER_CTRL GOP_REG(GOP_MIXER_OFST, 0x0) 740 741 #define GOP_MIXER_EN_GOP_MIX0 (1<<0) 742 #define GOP_MIXER_EN_GOP_MIX1 (1<<1) 743 #define GOP_MIXER_GOP_MIX_MODE (1<<2) 744 #define GOP_MIXER_HS_POL (1<<5) 745 #define GOP_MIXER_VS_POL (1<<6) 746 #define GOP_MIXER_EN_FLD_FREERUN_MD (1<<7) 747 #define GOP_MIXER_INV_FIELD_VEOSD (1<<8) 748 #define GOP_MIXER_ABL_POL (1<<9) 749 #define GOP_MIXER_EN_MIX (1<<15) 750 751 752 #define GOP_MIXER_FHST GOP_REG(GOP_MIXER_OFST, 0x1) 753 #define GOP_MIXER_FVST GOP_REG(GOP_MIXER_OFST, 0x2) 754 #define GOP_MIXER_FHEND GOP_REG(GOP_MIXER_OFST, 0x3) 755 #define GOP_MIXER_FVEND GOP_REG(GOP_MIXER_OFST, 0x4) 756 #define GOP_MIXER_HTT GOP_REG(GOP_MIXER_OFST, 0x5) 757 #define GOP_MIXER_HS_DELAY GOP_REG(GOP_MIXER_OFST, 0x6) 758 #define GOP_MIXER_FLD_DELAY_LINE GOP_REG(GOP_MIXER_OFST, 0x7) 759 #define GOP_MIXER_FLD_DE_ADJUST GOP_REG(GOP_MIXER_OFST, 0x8) 760 #define GOP_MIXER_C_FIL_COEF0COEF1 GOP_REG(GOP_MIXER_OFST, 0x9) 761 #define GOP_MIXER_C_FIL_COEF2COEF3 GOP_REG(GOP_MIXER_OFST, 0xa) 762 #define GOP_MIXER_VFIL_RATIO GOP_REG(GOP_MIXER_OFST, 0xb) 763 #define GOP_MIXER_MIX_DUMMY GOP_REG(GOP_MIXER_OFST, 0xc) 764 #define GOP_MIXER_DEBUG_H GOP_REG(GOP_MIXER_OFST, 0xd) 765 #define GOP_MIXER_DEBUG_V GOP_REG(GOP_MIXER_OFST, 0xe) 766 #define GOP_MIXER_DEBUG_PIXEL_L GOP_REG(GOP_MIXER_OFST, 0xf) 767 #define GOP_MIXER_DEBUG_PIXEL_H GOP_REG(GOP_MIXER_OFST, 0x10) 768 #define GOP_MIXER_VE GOP_REG(GOP_MIXER_OFST, 0x11) 769 #define GOP_MIXER_FULL_WIN_DE GOP_REG(GOP_MIXER_OFST, 0x20) 770 #define GOP_VE_DATA_MUX GOP_REG(GOP_MIXER_OFST, 0x30) 771 772 #define GOP_MIXER_EN_VFIL (1<<0) 773 #define GOP_MIXER_EN_VFIL_MASK GOP_BIT0 774 #define GOP_MIXER_VS_FLD_ON (1<<7) 775 #define GOP_MIXER_VS_FLD_ON_MASK GOP_BIT7 776 #define GOP_MIXER_REG_DUMMY GOP_REG(GOP_MIXER_OFST, 0x20) 777 778 #define GOP_1GS0_CTRL0 GOP_REG(GOP_1GS0_OFST, 0x00) 779 #define GOP_1GS0_CTRL1 GOP_REG(GOP_1GS0_OFST, 0x01) 780 #define GOP_1GS0_RATE GOP_REG(GOP_1GS0_OFST, 0x02) 781 #define GOP_1GS0_PALDATA_L GOP_REG(GOP_1GS0_OFST, 0x03) 782 #define GOP_1GS0_PALDATA_H GOP_REG(GOP_1GS0_OFST, 0x04) 783 #define GOP_1GS0_PALCTRL GOP_REG(GOP_1GS0_OFST, 0x05) 784 #define GOP_1GS0_REGDMA_END GOP_REG(GOP_1GS0_OFST, 0x06) 785 #define GOP_1GS0_REGDMA_STR GOP_REG(GOP_1GS0_OFST, 0x07) 786 #define GOP_1GS0_INT GOP_REG(GOP_1GS0_OFST, 0x08) 787 #define GOP_1GS0_HWSTATE GOP_REG(GOP_1GS0_OFST, 0x09) 788 #define GOP_1GS0_RDMA_HT GOP_REG(GOP_1GS0_OFST, 0x0e) 789 #define GOP_1GS0_HS_PIPE GOP_REG(GOP_1GS0_OFST, 0x0f) 790 #define GOP_1GS0_BRI GOP_REG(GOP_1GS0_OFST, 0x11) 791 #define GOP_1GS0_CON GOP_REG(GOP_1GS0_OFST, 0x12) 792 #define GOP_1GS0_BW GOP_REG(GOP_1GS0_OFST, 0x19) 793 #define GOP_1GS0_TRSCLR_L GOP_REG(GOP_1GS0_OFST, 0x24) 794 #define GOP_1GS0_TRSCLR_H GOP_REG(GOP_1GS0_OFST, 0x25) 795 #define GOP_1GS0_STRCH_HSZ GOP_REG(GOP_1GS0_OFST, 0x30) 796 #define GOP_1GS0_STRCH_VSZ GOP_REG(GOP_1GS0_OFST, 0x31) 797 #define GOP_1GS0_STRCH_HSTR GOP_REG(GOP_1GS0_OFST, 0x32) 798 #define GOP_1GS0_STRCH_VSTR GOP_REG(GOP_1GS0_OFST, 0x34) 799 #define GOP_1GS0_HSTRCH GOP_REG(GOP_1GS0_OFST, 0x35) 800 #define GOP_1GS0_HSTRCH_INI GOP_REG(GOP_1GS0_OFST, 0x38) 801 #define GOP_1GS0_VSTRCH_INI GOP_REG(GOP_1GS0_OFST, 0x39) 802 #define GOP_1GS0_HVStrch_MD GOP_REG(GOP_1GS0_OFST, 0x3a) 803 #define GOP_1GS0_OLDADDR GOP_REG(GOP_1GS0_OFST, 0x3b) 804 #define GOP_1GS0_MULTI_ALPHA GOP_REG(GOP_1GS0_OFST, 0x3c) 805 806 #define GOP_1GS0_GWIN0_CTRL GOP_REG(GOP_1GS0_OFST+1, 0x00) 807 #define GOP_1GS0_DRAM_RBLK_L GOP_REG(GOP_1GS0_OFST+1, 0x01) 808 #define GOP_1GS0_DRAM_RBLK_H GOP_REG(GOP_1GS0_OFST+1, 0x02) 809 #define GOP_1GS0_DEL_PIXEL GOP_REG(GOP_1GS0_OFST+1, 0x03) 810 #define GOP_1GS0_HSTR GOP_REG(GOP_1GS0_OFST+1, 0x04) 811 #define GOP_1GS0_HEND GOP_REG(GOP_1GS0_OFST+1, 0x05) 812 #define GOP_1GS0_VSTR GOP_REG(GOP_1GS0_OFST+1, 0x06) 813 #define GOP_1GS0_VEND GOP_REG(GOP_1GS0_OFST+1, 0x08) 814 #define GOP_1GS0_DRAM_RBLK_HSIZE GOP_REG(GOP_1GS0_OFST+1, 0x09) 815 #define GOP_1GS0_GWIN_ALPHA01 GOP_REG(GOP_1GS0_OFST+1, 0x0A) 816 #define GOP_1GS0_DRAM_VSTR_L GOP_REG(GOP_1GS0_OFST+1, 0x0C) 817 #define GOP_1GS0_DRAM_VSTR_H GOP_REG(GOP_1GS0_OFST+1, 0x0D) 818 #define GOP_1GS0_DRAM_FADE GOP_REG(GOP_1GS0_OFST+1, 0x16) 819 #define GOP_1GS0_3DOSD_SUB_RBLK_L GOP_REG(GOP_1GS0_OFST+1, 0x1E) 820 #define GOP_1GS0_3DOSD_SUB_RBLK_H GOP_REG(GOP_1GS0_OFST+1, 0x1F) 821 822 #define GOP_1GS1_CTRL0 GOP_REG(GOP_1GS1_OFST, 0x00) 823 #define GOP_1GS1_CTRL1 GOP_REG(GOP_1GS1_OFST, 0x01) 824 #define GOP_1GS1_RATE GOP_REG(GOP_1GS1_OFST, 0x02) 825 #define GOP_1GS1_PALDATA_L GOP_REG(GOP_1GS1_OFST, 0x03) 826 #define GOP_1GS1_PALDATA_H GOP_REG(GOP_1GS1_OFST, 0x04) 827 #define GOP_1GS1_PALCTRL GOP_REG(GOP_1GS1_OFST, 0x05) 828 #define GOP_1GS1_REGDMA_END GOP_REG(GOP_1GS1_OFST, 0x06) 829 #define GOP_1GS1_REGDMA_STR GOP_REG(GOP_1GS1_OFST, 0x07) 830 #define GOP_1GS1_INT GOP_REG(GOP_1GS1_OFST, 0x08) 831 #define GOP_1GS1_HWSTATE GOP_REG(GOP_1GS1_OFST, 0x09) 832 #define GOP_1GS1_RDMA_HT GOP_REG(GOP_1GS1_OFST, 0x0e) 833 #define GOP_1GS1_HS_PIPE GOP_REG(GOP_1GS1_OFST, 0x0f) 834 #define GOP_1GS1_BRI GOP_REG(GOP_1GS1_OFST, 0x11) 835 #define GOP_1GS1_CON GOP_REG(GOP_1GS1_OFST, 0x12) 836 #define GOP_1GS1_BW GOP_REG(GOP_1GS1_OFST, 0x19) 837 #define GOP_1GS1_TRSCLR_L GOP_REG(GOP_1GS1_OFST, 0x24) 838 #define GOP_1GS1_TRSCLR_H GOP_REG(GOP_1GS1_OFST, 0x25) 839 #define GOP_1GS1_STRCH_HSZ GOP_REG(GOP_1GS1_OFST, 0x30) 840 #define GOP_1GS1_STRCH_VSZ GOP_REG(GOP_1GS1_OFST, 0x31) 841 #define GOP_1GS1_STRCH_HSTR GOP_REG(GOP_1GS1_OFST, 0x32) 842 #define GOP_1GS1_STRCH_VSTR GOP_REG(GOP_1GS1_OFST, 0x34) 843 #define GOP_1GS1_HSTRCH GOP_REG(GOP_1GS1_OFST, 0x35) 844 #define GOP_1GS1_HSTRCH_INI GOP_REG(GOP_1GS1_OFST, 0x38) 845 #define GOP_1GS1_VSTRCH_INI GOP_REG(GOP_1GS1_OFST, 0x39) 846 #define GOP_1GS1_HVStrch_MD GOP_REG(GOP_1GS1_OFST, 0x3a) 847 #define GOP_1GS1_OLDADDR GOP_REG(GOP_1GS1_OFST, 0x3b) 848 #define GOP_1GS1_MULTI_ALPHA GOP_REG(GOP_1GS1_OFST, 0x3c) 849 850 #define GOP_1GS1_GWIN0_CTRL GOP_REG(GOP_1GS1_OFST+1, 0x00) 851 #define GOP_1GS1_DRAM_RBLK_L GOP_REG(GOP_1GS1_OFST+1, 0x01) 852 #define GOP_1GS1_DRAM_RBLK_H GOP_REG(GOP_1GS1_OFST+1, 0x02) 853 #define GOP_1GS1_DEL_PIXEL GOP_REG(GOP_1GS1_OFST+1, 0x03) 854 #define GOP_1GS1_HSTR GOP_REG(GOP_1GS1_OFST+1, 0x04) 855 #define GOP_1GS1_HEND GOP_REG(GOP_1GS1_OFST+1, 0x05) 856 #define GOP_1GS1_VSTR GOP_REG(GOP_1GS1_OFST+1, 0x06) 857 #define GOP_1GS1_VEND GOP_REG(GOP_1GS1_OFST+1, 0x08) 858 #define GOP_1GS1_DRAM_RBLK_HSIZE GOP_REG(GOP_1GS1_OFST+1, 0x09) 859 #define GOP_1GS1_GWIN_ALPHA01 GOP_REG(GOP_1GS1_OFST+1, 0x0A) 860 #define GOP_1GS1_DRAM_VSTR_L GOP_REG(GOP_1GS1_OFST+1, 0x0C) 861 #define GOP_1GS1_DRAM_VSTR_H GOP_REG(GOP_1GS1_OFST+1, 0x0D) 862 #define GOP_1GS1_DRAM_FADE GOP_REG(GOP_1GS1_OFST+1, 0x16) 863 #define GOP_1GS1_3DOSD_SUB_RBLK_L GOP_REG(GOP_1GS1_OFST+1, 0x1E) 864 #define GOP_1GS1_3DOSD_SUB_RBLK_H GOP_REG(GOP_1GS1_OFST+1, 0x1F) 865 //------------------------------------------------------------------------------------------------- 866 // Type and Structure 867 //------------------------------------------------------------------------------------------------- 868 869 //---------------------------------------------------------------------------- 870 // GOP Test Pattern Reg 871 //---------------------------------------------------------------------------- 872 #define REG_TSTCLR_EN GOP_REG(GOP_4G_OFST, 0x00) 873 #define REG_TSTCLR_ALPHA_EN GOP_REG(GOP_4G_OFST+2, 0x00) 874 #define REG_TLB_TAG_ADDR_L GOP_REG(GOP_4G_OFST+2, 0x2C) 875 #define REG_TLB_TAG_ADDR_H GOP_REG(GOP_4G_OFST+2, 0x2D) 876 #define REG_TLB_TAG_ADDR_RVIEW_L GOP_REG(GOP_4G_OFST+2, 0x2E) 877 #define REG_TLB_TAG_ADDR_RVIEW_H GOP_REG(GOP_4G_OFST+2, 0x2F) 878 #define REG_TSTCLR_ALPHA GOP_REG(GOP_4G_OFST+2, 0x40) 879 #define REG_R_STC GOP_REG(GOP_4G_OFST+2, 0x41) 880 #define REG_G_STC GOP_REG(GOP_4G_OFST+2, 0x48) 881 #define REG_B_STC GOP_REG(GOP_4G_OFST+2, 0x49) 882 #define REG_TSTCLR_HDUP GOP_REG(GOP_4G_OFST+2, 0x01) 883 #define REG_TSTCLR_VDUP GOP_REG(GOP_4G_OFST+2, 0x01) 884 #define REG_HR_INC GOP_REG(GOP_4G_OFST+2, 0x42) 885 #define REG_HR_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x42) 886 #define REG_HG_INC GOP_REG(GOP_4G_OFST+2, 0x43) 887 #define REG_HG_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x43) 888 #define REG_HB_INC GOP_REG(GOP_4G_OFST+2, 0x44) 889 #define REG_HB_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x44) 890 #define REG_HR_STEP GOP_REG(GOP_4G_OFST+2, 0x4A) 891 #define REG_HG_STEP GOP_REG(GOP_4G_OFST+2, 0x4B) 892 #define REG_HB_STEP GOP_REG(GOP_4G_OFST+2, 0x4C) 893 #define REG_VR_INC GOP_REG(GOP_4G_OFST+2, 0x45) 894 #define REG_VR_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x45) 895 #define REG_VG_INC GOP_REG(GOP_4G_OFST+2, 0x46) 896 #define REG_VG_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x46) 897 #define REG_VB_INC GOP_REG(GOP_4G_OFST+2, 0x47) 898 #define REG_VB_INC_SIGNZ GOP_REG(GOP_4G_OFST+2, 0x47) 899 #define REG_VR_STEP GOP_REG(GOP_4G_OFST+2, 0x4D) 900 #define REG_VG_STEP GOP_REG(GOP_4G_OFST+2, 0x4E) 901 #define REG_VB_STEP GOP_REG(GOP_4G_OFST+2, 0x4F) 902 #define REG_TLB_BASE_ADDR_L GOP_REG(GOP_4G_OFST+2, 0x58) 903 #define REG_TLB_BASE_ADDR_H GOP_REG(GOP_4G_OFST+2, 0x59) 904 #define REG_TLB_BASE_ADDR_RVIEW_L GOP_REG(GOP_4G_OFST+2, 0x5A) 905 #define REG_TLB_BASE_ADDR_RVIEW_H GOP_REG(GOP_4G_OFST+2, 0x5B) 906 907 #define MASK_TSTCLR_EN GOP_BIT6 908 #define MASK_TSTCLR_ALPHA_EN GOP_BIT1 909 #define MASK_TSTCLR_ALPHA BMASK(11:8)|BMASK(3:0) 910 #define MASK_RGB_STC_VALID BMASK(7:0) 911 #define MASK_R_STC BMASK(11:8)|BMASK(3:0) 912 #define MASK_G_STC BMASK(11:8)|BMASK(3:0) 913 #define MASK_B_STC BMASK(11:8)|BMASK(3:0) 914 #define MASK_INI_TSTCLR_EN GOP_BIT0 915 #define MASK_TSTCLR_HDUP BMASK(3:2) 916 #define MASK_TSTCLR_VDUP BMASK(1:0) 917 #define MASK_HR_INC BMASK(10:8)|BMASK(3:0) 918 #define MASK_HR_INC_SIGNZ GOP_BIT11 919 #define MASK_HG_INC BMASK(10:8)|BMASK(3:0) 920 #define MASK_HG_INC_SIGNZ GOP_BIT11 921 #define MASK_HB_INC BMASK(10:8)|BMASK(3:0) 922 #define MASK_HB_INC_SIGNZ GOP_BIT11 923 #define MASK_HR_STEP BMASK(11:8)|BMASK(3:0) 924 #define MASK_HG_STEP BMASK(11:8)|BMASK(3:0) 925 #define MASK_HB_STEP BMASK(11:8)|BMASK(3:0) 926 #define MASK_VR_INC BMASK(10:8)|BMASK(3:0) 927 #define MASK_VR_INC_SIGNZ GOP_BIT11 928 #define MASK_VG_INC BMASK(10:8)|BMASK(3:0) 929 #define MASK_VG_INC_SIGNZ GOP_BIT11 930 #define MASK_VB_INC BMASK(10:8)|BMASK(3:0) 931 #define MASK_VB_INC_SIGNZ GOP_BIT11 932 #define MASK_VR_STEP BMASK(11:8)|BMASK(3:0) 933 #define MASK_VG_STEP BMASK(11:8)|BMASK(3:0) 934 #define MASK_VB_STEP BMASK(11:8)|BMASK(3:0) 935 936 #define SHIFT_TSTCLR_EN 6 937 #define SHIFT_TSTCLR_ALPHA_EN 1 938 #define SHIFT_TSTCLR_ALPHA 8 939 #define SHIFT_R_STC 0 940 #define SHIFT_G_STC 0 941 #define SHIFT_B_STC 0 942 #define SHIFT_INI_TSTCLR_EN 0 943 #define SHIFT_TSTCLR_HDUP 2 944 #define SHIFT_TSTCLR_VDUP 0 945 #define SHIFT_HR_INC 0 946 #define SHIFT_HR_INC_SIGNZ 11 947 #define SHIFT_HG_INC 0 948 #define SHIFT_HG_INC_SIGNZ 11 949 #define SHIFT_HB_INC 0 950 #define SHIFT_HB_INC_SIGNZ 11 951 #define SHIFT_HR_STEP 0 952 #define SHIFT_HG_STEP 0 953 #define SHIFT_HB_STEP 0 954 #define SHIFT_VR_INC 0 955 #define SHIFT_VR_INC_SIGNZ 11 956 #define SHIFT_VG_INC 0 957 #define SHIFT_VG_INC_SIGNZ 11 958 #define SHIFT_VB_INC 0 959 #define SHIFT_VB_INC_SIGNZ 11 960 #define SHIFT_VR_STEP 0 961 #define SHIFT_VG_STEP 0 962 #define SHIFT_VB_STEP 0 963 964 965 //---------------------------------------------------------------------------- 966 // GOP AFBC Reg 967 //---------------------------------------------------------------------------- 968 #define REG_AFBC_CORE_EN(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x00+(0x20*id)) 969 #define REG_AFBC_ADDR_L(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x01+(0x20*id)) 970 #define REG_AFBC_ADDR_H(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x02+(0x20*id)) 971 #define REG_AFBC_FMT(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0C+(0x20*id)) 972 #define REG_AFBC_WIDTH(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0A+(0x20*id)) 973 #define REG_AFBC_HEIGHT(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0B+(0x20*id)) 974 #define REG_AFBC_RESP(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x0F+(0x20*id)) 975 #define REG_AFBC_MIU GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x43) 976 #define REG_AFBC_DEBUG(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x44+(0x20*id)) 977 #define REG_AFBC_READCNT(id) GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x4C+(0x20*id)) 978 #define REG_AFBC_TRIGGER GOP_REG(GOP_4G_OFST+GOP_AFBC_OFST, 0x50) 979 980 #endif // _REG_GOP_H_ 981