xref: /utopia/UTPA2-700.0.x/modules/graphic/hal/k6/gop/halGOP.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi //<MStar Software>
2*53ee8cc1Swenshuai.xi //******************************************************************************
3*53ee8cc1Swenshuai.xi // MStar Software
4*53ee8cc1Swenshuai.xi // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5*53ee8cc1Swenshuai.xi // All software, firmware and related documentation herein ("MStar Software") are
6*53ee8cc1Swenshuai.xi // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7*53ee8cc1Swenshuai.xi // law, including, but not limited to, copyright law and international treaties.
8*53ee8cc1Swenshuai.xi // Any use, modification, reproduction, retransmission, or republication of all
9*53ee8cc1Swenshuai.xi // or part of MStar Software is expressly prohibited, unless prior written
10*53ee8cc1Swenshuai.xi // permission has been granted by MStar.
11*53ee8cc1Swenshuai.xi //
12*53ee8cc1Swenshuai.xi // By accessing, browsing and/or using MStar Software, you acknowledge that you
13*53ee8cc1Swenshuai.xi // have read, understood, and agree, to be bound by below terms ("Terms") and to
14*53ee8cc1Swenshuai.xi // comply with all applicable laws and regulations:
15*53ee8cc1Swenshuai.xi //
16*53ee8cc1Swenshuai.xi // 1. MStar shall retain any and all right, ownership and interest to MStar
17*53ee8cc1Swenshuai.xi //    Software and any modification/derivatives thereof.
18*53ee8cc1Swenshuai.xi //    No right, ownership, or interest to MStar Software and any
19*53ee8cc1Swenshuai.xi //    modification/derivatives thereof is transferred to you under Terms.
20*53ee8cc1Swenshuai.xi //
21*53ee8cc1Swenshuai.xi // 2. You understand that MStar Software might include, incorporate or be
22*53ee8cc1Swenshuai.xi //    supplied together with third party`s software and the use of MStar
23*53ee8cc1Swenshuai.xi //    Software may require additional licenses from third parties.
24*53ee8cc1Swenshuai.xi //    Therefore, you hereby agree it is your sole responsibility to separately
25*53ee8cc1Swenshuai.xi //    obtain any and all third party right and license necessary for your use of
26*53ee8cc1Swenshuai.xi //    such third party`s software.
27*53ee8cc1Swenshuai.xi //
28*53ee8cc1Swenshuai.xi // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29*53ee8cc1Swenshuai.xi //    MStar`s confidential information and you agree to keep MStar`s
30*53ee8cc1Swenshuai.xi //    confidential information in strictest confidence and not disclose to any
31*53ee8cc1Swenshuai.xi //    third party.
32*53ee8cc1Swenshuai.xi //
33*53ee8cc1Swenshuai.xi // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34*53ee8cc1Swenshuai.xi //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35*53ee8cc1Swenshuai.xi //    without limitation, any warranties of merchantability, non-infringement of
36*53ee8cc1Swenshuai.xi //    intellectual property rights, fitness for a particular purpose, error free
37*53ee8cc1Swenshuai.xi //    and in conformity with any international standard.  You agree to waive any
38*53ee8cc1Swenshuai.xi //    claim against MStar for any loss, damage, cost or expense that you may
39*53ee8cc1Swenshuai.xi //    incur related to your use of MStar Software.
40*53ee8cc1Swenshuai.xi //    In no event shall MStar be liable for any direct, indirect, incidental or
41*53ee8cc1Swenshuai.xi //    consequential damages, including without limitation, lost of profit or
42*53ee8cc1Swenshuai.xi //    revenues, lost or damage of data, and unauthorized system use.
43*53ee8cc1Swenshuai.xi //    You agree that this Section 4 shall still apply without being affected
44*53ee8cc1Swenshuai.xi //    even if MStar Software has been modified by MStar in accordance with your
45*53ee8cc1Swenshuai.xi //    request or instruction for your use, except otherwise agreed by both
46*53ee8cc1Swenshuai.xi //    parties in writing.
47*53ee8cc1Swenshuai.xi //
48*53ee8cc1Swenshuai.xi // 5. If requested, MStar may from time to time provide technical supports or
49*53ee8cc1Swenshuai.xi //    services in relation with MStar Software to you for your use of
50*53ee8cc1Swenshuai.xi //    MStar Software in conjunction with your or your customer`s product
51*53ee8cc1Swenshuai.xi //    ("Services").
52*53ee8cc1Swenshuai.xi //    You understand and agree that, except otherwise agreed by both parties in
53*53ee8cc1Swenshuai.xi //    writing, Services are provided on an "AS IS" basis and the warranty
54*53ee8cc1Swenshuai.xi //    disclaimer set forth in Section 4 above shall apply.
55*53ee8cc1Swenshuai.xi //
56*53ee8cc1Swenshuai.xi // 6. Nothing contained herein shall be construed as by implication, estoppels
57*53ee8cc1Swenshuai.xi //    or otherwise:
58*53ee8cc1Swenshuai.xi //    (a) conferring any license or right to use MStar name, trademark, service
59*53ee8cc1Swenshuai.xi //        mark, symbol or any other identification;
60*53ee8cc1Swenshuai.xi //    (b) obligating MStar or any of its affiliates to furnish any person,
61*53ee8cc1Swenshuai.xi //        including without limitation, you and your customers, any assistance
62*53ee8cc1Swenshuai.xi //        of any kind whatsoever, or any information; or
63*53ee8cc1Swenshuai.xi //    (c) conferring any license or right under any intellectual property right.
64*53ee8cc1Swenshuai.xi //
65*53ee8cc1Swenshuai.xi // 7. These terms shall be governed by and construed in accordance with the laws
66*53ee8cc1Swenshuai.xi //    of Taiwan, R.O.C., excluding its conflict of law rules.
67*53ee8cc1Swenshuai.xi //    Any and all dispute arising out hereof or related hereto shall be finally
68*53ee8cc1Swenshuai.xi //    settled by arbitration referred to the Chinese Arbitration Association,
69*53ee8cc1Swenshuai.xi //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70*53ee8cc1Swenshuai.xi //    Rules of the Association by three (3) arbitrators appointed in accordance
71*53ee8cc1Swenshuai.xi //    with the said Rules.
72*53ee8cc1Swenshuai.xi //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73*53ee8cc1Swenshuai.xi //    be English.
74*53ee8cc1Swenshuai.xi //    The arbitration award shall be final and binding to both parties.
75*53ee8cc1Swenshuai.xi //
76*53ee8cc1Swenshuai.xi //******************************************************************************
77*53ee8cc1Swenshuai.xi //<MStar Software>
78*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
79*53ee8cc1Swenshuai.xi //
80*53ee8cc1Swenshuai.xi // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81*53ee8cc1Swenshuai.xi // All rights reserved.
82*53ee8cc1Swenshuai.xi //
83*53ee8cc1Swenshuai.xi // Unless otherwise stipulated in writing, any and all information contained
84*53ee8cc1Swenshuai.xi // herein regardless in any format shall remain the sole proprietary of
85*53ee8cc1Swenshuai.xi // MStar Semiconductor Inc. and be kept in strict confidence
86*53ee8cc1Swenshuai.xi // (!��MStar Confidential Information!�L) by the recipient.
87*53ee8cc1Swenshuai.xi // Any unauthorized act including without limitation unauthorized disclosure,
88*53ee8cc1Swenshuai.xi // copying, use, reproduction, sale, distribution, modification, disassembling,
89*53ee8cc1Swenshuai.xi // reverse engineering and compiling of the contents of MStar Confidential
90*53ee8cc1Swenshuai.xi // Information is unlawful and strictly prohibited. MStar hereby reserves the
91*53ee8cc1Swenshuai.xi // rights to any and all damages, losses, costs and expenses resulting therefrom.
92*53ee8cc1Swenshuai.xi //
93*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
94*53ee8cc1Swenshuai.xi 
95*53ee8cc1Swenshuai.xi #ifndef _HAL_GOP_H_
96*53ee8cc1Swenshuai.xi #define _HAL_GOP_H_
97*53ee8cc1Swenshuai.xi 
98*53ee8cc1Swenshuai.xi #include "drvGOP.h"
99*53ee8cc1Swenshuai.xi #include "regGOP.h"
100*53ee8cc1Swenshuai.xi 
101*53ee8cc1Swenshuai.xi #include "apiGOP.h"
102*53ee8cc1Swenshuai.xi 
103*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
104*53ee8cc1Swenshuai.xi //  Macro and Define
105*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
106*53ee8cc1Swenshuai.xi #define Gop23_GwinCtl_Ofet                      0UL
107*53ee8cc1Swenshuai.xi 
108*53ee8cc1Swenshuai.xi #define MAX_GOP_MIUCOUNT                        2UL
109*53ee8cc1Swenshuai.xi #define MAX_GOP_MIUSEL                          MAX_GOP_MIUCOUNT-1
110*53ee8cc1Swenshuai.xi #define MAX_GOP_SUPPORT                         5UL
111*53ee8cc1Swenshuai.xi #define MAX_GOP_MUX                             5UL
112*53ee8cc1Swenshuai.xi #define MAX_GOP_MUX_SEL                         5UL
113*53ee8cc1Swenshuai.xi #define MAX_GOP_MUX_OPNum			            MAX_GOP_MUX
114*53ee8cc1Swenshuai.xi #define MAX_GOP_DualMUX_Num			            3UL
115*53ee8cc1Swenshuai.xi #define MAX_GOP0_GWIN                           2UL
116*53ee8cc1Swenshuai.xi #define MAX_GOP1_GWIN                           2UL
117*53ee8cc1Swenshuai.xi #define MAX_GOP2_GWIN                           1UL
118*53ee8cc1Swenshuai.xi #define MAX_GOP3_GWIN                           1UL
119*53ee8cc1Swenshuai.xi #define MAX_GOP4_GWIN                           1UL
120*53ee8cc1Swenshuai.xi #define MAX_GOP5_GWIN                           0UL
121*53ee8cc1Swenshuai.xi 
122*53ee8cc1Swenshuai.xi #define GOP0_Gwin0Id                            0UL
123*53ee8cc1Swenshuai.xi #define GOP0_Gwin1Id                            1UL
124*53ee8cc1Swenshuai.xi #define GOP1_Gwin0Id                            2UL
125*53ee8cc1Swenshuai.xi #define GOP1_Gwin1Id                            3UL
126*53ee8cc1Swenshuai.xi #define GOP2_Gwin0Id                            4UL
127*53ee8cc1Swenshuai.xi #define GOP3_Gwin0Id                            5UL
128*53ee8cc1Swenshuai.xi #define GOP4_Gwin0Id                            6UL
129*53ee8cc1Swenshuai.xi #define GOP5_Gwin0Id                            0xF0
130*53ee8cc1Swenshuai.xi 
131*53ee8cc1Swenshuai.xi #define GOP0_REG_FORM                           E_GOP_REG_FORM_2G + E_GOP_PAL_SIZE_256
132*53ee8cc1Swenshuai.xi #define GOP1_REG_FORM                           E_GOP_REG_FORM_2G + E_GOP_PAL_SIZE_256
133*53ee8cc1Swenshuai.xi #define GOP2_REG_FORM                           E_GOP_REG_FORM_T81G + E_GOP_PAL_SIZE_NONE
134*53ee8cc1Swenshuai.xi #define GOP3_REG_FORM                           E_GOP_REG_FORM_T81G + E_GOP_PAL_SIZE_NONE
135*53ee8cc1Swenshuai.xi #define GOP4_REG_FORM                           E_GOP_REG_FORM_T81G + E_GOP_PAL_SIZE_NONE
136*53ee8cc1Swenshuai.xi #define GOP5_REG_FORM                           E_GOP_REG_FORM_NONE
137*53ee8cc1Swenshuai.xi #define GOPD_REG_FORM                           E_GOPD_FIFO_DEPTH_64
138*53ee8cc1Swenshuai.xi 
139*53ee8cc1Swenshuai.xi 
140*53ee8cc1Swenshuai.xi #define GOP0_GwinIdBase                         GOP0_Gwin0Id
141*53ee8cc1Swenshuai.xi #define GOP1_GwinIdBase                         MAX_GOP0_GWIN
142*53ee8cc1Swenshuai.xi #define GOP2_GwinIdBase                         MAX_GOP0_GWIN + MAX_GOP1_GWIN
143*53ee8cc1Swenshuai.xi #define GOP3_GwinIdBase                         MAX_GOP0_GWIN + MAX_GOP1_GWIN + MAX_GOP2_GWIN
144*53ee8cc1Swenshuai.xi #define GOP4_GwinIdBase                         MAX_GOP0_GWIN + MAX_GOP1_GWIN + MAX_GOP2_GWIN + MAX_GOP3_GWIN
145*53ee8cc1Swenshuai.xi #define GOP5_GwinIdBase                         MAX_GOP0_GWIN + MAX_GOP1_GWIN + MAX_GOP2_GWIN + MAX_GOP3_GWIN + MAX_GOP4_GWIN
146*53ee8cc1Swenshuai.xi 
147*53ee8cc1Swenshuai.xi #define MAX_MIXER_MUX   						2
148*53ee8cc1Swenshuai.xi #define MIXER_MUX0Id 							0
149*53ee8cc1Swenshuai.xi #define MIXER_MUX1Id 							1
150*53ee8cc1Swenshuai.xi 
151*53ee8cc1Swenshuai.xi #define GOP_MIXER_MUX                           6UL
152*53ee8cc1Swenshuai.xi 
153*53ee8cc1Swenshuai.xi #define GOP_BIT0    0x01
154*53ee8cc1Swenshuai.xi #define GOP_BIT1    0x02
155*53ee8cc1Swenshuai.xi #define GOP_BIT2    0x04
156*53ee8cc1Swenshuai.xi #define GOP_BIT3    0x08
157*53ee8cc1Swenshuai.xi #define GOP_BIT4    0x10
158*53ee8cc1Swenshuai.xi #define GOP_BIT5    0x20
159*53ee8cc1Swenshuai.xi #define GOP_BIT6    0x40
160*53ee8cc1Swenshuai.xi #define GOP_BIT7    0x80
161*53ee8cc1Swenshuai.xi #define GOP_BIT8    0x0100
162*53ee8cc1Swenshuai.xi #define GOP_BIT9    0x0200
163*53ee8cc1Swenshuai.xi #define GOP_BIT10   0x0400
164*53ee8cc1Swenshuai.xi #define GOP_BIT11   0x0800
165*53ee8cc1Swenshuai.xi #define GOP_BIT12   0x1000
166*53ee8cc1Swenshuai.xi #define GOP_BIT13   0x2000
167*53ee8cc1Swenshuai.xi #define GOP_BIT14   0x4000
168*53ee8cc1Swenshuai.xi #define GOP_BIT15   0x8000
169*53ee8cc1Swenshuai.xi 
170*53ee8cc1Swenshuai.xi #define GOP_REG_WORD_MASK                       0xFFFFUL
171*53ee8cc1Swenshuai.xi #define GOP_REG_HW_MASK                         0xFF00UL
172*53ee8cc1Swenshuai.xi #define GOP_REG_LW_MASK                         0x00FFUL
173*53ee8cc1Swenshuai.xi 
174*53ee8cc1Swenshuai.xi #define GOP_VE_PAL_HS_DELAY           0xE4
175*53ee8cc1Swenshuai.xi #define GOP_VE_NTSC_HS_DELAY          0xD3
176*53ee8cc1Swenshuai.xi #define GOP_VE_PAL_HSTART_OFST  0x19
177*53ee8cc1Swenshuai.xi #define GOP_VE_PAL_VSTART_OFST  0x29
178*53ee8cc1Swenshuai.xi #define GOP_VE_NTSC_HSTART_OFST  0x19
179*53ee8cc1Swenshuai.xi #define GOP_VE_NTSC_VSTART_OFST  0x23
180*53ee8cc1Swenshuai.xi #define GOP_VE_PAL_WIDTH    0x2E9 //720+0x48
181*53ee8cc1Swenshuai.xi #define GOP_VE_PAL_HEIGHT    0x26A //0x269
182*53ee8cc1Swenshuai.xi #define GOP_VE_PAL_HTOTAL    0x359
183*53ee8cc1Swenshuai.xi #define GOP_VE_NTSC_WIDTH     0x2E9
184*53ee8cc1Swenshuai.xi #define GOP_VE_NTSC_HEIGHT    0x204 //0x203
185*53ee8cc1Swenshuai.xi #define GOP_VE_NTSC_HTOTAL    0x359
186*53ee8cc1Swenshuai.xi 
187*53ee8cc1Swenshuai.xi #define GOP_WordUnit                            32
188*53ee8cc1Swenshuai.xi #define GOP_DWIN_WordUnit                       32UL
189*53ee8cc1Swenshuai.xi #define GOP_TotalGwinNum                        (MAX_GOP0_GWIN+MAX_GOP1_GWIN+MAX_GOP2_GWIN+MAX_GOP3_GWIN+MAX_GOP4_GWIN+MAX_GOP5_GWIN)
190*53ee8cc1Swenshuai.xi #define HAL_GOP_BankOffset(pGOPHalLocal)        ((pGOPHalLocal)->bank_offset)
191*53ee8cc1Swenshuai.xi 
192*53ee8cc1Swenshuai.xi #define GOP_FIFO_BURST_ALL                      (GOP_BIT8|GOP_BIT9|GOP_BIT10|GOP_BIT11|GOP_BIT12)
193*53ee8cc1Swenshuai.xi #define GOP_FIFO_BURST_MIDDLE                   (GOP_BIT8|GOP_BIT9)
194*53ee8cc1Swenshuai.xi #define GOP_FIFO_BURST_SHORT                    (GOP_BIT8)
195*53ee8cc1Swenshuai.xi 
196*53ee8cc1Swenshuai.xi #define GOP_FIFO_BURST_MASK                     (GOP_BIT8|GOP_BIT9|GOP_BIT10|GOP_BIT11|GOP_BIT12)
197*53ee8cc1Swenshuai.xi #define GOP_FIFO_THRESHOLD                      0xD0UL
198*53ee8cc1Swenshuai.xi #define GOP3_FIFO_THRESHOLD                     0x70UL
199*53ee8cc1Swenshuai.xi 
200*53ee8cc1Swenshuai.xi #ifndef GOP_MIU0_LENGTH
201*53ee8cc1Swenshuai.xi #define GOP_MIU0_LENGTH                         HAL_MIU1_BASE
202*53ee8cc1Swenshuai.xi #endif
203*53ee8cc1Swenshuai.xi 
204*53ee8cc1Swenshuai.xi #define DWIN_SUPPORT_WINDOWDE_CAPTURE           FALSE //HW issue, Not support it, should use FrameDE to capture video for DWIN
205*53ee8cc1Swenshuai.xi #define DWIN_SUPPORT_OSD_CAPTURE                FALSE  //Support it
206*53ee8cc1Swenshuai.xi #define DWIN_SUPPORT_CLOCK_GATING               FALSE  //Support it
207*53ee8cc1Swenshuai.xi 
208*53ee8cc1Swenshuai.xi #define ENABLE_GOP_T3DPATCH
209*53ee8cc1Swenshuai.xi #ifdef ENABLE_GOP_T3DPATCH
210*53ee8cc1Swenshuai.xi #define GOP_PD_T3D                              0x153UL
211*53ee8cc1Swenshuai.xi #define GOP_PD_NORMAL                           0xD3UL
212*53ee8cc1Swenshuai.xi #endif
213*53ee8cc1Swenshuai.xi 
214*53ee8cc1Swenshuai.xi #define GOP_4K2K30
215*53ee8cc1Swenshuai.xi #define OUTPUT_VAILD_SIZE_PATCH
216*53ee8cc1Swenshuai.xi 
217*53ee8cc1Swenshuai.xi #define GOP_PUBLIC_UPDATE MAX_GOP_SUPPORT
218*53ee8cc1Swenshuai.xi 
219*53ee8cc1Swenshuai.xi #if (MAX_GOP_SUPPORT < 5)
220*53ee8cc1Swenshuai.xi #define GFLIP_REG_BANKS (MAX_GOP_SUPPORT * GOP_BANK_OFFSET)
221*53ee8cc1Swenshuai.xi #else
222*53ee8cc1Swenshuai.xi #define GFLIP_REG_BANKS (MAX_GOP_SUPPORT * GOP_BANK_OFFSET + 2)
223*53ee8cc1Swenshuai.xi #endif
224*53ee8cc1Swenshuai.xi #define GFLIP_REG16_NUM_PER_BANK                128UL
225*53ee8cc1Swenshuai.xi 
226*53ee8cc1Swenshuai.xi #define GPU_TILE_FORMAT_ARGB8888                0x5UL
227*53ee8cc1Swenshuai.xi 
228*53ee8cc1Swenshuai.xi #define AFBC_CORE_COUNT 2
229*53ee8cc1Swenshuai.xi 
230*53ee8cc1Swenshuai.xi #if (defined ANDROID) && (defined TV_OS)
231*53ee8cc1Swenshuai.xi #define GOP_CMDQ_ENABLE
232*53ee8cc1Swenshuai.xi #endif
233*53ee8cc1Swenshuai.xi 
234*53ee8cc1Swenshuai.xi #ifdef GOP_CMDQ_ENABLE
235*53ee8cc1Swenshuai.xi #include "drvCMDQ.h"
236*53ee8cc1Swenshuai.xi #endif
237*53ee8cc1Swenshuai.xi 
238*53ee8cc1Swenshuai.xi #define AFBC_ALIGN_FACTOR      16
239*53ee8cc1Swenshuai.xi 
240*53ee8cc1Swenshuai.xi #define VE_MUX_INIT_VALUE                       7UL
241*53ee8cc1Swenshuai.xi 
242*53ee8cc1Swenshuai.xi //Gwin enable HW bug
243*53ee8cc1Swenshuai.xi #define GOP_AUTO_CLK_GATING_PATCH
244*53ee8cc1Swenshuai.xi 
245*53ee8cc1Swenshuai.xi /*the following is for parameters for shared between multiple process context*/
246*53ee8cc1Swenshuai.xi typedef struct __attribute__((packed))
247*53ee8cc1Swenshuai.xi {
248*53ee8cc1Swenshuai.xi     GOP_CHIP_PROPERTY       gopChipProperty;
249*53ee8cc1Swenshuai.xi     MS_U16 u16GopSplitMode_LRWIDTH[SHARED_GOP_MAX_COUNT];
250*53ee8cc1Swenshuai.xi     DRV_GOPDstType GOP_Dst[SHARED_GOP_MAX_COUNT];
251*53ee8cc1Swenshuai.xi }GOP_CTX_HAL_SHARED;
252*53ee8cc1Swenshuai.xi 
253*53ee8cc1Swenshuai.xi /*the following is for parameters for used in local process context*/
254*53ee8cc1Swenshuai.xi typedef struct
255*53ee8cc1Swenshuai.xi {
256*53ee8cc1Swenshuai.xi     GOP_CTX_HAL_SHARED      *pHALShared;
257*53ee8cc1Swenshuai.xi     MS_VIRT                 va_mmio_base;
258*53ee8cc1Swenshuai.xi     MS_U32                  bank_offset;
259*53ee8cc1Swenshuai.xi     MS_U16                  u16Clk0Setting; ///Backup Current GOPG clock setting
260*53ee8cc1Swenshuai.xi     MS_U16                  u16Clk1Setting; ///Backup Current GOPD clock setting
261*53ee8cc1Swenshuai.xi     MS_U16                  u16Clk2Setting; ///Backup Current SRAM clock setting
262*53ee8cc1Swenshuai.xi     DRV_GOPDstType          drvGFlipGOPDst[MAX_GOP_SUPPORT];
263*53ee8cc1Swenshuai.xi     GOP_CHIP_PROPERTY       *pGopChipPro;
264*53ee8cc1Swenshuai.xi     DRV_GOP_CONSALPHA_BITS  User_ConsAlpha_bits;
265*53ee8cc1Swenshuai.xi 
266*53ee8cc1Swenshuai.xi     /*check all gop dst is valid or not for each mux*/
267*53ee8cc1Swenshuai.xi     MS_BOOL                 *pbIsMuxVaildToGopDst;
268*53ee8cc1Swenshuai.xi }GOP_CTX_HAL_LOCAL;
269*53ee8cc1Swenshuai.xi 
270*53ee8cc1Swenshuai.xi typedef struct
271*53ee8cc1Swenshuai.xi {
272*53ee8cc1Swenshuai.xi     GOP_CTX_HAL_LOCAL GOPHalSTRCtx;
273*53ee8cc1Swenshuai.xi     MS_U16 BankReg[GFLIP_REG_BANKS][GFLIP_REG16_NUM_PER_BANK];
274*53ee8cc1Swenshuai.xi     MS_U16 CKG_GopReg[10];
275*53ee8cc1Swenshuai.xi     MS_U16 GS_GopReg[3];
276*53ee8cc1Swenshuai.xi     MS_U16 XC_GopReg[20];
277*53ee8cc1Swenshuai.xi }GFLIP_REGS_SAVE_AREA;
278*53ee8cc1Swenshuai.xi 
279*53ee8cc1Swenshuai.xi //VE register bank
280*53ee8cc1Swenshuai.xi typedef enum
281*53ee8cc1Swenshuai.xi {
282*53ee8cc1Swenshuai.xi     MS_VE_REG_BANK_3B,
283*53ee8cc1Swenshuai.xi     MS_VE_REG_BANK_3E,
284*53ee8cc1Swenshuai.xi     MS_VE_REG_BANK_3F,
285*53ee8cc1Swenshuai.xi } MS_VE_REG_BANK;
286*53ee8cc1Swenshuai.xi 
287*53ee8cc1Swenshuai.xi typedef enum
288*53ee8cc1Swenshuai.xi {
289*53ee8cc1Swenshuai.xi     EN_OSD_0,
290*53ee8cc1Swenshuai.xi     EN_OSD_1,
291*53ee8cc1Swenshuai.xi }EN_VE_OSD_ENABLE;
292*53ee8cc1Swenshuai.xi 
293*53ee8cc1Swenshuai.xi /*To write VE bank register*/
294*53ee8cc1Swenshuai.xi extern void MApi_VE_W2BYTE_MSK(MS_VE_REG_BANK VE_BK, MS_U32 u32Reg, MS_U16 u16Val, MS_U16 u16Mask);
295*53ee8cc1Swenshuai.xi extern MS_U16 MApi_VE_R2BYTE_MSK(MS_VE_REG_BANK VE_BK, MS_U32 u32Reg, MS_U16 u16Mask);
296*53ee8cc1Swenshuai.xi 
297*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
298*53ee8cc1Swenshuai.xi //  Type and Structure
299*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
300*53ee8cc1Swenshuai.xi typedef enum
301*53ee8cc1Swenshuai.xi {
302*53ee8cc1Swenshuai.xi     E_GOP0 = 0,
303*53ee8cc1Swenshuai.xi     E_GOP1 = 1,
304*53ee8cc1Swenshuai.xi     E_GOP2 = 2,
305*53ee8cc1Swenshuai.xi     E_GOP3 = 3,
306*53ee8cc1Swenshuai.xi     E_GOP4 = 4,
307*53ee8cc1Swenshuai.xi     E_GOP_Dwin = 5,
308*53ee8cc1Swenshuai.xi     E_GOP_MIXER = 6,
309*53ee8cc1Swenshuai.xi     E_GOP5 = 7,
310*53ee8cc1Swenshuai.xi }E_GOP_TYPE;
311*53ee8cc1Swenshuai.xi 
312*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
313*53ee8cc1Swenshuai.xi //  Function and Variable
314*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
315*53ee8cc1Swenshuai.xi MS_BOOL _GetBnkOfstByGop(MS_U8 gop, MS_U32 *pBnkOfst);
316*53ee8cc1Swenshuai.xi 
317*53ee8cc1Swenshuai.xi // Get the Gwin offset id of current GOP
318*53ee8cc1Swenshuai.xi MS_U8 _GetGwinOffsetInGOP(MS_U8 u8GwinId);
319*53ee8cc1Swenshuai.xi void HAL_GOP_Init(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOPNum);
320*53ee8cc1Swenshuai.xi void HAL_GOP_Init_Context(GOP_CTX_HAL_LOCAL *pGOPHalLocal,
321*53ee8cc1Swenshuai.xi                                      GOP_CTX_HAL_SHARED *pHALShared, MS_BOOL bNeedInitShared);
322*53ee8cc1Swenshuai.xi void HAL_GOP_Chip_Proprity_Init(GOP_CTX_HAL_LOCAL *pGOPHalLocal);
323*53ee8cc1Swenshuai.xi void HAL_GOP_Restore_Ctx(GOP_CTX_HAL_LOCAL *pGOPHalLocal);
324*53ee8cc1Swenshuai.xi void HAL_GOP_Write16Reg(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u32addr, MS_U16 u16val, MS_U16 mask);
325*53ee8cc1Swenshuai.xi void HAL_GOP_Write32Reg(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u16addr, MS_U32 u32val);
326*53ee8cc1Swenshuai.xi void HAL_GOP_Write32Pal(GOP_CTX_HAL_LOCAL *pGOPHalLocal,
327*53ee8cc1Swenshuai.xi MS_U8* pREGMAP_Base, MS_U16 *pREGMAP_Offset, MS_U32 u32REGMAP_Len,
328*53ee8cc1Swenshuai.xi MS_U8 u8Index, MS_U8 u8A, MS_U8 u8R, MS_U8 u8G, MS_U8 u8B);
329*53ee8cc1Swenshuai.xi void HAL_GOP_Read16Reg(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u16addr, MS_U16* pu16ret);
330*53ee8cc1Swenshuai.xi void HAL_GOP_GWIN_SetBlending(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8win, MS_BOOL bEnable, MS_U8 u8coef);
331*53ee8cc1Swenshuai.xi void HAL_GOP_SetIOMapBase(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_VIRT addr);
332*53ee8cc1Swenshuai.xi void HAL_GOP_SetIOFRCMapBase(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_VIRT addr);
333*53ee8cc1Swenshuai.xi void HAL_GOP_SetIOPMMapBase(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_VIRT addr);
334*53ee8cc1Swenshuai.xi void HAL_GOP_GWIN_GetMUX(GOP_CTX_HAL_LOCAL*pGOPHalLocal, MS_U8* u8GOPNum, Gop_MuxSel eGopMux);
335*53ee8cc1Swenshuai.xi void HAL_GOP_GWIN_SetMUX(GOP_CTX_HAL_LOCAL*pGOPHalLocal, MS_U8 u8GOPNum, Gop_MuxSel eGopMux);
336*53ee8cc1Swenshuai.xi void HAL_GOP_GetGOPEnum(GOP_CTX_HAL_LOCAL *pGOPHalLocal, GOP_TYPE_DEF* GOP_TYPE);
337*53ee8cc1Swenshuai.xi MS_U16 HAL_GOP_GetBPP(GOP_CTX_HAL_LOCAL *pGOPHalLocal, DRV_GOPColorType fbFmt);
338*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOPACKMask(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U16 u16GopMask);
339*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOPACK(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 gop);
340*53ee8cc1Swenshuai.xi MS_U16 HAL_GOP_GetGOPACK(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 gop);
341*53ee8cc1Swenshuai.xi MS_U8 HAL_GOP_GetMaxGwinNumByGOP(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GopNum);
342*53ee8cc1Swenshuai.xi MS_U8 HAL_GOP_SelGwinIdByGOP(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8Gop, MS_U8 u8Idx);
343*53ee8cc1Swenshuai.xi MS_U8 HAL_GOP_GetMIUDst(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopnum);
344*53ee8cc1Swenshuai.xi void HAL_GOP_SetIPSel2SC(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_IPSEL_GOP ipSelGop);
345*53ee8cc1Swenshuai.xi E_GOP_VIDEOTIMING_MIRRORTYPE HAL_GOP_GetVideoTimingMirrorType(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_BOOL bHorizontal);
346*53ee8cc1Swenshuai.xi MS_U8 HAL_GOP_GetDWINMIU(GOP_CTX_HAL_LOCAL *pGOPHalLocal);
347*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_DWIN_SetSourceSel(GOP_CTX_HAL_LOCAL *pGOPHalLocal, DRV_GOP_DWIN_SRC_SEL enSrcSel);
348*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_DWIN_EnableR2YCSC(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_BOOL bEnable);
349*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetDWINMIU(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 miu);
350*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GetGOPDst(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8gopNum, DRV_GOPDstType *pGopDst);
351*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GetMixerDst(GOP_CTX_HAL_LOCAL *pGOPHalLocal, DRV_GOPDstType *pGopDst);
352*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetMixerDst(GOP_CTX_HAL_LOCAL *pGOPHalLocal, DRV_GOPDstType eDstType);
353*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GOPSel(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOPNum);
354*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOPHighPri(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum);
355*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOPEnable2SC(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, MS_BOOL bEnable);
356*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOP2Pto1P(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, MS_BOOL bEnable);
357*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOPEnable2Mode1(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, MS_BOOL bEnable);
358*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GetGOPAlphaMode1(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, MS_BOOL *pbEnable);
359*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GWIN_SetDstPlane(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 GopNum, DRV_GOPDstType eDstType,MS_BOOL bOnlyCheck);
360*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOPClk(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, DRV_GOPDstType eDstType);
361*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetClkForCapture(GOP_CTX_HAL_LOCAL *pGOPHalLocal, DRV_GOP_DWIN_SRC_SEL enSrcSel);
362*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_MIXER_SetGOPEnable2Mixer(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, MS_BOOL bEnable);
363*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_MIXER_EnableVfilter(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_BOOL bEn);
364*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_MIXER_SetMux(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, MS_U8 muxNum, MS_BOOL bEnable);
365*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_MIXER_EnableOldBlendMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, MS_BOOL bEn);
366*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_EnableSCPerPixelNewAlphaMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal, Gop_MuxSel muxNum, MS_BOOL bEnable);
367*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_EnableSCNewAlphaMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal, Gop_MuxSel muxNum, MS_BOOL bEnable);
368*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_InitMux(GOP_CTX_HAL_LOCAL *pGOPHalLocal);
369*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetClock(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_BOOL bEnable);
370*53ee8cc1Swenshuai.xi GOP_Result HAL_ConvertAPIAddr(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gwinid, MS_PHY* u64Adr);
371*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_VE_SetOutputTiming(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u32mode);
372*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_MIXER_SetOutputTiming(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u32mode, GOP_DRV_MixerTiming *pTM);
373*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GWIN_EnableTileMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8win, MS_BOOL bEnable, E_GOP_TILE_DATA_TYPE tilemode);
374*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetUVSwap(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOPNum,MS_BOOL bEn);
375*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetYCSwap(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOPNum,MS_BOOL bEn);
376*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GWIN_GetNewAlphaMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8win, MS_BOOL* pEnable);
377*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GWIN_SetNewAlphaMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8win, MS_BOOL bEnable);
378*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GWiN_Set3DOSD_Sub(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 u8GOP ,MS_U8 u8Gwin, MS_PHY u32SubAddr);
379*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_VE_SetOSDEnable(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_BOOL bEnable, EN_VE_OSD_ENABLE eOSD, MS_U8 gopNum);
380*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGOPToVE(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 gopNum, MS_BOOL bEn );
381*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_3D_SetMiddle(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 u8GOP,MS_U16 u16Middle);
382*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_OC_SetOCEn(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, MS_BOOL bOCEn);
383*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_OC_Get_MIU_Sel(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 *MIUId);
384*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_OC_SetOCInfo(GOP_CTX_HAL_LOCAL *pGOPHalLocal, DRV_GOP_OC_INFO* pOCinfo);
385*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_DWIN_SetRingBuffer(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u32RingSize,MS_U32 u32BufSize);
386*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_AdjustField(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 GopNum, DRV_GOPDstType eDstType);
387*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_TestPattern_IsVaild(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GopNum);
388*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetWinFmt(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 regForm, MS_U8 u8GOPNum, MS_U8 u8GwinNum, MS_U16 colortype);
389*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_Set_PINPON(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOPNum, MS_BOOL bEn, E_DRV_GOP_PINPON_MODE pinpon_mode);
390*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_HScalingDown(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 u8GOP, MS_BOOL bEnable,MS_U16 src, MS_U16 dst);
391*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_VScalingDown(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 u8GOP, MS_BOOL bEnable,MS_U16 src, MS_U16 dst);
392*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_DeleteWinHVSize(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 u8GOP, MS_U16 u16HSize, MS_U16 u16VSize);
393*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_DumpGOPReg(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u32GopIdx, MS_U16 u16BankIdx, MS_U16 u16Addr, MS_U16* u16Val);
394*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_RestoreGOPReg(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u32GopIdx, MS_U16 u16BankIdx, MS_U16 u16Addr, MS_U16 u16Val);
395*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_PowerState(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U32 u32PowerState, GFLIP_REGS_SAVE_AREA* pGOP_STRPrivate);
396*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GWIN_SetGPUTileMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 gwinid, EN_DRV_GOP_GPU_TILE_MODE tile_mode);
397*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_EnableTLB(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 u8GOP, MS_BOOL bEnable);
398*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetTLBAddr(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, MS_PHY u64TLBAddr, MS_U32 u32size);
399*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetTLBSubAddr(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, MS_PHY u64TLBAddr);
400*53ee8cc1Swenshuai.xi #ifdef GOP_CMDQ_ENABLE
401*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_CMDQ_WriteCommand(GOP_CTX_HAL_LOCAL *pGOPHalLocal,CAF_Struct *cmdq_struct,MS_U32 *number,MS_U32 u32addr, MS_U16 u16val, MS_U16 mask);
402*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_CMDQ_BegineDraw(GOP_CTX_HAL_LOCAL *pGOPHalLocal,CAF_Struct *target,MS_U32 *number, MS_U32 *u32GopIdx);
403*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_CMDQ_EndDraw(GOP_CTX_HAL_LOCAL *pGOPHalLocal,CAF_Struct *target,MS_U32 *number, MS_U32 u32GopIdx);
404*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_CMDQ_SetGOPACKMask(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U16 u16GopMask);
405*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_CMDQ_SetGOPACK(GOP_CTX_HAL_LOCAL *pGOPHalLocal,MS_U8 gop);
406*53ee8cc1Swenshuai.xi #endif
407*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_EnableTwoLineBufferMode(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, MS_BOOL bEnable);
408*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_Set_GWIN_INTERNAL_MIU(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, MS_U8 miusel);
409*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_Set_MIU(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP,MS_U8 miusel);
410*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_GetIPInterlace(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_BOOL *bInterlace);
411*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_IsHDREnabled(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_BOOL *pbHDREnable);
412*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_SetGopGwinHVPixel(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, MS_U8 u8win, MS_U16 hstart, MS_U16 hend, MS_U16 vstart, MS_U16 vend);
413*53ee8cc1Swenshuai.xi GOP_Result HAL_GOP_AFBC_GetCore(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP,MS_U8* u8Core);
414*53ee8cc1Swenshuai.xi GOP_Result Hal_SetCropWindow(GOP_CTX_HAL_LOCAL *pGOPHalLocal, MS_U8 u8GOP, EN_GOP_CROP_CTL crop_mode);
415*53ee8cc1Swenshuai.xi //GOP_Result HAL_GOP_SetDbgLevel(EN_GOP_DEBUG_LEVEL level);
416*53ee8cc1Swenshuai.xi #define HAL_GOP_SetDbgLevel(args...)
417*53ee8cc1Swenshuai.xi #endif // _HAL_TEMP_H_
418