xref: /utopia/UTPA2-700.0.x/modules/xc/drv/xc/include/mdrv_ld.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-2010 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 ///////////////////////////////////////////////////////////////////////////////////////////////////
96 /// file    Mdrv_ld.h
97 /// @brief  local dimming Driver Interface
98 /// @author MStar Semiconductor Inc.
99 ///////////////////////////////////////////////////////////////////////////////////////////////////
100 
101 #ifndef _MDRV_LD_H_
102 #define _MDRV_LD_H_
103 
104 
105 #include "MsCommon.h"
106 #include "MsOS.h"
107 #include "mhal_xc_chip_config.h"
108 
109 // Internal Definition
110 #include "drvXC_IOPort.h"
111 #include "apiXC.h"
112 #include "hwreg_sc.h"
113 #include "MsCommon.h"
114 #include "mhal_xc_chip_config.h"
115 #include "xc_hwreg_utility2.h"
116 //#include "mdrv_spi.h"
117 
118 #ifdef _MDRV_LD_C_
119 #define INTERFACE
120 #else
121 #define INTERFACE extern
122 #endif
123 
124 
125 #define MST_3xxx_U01        0x21    //Amber5 U01
126 #define MST_3xxx_U02        0x22    //Amber5 U02
127 #define MST_3xxx_U03        0x23    //Amber5 U03
128 #define MST_3xxx_U04        0x24    //Amber5 U04
129 
130 
131 #define ENABLE_TEST_DRV_LD  1
132 #define DRV_LD_USE_SWSPI    1
133 #define MAX_SPI_CMD_NUM     8
134 #define DRV_LD_SPI_BUF_MAX_SIZE     64//SPI_WRITE_BUF_SIZE
135 
136 #if(HW_DESIGN_LD_VER == 2 || HW_DESIGN_LD_VER == 3 || HW_DESIGN_LD_VER == 4)
137 #define MEMORY_MASK 0x07FFFFFF
138 #else
139 #define MEMORY_MASK 0x01FFFFFF
140 #endif
141 
142 
143 #define LD_MIU_ALIGN  16
144 
145 
146 typedef enum
147 {
148     LD_BLOCK_10,
149     LD_BLOCK_16,
150     LD_BLOCK_32,
151     LD_BLOCK_72,
152     LD_BLOCK_96,
153     LD_BLOCK_480,
154     LD_BLOCK_TSB,   //Need to check
155     LD_BLOCK_DEFALUT,
156     LD_BLOCK_NUMS,
157 }EN_LD_BLOCK_NUM;
158 
159 
160 typedef enum LD_LSFCONFIG_E
161 {
162     E_LD_LSF_H_SHIFT  = BIT(0),
163     E_LD_LSF_V_SHIFT  = BIT(1),
164     E_LD_LSF_BILINEAR = BIT(11),
165     E_LD_LSF_SIGNBIT  = BIT(14),
166 }LD_LSFCONFIG_E;
167 #define LD_LSFCONFIG_VALID (BIT(0)|BIT(1)|BIT(11)|BIT(14))
168 
169 typedef enum LD_LSFLPF_HTAPS_E
170 {
171     E_LD_LSFLPF_9TAPS     = 0,
172     E_LD_LSFLPF_17TAPS    = 1,
173     E_LD_LSFLPF_33TAPS    = 2,
174 }LD_LSFLPF_HTAPS_E;
175 
176 typedef enum LD_LSF_OUT_MODE_E
177 {
178     E_LD_LSF_OUT_INPUTDATA    = 0,
179     E_LD_LSF_OUT_0x3FF        = 1,
180     E_LD_LSF_OUT_DIGITALBL    = 2,
181 }LD_LSF_OUT_MODE_E;
182 
183 typedef enum LD_COMP_OUT_MODE_E
184 {
185     E_LD_COMP_OUT_NORMAL                      = 0,
186     E_LD_COMP_OUT_HIGHLIGHT_OVERFLOW_DATA       = 1,
187     E_LD_COMP_OUT_HIGHLIGHT_OVERFLOW_DATA_ONLY   = 2,
188     E_LD_COMP_OUT_GRID                        = 3,
189 }LD_COMP_OUT_MODE_E;
190 
191 #if(HW_DESIGN_LD_VER == 2 || HW_DESIGN_LD_VER == 3 || HW_DESIGN_LD_VER == 4)
192 typedef enum LD_DITHER3C_E
193 {
194     E_LD_DITHER_COMPENSATION_OUT  = BIT(10),
195     E_LD_DITHER_COMPENSATION  = BIT(13),
196 }LD_DITHER3C_E;
197 #define LD_DITHER3C_VALID (BIT(10)|BIT(13))
198 
199 #else
200 typedef enum LD_DITHER3C_E
201 {
202     E_LD_DITHER_COMPENSATION_OUT  = BIT(10),
203     E_LD_DITHER_MIN_SELECT        = BIT(12),
204     E_LD_DITHER_COMPENSATION      = BIT(13),
205     E_LD_DITHER_SATURATION        = BIT(15),
206 }LD_DITHER3C_E;
207 #define LD_DITHER3C_VALID (BIT(10)|BIT(12)|BIT(13)|BIT(15))
208 
209 typedef enum LD_DITHER3D_E
210 {
211     E_LD_DITHER_VLPF      = BIT(12),
212     E_LD_DITHER_HLPF      = BIT(13),
213     E_LD_DITHER_OFFSET    = BIT(15),
214 }LD_DITHER3D_E;
215 #define LD_DITHER3D_VALID (BIT(12)|BIT(13)|BIT(15))
216 #endif
217 
218 typedef enum LD_CS_MODE_E
219 {
220     E_LD_CS_MODE_SW        = 0,
221     E_LD_CS_MODE_HW0       = 1,
222     E_LD_CS_MODE_HW1       = 2,
223 }LD_CS_MODE_E;
224 
225 typedef enum LD_BL_GLOBAL_GAIN_MODE_E
226 {
227     E_LD_BL_GLOBAL_GAIN_8BIT  = 3,
228     E_LD_BL_GLOBAL_GAIN_16BIT = 1,
229     E_LD_BL_GLOBAL_GAIN_12BIT = 0,
230     E_LD_BL_GLOBAL_GAIN_4BIT  = 5,
231     E_LD_BL_GLOBAL_GAIN_10BIT = 7,
232 }LD_BL_GLOBAL_GAIN_MODE_E;
233 
234 
235 typedef struct __attribute__((packed))
236 {
237     MS_U16 u16PanelWidth; //panel width
238     MS_U16 u16PanelHeight; //panel heigh
239 
240     MS_U8 u8LedNumH; // Led number H
241     MS_U8 u8LedNumV; // Led number V
242 
243     MS_U8 u8LD_BackLightH; //backlight H
244     MS_U8 u8LD_BackLightV; //backlight V
245 
246     MS_U8* pu8CompTable;  //compensation table
247 #if !defined (__aarch64__)
248     MS_U32 u32AlignmentDummy0;
249 #endif
250 
251     MS_U8* pu8Edge2DTable; //Edge2D table
252 #if !defined (__aarch64__)
253     MS_U32 u32AlignmentDummy1;
254 #endif
255     //EnuMSPI_CLOCK_SPEED eMSPIClockSpeed;
256     MS_U8 u8SpiClockPolarity; // 0 or 1
257     MS_U8 u8SpiClockPhase;    // 0 or 1
258 
259     MS_U8 u8SpiTime_VSyncWidth; // Unit is us
260     MS_U8 u8SpiTime_VSync_To_FirstClock; // Unit is us
261     MS_U8 u8SpiTime_Byte_to_Byte; // Unit is us
262 
263     MS_U8 u8SpiCmdLen;
264     MS_U16 au16SpiCmd[MAX_SPI_CMD_NUM];
265     MS_U8 u8CheckSumMode;
266 
267 } ST_DRV_LD_INFO;
268 
269 
270 typedef struct __attribute__((packed))
271 {
272     MS_U8 u8MIU;
273 
274     //LDF memory frame buffer
275     MS_PHY u32LDFReadBuf0Base;
276     MS_PHY u32LDFReadBuf1Base;
277 
278     //LDB memory frame buffer
279     MS_PHY u32LDBWriteBuf0Base;
280     MS_PHY u32LDBWriteBuf1Base;
281 
282     //SPI memory frame buffer
283     MS_PHY u32SPIDataBuf0Base;
284     MS_PHY u32SPIDataBuf1Base;
285 
286     //edge2 coeff base
287     MS_PHY u32Edge2DCoeffBase;
288 } ST_LD_DRAM_ADDR;
289 
290 #define LD_BUF_ReadDBuf_0   pXCResourcePrivate->stdrv_LD.gsLDDramBaseAddr.u32LDFReadBuf0Base
291 #define LD_BUF_ReadDBuf_1   pXCResourcePrivate->stdrv_LD.gsLDDramBaseAddr.u32LDFReadBuf1Base
292 #define LD_BUF_WriteBuf_0   pXCResourcePrivate->stdrv_LD.gsLDDramBaseAddr.u32LDBWriteBuf0Base
293 #define LD_BUF_WriteBuf_1   pXCResourcePrivate->stdrv_LD.gsLDDramBaseAddr.u32LDBWriteBuf1Base
294 #define LD_BUF_SPIBuf_0     pXCResourcePrivate->stdrv_LD.gsLDDramBaseAddr.u32SPIDataBuf0Base
295 #define LD_BUF_SPIBuf_1     pXCResourcePrivate->stdrv_LD.gsLDDramBaseAddr.u32SPIDataBuf1Base
296 #define LD_BUF_Edge2DCoe    pXCResourcePrivate->stdrv_LD.gsLDDramBaseAddr.u32Edge2DCoeffBase
297 
298 //local dimming miu read / write
299 #if (HW_DESIGN_LD_VER == 2 || HW_DESIGN_LD_VER == 3 || HW_DESIGN_LD_VER == 4)
300 #define MDrv_LD_MIUReadByte(_BUF_ID, _offset)             (*(volatile unsigned char *) (MsOS_PA2KSEG1(_BUF_ID + _offset) ))
301 #define MDrv_LD_MIURead2Bytes(_BUF_ID, _offset)           (*(volatile MS_U16 *) (MsOS_PA2KSEG1( _BUF_ID + _offset) ))
302 #define MDrv_LD_MIUWriteByte(_BUF_ID, _offset, _val)    (*((volatile MS_U8*)(MsOS_PA2KSEG1(_BUF_ID + _offset) ))) = (MS_U8)(_val)
303 #define MDrv_LD_MIUWrite2Bytes(_BUF_ID, _offset, _val)  (*((volatile MS_U16*)(MsOS_PA2KSEG1(_BUF_ID + _offset) ))) = (MS_U16)(_val)
304 #else
305 #define MDrv_LD_MIUReadByte(_BUF_ID, _offset)             (*(volatile unsigned char *) (MsOS_PA2KSEG0(_BUF_ID + _offset) ))
306 #define MDrv_LD_MIURead2Bytes(_BUF_ID, _offset)           (*(volatile MS_U16 *) (MsOS_PA2KSEG0( _BUF_ID + _offset) ))
307 #define MDrv_LD_MIUWriteByte(_BUF_ID, _offset, _val)    (*((volatile MS_U8*)(MsOS_PA2KSEG0(_BUF_ID + _offset) ))) = (MS_U8)(_val)
308 #define MDrv_LD_MIUWrite2Bytes(_BUF_ID, _offset, _val)  (*((volatile MS_U16*)(MsOS_PA2KSEG0(_BUF_ID + _offset) ))) = (MS_U16)(_val)
309 #endif
310 
311 #if  (LD_ENABLE==1)
312 //-------------------------------------------------------------------------------------------------
313 /// LD initial
314 /// @param  void                \b IN: none
315 /// @return true or false
316 //-------------------------------------------------------------------------------------------------
317 INTERFACE MS_BOOL MDrv_LD_Init(void *pInstance);
318 
319 //-------------------------------------------------------------------------------------------------
320 /// LD initial, do not confused with MDrv_LD_Init()
321 /// the call flow is MDrv_XC_LD_Init --> MDrv_LD_Init()
322 /// @param  enLDPanelType                \b IN: Panel Type
323 /// @return true or false
324 //-------------------------------------------------------------------------------------------------
325 INTERFACE MS_BOOL MDrv_XC_LD_Init(void *pInstance, EN_LD_PANEL_TYPE enLDPanelType);
326 
327 //-------------------------------------------------------------------------------------------------
328 /// LD set memory address for internal use only
329 /// @param  u32LDFBase0                \b IN: LDF memeory0 address
330 /// @param  u32LDFBase1                \b IN: LDF memeory1 address
331 /// @param  u32LDBBase0                \b IN: LDB memeory0 address
332 /// @param  u32LDBBase1                \b IN: LDB memeory1 address
333 /// @param  u32EDGE2DBase              \b IN: EDGE2D memeory address
334 /// @param  u32LEDoffset               \b IN: LED  data offset
335 /// @return  void
336 //-------------------------------------------------------------------------------------------------
337 INTERFACE void MDrv_XC_LD_SetMemoryAddress(void *pInstance,
338                                            MS_PHY u32LDFBase0,
339                                            MS_PHY u32LDFBase1,
340                                            MS_PHY u32LDBBase0,
341                                            MS_PHY u32LDBBase1,
342                                            MS_PHY u32EDGE2DBase,
343                                            MS_PHY u32LEDOffset);
344 
345 //-------------------------------------------------------------------------------------------------
346 /// LD set memory MIU selection for internal use only
347 /// @param  u8MIU                \b IN: LD's memory miu selection
348 /// @return void
349 //-------------------------------------------------------------------------------------------------
350 INTERFACE void MDrv_XC_LD_Set_MIUSel(void *pInstance, MS_U8 u8MIU);
351 
352 //-------------------------------------------------------------------------------------------------
353 /// LD common initial
354 /// @param  void                \b IN: none
355 /// @return  none
356 //-------------------------------------------------------------------------------------------------
357 INTERFACE void MDrv_LD_CommonInit(void *pInstance);
358 //-------------------------------------------------------------------------------------------------
359 /// Set LocalDimming Data  to spi (not used, set Local dimming data to spi handle in pm code)
360 /// @param  pu8LocalDimmingData                \b IN: LocalDimming Data
361 /// @param  u16DataLen                \b IN: LocalDimming Data  size
362 /// @return  none
363 //-------------------------------------------------------------------------------------------------
364 INTERFACE MS_BOOL MDrv_LD_SetLocalDimmingData(void *pInstance, MS_U8* pu8LocalDimmingData, MS_U16 u16DataLen);
365 //-------------------------------------------------------------------------------------------------
366 /// LocalDimming test function(Set LocalDimming Data  to spi test )(not used, set Local dimming data to spi handle in pm code)
367 /// @param  void                \b IN: none
368 /// @return  none
369 //-------------------------------------------------------------------------------------------------
370 INTERFACE void MDrv_LD_Test1(void *pInstance);
371 //-------------------------------------------------------------------------------------------------
372 /// LocalDimming test function (miu read/write test)
373 /// @param  void                \b IN: none
374 /// @return  none
375 //-------------------------------------------------------------------------------------------------
376 INTERFACE void MDrv_LD_Test2(void *pInstance);
377 //-------------------------------------------------------------------------------------------------
378 /// get local dimming info
379 /// @param  void      \b IN: none
380 /// @return  local dimming info
381 //-------------------------------------------------------------------------------------------------
382 INTERFACE ST_DRV_LD_INFO MDrv_LD_GetLDInfo(void *pInstance);
383 //-------------------------------------------------------------------------------------------------
384 /// set OSD enable
385 /// @param  u8OSDEnable      \b 1:enable ;0;disable
386 /// @return  none
387 //-------------------------------------------------------------------------------------------------
388 INTERFACE void MDrv_LD_SetOSDEnable(void *pInstance, MS_U8 u8OSDEnable);
389 //-------------------------------------------------------------------------------------------------
390 /// get panel type
391 /// @param  void      \b IN: none
392 /// @return  panel type
393 //-------------------------------------------------------------------------------------------------
394 INTERFACE EN_LD_PANEL_TYPE Mdrv_LD_GetPanelType(void *pInstance);
395 //-------------------------------------------------------------------------------------------------
396 /// load panel compensation table
397 /// @param  pu8CompTable      \b IN: panel compensation table
398 /// @return  none
399 //-------------------------------------------------------------------------------------------------
400 INTERFACE void MDrv_LD_Load_Compensation_Table(void *pInstance, MS_U8* pu8CompTable,MS_U16 u16CompTableLength);
401 //-------------------------------------------------------------------------------------------------
402 /// load  edge2d table
403 /// @param  u8LEDWidth      \b IN: LED width
404 /// @param  u8LEDHeight      \b IN: LED heigh
405 /// @param  u8BLWidth      \b IN: backilight width
406 /// @param  u8BLHeight      \b IN: backilight heigh
407 /// @param  pu8Edge2DTable      \b IN: edge2d table
408 /// @return  none
409 //-------------------------------------------------------------------------------------------------
410 INTERFACE void MDrv_LD_Load_EDGE2D_Table(void *pInstance, MS_U8 u8LEDWidth, MS_U8 u8LEDHeight, MS_U8 u8BLWidth, MS_U8 u8BLHeight, MS_U8* pu8Edge2DTable);
411 #if(HW_DESIGN_LD_VER == 1)
412 //-------------------------------------------------------------------------------------------------
413 /// load  Hscaling table
414 /// @param  pu8CoefTable      \b IN: Hscaling table
415 /// @return  none
416 //-------------------------------------------------------------------------------------------------
417 INTERFACE void MDrv_LD_Load_Hscaling_Table(void *pInstance, MS_U8* pu8CoefTable);
418 //-------------------------------------------------------------------------------------------------
419 /// load  Vscaling table
420 /// @param  pu8CoefTable      \b IN: Vscaling table
421 /// @return  none
422 //-------------------------------------------------------------------------------------------------
423 INTERFACE void MDrv_LD_Load_Vscaling_Table(void *pInstance, MS_U8* pu8CoefTable);
424 //-------------------------------------------------------------------------------------------------
425 /// set DMA access x
426 /// @param  u8DmaIdx      \b IN: DMA access x index
427 /// @param  u8XStart      \b IN: DMA access x start
428 /// @param  u8XEnd      \b IN: DMA access x end
429 /// @return  none
430 //-------------------------------------------------------------------------------------------------
431 INTERFACE void MDrvl_LD_Set_DmaXOffset(void *pInstance, MS_U8 u8DmaIdx, MS_U8 u8XStart, MS_U8 u8XEnd);
432 //-------------------------------------------------------------------------------------------------
433 /// set DMA access y
434 /// @param  u8DmaIdx      \b IN: DMA access y index
435 /// @param  u8YStart      \b IN: DMA access y start
436 /// @return  none
437 //-------------------------------------------------------------------------------------------------
438 INTERFACE void MDrv_LD_Set_DmaYOffset(void *pInstance, MS_U8 u8DmaIdx, MS_U8 u8YStart);
439 #endif
440 //-------------------------------------------------------------------------------------------------
441 /// set LDF frame buffer
442 /// @param  u8BufIdx        \b IN: LDF buffer frame index
443 /// @param  u32LDFBase      \b IN: LDF buffer frame memeory base address
444 /// @return  none
445 //-------------------------------------------------------------------------------------------------
446 INTERFACE void MDrv_LD_Set_LDF_FrameBufBaseAddr(void *pInstance, MS_U8 u8BufIdx,MS_PHY u32LDFBase);
447 //-------------------------------------------------------------------------------------------------
448 /// get LDF frame buffer
449 /// @param  u8BufIdx        \b IN: LDF buffer frame index
450 /// @return   LDF buffer frame memeory base address
451 //-------------------------------------------------------------------------------------------------
452 INTERFACE MS_PHY MDrv_LD_Get_LDF_FrameBufBaseAddr(void *pInstance, MS_PHY u8BufIdx);
453 //-------------------------------------------------------------------------------------------------
454 /// Set LDB frame buffer
455 /// @param  u8BufIdx        \b IN: LDB buffer frame index
456 /// @param  u32LDFBase      \b IN: LDB buffer frame memeory base address
457 /// @return  none
458 //-------------------------------------------------------------------------------------------------
459 INTERFACE void MDrv_LD_Set_LDB_FrameBufBaseAddr(void *pInstance, MS_U8 u8BufIdx,MS_PHY u32LDBBase);
460 //-------------------------------------------------------------------------------------------------
461 /// get LDB frame buffer
462 /// @param  u8BufIdx        \b IN: LDB buffer frame index
463 /// @return   LDB buffer frame memeory base address
464 //-------------------------------------------------------------------------------------------------
465 INTERFACE MS_PHY MDrv_LD_Get_LDB_FrameBufBaseAddr(void *pInstance, MS_PHY u8BufIdx);
466 //-------------------------------------------------------------------------------------------------
467 /// Set Led  control data offset
468 /// @param  u32LEDoffset      \b IN: Led  control data offset
469 /// @return  none
470 //-------------------------------------------------------------------------------------------------
471 INTERFACE void MDrv_LD_Set_LEDData_BaseOffset(void *pInstance, MS_PHY u32LEDoffset);
472 //-------------------------------------------------------------------------------------------------
473 /// Get spi data memeory base address
474 /// @param  u8BufIdx        \b IN: LDB buffer frame index
475 /// @return   spi data memeory base address
476 //-------------------------------------------------------------------------------------------------
477 INTERFACE MS_PHY MDrv_LD_Get_SPIData_BaseAddr(void *pInstance, MS_PHY u8BufIdx);
478 //-------------------------------------------------------------------------------------------------
479 /// set EDGE2D frame buffer
480 /// @param  u32EDGE2DBase      \b IN: EDGE2D memeory base address
481 /// @return  none
482 //-------------------------------------------------------------------------------------------------
483 INTERFACE void MDrv_LD_Set_EDGE2D_BaseAddr(void *pInstance, MS_PHY u32EDGE2DBase);
484 //-------------------------------------------------------------------------------------------------
485 /// set EDGE2D frame buffer
486 /// @param  none
487 /// @return  EDGE2D memeory base address
488 //-------------------------------------------------------------------------------------------------
489 INTERFACE MS_PHY MDrv_LD_Get_EDGE2D_BaseAddr(void *pInstance);
490 //-------------------------------------------------------------------------------------------------
491 /// set local dimming enable
492 /// @param  bEn         \b IN: 1 :enable ;0 :disable
493 /// @return  none
494 //-------------------------------------------------------------------------------------------------
495 INTERFACE void MDrv_LD_Set_LocalDimmingEn(void *pInstance, MS_BOOL bEn);
496 //-------------------------------------------------------------------------------------------------
497 /// get local dimming enable
498 /// @param  none
499 /// @return  1 :enable ;0 :disable
500 //-------------------------------------------------------------------------------------------------
501 INTERFACE MS_BOOL MDrv_LD_Get_LocalDimmingEn(void *pInstance);
502 //-------------------------------------------------------------------------------------------------
503 /// LD set panel type
504 /// @param  eLdPanelType                \b IN: panel type
505 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL
506 //-------------------------------------------------------------------------------------------------
507 INTERFACE MS_BOOL MDrv_XC_LD_SetPanelType(void *pInstance, EN_LD_PANEL_TYPE eLDPanelType );
508 
509 #endif
510 
511 #undef INTERFACE
512 
513 #endif
514 
515