xref: /utopia/UTPA2-700.0.x/modules/graphic/hal/maldives/gop/regGOP.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
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                           0x1F00
110 #define GE_REG_BASE                            0x2800
111 #define SC1_REG_BASE                           0x2F00
112 #define CKG_REG_BASE                           0x0B00
113 #define MIU_REG_BASE                           0x1200
114 #define MVOP_REG_BASE                          0x1400
115 #define SC1_DIRREG_BASE                        0x130000
116 //----------------------------------------------------------------------------
117 // Scaler Reg
118 //----------------------------------------------------------------------------
119 #define XC_REG(bk, reg)                        (SC1_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2)
120 
121 #define REG_SC_BK00_00_L                        XC_REG(0x00, 0x00)
122 #define REG_SC_BK00_05_L                        XC_REG(0x00, 0x05)
123 #define REG_SC_BK00_06_L                        XC_REG(0x00, 0x06)
124 #define REG_SC_BK01_02_L                        XC_REG(0x01, 0x02)
125 #define REG_SC_BK02_5F_L                        XC_REG(0x02, 0x5F)
126 #define REG_SC_BK10_23_L                        XC_REG(0x10, 0x23)
127 #define REG_SC_BK10_50_L                        XC_REG(0x10, 0x50)
128 #define REG_SC_BK10_5B_L                        XC_REG(0x10, 0x5B)
129 #define REG_SC_BK12_03_L                        XC_REG(0x12, 0x03)
130 #define REG_SC_BK20_10_L                        XC_REG(0x20, 0x10)
131 #define REG_SC_BK0F_2B_L				        XC_REG(0x0F, 0x2B)
132 #define REG_SC_BK3E_28_L                        XC_REG(0x3E, 0x28)
133 #define REG_SC_BK37_22_L                        XC_REG(0x37, 0x22)
134 #define REG_SC_BK37_24_L                        XC_REG(0x37, 0x24)
135 #define REG_SC_BK3D_0D_L                        XC_REG(0x3D, 0x0D)
136 
137 #define GOP_SC_BANKSEL                          REG_SC_BK00_00_L
138 #define GOP_SC_CHANNELSYNC                      REG_SC_BK00_05_L
139 #define GOP_SC_GOPEN                            REG_SC_BK00_06_L
140 #define GOP_SC_IP_SYNC                          REG_SC_BK01_02_L
141 #define GOP_SC_IP2GOP_SRCSEL                    REG_SC_BK02_5F_L
142 #define GOP_SC_VOPNBL                           REG_SC_BK10_23_L
143 #define GOP_SC_GOPEN_DWIN                       REG_SC_BK10_50_L
144 #define GOP_SC_GOPENMODE1                       REG_SC_BK10_5B_L
145 #define GOP_SC_MIRRORCFG                        REG_SC_BK12_03_L
146 #define GOP_SC_OSD_CHECK_ALPHA                  REG_SC_BK0F_2B_L
147 #define GOP_SC_GOPEN_BYPASS                     REG_SC_BK3E_28_L
148 #define GOP_SC_OCMIXER                          REG_SC_BK37_22_L
149 #define GOP_SC_OCMISC                           REG_SC_BK37_24_L
150 #define GOP_SC_GOPSC_SRAM_CTRL                  REG_SC_BK3D_0D_L
151 
152 //----------------------------------------------------------------------------
153 // MVOP Reg
154 //----------------------------------------------------------------------------
155 #define GOP_MVOP_MIRRORCFG                      (MVOP_REG_BASE+0x76)
156 
157 
158 
159 //----------------------------------------------------------------------------
160 // GE Reg
161 //----------------------------------------------------------------------------
162 #define GOP_GE_FMT_BLT                          (GE_REG_BASE+(0x01*2))
163 #define GOP_GE_EN_CMDQ                          BIT(0)
164 #define GOP_GE_EN_VCMDQ                         BIT(1)
165 
166 #define GOP_GE_VQ_FIFO_STATUS_L                 (GE_REG_BASE+(0x04*2))
167 #define GOP_GE_VQ_FIFO_STATUS_H                 (GE_REG_BASE+(0x05*2))
168 
169 #define GOP_GE_STATUS                           (GE_REG_BASE+(0x07*2))
170 #define GOP_GE_BUSY                             BIT(0)
171 #define GOP_GE_CMDQ1_STATUS                     BMASK(7:3)
172 #define GOP_GE_CMDQ2_STATUS                     BMASK(15:11)
173 
174 #define GOP_GE_TAG                              (GE_REG_BASE+(0x2C*2))
175 
176 #define GOP_GE_DBBASE0                          (GE_REG_BASE+(0x26*2))
177 #define GOP_GE_DBBASE1                          (GE_REG_BASE+(0x27*2))
178 #define GOP_GE_DBPIT                            (GE_REG_BASE+(0x33*2))
179 #define GOP_GE_FBFMT                            (GE_REG_BASE+(0x34*2))
180 #define GOP_GE_SRCW                             (GE_REG_BASE+(0x6e*2))
181 #define GOP_GE_SRCH                             (GE_REG_BASE+(0x6f*2))
182 
183 
184 //----------------------------------------------------------------------------
185 // ChipTop Reg
186 //----------------------------------------------------------------------------
187 /* GOP0 and GOP1 CLK */
188 #define GOP_GOPCLK                 (CKG_REG_BASE+0x80)
189 #define CKG_GOPG0_DISABLE_CLK   ~(GOP_BIT0)
190 #define CKG_GOPG0_ODCLK         (0<<2)
191 #define CKG_GOPG0_IDCLK2        (1 << 2)
192 #define CKG_GOPG0_IDCLK1        (3 << 2)
193 #define CKG_GOPG0_MASK          (GOP_BIT4 | GOP_BIT3 | GOP_BIT2)
194 #define CKG_GOPG1_MASK          (GOP_BIT12 | GOP_BIT11 | GOP_BIT10)
195 #define CKG_GOPG1_DISABLE_CLK   ~(GOP_BIT8)
196 #define CKG_GOPG1_ODCLK         (0 << 10)
197 #define CKG_GOPG1_IDCLK2        (1 << 10)
198 #define CKG_GOPG1_IDCLK1        (3 << 10)
199 
200 #define CKG_GOPG0_SCALING       (CKG_REG_BASE+0x88)
201 #define CKG_GOPG0_MG            (CKG_REG_BASE+0xFE)
202 #define CKG_GOPG0_MG_MASK       (GOP_BIT3 | GOP_BIT2)
203 #define CKG_GOPG2_MG_MASK       (GOP_BIT7 | GOP_BIT6)
204 
205 /* GOP2 and GOPDWIN CLK */
206 #define GOP_GOP2CLK                 (CKG_REG_BASE+0x82)
207 #define CKG_GOPG2_DISABLE_CLK   ~(GOP_BIT0)
208 #define CKG_GOPG2_ODCLK         (0<<2)
209 #define CKG_GOPG2_IDCLK2        (1 << 2)
210 #define CKG_GOPG2_IDCLK1        (3 << 2)
211 #define CKG_GOPG2_MASK          (GOP_BIT4 | GOP_BIT3 | GOP_BIT2)
212 #define CKG_GOPD_MASK           (GOP_BIT12 | GOP_BIT11 | GOP_BIT10)
213 #define CKG_GOPD_CLK_IDCLK2     (0 << 10)
214 #define CKG_GOPD_CLK_ODCLK      (1 << 10)
215 #define CKG_GOPD_CLK_DC0CLK     (2 << 10)
216 #define CKG_GOPD_CLK_SUBDC0CLK  (3 << 10)
217 
218 
219 /* GOP3 CLK*/
220 #define GOP_GOP3CLK             (CKG_REG_BASE+0x84)
221 #define CKG_GOPG3_ODCLK         (0<<2)
222 #define CKG_GOPG3_IDCLK2        (1 << 2)
223 #define CKG_GOPG3_IDCLK1        (3 << 2)
224 #define CKG_GOPG3_MASK          (GOP_BIT4 | GOP_BIT3 | GOP_BIT2)
225 #define CKG_GOPD_DISABLE_CLK   ~(GOP_BIT8)
226 
227 /* GOP4 CLK*/
228 #define GOP_GOP4CLK             (CKG_REG_BASE+(0x7E<<1))
229 #define CKG_GOPG4_ODCLK         (0 << 10)
230 #define CKG_GOPG4_IDCLK2        (1 << 10)
231 #define CKG_GOPG4_IDCLK1        (2 << 10)
232 #define CKG_GOPG4_OCC_FRCCLK    (3 << 10)
233 #define CKG_GOPG4_MIXERCLK_VE   (4 << 10)
234 #define CKG_GOPG4_MASK          (GOP_BIT12 | GOP_BIT11 | GOP_BIT10)
235 
236 
237 /* SRAM CLK */
238 #define GOP_SRAMCLK             (CKG_REG_BASE+0x84)
239 #define CKG_SRAM0_DISABLE_CLK   (GOP_BIT0)
240 #define CKG_SRAM1_DISABLE_CLK   (GOP_BIT8)
241 #define CKG_SRAM0_MASK          (GOP_BIT0|GOP_BIT1)
242 #define CKG_SRAM1_MASK          (GOP_BIT8|GOP_BIT9)
243 
244 
245 //----------------------------------------------------------------------------
246 // MIU Reg
247 //----------------------------------------------------------------------------
248 #define GOP_MIU_GROUP1          (MIU_REG_BASE+0xF2)
249 
250 /*Define each gop miu clint bit*/
251 #define GOP_MIU_CLIENT_DWIN     0xff
252 #define GOP_MIU_CLIENT_GOP0     0x5
253 #define GOP_MIU_CLIENT_GOP1     0x6
254 #define GOP_MIU_CLIENT_GOP2     0x7
255 #define GOP_MIU_CLIENT_GOP3     0xF
256 #define GOP_MIU_CLIENT_GOP4     0xff
257 #define GOP_MIU_CLIENT_GOP5     0xff
258 //----------------------------------------------------------------------------
259 // GOP Reg
260 //----------------------------------------------------------------------------
261 #define GOP_REG(bk, reg)                    (GOP_REG_BASE+((MS_U32)(bk)<<16) + (reg) * 2)
262 #define __GOP_REG(reg)                      (GOP_REG_BASE+(reg) * 2)
263 #define GOP_REG_DIRECT_BASE                 (0x120200)
264 #define GOP_REG_VAL(x)                      (1<<x)
265 
266 //MUX Setting
267 #define GOP_MUX_SHIFT                       0x2
268 #define GOP_REGMUX_MASK                     BMASK((GOP_MUX_SHIFT-1):0)
269 #define GOP_MUX0_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*0))
270 #define GOP_MUX1_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*1))
271 #define GOP_MUX2_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*2))
272 #define GOP_MUX3_MASK                       (GOP_REGMUX_MASK<<(GOP_MUX_SHIFT*3))
273 
274 //IP and VOP MUX Setting
275 #define GOP_IP_MAIN_MUX_SHIFT                 0
276 #define GOP_IP_MAIN_MUX_MASK                 (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_MAIN_MUX_SHIFT
277 #define GOP_IP_SUB_MUX_SHIFT                  3
278 #define GOP_IP_SUB_MUX_MASK                  (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_SUB_MUX_SHIFT
279 #define GOP_IP_VOP0_MUX_SHIFT                 6
280 #define GOP_IP_VOP0_MUX_MASK                 (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP0_MUX_SHIFT
281 #define GOP_IP_VOP1_MUX_SHIFT                 9
282 #define GOP_IP_VOP1_MUX_MASK                 (BMASK((GOP_MUX_SHIFT-1):0))<<GOP_IP_VOP1_MUX_SHIFT
283 
284 // for gwin color format mask
285 #define GOP_REG_COLORTYPE_MASK              BMASK(3:0)
286 #define GOP_REG_COLORTYPE_SHIFT             4
287 
288 #define GOP_BANK_OFFSET                       0x3
289 #define GOP_4G_OFST                           0x0
290 #define GOP_2G_OFST                           0x3
291 #define GOP_1G_OFST                           0x8
292 #define GOP_1GX_OFST                          0xB
293 #define GOP_DW_OFST                           0x6
294 #define GOP_1GS0_OFST                         0xe
295 #define GOP_1GS1_OFST                         0x11
296 
297 #define GOP_OFFSET_WR                       8
298 #define GOP_VAL_WR                          GOP_REG_VAL(GOP_OFFSET_WR)
299 #define GOP_OFFSET_FWR                      9
300 #define GOP_VAL_FWR                         GOP_REG_VAL(GOP_OFFSET_FWR)
301 #define GOP_OFFSET_FCLR                     11
302 #define GOP_VAL_FCL                         GOP_REG_VAL(GOP_OFFSET_FCLR)
303 #define GOP4G_OFFSET_WR_ACK                 12
304 #define GOP4G_VAL_WR_ACK                    GOP_REG_VAL(GOP4G_OFFSET_WR_ACK)
305 #define GOP2G_OFFSET_WR_ACK                 13
306 #define GOP2G_VAL_WR_ACK                    GOP_REG_VAL(GOP2G_OFFSET_WR_ACK)
307 #define GOPD_OFFSET_WR_ACK                  14
308 #define GOPD_VAL_WR_ACK                     GOP_REG_VAL(GOPD_OFFSET_WR_ACK)
309 #define GOP1G_OFFSET_WR_ACK                 15
310 #define GOP1G_VAL_WR_ACK                    GOP_REG_VAL(GOPD_OFFSET_WR_ACK)
311 #define GOP_VAL_ACK(x)                      GOP_REG_VAL(GOP4G_OFFSET_WR_ACK+x)
312 
313 #define GOP_4G_CTRL0                        GOP_REG(GOP_4G_OFST, 0x00)
314 #define GOP_4G_CTRL1                        GOP_REG(GOP_4G_OFST, 0x01)
315 #define GOP_4G_RATE                         GOP_REG(GOP_4G_OFST, 0x02)
316 #define GOP_4G_PALDATA_L                    GOP_REG(GOP_4G_OFST, 0x03)
317 #define GOP_4G_PALDATA_H                    GOP_REG(GOP_4G_OFST, 0x04)
318 #define GOP_4G_PALCTRL                      GOP_REG(GOP_4G_OFST, 0x05)
319 #define GOP_4G_REGDMA_END                   GOP_REG(GOP_4G_OFST, 0x06)
320 #define GOP_4G_REGDMA_STR                   GOP_REG(GOP_4G_OFST, 0x07)
321 #define GOP_4G_INT                          GOP_REG(GOP_4G_OFST, 0x08)
322 #define GOP_4G_HWSTATE                      GOP_REG(GOP_4G_OFST, 0x09)
323 #define GOP_4G_SVM_HSTR                     GOP_REG(GOP_4G_OFST, 0x0a)
324 #define GOP_4G_SVM_HEND                     GOP_REG(GOP_4G_OFST, 0x0b)
325 #define GOP_4G_SVM_VSTR                     GOP_REG(GOP_4G_OFST, 0x0c)
326 #define GOP_4G_SVM_VEND                     GOP_REG(GOP_4G_OFST, 0x0d)
327 #define GOP_4G_RDMA_HT                      GOP_REG(GOP_4G_OFST, 0x0e)
328 #define GOP_4G_HS_PIPE                      GOP_REG(GOP_4G_OFST, 0x0f)
329 #define GOP_4G_SLOW                         GOP_REG(GOP_4G_OFST, 0x10)
330 #define GOP_4G_BRI                          GOP_REG(GOP_4G_OFST, 0x11)
331 #define GOP_4G_CON                          GOP_REG(GOP_4G_OFST, 0x12)
332 #define GOP_4G_BW                           GOP_REG(GOP_4G_OFST, 0x19)
333 #define GOP_4G_NEW_BW                       GOP_REG(GOP_4G_OFST, 0x1C)
334 #define GOP_4G_SRAM_BORROW                  GOP_REG(GOP_4G_OFST, 0x1D)
335 #define GOP_4G_3D_MIDDLE                    GOP_REG(GOP_4G_OFST, 0x1E)
336 #define GOP_4G_PRI0                         GOP_REG(GOP_4G_OFST, 0x20)
337 #define GOP_4G_DUMMY_22                     GOP_REG(GOP_4G_OFST, 0x22)
338 #define GOP_4G_BOT_HS                       GOP_REG(GOP_4G_OFST, 0x23)
339 #define GOP_4G_TRSCLR_L                     GOP_REG(GOP_4G_OFST, 0x24)
340 #define GOP_4G_TRSCLR_H                     GOP_REG(GOP_4G_OFST, 0x25)
341 #define GOP_4G_YUV_SWAP                     GOP_REG(GOP_4G_OFST, 0x28)
342 #define GOP_4G_STRCH_HSZ                    GOP_REG(GOP_4G_OFST, 0x30)
343 #define GOP_4G_STRCH_VSZ                    GOP_REG(GOP_4G_OFST, 0x31)
344 #define GOP_4G_STRCH_HSTR                   GOP_REG(GOP_4G_OFST, 0x32)
345 #define GOP_4G_STRCH_VSTR                   GOP_REG(GOP_4G_OFST, 0x34)
346 #define GOP_4G_HSTRCH                       GOP_REG(GOP_4G_OFST, 0x35)
347 #define GOP_4G_VSTRCH                       GOP_REG(GOP_4G_OFST, 0x36)
348 #define GOP_4G_HSTRCH_INI                   GOP_REG(GOP_4G_OFST, 0x38)
349 #define GOP_4G_VSTRCH_INI                   GOP_REG(GOP_4G_OFST, 0x39)
350 #define GOP_4G_HVSTRCHMD                    GOP_REG(GOP_4G_OFST, 0x3a)
351 #define GOP_4G_OLDADDR                      GOP_REG(GOP_4G_OFST, 0x3b)
352 #define GOP_4G_MULTI_ALPHA                  GOP_REG(GOP_4G_OFST, 0x3c)
353 #define GOP_4G_BANK_FWR                     GOP_REG(GOP_4G_OFST, 0x50)
354 #define GOP_4G_BANK_HVAILDSIZE              GOP_REG(GOP_4G_OFST, 0x52)
355 #define GOP_4G_BANK_VVAILDSIZE              GOP_REG(GOP_4G_OFST, 0x53)
356 #define GOP_4G_SCALING_H_OUTPUTSIZE         GOP_REG(GOP_4G_OFST, 0x56)
357 #define GOP_4G_SCALING_HRATIO_L             GOP_REG(GOP_4G_OFST, 0x59)  //GOP scaling down ratio  dst / out * 2^20
358 #define GOP_4G_SCALING_HRATIO_H             GOP_REG(GOP_4G_OFST, 0x5A)
359 #define GOP_4G_SCALING_CFG                  GOP_REG(GOP_4G_OFST, 0x5B)
360 #define GOP_4G_SCALING_VRATIO_L             GOP_REG(GOP_4G_OFST, 0x5C)  //GOP scaling down ratio  dst / out * 2^20
361 #define GOP_4G_SCALING_VRATIO_H             GOP_REG(GOP_4G_OFST, 0x5D)
362 
363 
364 #define GOP_4G_RBLK0_VOFFL                  GOP_REG(GOP_4G_OFST, 0x60)
365 #define GOP_4G_RBLK0_VOFFH                  GOP_REG(GOP_4G_OFST, 0x61)
366 #define GOP_4G_RBLK1_VOFFL                  GOP_REG(GOP_4G_OFST, 0x62)
367 #define GOP_4G_RBLK1_VOFFH                  GOP_REG(GOP_4G_OFST, 0x63)
368 #define GOP_4G_RBLK2_VOFFL                  GOP_REG(GOP_4G_OFST, 0x64)
369 #define GOP_4G_RBLK2_VOFFH                  GOP_REG(GOP_4G_OFST, 0x65)
370 #define GOP_4G_RBLK3_VOFFL                  GOP_REG(GOP_4G_OFST, 0x66)
371 #define GOP_4G_RBLK3_VOFFH                  GOP_REG(GOP_4G_OFST, 0x67)
372 #define GOP_4G_RBLK0_HOFF                   GOP_REG(GOP_4G_OFST, 0x70)
373 #define GOP_4G_RBLK1_HOFF                   GOP_REG(GOP_4G_OFST, 0x71)
374 #define GOP_4G_RBLK2_HOFF                   GOP_REG(GOP_4G_OFST, 0x72)
375 #define GOP_4G_RBLK3_HOFF                   GOP_REG(GOP_4G_OFST, 0x73)
376 #define GOP_4G_REGDMA_EN                    GOP_REG(GOP_4G_OFST, 0x78)
377 #define GOP_MUX_IPVOP                       __GOP_REG(0x77)
378 #define GOP_MUX_BYPASS                      __GOP_REG(0x7B)
379 #define GOP_MUX                             __GOP_REG(0x7E)
380 #define GOP_BAK_SEL                         __GOP_REG(0x7F)
381 
382 #define GOP_4G_GWIN0_CTRL(id)               GOP_REG(GOP_4G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP0_GWIN)))
383 #define GOP_4G_DRAM_RBLK_L(id)              GOP_REG(GOP_4G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP0_GWIN)))
384 #define GOP_4G_DRAM_RBLK_H(id)              GOP_REG(GOP_4G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP0_GWIN)))
385 #define GOP_4G_DEL_PIXEL(id)                GOP_REG(GOP_4G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN)))
386 #define GOP_4G_HSTR(id)                     GOP_REG(GOP_4G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP0_GWIN)))
387 #define GOP_4G_HEND(id)                     GOP_REG(GOP_4G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP0_GWIN)))
388 #define GOP_4G_VSTR(id)                     GOP_REG(GOP_4G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP0_GWIN)))
389 #define GOP_4G_GWIN_MIDDLE(id)              GOP_REG(GOP_4G_OFST+1, 0x07 + (0x20*((id)%MAX_GOP0_GWIN)))
390 #define GOP_4G_VEND(id)                     GOP_REG(GOP_4G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP0_GWIN)))
391 #define GOP_4G_DRAM_RBLK_HSIZE(id)          GOP_REG(GOP_4G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP0_GWIN)))
392 #define GOP_4G_GWIN_ALPHA01(id)             GOP_REG(GOP_4G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP0_GWIN)))
393 #define GOP_4G_DRAM_VSTR_L(id)              GOP_REG(GOP_4G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP0_GWIN)))
394 #define GOP_4G_DRAM_VSTR_H(id)              GOP_REG(GOP_4G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP0_GWIN)))
395 #define GOP_4G_DRAM_HSTR(id)                GOP_REG(GOP_4G_OFST+1, 0x0E + (0x20*((id)%MAX_GOP0_GWIN)))
396 #define GOP_4G_DRAM_RBLK_SIZE_L(id)         GOP_REG(GOP_4G_OFST+1, 0x10 + (0x20*((id)%MAX_GOP0_GWIN)))
397 #define GOP_4G_DRAM_RBLK_SIZE_H(id)         GOP_REG(GOP_4G_OFST+1, 0x11 + (0x20*((id)%MAX_GOP0_GWIN)))
398 #define GOP_4G_DRAM_RLEN_L(id)              GOP_REG(GOP_4G_OFST+1, 0x12 + (0x20*((id)%MAX_GOP0_GWIN)))
399 #define GOP_4G_DRAM_RLEN_H(id)              GOP_REG(GOP_4G_OFST+1, 0x13 + (0x20*((id)%MAX_GOP0_GWIN)))
400 #define GOP_4G_DRAM_HVSTOP_L(id)            GOP_REG(GOP_4G_OFST+1, 0x14 + (0x20*((id)%MAX_GOP0_GWIN)))
401 #define GOP_4G_DRAM_HVSTOP_H(id)            GOP_REG(GOP_4G_OFST+1, 0x15 + (0x20*((id)%MAX_GOP0_GWIN)))
402 #define GOP_4G_DRAM_FADE(id)                GOP_REG(GOP_4G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP0_GWIN)))
403 #define GOP_4G_BG_CLR(id)                   GOP_REG(GOP_4G_OFST+1, 0x18 + (0x20*((id)%MAX_GOP0_GWIN)))
404 #define GOP_4G_BG_HSTR(id)                  GOP_REG(GOP_4G_OFST+1, 0x19 + (0x20*((id)%MAX_GOP0_GWIN)))
405 #define GOP_4G_BG_HEND(id)                  GOP_REG(GOP_4G_OFST+1, 0x1a + (0x20*((id)%MAX_GOP0_GWIN)))
406 #define GOP_4G_BG_VSTR(id)                  GOP_REG(GOP_4G_OFST+1, 0x1C + (0x20*((id)%MAX_GOP0_GWIN)))
407 #define GOP_4G_BG_VEND(id)                  GOP_REG(GOP_4G_OFST+1, 0x1D + (0x20*((id)%MAX_GOP0_GWIN)))
408 #define GOP_4G_3DOSD_SUB_RBLK_L(id)         GOP_REG(GOP_4G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP0_GWIN)))
409 #define GOP_4G_3DOSD_SUB_RBLK_H(id)         GOP_REG(GOP_4G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP0_GWIN)))
410 
411 
412 #define GOP_2G_CTRL0                        GOP_REG(GOP_2G_OFST, 0x00)
413 #define GOP_2G_CTRL1                        GOP_REG(GOP_2G_OFST, 0x01)
414 #define GOP_2G_RATE                         GOP_REG(GOP_2G_OFST, 0x02)
415 #define GOP_2G_PALDATA_L                    GOP_REG(GOP_2G_OFST, 0x03)
416 #define GOP_2G_PALDATA_H                    GOP_REG(GOP_2G_OFST, 0x04)
417 #define GOP_2G_PALCTRL                      GOP_REG(GOP_2G_OFST, 0x05)
418 #define GOP_2G_REGDMA_END                   GOP_REG(GOP_2G_OFST, 0x06)
419 #define GOP_2G_REGDMA_STR                   GOP_REG(GOP_2G_OFST, 0x07)
420 #define GOP_2G_INT                          GOP_REG(GOP_2G_OFST, 0x08)
421 #define GOP_2G_HWSTATE                      GOP_REG(GOP_2G_OFST, 0x09)
422 #define GOP_2G_RDMA_HT                      GOP_REG(GOP_2G_OFST, 0x0e)
423 #define GOP_2G_HS_PIPE                      GOP_REG(GOP_2G_OFST, 0x0f)
424 #define GOP_2G_SLOW                         GOP_REG(GOP_2G_OFST, 0x10)
425 #define GOP_2G_BRI                          GOP_REG(GOP_2G_OFST, 0x11)
426 #define GOP_2G_CON                          GOP_REG(GOP_2G_OFST, 0x12)
427 #define GOP_2G_BW                           GOP_REG(GOP_2G_OFST, 0x19)
428 #define GOP_2G_3D_MIDDLE                    GOP_REG(GOP_2G_OFST, 0x1E)
429 #define GOP_2G_PRI0                         GOP_REG(GOP_2G_OFST, 0x20)
430 #define GOP_2G_TRSCLR_L                     GOP_REG(GOP_2G_OFST, 0x24)
431 #define GOP_2G_TRSCLR_H                     GOP_REG(GOP_2G_OFST, 0x25)
432 #define GOP_2G_STRCH_HSZ                    GOP_REG(GOP_2G_OFST, 0x30)
433 #define GOP_2G_STRCH_VSZ                    GOP_REG(GOP_2G_OFST, 0x31)
434 #define GOP_2G_STRCH_HSTR                   GOP_REG(GOP_2G_OFST, 0x32)
435 #define GOP_2G_STRCH_VSTR                   GOP_REG(GOP_2G_OFST, 0x34)
436 #define GOP_2G_HSTRCH                       GOP_REG(GOP_2G_OFST, 0x35)
437 #define GOP_2G_VSTRCH                       GOP_REG(GOP_2G_OFST, 0x36)
438 #define GOP_2G_HSTRCH_INI                   GOP_REG(GOP_2G_OFST, 0x38)
439 #define GOP_2G_VSTRCH_INI                   GOP_REG(GOP_2G_OFST, 0x39)
440 #define GOP_2G_HVStrch_MD                   GOP_REG(GOP_2G_OFST, 0x3a)
441 #define GOP_2G_OLDADDR                      GOP_REG(GOP_2G_OFST, 0x3b)
442 #define GOP_2G_MULTI_ALPHA                  GOP_REG(GOP_2G_OFST, 0x3c)
443 #define GOP_2G_REGDMA_EN                    GOP_REG(GOP_2G_OFST, 0x78)
444 
445 
446 #define GOP_2G_GWIN0_CTRL(id)               GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN)))
447 #define GOP_2G_GWIN_CTRL(id)                GOP_REG(GOP_2G_OFST+1, 0x00 + (0x20*((id)%MAX_GOP1_GWIN)))
448 #define GOP_2G_DRAM_RBLK_L(id)              GOP_REG(GOP_2G_OFST+1, 0x01 + (0x20*((id)%MAX_GOP1_GWIN)))
449 #define GOP_2G_DRAM_RBLK_H(id)              GOP_REG(GOP_2G_OFST+1, 0x02 + (0x20*((id)%MAX_GOP1_GWIN)))
450 #define GOP_2G_DEL_PIXEL(id)                GOP_REG(GOP_2G_OFST+1, 0x03 + (0x20*((id)%MAX_GOP1_GWIN)))
451 #define GOP_2G_HSTR(id)                     GOP_REG(GOP_2G_OFST+1, 0x04 + (0x20*((id)%MAX_GOP1_GWIN)))
452 #define GOP_2G_HEND(id)                     GOP_REG(GOP_2G_OFST+1, 0x05 + (0x20*((id)%MAX_GOP1_GWIN)))
453 #define GOP_2G_VSTR(id)                     GOP_REG(GOP_2G_OFST+1, 0x06 + (0x20*((id)%MAX_GOP1_GWIN)))
454 #define GOP_2G_VEND(id)                     GOP_REG(GOP_2G_OFST+1, 0x08 + (0x20*((id)%MAX_GOP1_GWIN)))
455 #define GOP_2G_DRAM_RBLK_HSIZE(id)          GOP_REG(GOP_2G_OFST+1, 0x09 + (0x20*((id)%MAX_GOP1_GWIN)))
456 #define GOP_2G_GWIN_ALPHA01(id)             GOP_REG(GOP_2G_OFST+1, 0x0A + (0x20*((id)%MAX_GOP1_GWIN)))
457 #define GOP_2G_DRAM_VSTR_L(id)              GOP_REG(GOP_2G_OFST+1, 0x0C + (0x20*((id)%MAX_GOP1_GWIN)))
458 #define GOP_2G_DRAM_VSTR_H(id)              GOP_REG(GOP_2G_OFST+1, 0x0D + (0x20*((id)%MAX_GOP1_GWIN)))
459 #define GOP_2G_DRAM_FADE(id)                GOP_REG(GOP_2G_OFST+1, 0x16 + (0x20*((id)%MAX_GOP1_GWIN)))
460 #define GOP_2G_3DOSD_SUB_RBLK_L(id)         GOP_REG(GOP_2G_OFST+1, 0x1E + (0x20*((id)%MAX_GOP1_GWIN)))
461 #define GOP_2G_3DOSD_SUB_RBLK_H(id)         GOP_REG(GOP_2G_OFST+1, 0x1F + (0x20*((id)%MAX_GOP1_GWIN)))
462 
463 // DWIN reg
464 #define GOP_DW_CTL0_EN                          GOP_REG(GOP_DW_OFST, 0x00)
465 #define GOP_DWIN_EN                             (0x00)
466 #define GOP_DWIN_EN_VAL                         GOP_REG_VAL(GOP_DWIN_EN)
467 #define GOP_DWIN_SHOT                           (0x07)
468 #define GOP_DWIN_SHOT_VAL                       GOP_REG_VAL(GOP_DWIN_SHOT)
469 
470 #define GOP_DW_LSTR_WBE                         GOP_REG(GOP_DW_OFST, 0x01)
471 #define GOP_DW_INT_MASK                         GOP_REG(GOP_DW_OFST, 0x02)
472 #define GOP_DW_DEBUG                            GOP_REG(GOP_DW_OFST, 0x03)
473 #define GOP_DW_ALPHA                            GOP_REG(GOP_DW_OFST, 0x04)
474 #define GOP_DW_BW                               GOP_REG(GOP_DW_OFST, 0x05)
475 #define GOP_DW_VSTR                             GOP_REG(GOP_DW_OFST, 0x10)
476 #define GOP_DW_HSTR                             GOP_REG(GOP_DW_OFST, 0x11)
477 #define GOP_DW_VEND                             GOP_REG(GOP_DW_OFST, 0x12)
478 #define GOP_DW_HEND                             GOP_REG(GOP_DW_OFST, 0x13)
479 #define GOP_DW_HSIZE                            GOP_REG(GOP_DW_OFST, 0x14)
480 #define GOP_DW_JMPLEN                           GOP_REG(GOP_DW_OFST, 0x15)
481 #define GOP_DW_DSTR_L                           GOP_REG(GOP_DW_OFST, 0x16)
482 #define GOP_DW_DSTR_H                           GOP_REG(GOP_DW_OFST, 0x17)
483 #define GOP_DW_UB_L                             GOP_REG(GOP_DW_OFST, 0x18)
484 #define GOP_DW_UB_H                             GOP_REG(GOP_DW_OFST, 0x19)
485 
486 #define GOP_DW_PON_DSTR_L                       GOP_REG(GOP_DW_OFST, 0x1a)
487 #define GOP_DW_PON_DSTR_H                       GOP_REG(GOP_DW_OFST, 0x1b)
488 #define GOP_DW_PON_UB_L                         GOP_REG(GOP_DW_OFST, 0x1c)
489 #define GOP_DW_PON_UB_H                         GOP_REG(GOP_DW_OFST, 0x1d)
490 #define GOP_DW_FRAME_OFT_L                      GOP_REG(GOP_DW_OFST, 0x28)
491 #define GOP_DW_FRAME_OFT_H                      GOP_REG(GOP_DW_OFST, 0x29)
492 #define GOP_DW_FRAME_CTRL                       GOP_REG(GOP_DW_OFST, 0x30)
493 
494 #define GOP_1G_CTRL0                        GOP_REG(GOP_1G_OFST, 0x00)
495 #define GOP_1G_CTRL1                        GOP_REG(GOP_1G_OFST, 0x01)
496 #define GOP_1G_RATE                         GOP_REG(GOP_1G_OFST, 0x02)
497 #define GOP_1G_PALDATA_L                    GOP_REG(GOP_1G_OFST, 0x03)
498 #define GOP_1G_PALDATA_H                    GOP_REG(GOP_1G_OFST, 0x04)
499 #define GOP_1G_PALCTRL                      GOP_REG(GOP_1G_OFST, 0x05)
500 #define GOP_1G_REGDMA_END                   GOP_REG(GOP_1G_OFST, 0x06)
501 #define GOP_1G_REGDMA_STR                   GOP_REG(GOP_1G_OFST, 0x07)
502 #define GOP_1G_INT                          GOP_REG(GOP_1G_OFST, 0x08)
503 #define GOP_1G_HWSTATE                      GOP_REG(GOP_1G_OFST, 0x09)
504 #define GOP_1G_RDMA_HT                      GOP_REG(GOP_1G_OFST, 0x0e)
505 #define GOP_1G_HS_PIPE                      GOP_REG(GOP_1G_OFST, 0x0f)
506 #define GOP_1G_BRI                          GOP_REG(GOP_1G_OFST, 0x11)
507 #define GOP_1G_CON                          GOP_REG(GOP_1G_OFST, 0x12)
508 #define GOP_1G_BW                           GOP_REG(GOP_1G_OFST, 0x19)
509 #define GOP_1G_3D_MIDDLE                    GOP_REG(GOP_1G_OFST, 0x1E)
510 #define GOP_1G_TRSCLR_L                     GOP_REG(GOP_1G_OFST, 0x24)
511 #define GOP_1G_TRSCLR_H                     GOP_REG(GOP_1G_OFST, 0x25)
512 #define GOP_1G_STRCH_HSZ                    GOP_REG(GOP_1G_OFST, 0x30)
513 #define GOP_1G_STRCH_VSZ                    GOP_REG(GOP_1G_OFST, 0x31)
514 #define GOP_1G_STRCH_HSTR                   GOP_REG(GOP_1G_OFST, 0x32)
515 #define GOP_1G_STRCH_VSTR                   GOP_REG(GOP_1G_OFST, 0x34)
516 #define GOP_1G_HSTRCH                       GOP_REG(GOP_1G_OFST, 0x35)
517 #define GOP_1G_HSTRCH_INI                   GOP_REG(GOP_1G_OFST, 0x38)
518 #define GOP_1G_VSTRCH_INI                   GOP_REG(GOP_1G_OFST, 0x39)
519 #define GOP_1G_HStrch_MD                    GOP_REG(GOP_1G_OFST, 0x3a)
520 #define GOP_1G_OLDADDR                      GOP_REG(GOP_1G_OFST, 0x3b)
521 #define GOP_1G_MULTI_ALPHA                  GOP_REG(GOP_1G_OFST, 0x3c)
522 
523 #define GOP_1G_GWIN0_CTRL                   GOP_REG(GOP_1G_OFST+1, 0x0)
524 #define GOP_1G_DRAM_RBLK_L                  GOP_REG(GOP_1G_OFST+1, 0x1)
525 #define GOP_1G_DRAM_RBLK_H                  GOP_REG(GOP_1G_OFST+1, 0x2)
526 #define GOP_1G_DEL_PIXEL                    GOP_REG(GOP_1G_OFST+1, 0x3)
527 #define GOP_1G_HSTR                         GOP_REG(GOP_1G_OFST+1, 0x4)
528 #define GOP_1G_HEND                         GOP_REG(GOP_1G_OFST+1, 0x5)
529 #define GOP_1G_VSTR                         GOP_REG(GOP_1G_OFST+1, 0x6)
530 #define GOP_1G_VEND                         GOP_REG(GOP_1G_OFST+1, 0x8)
531 #define GOP_1G_DRAM_RBLK_HSIZE              GOP_REG(GOP_1G_OFST+1, 0x9)
532 #define GOP_1G_GWIN_ALPHA01                 GOP_REG(GOP_1G_OFST+1, 0xA)
533 #define GOP_1G_DRAM_VSTR_L                  GOP_REG(GOP_1G_OFST+1, 0x0C)
534 #define GOP_1G_DRAM_VSTR_H                  GOP_REG(GOP_1G_OFST+1, 0x0D)
535 #define GOP_1G_DRAM_FADE                    GOP_REG(GOP_1G_OFST+1, 0x16)
536 #define GOP_1G_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1G_OFST+1, 0x1E)
537 #define GOP_1G_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1G_OFST+1, 0x1F)
538 
539 #define GOP_1GX_CTRL0                        GOP_REG(GOP_1GX_OFST, 0x00)
540 #define GOP_1GX_CTRL1                        GOP_REG(GOP_1GX_OFST, 0x01)
541 #define GOP_1GX_RATE                         GOP_REG(GOP_1GX_OFST, 0x02)
542 #define GOP_1GX_PALDATA_L                    GOP_REG(GOP_1GX_OFST, 0x03)
543 #define GOP_1GX_PALDATA_H                    GOP_REG(GOP_1GX_OFST, 0x04)
544 #define GOP_1GX_PALCTRL                      GOP_REG(GOP_1GX_OFST, 0x05)
545 #define GOP_1GX_REGDMA_END                   GOP_REG(GOP_1GX_OFST, 0x06)
546 #define GOP_1GX_REGDMA_STR                   GOP_REG(GOP_1GX_OFST, 0x07)
547 #define GOP_1GX_INT                          GOP_REG(GOP_1GX_OFST, 0x08)
548 #define GOP_1GX_HWSTATE                      GOP_REG(GOP_1GX_OFST, 0x09)
549 #define GOP_1GX_RDMA_HT                      GOP_REG(GOP_1GX_OFST, 0x0e)
550 #define GOP_1GX_HS_PIPE                      GOP_REG(GOP_1GX_OFST, 0x0f)
551 #define GOP_1GX_BRI                          GOP_REG(GOP_1GX_OFST, 0x11)
552 #define GOP_1GX_CON                          GOP_REG(GOP_1GX_OFST, 0x12)
553 #define GOP_1GX_BW                           GOP_REG(GOP_1GX_OFST, 0x19)
554 #define GOP_1GX_3D_MIDDLE                    GOP_REG(GOP_1GX_OFST, 0x1E)
555 #define GOP_1GX_TRSCLR_L                     GOP_REG(GOP_1GX_OFST, 0x24)
556 #define GOP_1GX_TRSCLR_H                     GOP_REG(GOP_1GX_OFST, 0x25)
557 #define GOP_1GX_STRCH_HSZ                    GOP_REG(GOP_1GX_OFST, 0x30)
558 #define GOP_1GX_STRCH_VSZ                    GOP_REG(GOP_1GX_OFST, 0x31)
559 #define GOP_1GX_STRCH_HSTR                   GOP_REG(GOP_1GX_OFST, 0x32)
560 #define GOP_1GX_STRCH_VSTR                   GOP_REG(GOP_1GX_OFST, 0x34)
561 #define GOP_1GX_HSTRCH                       GOP_REG(GOP_1GX_OFST, 0x35)
562 #define GOP_1GX_HSTRCH_INI                   GOP_REG(GOP_1GX_OFST, 0x38)
563 #define GOP_1GX_VSTRCH_INI                   GOP_REG(GOP_1GX_OFST, 0x39)
564 #define GOP_1GX_HStrch_MD                    GOP_REG(GOP_1GX_OFST, 0x3a)
565 #define GOP_1GX_OLDADDR                      GOP_REG(GOP_1GX_OFST, 0x3b)
566 #define GOP_1GX_MULTI_ALPHA                  GOP_REG(GOP_1GX_OFST, 0x3c)
567 
568 #define GOP_1GX_GWIN0_CTRL                   GOP_REG(GOP_1GX_OFST+1, 0x00)
569 #define GOP_1GX_DRAM_RBLK_L                  GOP_REG(GOP_1GX_OFST+1, 0x01)
570 #define GOP_1GX_DRAM_RBLK_H                  GOP_REG(GOP_1GX_OFST+1, 0x02)
571 #define GOP_1GX_DEL_PIXEL                    GOP_REG(GOP_1GX_OFST+1, 0x03)
572 #define GOP_1GX_HSTR                         GOP_REG(GOP_1GX_OFST+1, 0x04)
573 #define GOP_1GX_HEND                         GOP_REG(GOP_1GX_OFST+1, 0x05)
574 #define GOP_1GX_VSTR                         GOP_REG(GOP_1GX_OFST+1, 0x06)
575 #define GOP_1GX_VEND                         GOP_REG(GOP_1GX_OFST+1, 0x08)
576 #define GOP_1GX_DRAM_RBLK_HSIZE              GOP_REG(GOP_1GX_OFST+1, 0x09)
577 #define GOP_1GX_GWIN_ALPHA01                 GOP_REG(GOP_1GX_OFST+1, 0x0A)
578 #define GOP_1GX_DRAM_VSTR_L                  GOP_REG(GOP_1GX_OFST+1, 0x0C)
579 #define GOP_1GX_DRAM_VSTR_H                  GOP_REG(GOP_1GX_OFST+1, 0x0D)
580 #define GOP_1GX_DRAM_FADE                    GOP_REG(GOP_1GX_OFST+1, 0x16)
581 #define GOP_1GX_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1GX_OFST+1, 0x1E)
582 #define GOP_1GX_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1GX_OFST+1, 0x1F)
583 
584 #define GOP_1GS0_CTRL0                        GOP_REG(GOP_1GS0_OFST, 0x00)
585 #define GOP_1GS0_CTRL1                        GOP_REG(GOP_1GS0_OFST, 0x01)
586 #define GOP_1GS0_RATE                         GOP_REG(GOP_1GS0_OFST, 0x02)
587 #define GOP_1GS0_PALDATA_L                    GOP_REG(GOP_1GS0_OFST, 0x03)
588 #define GOP_1GS0_PALDATA_H                    GOP_REG(GOP_1GS0_OFST, 0x04)
589 #define GOP_1GS0_PALCTRL                      GOP_REG(GOP_1GS0_OFST, 0x05)
590 #define GOP_1GS0_REGDMA_END                   GOP_REG(GOP_1GS0_OFST, 0x06)
591 #define GOP_1GS0_REGDMA_STR                   GOP_REG(GOP_1GS0_OFST, 0x07)
592 #define GOP_1GS0_INT                          GOP_REG(GOP_1GS0_OFST, 0x08)
593 #define GOP_1GS0_HWSTATE                      GOP_REG(GOP_1GS0_OFST, 0x09)
594 #define GOP_1GS0_RDMA_HT                      GOP_REG(GOP_1GS0_OFST, 0x0e)
595 #define GOP_1GS0_HS_PIPE                      GOP_REG(GOP_1GS0_OFST, 0x0f)
596 #define GOP_1GS0_BRI                          GOP_REG(GOP_1GS0_OFST, 0x11)
597 #define GOP_1GS0_CON                          GOP_REG(GOP_1GS0_OFST, 0x12)
598 #define GOP_1GS0_BW                           GOP_REG(GOP_1GS0_OFST, 0x19)
599 #define GOP_1GS0_TRSCLR_L                     GOP_REG(GOP_1GS0_OFST, 0x24)
600 #define GOP_1GS0_TRSCLR_H                     GOP_REG(GOP_1GS0_OFST, 0x25)
601 #define GOP_1GS0_STRCH_HSZ                    GOP_REG(GOP_1GS0_OFST, 0x30)
602 #define GOP_1GS0_STRCH_VSZ                    GOP_REG(GOP_1GS0_OFST, 0x31)
603 #define GOP_1GS0_STRCH_HSTR                   GOP_REG(GOP_1GS0_OFST, 0x32)
604 #define GOP_1GS0_STRCH_VSTR                   GOP_REG(GOP_1GS0_OFST, 0x34)
605 #define GOP_1GS0_HSTRCH                       GOP_REG(GOP_1GS0_OFST, 0x35)
606 #define GOP_1GS0_HSTRCH_INI                   GOP_REG(GOP_1GS0_OFST, 0x38)
607 #define GOP_1GS0_VSTRCH_INI                   GOP_REG(GOP_1GS0_OFST, 0x39)
608 #define GOP_1GS0_HVStrch_MD                    GOP_REG(GOP_1GS0_OFST, 0x3a)
609 #define GOP_1GS0_OLDADDR                      GOP_REG(GOP_1GS0_OFST, 0x3b)
610 #define GOP_1GS0_MULTI_ALPHA                  GOP_REG(GOP_1GS0_OFST, 0x3c)
611 
612 #define GOP_1GS0_GWIN0_CTRL                   GOP_REG(GOP_1GS0_OFST+1, 0x00)
613 #define GOP_1GS0_DRAM_RBLK_L                  GOP_REG(GOP_1GS0_OFST+1, 0x01)
614 #define GOP_1GS0_DRAM_RBLK_H                  GOP_REG(GOP_1GS0_OFST+1, 0x02)
615 #define GOP_1GS0_DEL_PIXEL                    GOP_REG(GOP_1GS0_OFST+1, 0x03)
616 #define GOP_1GS0_HSTR                         GOP_REG(GOP_1GS0_OFST+1, 0x04)
617 #define GOP_1GS0_HEND                         GOP_REG(GOP_1GS0_OFST+1, 0x05)
618 #define GOP_1GS0_VSTR                         GOP_REG(GOP_1GS0_OFST+1, 0x06)
619 #define GOP_1GS0_VEND                         GOP_REG(GOP_1GS0_OFST+1, 0x08)
620 #define GOP_1GS0_DRAM_RBLK_HSIZE              GOP_REG(GOP_1GS0_OFST+1, 0x09)
621 #define GOP_1GS0_GWIN_ALPHA01                 GOP_REG(GOP_1GS0_OFST+1, 0x0A)
622 #define GOP_1GS0_DRAM_VSTR_L                  GOP_REG(GOP_1GS0_OFST+1, 0x0C)
623 #define GOP_1GS0_DRAM_VSTR_H                  GOP_REG(GOP_1GS0_OFST+1, 0x0D)
624 #define GOP_1GS0_DRAM_FADE                    GOP_REG(GOP_1GS0_OFST+1, 0x16)
625 #define GOP_1GS0_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1GS0_OFST+1, 0x1E)
626 #define GOP_1GS0_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1GS0_OFST+1, 0x1F)
627 
628 #define GOP_1GS1_CTRL0                        GOP_REG(GOP_1GS1_OFST, 0x00)
629 #define GOP_1GS1_CTRL1                        GOP_REG(GOP_1GS1_OFST, 0x01)
630 #define GOP_1GS1_RATE                         GOP_REG(GOP_1GS1_OFST, 0x02)
631 #define GOP_1GS1_PALDATA_L                    GOP_REG(GOP_1GS1_OFST, 0x03)
632 #define GOP_1GS1_PALDATA_H                    GOP_REG(GOP_1GS1_OFST, 0x04)
633 #define GOP_1GS1_PALCTRL                      GOP_REG(GOP_1GS1_OFST, 0x05)
634 #define GOP_1GS1_REGDMA_END                   GOP_REG(GOP_1GS1_OFST, 0x06)
635 #define GOP_1GS1_REGDMA_STR                   GOP_REG(GOP_1GS1_OFST, 0x07)
636 #define GOP_1GS1_INT                          GOP_REG(GOP_1GS1_OFST, 0x08)
637 #define GOP_1GS1_HWSTATE                      GOP_REG(GOP_1GS1_OFST, 0x09)
638 #define GOP_1GS1_RDMA_HT                      GOP_REG(GOP_1GS1_OFST, 0x0e)
639 #define GOP_1GS1_HS_PIPE                      GOP_REG(GOP_1GS1_OFST, 0x0f)
640 #define GOP_1GS1_BRI                          GOP_REG(GOP_1GS1_OFST, 0x11)
641 #define GOP_1GS1_CON                          GOP_REG(GOP_1GS1_OFST, 0x12)
642 #define GOP_1GS1_BW                           GOP_REG(GOP_1GS1_OFST, 0x19)
643 #define GOP_1GS1_TRSCLR_L                     GOP_REG(GOP_1GS1_OFST, 0x24)
644 #define GOP_1GS1_TRSCLR_H                     GOP_REG(GOP_1GS1_OFST, 0x25)
645 #define GOP_1GS1_STRCH_HSZ                    GOP_REG(GOP_1GS1_OFST, 0x30)
646 #define GOP_1GS1_STRCH_VSZ                    GOP_REG(GOP_1GS1_OFST, 0x31)
647 #define GOP_1GS1_STRCH_HSTR                   GOP_REG(GOP_1GS1_OFST, 0x32)
648 #define GOP_1GS1_STRCH_VSTR                   GOP_REG(GOP_1GS1_OFST, 0x34)
649 #define GOP_1GS1_HSTRCH                       GOP_REG(GOP_1GS1_OFST, 0x35)
650 #define GOP_1GS1_HSTRCH_INI                   GOP_REG(GOP_1GS1_OFST, 0x38)
651 #define GOP_1GS1_VSTRCH_INI                   GOP_REG(GOP_1GS1_OFST, 0x39)
652 #define GOP_1GS1_HVStrch_MD                    GOP_REG(GOP_1GS1_OFST, 0x3a)
653 #define GOP_1GS1_OLDADDR                      GOP_REG(GOP_1GS1_OFST, 0x3b)
654 #define GOP_1GS1_MULTI_ALPHA                  GOP_REG(GOP_1GS1_OFST, 0x3c)
655 
656 #define GOP_1GS1_GWIN0_CTRL                   GOP_REG(GOP_1GS1_OFST+1, 0x00)
657 #define GOP_1GS1_DRAM_RBLK_L                  GOP_REG(GOP_1GS1_OFST+1, 0x01)
658 #define GOP_1GS1_DRAM_RBLK_H                  GOP_REG(GOP_1GS1_OFST+1, 0x02)
659 #define GOP_1GS1_DEL_PIXEL                    GOP_REG(GOP_1GS1_OFST+1, 0x03)
660 #define GOP_1GS1_HSTR                         GOP_REG(GOP_1GS1_OFST+1, 0x04)
661 #define GOP_1GS1_HEND                         GOP_REG(GOP_1GS1_OFST+1, 0x05)
662 #define GOP_1GS1_VSTR                         GOP_REG(GOP_1GS1_OFST+1, 0x06)
663 #define GOP_1GS1_VEND                         GOP_REG(GOP_1GS1_OFST+1, 0x08)
664 #define GOP_1GS1_DRAM_RBLK_HSIZE              GOP_REG(GOP_1GS1_OFST+1, 0x09)
665 #define GOP_1GS1_GWIN_ALPHA01                 GOP_REG(GOP_1GS1_OFST+1, 0x0A)
666 #define GOP_1GS1_DRAM_VSTR_L                  GOP_REG(GOP_1GS1_OFST+1, 0x0C)
667 #define GOP_1GS1_DRAM_VSTR_H                  GOP_REG(GOP_1GS1_OFST+1, 0x0D)
668 #define GOP_1GS1_DRAM_FADE                    GOP_REG(GOP_1GS1_OFST+1, 0x16)
669 #define GOP_1GS1_3DOSD_SUB_RBLK_L             GOP_REG(GOP_1GS1_OFST+1, 0x1E)
670 #define GOP_1GS1_3DOSD_SUB_RBLK_H             GOP_REG(GOP_1GS1_OFST+1, 0x1F)
671 //-------------------------------------------------------------------------------------------------
672 //  Type and Structure
673 //-------------------------------------------------------------------------------------------------
674 
675 //----------------------------------------------------------------------------
676 // GOP Test Pattern Reg
677 //----------------------------------------------------------------------------
678 #define REG_TSTCLR_EN                       GOP_REG(GOP_4G_OFST, 0x00)
679 #define REG_TSTCLR_ALPHA_EN                 GOP_REG(GOP_4G_OFST+2, 0x00)
680 #define REG_TLB_TAG_ADDR_L                  GOP_REG(GOP_4G_OFST+2, 0x2C)
681 #define REG_TLB_TAG_ADDR_H                  GOP_REG(GOP_4G_OFST+2, 0x2D)
682 #define REG_TLB_TAG_ADDR_RVIEW_L            GOP_REG(GOP_4G_OFST+2, 0x2E)
683 #define REG_TLB_TAG_ADDR_RVIEW_H            GOP_REG(GOP_4G_OFST+2, 0x2F)
684 #define REG_TSTCLR_ALPHA                    GOP_REG(GOP_4G_OFST+2, 0x40)
685 #define REG_R_STC                           GOP_REG(GOP_4G_OFST+2, 0x41)
686 #define REG_G_STC                           GOP_REG(GOP_4G_OFST+2, 0x48)
687 #define REG_B_STC                           GOP_REG(GOP_4G_OFST+2, 0x49)
688 #define REG_TSTCLR_HDUP                     GOP_REG(GOP_4G_OFST+2, 0x01)
689 #define REG_TSTCLR_VDUP                     GOP_REG(GOP_4G_OFST+2, 0x01)
690 #define REG_HR_INC                          GOP_REG(GOP_4G_OFST+2, 0x42)
691 #define REG_HR_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x42)
692 #define REG_HG_INC                          GOP_REG(GOP_4G_OFST+2, 0x43)
693 #define REG_HG_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x43)
694 #define REG_HB_INC                          GOP_REG(GOP_4G_OFST+2, 0x44)
695 #define REG_HB_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x44)
696 #define REG_HR_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4A)
697 #define REG_HG_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4B)
698 #define REG_HB_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4C)
699 #define REG_VR_INC                          GOP_REG(GOP_4G_OFST+2, 0x45)
700 #define REG_VR_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x45)
701 #define REG_VG_INC                          GOP_REG(GOP_4G_OFST+2, 0x46)
702 #define REG_VG_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x46)
703 #define REG_VB_INC                          GOP_REG(GOP_4G_OFST+2, 0x47)
704 #define REG_VB_INC_SIGNZ                    GOP_REG(GOP_4G_OFST+2, 0x47)
705 #define REG_VR_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4D)
706 #define REG_VG_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4E)
707 #define REG_VB_STEP                         GOP_REG(GOP_4G_OFST+2, 0x4F)
708 #define REG_TLB_BASE_ADDR_L                 GOP_REG(GOP_4G_OFST+2, 0x58)
709 #define REG_TLB_BASE_ADDR_H                 GOP_REG(GOP_4G_OFST+2, 0x59)
710 #define REG_TLB_BASE_ADDR_RVIEW_L           GOP_REG(GOP_4G_OFST+2, 0x5A)
711 #define REG_TLB_BASE_ADDR_RVIEW_H           GOP_REG(GOP_4G_OFST+2, 0x5B)
712 
713 #define MASK_TSTCLR_EN                      GOP_BIT6
714 #define MASK_TSTCLR_ALPHA_EN                0
715 #define MASK_TSTCLR_ALPHA                   0
716 #define MASK_RGB_STC_VALID                  BMASK(1:0)
717 #define MASK_R_STC                          BMASK(9:8)
718 #define MASK_G_STC                          BMASK(11:10)
719 #define MASK_B_STC                          BMASK(1:0)
720 #define MASK_INI_TSTCLR_EN                  GOP_BIT15
721 #define MASK_TSTCLR_HDUP                    BMASK(9:8)
722 #define MASK_TSTCLR_VDUP                    BMASK(3:2)
723 #define MASK_HR_INC                         BMASK(14:8)
724 #define MASK_HR_INC_SIGNZ                   GOP_BIT15
725 #define MASK_HG_INC                         BMASK(6:0)
726 #define MASK_HG_INC_SIGNZ                   GOP_BIT7
727 #define MASK_HB_INC                         BMASK(6:0)
728 #define MASK_HB_INC_SIGNZ                   GOP_BIT7
729 #define MASK_HR_STEP                        BMASK(7:0)
730 #define MASK_HG_STEP                        BMASK(15:8)
731 #define MASK_HB_STEP                        BMASK(7:0)
732 #define MASK_VR_INC                         BMASK(14:8)
733 #define MASK_VR_INC_SIGNZ                   GOP_BIT4
734 #define MASK_VG_INC                         BMASK(6:0)
735 #define MASK_VG_INC_SIGNZ                   GOP_BIT7
736 #define MASK_VB_INC                         BMASK(14:8)
737 #define MASK_VB_INC_SIGNZ                   GOP_BIT15
738 #define MASK_VR_STEP                        BMASK(7:0)
739 #define MASK_VG_STEP                        BMASK(7:0)
740 #define MASK_VB_STEP                        BMASK(7:0)
741 
742 #define SHIFT_TSTCLR_EN                     6
743 #define SHIFT_TSTCLR_ALPHA_EN               0
744 #define SHIFT_TSTCLR_ALPHA                  0
745 #define SHIFT_R_STC                         8
746 #define SHIFT_G_STC                         10
747 #define SHIFT_B_STC                         0
748 #define SHIFT_INI_TSTCLR_EN                 15
749 #define SHIFT_TSTCLR_HDUP                   8
750 #define SHIFT_TSTCLR_VDUP                   2
751 #define SHIFT_HR_INC                        8
752 #define SHIFT_HR_INC_SIGNZ                  15
753 #define SHIFT_HG_INC                        0
754 #define SHIFT_HG_INC_SIGNZ                  7
755 #define SHIFT_HB_INC                        0
756 #define SHIFT_HB_INC_SIGNZ                  7
757 #define SHIFT_HR_STEP                       0
758 #define SHIFT_HG_STEP                       8
759 #define SHIFT_HB_STEP                       0
760 #define SHIFT_VR_INC                        8
761 #define SHIFT_VR_INC_SIGNZ                  4
762 #define SHIFT_VG_INC                        0
763 #define SHIFT_VG_INC_SIGNZ                  7
764 #define SHIFT_VB_INC                        8
765 #define SHIFT_VB_INC_SIGNZ                  15
766 #define SHIFT_VR_STEP                       0
767 #define SHIFT_VG_STEP                       0
768 #define SHIFT_VB_STEP                       0
769 #endif // _REG_GOP_H_
770 
771