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 /////////////////////////////////////////////////////////////////////////////////////////////////// 96 /// 97 /// @file apiXC.h 98 /// @brief XC Interface 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 /*! \defgroup Video Video modules 103 104 XC is used for \n 105 1. video display \n 106 2. 3D support \n 107 3. mirror mode spoort \n 108 4. frame rate convert and output timing control \n 109 5. OSDC timing control \n 110 For more information,see \link XC_CORE XC_CORE modules \endlink \n 111 112 There are three parts as follow,\n 113 ACE is used for \n 114 1. control the picture quality,include brightness, contrast, CSC ,etc.\n 115 2. MWE function.\n 116 DBC is used for\n 117 1. Dynamic Backlight Curve : Calculate the DBC base on average value.\n 118 DLC is used for\n 119 1. Dynamic Luma Curve : Calculate the DLC curve base on histogram and average value.\n 120 For more information,see \link XC_BE XC_BE modules \endlink \n 121 122 ADC is used to control ADC relative setting for YPbPr, VGA, SCART, AV, SV, ATV.\n 123 For more information,see \link XC_SRC XC_SRC modules \endlink \n 124 125 There are three parts as follow,\n 126 Auto is used to implement auto adjust and auto calibration.\n 127 Mode Parse mechanism is a fast and easy way to look up input timing according to different timing characteristics.\n 128 PC monitor is used to detect signal information.\n 129 For more information,see \link XC_FE XC_FE modules \endlink \n 130 131 DIP is a video capture function ,the whole function block separate four part,source select, clip window, HV scaling down , output window.\n 132 For more information,see \link XC_DWIN XC_DWIN modules \endlink 133 134 * \defgroup XC_CORE XC_CORE modules 135 * \ingroup Video 136 137 XC is used for \n 138 1. video display \n 139 2. 3D support \n 140 3. mirror mode spoort \n 141 4. frame rate convert and output timing control \n 142 5. OSDC timing control \n 143 For more information,see \link XC XC interface (apiXC.h) \endlink 144 145 * \defgroup XC XC interface (apiXC.h) 146 * \ingroup XC_CORE 147 148 XC is used for: 149 150 - 1. video display 151 - support input source as VGA, ATV, CVBS, S-video, YPbPr, SCART, HDMI, DTV, MM 152 - support output as main window, sub window, CVBS out 153 - suoport crop, scaling video to any size and position for display 154 155 - 2. 3D support 156 - support 3D input format as frame packing, field alternative, line alternative, side by side, top bottom, checker board, frame alternative 157 - support 3D output format as line alternative, top bottom, side by side, frame alternative, checker board, pixel alternative, only L frame, only R frame 158 - support normal 2D convert to 3D 159 160 - 3. mirror mode spoort 161 - support H mirror, V mirror, and H+V mirror 162 163 - 4. frame rate convert and output timing control 164 165 - 5. OSDC timing control 166 - support for video and OSD seperate transfer with VB1 167 168 <b> Operation Code Flow: </b> \n 169 check flow chart directly. 170 \image html apiXC_code_follow.png 171 172 * \defgroup XC_INIT XC init control 173 * \ingroup XC 174 175 *! \defgroup XC_INFO XC Infomation pool 176 * \ingroup XC 177 178 *! \defgroup XC_TIMING_DETECT XC Timing detect 179 * \ingroup XC 180 181 *! \defgroup XC_MUX XC mux and path setting 182 * \ingroup XC 183 184 *! \defgroup XC_SCALER XC scaler function 185 * \ingroup XC 186 187 *! \defgroup XC_FRC XC embedded FRC function 188 * \ingroup XC 189 190 *! \defgroup XC_3D XC 3D function 191 * \ingroup XC 192 193 *! \defgroup XC_DS XC DS function 194 * \ingroup XC 195 196 *! \defgroup XC_PQ XC PQ related function 197 * \ingroup XC 198 199 *! \defgroup XC_LD XC Local Dimming function 200 * \ingroup XC 201 202 *! \defgroup XC_OSD XC OSD related function 203 * \ingroup XC 204 205 *! \defgroup XC_VE XC VE function 206 * \ingroup XC 207 208 *! \defgroup XC_DISPLAY XC display function 209 * \ingroup XC 210 211 *! \defgroup XC_GAMMA XC gamma function 212 * \ingroup XC 213 214 *! \defgroup XC_TEST_PATTERN XC test pattern 215 * \ingroup XC 216 217 *! \defgroup XC_UTILITY XC utility function 218 * \ingroup XC 219 220 *! \defgroup XC_ToBeModified XC api to be modified 221 * \ingroup XC 222 223 *! \defgroup XC_ToBeRemove XC api to be removed 224 * \ingroup XC 225 */ 226 227 228 #ifndef _API_XC_H_ 229 #define _API_XC_H_ 230 231 #include "MsDevice.h" 232 // Driver 233 #include "drvXC_IOPort.h" 234 #include "UFO.h" 235 //? SYMBOL_WEAK defined here , but cause SN compile error 236 //#include "MsCommon.h" 237 #ifdef __cplusplus 238 extern "C" 239 { 240 #endif 241 #ifdef MVIDEO_C 242 #define INTERFACE 243 #else 244 #define INTERFACE extern 245 #endif 246 //------------------------------------------------------------------------------------------------- 247 // Macro and Define 248 //------------------------------------------------------------------------------------------------- 249 250 //------------------------------------------------------------------------------------------------- 251 // This macro defined in mscommon.h originally, here just for avoid SN compile error 252 //------------------------------------------------------------------------------------------------- 253 #ifdef MSOS_TYPE_LINUX_KERNEL 254 #define SYMBOL_WEAK 255 #else 256 #define SYMBOL_WEAK __attribute__((weak)) 257 #endif 258 // library information 259 #define MSIF_XC_LIB_CODE {'X','C','_','_'} 260 #define MSIF_XC_LIBVER {'0','9'} 261 #define MSIF_XC_BUILDNUM {'1','0'} 262 #define MSIF_XC_CHANGELIST {'0','0','7','0','9','8','0','1'} 263 #define XC_API_VERSION /* Character String for DRV/API version */ \ 264 MSIF_TAG, /* 'MSIF' */ \ 265 MSIF_CLASS, /* '00' */ \ 266 MSIF_CUS, /* 0x0000 */ \ 267 MSIF_MOD, /* 0x0000 */ \ 268 MSIF_CHIP, \ 269 MSIF_CPU, \ 270 MSIF_XC_LIB_CODE , /* IP__ */ \ 271 MSIF_XC_LIBVER , /* 0.0 ~ Z.Z */ \ 272 MSIF_XC_BUILDNUM , /* 00 ~ 99 */ \ 273 MSIF_XC_CHANGELIST, /* CL# */ \ 274 MSIF_OS 275 276 #define XC_INITDATA_VERSION 1 277 #define XC_OUTPUT_TIMING_ADJUST_VERSION 1 278 /// PANEL_INFO_EX version of current XC lib 279 #define PANEL_INFO_EX_VERSION 2 280 /// hw 2d to 3d para version 281 #define HW2DTO3DPARA_VERSION 2 282 /// 3d detect format para version 283 #define DETECT3DFORMATPARA_VERSION 1 284 285 /// ApiStatusEX version of current XC lib 286 /// Define below to distinguish from API_PNLSTATUS_EX_VERSION 287 #if defined(UFO_PUBLIC_HEADER_300) 288 #define API_XCSTATUS_EX_VERSION 4 289 #elif defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_212) 290 #define API_XCSTATUS_EX_VERSION 5 291 #else 292 #define API_XCSTATUS_EX_VERSION 9 293 #endif 294 #define API_STATUS_EX_VERSION API_XCSTATUS_EX_VERSION 295 296 /// 3d fp info version of current XC lib 297 #define XC_3D_FPINFOPARA_VERSION 1 298 /// report pixel info version of current XC lib 299 #define XC_REPORT_PIXELINFO_VERSION 1 300 301 /// OPTEE structure version 302 #define XC_OPTEE_HANDLER_VERSION 1 303 304 #if defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_300) 305 #define API_XCDS_INFO_VERSION 4 306 #else 307 #define API_XCDS_INFO_VERSION 3 308 #endif 309 #define API_DS_INFO_VERSION API_XCDS_INFO_VERSION 310 311 /// osdc disp info version of current XC lib 312 #define ODSC_DISPINFO_VERSIN 1 313 314 #define XC_INVALID_HEAP_ID 0xFFFFFFFF 315 316 #define MAX_FRC_TABLE_INDEX 10 317 318 #define _BIT(_bit_) (1 << (_bit_)) 319 320 //---------------------------- 321 // Return value 322 //---------------------------- 323 324 /// XC Return Value 325 typedef enum 326 { 327 E_APIXC_RET_FAIL = 0, ///<Fail 328 E_APIXC_RET_OK, ///<OK 329 E_APIXC_RET_FAIL_FUN_NOT_SUPPORT, ///<Fail 330 E_APIXC_RET_FAIL_ENUM_NOT_SUPPORT, ///<Fail 331 E_APIXC_RET_FAIL_INVALID_PARAMETER, ///<Fail 332 } E_APIXC_ReturnValue; 333 334 //---------------------------- 335 // Debug Switch 336 //---------------------------- 337 #define XC_DBGLEVEL_OFF (0x0000) ///< Turn off 338 #define XC_DBGLEVEL_SETWINDOW (0x0001) ///< Set Window 339 #define XC_DBGLEVEL_SETTIMING (0x0002) ///< LPLL / SetPanelTiming 340 #define XC_DBGLEVEL_SYNCDETECT (0x0004) ///< Sync detection ======>Not using it by now 341 #define XC_DBGLEVEL_MUX (0x0008) ///< Mux / Path Creation 342 #define XC_DBGLEVEL_MODEPARSE (0x0010) ///< Mode Parse ======>Not using it by now 343 #define XC_DBGLEVEL_HDMIMONITOR (0x0020) ///< HDMI and Package Monitor ===>Not using it by now 344 #define XC_DBGLEVEL_AUTOGEOMETRY (0x0040) ///< Auto Geometry / Auto Calibration 345 #define XC_DGBLEVEL_CROPCALC (0x0080) ///< Crop Window / Memory / OPM / IPM calculation 346 347 #define XC_DBGLEVEL_SETTIMING_ISR (0x0100) ///< ISR / SetPanelTiming 348 #define XC_DBGLEVEL_DWIN_SETWINDOW (0x0200) ///< DWIN / Set Window 349 #define XC_DBGLEVEL_FUNCTION_TRACE (0x0400) ///< Trace XC function using status 350 #define XC_DBGLEVEL_PARAMETER_TRACE (0x0800) ///< Trace XC function parameter 351 352 #define XC_DBGLEVEL_SEAMLESSZAP (0x1000) ///< Seamless Zapping 353 #define XC_DBGLEVEL_ATVTiming (0x2000) ///< Seamless Trace ATV Timing 354 //---------------------------- 355 // Input signal detect 356 //---------------------------- 357 358 #define XC_MD_VSYNC_POR_BIT _BIT(0) ///< VSnc polarity bit(0/1 = positive/negative) 359 #define XC_MD_HSYNC_POR_BIT _BIT(1) ///< HSync polarity bit(0/1 = positive/negative) 360 #define XC_MD_HSYNC_LOSS_BIT _BIT(2) ///< HSync loss bit 361 #define XC_MD_VSYNC_LOSS_BIT _BIT(3) ///< VSync loss bit 362 #define XC_MD_INTERLACE_BIT _BIT(4) ///< Interlace mode 363 #define XC_MD_USER_MODE_BIT _BIT(7) ///< User new mode (Not found in mode table) 364 #define XC_MD_SYNC_LOSS (XC_MD_HSYNC_LOSS_BIT | XC_MD_VSYNC_LOSS_BIT) ///< VSync & HSync loss bit 365 366 //---------------------------- 367 // 3D macros 368 //---------------------------- 369 #define DOUBLEHD_PRESCALE_VONEHDSIZE (540) 370 371 #define DOUBLEHD_1080X2I_FRAME_VSIZE (1080) 372 #define DOUBLEHD_1080X2I_FIELD_VSIZE (540) 373 #define DOUBLEHD_1080X2I_HSIZE (1920) 374 #define DOUBLEHD_1080X2I_VACT_SPACE1 (23) 375 #define DOUBLEHD_1080X2I_VACT_SPACE2 (22) 376 #define DOUBLEHD_1080X2I_VSIZE (DOUBLEHD_1080X2I_FRAME_VSIZE*2+DOUBLEHD_1080X2I_VACT_SPACE1*2+DOUBLEHD_1080X2I_VACT_SPACE2) 377 378 #define DOUBLEHD_1080X2I_50_VACT_SPACE1 (85) // not sure spec 379 #define DOUBLEHD_1080X2I_50_VACT_SPACE2 (85) // not sure spec 380 #define DOUBLEHD_1080X2I_50_VSIZE (DOUBLEHD_1080X2I_FRAME_VSIZE*2+DOUBLEHD_1080X2I_50_VACT_SPACE1*2+DOUBLEHD_1080X2I_50_VACT_SPACE1) 381 382 #define DOUBLEHD_576X2I_FRAME_VSIZE (576) 383 #define DOUBLEHD_576X2I_FIELD_VSIZE (288) 384 #if defined(UFO_PUBLIC_HEADER_212) ||defined(UFO_PUBLIC_HEADER_500_3) ||defined(UFO_PUBLIC_HEADER_700) 385 #define DOUBLEHD_576X2I_HSIZE (720) 386 #else 387 #define DOUBLEHD_576X2I_HSIZE (1440) 388 #endif 389 #define DOUBLEHD_576X2I_VACT_SPACE1 (25) 390 #define DOUBLEHD_576X2I_VACT_SPACE2 (24) 391 #define DOUBLEHD_576X2I_VSIZE (DOUBLEHD_576X2I_FRAME_VSIZE*2+DOUBLEHD_576X2I_VACT_SPACE1*2+DOUBLEHD_576X2I_VACT_SPACE2) 392 393 394 #define DOUBLEHD_480X2I_FRAME_VSIZE (480) 395 #define DOUBLEHD_480X2I_FIELD_VSIZE (240) 396 #if defined(UFO_PUBLIC_HEADER_212) ||defined(UFO_PUBLIC_HEADER_500_3) ||defined(UFO_PUBLIC_HEADER_700) 397 #define DOUBLEHD_480X2I_HSIZE (720) 398 #else 399 #define DOUBLEHD_480X2I_HSIZE (1440) 400 #endif 401 #define DOUBLEHD_480X2I_VACT_SPACE1 (23) 402 #define DOUBLEHD_480X2I_VACT_SPACE2 (22) 403 #define DOUBLEHD_480X2I_VSIZE (DOUBLEHD_480X2I_FRAME_VSIZE*2+DOUBLEHD_480X2I_VACT_SPACE1*2+DOUBLEHD_480X2I_VACT_SPACE2) 404 405 #define DOUBLEHD_1080X2P_VSIZE (2205) 406 #define DOUBLEHD_1080X2P_FRAME_VSIZE (1080) 407 #define DOUBLEHD_1080X2P_HSIZE (1920) 408 #define DOUBLEHD_1080X2P_GARBAGE_VSIZE (45) 409 410 #define DOUBLEHD_720X2P_VSIZE (1470) 411 #define DOUBLEHD_720X2P_FRAME_VSIZE (720) 412 #define DOUBLEHD_720X2P_HSIZE (1280) 413 #define DOUBLEHD_720X2P_GARBAGE_VSIZE (30) 414 415 #define DOUBLEHD_576X2P_VSIZE (1201) 416 #define DOUBLEHD_576X2P_FRAME_VSIZE (576) 417 #define DOUBLEHD_576X2P_HSIZE (720) 418 #define DOUBLEHD_576X2P_GARBAGE_VSIZE (49) 419 420 //720X480p 421 #define DOUBLEHD_480X2P_VSIZE (1005) 422 #define DOUBLEHD_480X2P_FRAME_VSIZE (480) 423 #define DOUBLEHD_480X2P_HSIZE (720) 424 #define DOUBLEHD_480X2P_GARBAGE_VSIZE (45) 425 426 //640X480p 427 #define DOUBLEHD_640_480X2P_VSIZE (1005) 428 #define DOUBLEHD_640_480X2P_FRAME_VSIZE (480) 429 #define DOUBLEHD_640_480X2P_HSIZE (640) 430 #define DOUBLEHD_640_480X2P_GARBAGE_VSIZE (45) 431 432 #define DOUBLEHD_288X2P_VSIZE (600) 433 #define DOUBLEHD_288X2P_FRAME_VSIZE (288) 434 #define DOUBLEHD_288X2P_HSIZE (1440) 435 #define DOUBLEHD_288X2P_GARBAGE_VSIZE (24) 436 437 #define DOUBLEHD_240X2P_VSIZE (502) 438 #define DOUBLEHD_240X2P_FRAME_VSIZE (240) 439 #define DOUBLEHD_240X2P_HSIZE (1440) 440 #define DOUBLEHD_240X2P_GARBAGE_VSIZE (22) 441 442 #define DOUBLEHD_240X2P_1_VSIZE (503) 443 #define DOUBLEHD_240X2P_1_FRAME_VSIZE (240) 444 #define DOUBLEHD_240X2P_1_HSIZE (1440) 445 #define DOUBLEHD_240X2P_1_GARBAGE_VSIZE (23) 446 447 // Field Interleave 448 #define FIELD_INTERLEAVE_1080X2I_FRAME_VSIZE (1080) 449 #define FIELD_INTERLEAVE_1080X2I_FIELD_VISZE (540) 450 #define FIELD_INTERLEAVE_1080X2I_HISZE (1920) 451 #define FIELD_INTERLEAVE_1080X2I_VACT_SPACE (23) 452 #define FIELD_INTERLEAVE_1080X2I_VISZE (FIELD_INTERLEAVE_1080X2I_FRAME_VSIZE+FIELD_INTERLEAVE_1080X2I_VACT_SPACE) 453 454 #define FIELD_INTERLEAVE_576X2I_FRAME_VSIZE (576) 455 #define FIELD_INTERLEAVE_576X2I_FIELD_VISZE (288) 456 #define FIELD_INTERLEAVE_576X2I_HISZE (1440) 457 #define FIELD_INTERLEAVE_576X2I_VACT_SPACE (25) 458 #define FIELD_INTERLEAVE_576X2I_VISZE (FIELD_INTERLEAVE_576X2I_FRAME_VSIZE+FIELD_INTERLEAVE_576X2I_VACT_SPACE) 459 460 #define FIELD_INTERLEAVE_480X2I_FRAME_VSIZE (480) 461 #define FIELD_INTERLEAVE_480X2I_FIELD_VISZE (240) 462 #define FIELD_INTERLEAVE_480X2I_HISZE (1440) 463 #define FIELD_INTERLEAVE_480X2I_VACT_SPACE (23) 464 #define FIELD_INTERLEAVE_480X2I_VISZE (FIELD_INTERLEAVE_480X2I_FRAME_VSIZE+FIELD_INTERLEAVE_480X2I_VACT_SPACE) 465 466 ///< When disable panel_info_ex, this means disable all valid panel info 467 #define PANEL_INFO_EX_INVALID_ALL 0xFFFF 468 //------------------------------------------------------------------------------------------------- 469 // Type and Structure 470 //------------------------------------------------------------------------------------------------- 471 #if defined(UFO_PUBLIC_HEADER_700) 472 INTERFACE void* pu32XC_Kernel_Inst; 473 #endif 474 //---------------------------- 475 // Common 476 //---------------------------- 477 478 /// Define mute type 479 #ifdef UFO_XC_FORCEWRITE_V2 480 typedef enum 481 { 482 E_BACKEND_MUTE = 1, ///< Backend mute 483 E_MUTE_MAX 484 }EN_MUTE_TYPE; 485 #else 486 typedef enum 487 { 488 E_MAIN_WINDOW_MUTE =0, ///< main window mute 489 E_SUB_WINDOW_MUTE =1, ///< sub window mute 490 E_PANEL_MUTE = 2 ///< panel mute 491 }EN_MUTE_TYPE; 492 #endif 493 494 typedef enum 495 { 496 E_XC_FB_LEVEL_FB, // frame buff mode 497 E_XC_FB_LEVEL_FBL, // same as fbl,not use miu 498 E_XC_FB_LEVEL_RFBL_DI, // use miu to deinterlace 499 E_XC_FB_LEVEL_NUM, // number 500 } E_XC_FB_LEVEL; 501 502 /// Define window type 503 typedef enum 504 { 505 MAIN_WINDOW=0, ///< main window if with PIP or without PIP 506 SUB_WINDOW=1, ///< sub window if PIP 507 MAX_WINDOW /// The max support window 508 }SCALER_WIN; 509 510 #define PIP_WINDOWS MAX_WINDOW 511 512 /// Define Window position and size attribute 513 typedef struct __attribute__((packed)) 514 { 515 MS_U16 x; ///<start x of the window 516 MS_U16 y; ///<start y of the window 517 MS_U16 width; ///<width of the window 518 MS_U16 height; ///<height of the window 519 } MS_WINDOW_TYPE; 520 #ifdef UFO_PUBLIC_HEADER_212 521 typedef enum 522 { 523 SCAN_AUTO = 0, 524 SCAN_PROGRESSIVE = SCAN_AUTO, 525 SCAN_INTERLACE = 1 526 }EN_VIDEO_SCAN_TYPE; 527 #endif 528 //////////////////////////////////////////////////////////////////////////////// 529 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 530 // This is abstract input source for XC library. If you want to add another one. 531 // Please contace with XC member 532 //////////////////////////////////////////////////////////////////////////////// 533 typedef struct DLL_PACKED 534 { 535 MS_U32 u32EnablePort; 536 MS_U32 u32Port[2]; 537 } XC_MUX_INPUTSRCTABLE; 538 /// Define Input type 539 typedef enum 540 { 541 INPUT_SOURCE_VGA, ///<0 VGA input 542 INPUT_SOURCE_TV, ///<1 TV input 543 544 INPUT_SOURCE_CVBS, ///<2 AV 1 545 INPUT_SOURCE_CVBS2, ///<3 AV 2 546 INPUT_SOURCE_CVBS3, ///<4 AV 3 547 INPUT_SOURCE_CVBS4, ///<5 AV 4 548 INPUT_SOURCE_CVBS5, ///<6 AV 5 549 INPUT_SOURCE_CVBS6, ///<7 AV 6 550 INPUT_SOURCE_CVBS7, ///<8 AV 7 551 INPUT_SOURCE_CVBS8, ///<9 AV 8 552 INPUT_SOURCE_CVBS_MAX, ///<10 AV max 553 554 INPUT_SOURCE_SVIDEO, ///<11 S-video 1 555 INPUT_SOURCE_SVIDEO2, ///<12 S-video 2 556 INPUT_SOURCE_SVIDEO3, ///<13 S-video 3 557 INPUT_SOURCE_SVIDEO4, ///<14 S-video 4 558 INPUT_SOURCE_SVIDEO_MAX, ///<15 S-video max 559 560 INPUT_SOURCE_YPBPR, ///<16 Component 1 561 INPUT_SOURCE_YPBPR2, ///<17 Component 2 562 INPUT_SOURCE_YPBPR3, ///<18 Component 3 563 INPUT_SOURCE_YPBPR_MAX, ///<19 Component max 564 565 INPUT_SOURCE_SCART, ///<20 Scart 1 566 INPUT_SOURCE_SCART2, ///<21 Scart 2 567 INPUT_SOURCE_SCART_MAX, ///<22 Scart max 568 569 INPUT_SOURCE_HDMI, ///<23 HDMI 1 570 INPUT_SOURCE_HDMI2, ///<24 HDMI 2 571 INPUT_SOURCE_HDMI3, ///<25 HDMI 3 572 INPUT_SOURCE_HDMI4, ///<26 HDMI 4 573 INPUT_SOURCE_HDMI_MAX, ///<27 HDMI max 574 575 INPUT_SOURCE_DTV, ///<28 DTV 576 577 INPUT_SOURCE_DVI, ///<29 DVI 1 578 INPUT_SOURCE_DVI2, ///<30 DVI 2 579 INPUT_SOURCE_DVI3, ///<31 DVI 2 580 INPUT_SOURCE_DVI4, ///<32 DVI 4 581 INPUT_SOURCE_DVI_MAX, ///<33 DVI max 582 583 // Application source 584 INPUT_SOURCE_STORAGE, ///<34 Storage 585 INPUT_SOURCE_KTV, ///<35 KTV 586 INPUT_SOURCE_JPEG, ///<36 JPEG 587 588 //Support Dual MVOP port 589 INPUT_SOURCE_DTV2, ///<37 DTV 590 INPUT_SOURCE_STORAGE2, ///<38 Storage 591 592 //Support Third MVOP port 593 INPUT_SOURCE_DTV3, ///<39 DTV 594 595 // Support OP capture 596 INPUT_SOURCE_SCALER_OP, ///<40 scaler OP 597 598 INPUT_SOURCE_VGA2, /// <41 VGA2 599 INPUT_SOURCE_VGA3, /// <42 VGA3 600 601 INPUT_SOURCE_NUM, ///<43 number of the source 602 INPUT_SOURCE_NONE = INPUT_SOURCE_NUM, ///<NULL input 603 } INPUT_SOURCE_TYPE_t; 604 605 #define IsSrcTypeAV(x) (((x)>=INPUT_SOURCE_CVBS)&&((x)<=INPUT_SOURCE_CVBS_MAX))/// x is AV 606 #define IsSrcTypeSV(x) (((x)>=INPUT_SOURCE_SVIDEO)&&((x)<=INPUT_SOURCE_SVIDEO_MAX))///< x is SV 607 #define IsSrcTypeATV(x) ((x)==INPUT_SOURCE_TV)///< x is ATV 608 #define IsSrcTypeScart(x) (((x)>=INPUT_SOURCE_SCART)&&((x)<=INPUT_SOURCE_SCART_MAX))///< x is Scart 609 #define IsSrcTypeHDMI(x) (((x)>=INPUT_SOURCE_HDMI)&&((x)<=INPUT_SOURCE_HDMI_MAX))///< x is HDMI 610 #define IsSrcTypeVga(x) (((x)==INPUT_SOURCE_VGA) || ((x)==INPUT_SOURCE_VGA2) || ((x)==INPUT_SOURCE_VGA3))///< x is VGA 611 #define IsSrcTypeYPbPr(x) (((x)>=INPUT_SOURCE_YPBPR)&&((x)<=INPUT_SOURCE_YPBPR_MAX))///< x is YPbPr 612 #define IsSrcTypeDTV(x) (((x)==INPUT_SOURCE_DTV) || ((x)==INPUT_SOURCE_DTV2) || ((x)==INPUT_SOURCE_DTV3))///< x is DTV 613 #define IsSrcTypeDVI(x) (((x)>=INPUT_SOURCE_DVI)&&((x)<=INPUT_SOURCE_DVI_MAX))///< x is DVI 614 #define IsSrcTypeJpeg(x) ((x)==INPUT_SOURCE_JPEG)///< x is JPEG 615 #define IsSrcTypeStorage(x) (((x)==INPUT_SOURCE_STORAGE) || ((x)==INPUT_SOURCE_STORAGE2) ||IsSrcTypeJpeg(x))///< x is Storage 616 #define IsSrcTypeDigitalVD(x) ( IsSrcTypeAV(x)||IsSrcTypeSV(x)||IsSrcTypeATV(x)||IsSrcTypeScart(x))///< x is VD 617 #define IsSrcTypeAnalog(x) ( IsSrcTypeVga(x)|| IsSrcTypeYPbPr(x))///< x is Analog 618 #define IsSrcTypeVideo(x) ( IsSrcTypeYPbPr(x) || IsSrcTypeATV(x) || IsSrcTypeAV(x) || IsSrcTypeSV(x) || IsSrcTypeScart(x) || IsSrcTypeDTV(x) ) ///< x is Video 619 #define IsSrcTypeCapture(x) ((x)==INPUT_SOURCE_SCALER_OP)///< x is scaler OP 620 621 //////////////////////////////////////////////////////////////////////////////// 622 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 623 // This is abstract output source for XC library. If you want to add another one. 624 // Please contace with XC member 625 //////////////////////////////////////////////////////////////////////////////// 626 627 /// Define output type 628 typedef enum 629 { 630 OUTPUT_NONE = 0, ///<NULL output 631 OUTPUT_SCALER_MAIN_WINDOW = 1, ///<output to Scaler main window 632 OUTPUT_SCALER2_MAIN_WINDOW = 2, 633 634 OUTPUT_SCALER_SUB_WINDOW = 10, ///<output to Scaler sub window 635 OUTPUT_SCALER2_SUB_WINDOW = 11, 636 637 OUTPUT_CVBS1 = 20, ///<output to CVBS1 638 OUTPUT_CVBS2, ///<output to CVBS2 639 // Reserved area 640 641 OUTPUT_YPBPR0 = 40, ///<output to YPBPR0 642 OUTPUT_YPBPR1, ///<output to YPBPR1 643 // Reserved area 644 645 OUTPUT_HDMI1 = 60, ///<output to HDMI1 646 OUTPUT_HDMI2, ///<output to HDMI2 647 648 OUTPUT_OFFLINE_DETECT = 80, ///<output to OFFLINE detect 649 650 OUTPUT_SCALER_DWIN = 100, ///<output to Dwin 651 652 OUTPUT_NUM, ///<number of outputs 653 }E_DEST_TYPE; 654 655 656 /// Define DeInterlace mode 657 typedef enum 658 { 659 660 MS_DEINT_OFF=0, ///<deinterlace mode off 661 MS_DEINT_2DDI_BOB, ///<deinterlace mode: BOB 662 MS_DEINT_2DDI_AVG, ///<deinterlace mode: AVG 663 MS_DEINT_3DDI_HISTORY, ///<deinterlace mode: HISTORY // 24 bit 664 MS_DEINT_3DDI, ///<deinterlace mode:3DDI// 16 bit 665 } MS_DEINTERLACE_MODE; 666 667 668 /// Define the members of IP Sync Status 669 typedef struct DLL_PACKED 670 { 671 MS_U8 u8SyncStatus; ///< IP Sync status: refer to MD_VSYNC_POR_BIT, etc 672 MS_U16 u16Hperiod; ///<H Period 673 MS_U16 u16Vtotal; ///<Vertcal total 674 } XC_IP_SYNC_STATUS; 675 676 typedef enum 677 { 678 CMA_XC_SELF_MEM = 0, 679 CMA_XC_COBUFF_MEM = 1, 680 CMA_XC_MEM_NUM = 2, 681 } XC_CMA_CLIENT; 682 683 typedef struct DLL_PACKED 684 { 685 MS_U32 u32HeapID; 686 MS_U64 u64AddrHeapOffset; 687 } XC_CMA_CONFIG; 688 689 /// Define Freerun color 690 typedef enum 691 { 692 E_XC_FREE_RUN_COLOR_BLACK, 693 E_XC_FREE_RUN_COLOR_WHITE, 694 E_XC_FREE_RUN_COLOR_BLUE, 695 E_XC_FREE_RUN_COLOR_RED, 696 E_XC_FREE_RUN_COLOR_GREEN, 697 E_XC_FREE_RUN_COLOR_MAX, 698 } XC_FREERUN_COLOR; 699 700 /// Define which panel output timing change mode is used to change VFreq for same panel 701 typedef enum 702 { 703 E_XC_PNL_CHG_DCLK = 0, ///<change output DClk to change Vfreq. 704 E_XC_PNL_CHG_HTOTAL = 1, ///<change H total to change Vfreq. 705 E_XC_PNL_CHG_VTOTAL = 2, ///<change V total to change Vfreq. 706 } E_XC_PNL_OUT_TIMING_MODE; 707 708 typedef enum 709 { 710 E_XC_PNL_LPLL_TTL, ///< TTL type 711 E_XC_PNL_LPLL_LVDS, ///< LVDS type 712 E_XC_PNL_LPLL_RSDS, ///< RSDS type 713 E_XC_PNL_LPLL_MINILVDS, ///< TCON //E_XC_PNL_LPLL_MINILVDS_6P_2Link 714 E_XC_PNL_LPLL_ANALOG_MINILVDS, ///< Analog TCON 715 E_XC_PNL_LPLL_DIGITAL_MINILVDS, ///< Digital TCON 716 E_XC_PNL_LPLL_MFC, ///< Ursa (TTL output to Ursa) 717 E_XC_PNL_LPLL_DAC_I, ///< DAC output 718 E_XC_PNL_LPLL_DAC_P, ///< DAC output 719 E_XC_PNL_LPLL_PDPLVDS, ///< For PDP(Vsync use Manually MODE) 720 E_XC_PNL_LPLL_EXT, 721 }E_XC_PNL_LPLL_TYPE; 722 723 724 typedef enum 725 { 726 727 E_XC_PNL_LPLL_EPI34_8P = E_XC_PNL_LPLL_EXT, 728 E_XC_PNL_LPLL_EPI28_8P, 729 E_XC_PNL_LPLL_EPI34_6P, 730 E_XC_PNL_LPLL_EPI28_6P, 731 732 ///< replace this with E_XC_PNL_LPLL_MINILVD 733 E_XC_PNL_LPLL_MINILVDS_5P_2L, 734 E_XC_PNL_LPLL_MINILVDS_4P_2L, 735 E_XC_PNL_LPLL_MINILVDS_3P_2L, 736 E_XC_PNL_LPLL_MINILVDS_6P_1L, 737 E_XC_PNL_LPLL_MINILVDS_5P_1L, 738 E_XC_PNL_LPLL_MINILVDS_4P_1L, 739 E_XC_PNL_LPLL_MINILVDS_3P_1L, 740 741 E_XC_PNL_LPLL_HS_LVDS, ///< High speed LVDS 742 E_XC_PNL_LPLL_HF_LVDS, ///< High Freqquency LVDS 743 744 E_XC_PNL_LPLL_TTL_TCON, 745 E_XC_PNL_LPLL_MINILVDS_2CH_3P_8BIT, ///< 2 channel, 3 pair, 8 bits 746 E_XC_PNL_LPLL_MINILVDS_2CH_4P_8BIT, ///< 2 channel, 4 pair, 8 bits 747 E_XC_PNL_LPLL_MINILVDS_2CH_5P_8BIT, ///< 2 channel, 5 pair, 8 bits 748 E_XC_PNL_LPLL_MINILVDS_2CH_6P_8BIT, ///< 2 channel, 6 pair, 8 bits 749 750 E_XC_PNL_LPLL_MINILVDS_1CH_3P_8BIT, ///< 1 channel, 3 pair, 8 bits 751 E_XC_PNL_LPLL_MINILVDS_1CH_4P_8BIT, ///< 1 channel, 4 pair, 8 bits 752 E_XC_PNL_LPLL_MINILVDS_1CH_5P_8BIT, ///< 1 channel, 5 pair, 8 bits 753 E_XC_PNL_LPLL_MINILVDS_1CH_6P_8BIT, ///< 1 channel, 6 pair, 8 bits 754 755 E_XC_PNL_LPLL_MINILVDS_2CH_3P_6BIT, ///< 2 channel, 3 pari, 6 bits 756 E_XC_PNL_LPLL_MINILVDS_2CH_4P_6BIT, ///< 2 channel, 4 pari, 6 bits 757 E_XC_PNL_LPLL_MINILVDS_2CH_5P_6BIT, ///< 2 channel, 5 pari, 6 bits 758 E_XC_PNL_LPLL_MINILVDS_2CH_6P_6BIT, ///< 2 channel, 6 pari, 6 bits 759 760 E_XC_PNL_LPLL_MINILVDS_1CH_3P_6BIT, ///< 1 channel, 3 pair, 6 bits 761 E_XC_PNL_LPLL_MINILVDS_1CH_4P_6BIT, ///< 1 channel, 4 pair, 6 bits 762 E_XC_PNL_LPLL_MINILVDS_1CH_5P_6BIT, ///< 1 channel, 5 pair, 6 bits 763 E_XC_PNL_LPLL_MINILVDS_1CH_6P_6BIT, ///< 1 channel, 6 pair, 6 bits 764 765 E_XC_PNL_LPLL_HDMI_BYPASS_MODE, //40 // HDMI Bypass Mode 766 767 E_XC_PNL_LPLL_EPI34_2P, /// 41 768 E_XC_PNL_LPLL_EPI34_4P, /// 42 769 E_XC_PNL_LPLL_EPI28_2P, /// 43 770 E_XC_PNL_LPLL_EPI28_4P, /// 44 771 772 E_XC_PNL_LPLL_VBY1_10BIT_4LANE, ///45 773 E_XC_PNL_LPLL_VBY1_10BIT_2LANE, ///46 774 E_XC_PNL_LPLL_VBY1_10BIT_1LANE, ///47 775 E_XC_PNL_LPLL_VBY1_8BIT_4LANE, ///48 776 E_XC_PNL_LPLL_VBY1_8BIT_2LANE, ///49 777 E_XC_PNL_LPLL_VBY1_8BIT_1LANE, ///50 778 779 E_XC_PNL_LPLL_VBY1_10BIT_8LANE, ///51 780 E_XC_PNL_LPLL_VBY1_8BIT_8LANE, ///52 781 782 E_XC_PNL_LPLL_EPI28_12P, /// 53 783 784 E_XC_PNL_LPLL_HS_LVDS_BYPASS_MODE, ///54 785 E_XC_PNL_LPLL_VBY1_10BIT_4LANE_BYPASS_MODE, ///55 786 E_XC_PNL_LPLL_VBY1_8BIT_4LANE_BYPASS_MODE, ///56 787 788 E_XC_PNL_LPLL_VBY1_10BIT_16LANE, //57 789 E_XC_PNL_LPLL_VBY1_8BIT_16LANE, //58 790 E_XC_PNL_LPLL_EPI24_12P, //59 791 E_XC_PNL_LPLL_USI_T_8BIT_12P, //60 792 E_XC_PNL_LPLL_USI_T_10BIT_12P, //61 793 E_XC_PNL_LPLL_ISP_8BIT_12P, //62 794 E_XC_PNL_LPLL_ISP_8BIT_6P_D, //63 795 796 E_XC_PNL_LPLL_TYPE_MAX, 797 }E_XC_PNL_LPLL_EXT_TYPE; 798 799 typedef enum 800 { 801 E_XC_MOD_OUTPUT_SINGLE = 0, ///< single channel 802 E_XC_MOD_OUTPUT_DUAL = 1, ///< dual channel 803 804 E_XC_MOD_OUTPUT_QUAD = 2, ///< quad channel 805 806 } E_XC_OUTPUT_MODE; 807 808 typedef enum 809 { 810 VFREQ_50HZ = 0x00, 811 VFREQ_60HZ = 0x01, 812 VFREQ_FROM_SRC = 0x02, 813 VFREQ_FROM_PANEL = 0x03, 814 } E_VFREQ_SEL; 815 816 /// Sources to VE 817 typedef enum 818 { 819 E_XC_NONE =0x00, 820 E_XC_IP = 0x01, ///< Scaler IP 821 E_XC_VOP2 = 0x02, ///< Scaler VOP2 822 E_XC_BRI = 0x04, ///< Scaler BRI 823 824 /// Please use this for OSD OP video capture!!! 825 E_XC_OP2 = 0x08, ///< Scaler OP2 - After Blending with OSD 826 E_XC_GAM = 0x10, ///< Scaler Gamma - Without Blending with OSD 827 E_XC_DITHER = 0x20, ///< Scaler noise dither - Without Blending with OSD 828 829 /// Please use this for non-OSD OP video capture!!! 830 E_XC_OVERLAP = 0x40, ///< Scaler color overlap - Without Blending with OSD 831 E_XC_IP_SUB = 0x80, ///< Scaler IP of sub window 832 }E_XC_SOURCE_TO_VE; 833 834 ///Port connect to pin 8 of SCART 835 typedef enum 836 { 837 E_XC_SCARTID_NONE = 0x00, ///< No connection 838 E_XC_SCARTID_TO_HSYNC0 = 0x01, ///< Pin 8 of SCART connects to Hsync 0 839 E_XC_SCARTID_TO_HSYNC1 = 0x02, ///< Pin 8 of SCART connects to Hsync 1 840 E_XC_SCARTID_TO_HSYNC2 = 0x04, ///< Pin 8 of SCART connects to Hsync 2 841 E_XC_SCARTID_TO_SOG0 = 0x08, ///< Pin 8 of SCART connects to SOG0 842 E_XC_SCARTID_TO_SOG1 = 0x10, ///< Pin 8 of SCART connects to SOG1 843 E_XC_SCARTID_TO_SOG2 = 0x20, ///< Pin 8 of SCART connects to SOG2 844 }E_XC_SCART_ID_PORT; 845 846 /// Items for query driver or H/W capability. 847 typedef enum 848 { 849 E_XC_SUPPORT_IMMESWITCH = 0x00000001, ///< return true if H/W support HDMI immeswitch 850 851 E_XC_SUPPORT_DVI_AUTO_EQ = 0x00000005, ///< return true if driver support Auto EQ. 852 853 E_XC_SUPPORT_FRC_INSIDE = 0x00000100, ///< return true if scaler driver support FRC (MFC) function. 854 855 }E_XC_CAPABILITY; 856 857 typedef enum 858 { 859 E_XC_SR_MODE_BASIC = 0x00000001, ///< basic SuperResolution 860 E_XC_SR_MODE_ADVANCED = 0x00000002, ///< advanced SuperResolution 861 }E_XC_SR_MODE; 862 863 typedef enum 864 { 865 E_XC_IMMESWITCH = 0x00000001, ///< return true if H/W support HDMI immeswitch 866 867 E_XC_DVI_AUTO_EQ = 0x00000002, ///< return true if driver support Auto EQ. 868 869 E_XC_FRC_INSIDE = 0x00000004, ///< return true if scaler driver support FRC (MFC) function. 870 871 E_XC_DIP_CHIP_CAPS = 0x00000008, ///< return dip chip caps. 872 873 E_XC_3D_FBL_CAPS = 0x00000010, ///< return true if chip support fbl 3d.attention:fbl 3d only support sbs to lbl and sbs to sbs 874 875 E_XC_HW_SEAMLESS_ZAPPING = 0x00000020, ///< return true if H/W support seamless zapping 876 877 E_XC_SUPPORT_DEVICE1 = 0x00000040, ///< return true if H/W support scaler device1 878 879 E_XC_SUPPORT_DETECT3D_IN3DMODE = 0x00000080, ///< return true if H/W support detecting 3d when already in 3d mode 880 881 E_XC_2DTO3D_VERSION = 0x00000100, ///< return value 2D-to-3D version 882 883 E_XC_SUPPORT_FORCE_VSP_IN_DS_MODE = 0x00000200, ///< return if H/W support force post-Vscalin-down in DS mode 884 885 E_XC_SUPPORT_FRCM_MODE = 0x00000400, ///< return if H/W support frcm 886 887 E_XC_SUPPORT_INTERLACE_OUT = 0x00000800, ///< return if H/W supports interlace output timing 888 889 E_XC_SUPPORT_4K2K_WITH_PIP = 0x00001000, ///< return if H/W supports output is 4k2k and open pip 890 #if defined(UFO_PUBLIC_HEADER_300) 891 E_XC_HW_4K2K_VIP_PEAKING_LIMITATION = 0x00002000, ///return if H/W has vip peaking limitation 892 #else 893 E_XC_SUPPORT_4K2K_60P = 0x00002000, ///< return if H/W supports output is 4k2k_60P timing 894 #endif 895 #if defined(UFO_PUBLIC_HEADER_500_3) 896 E_XC_DIP_CHIP_SOURCESEL = 0x00004000, ///< return if H/W supports output is 4k2k_60P timing 897 #else 898 E_XC_SUPPORT_PIP_PATCH_USING_SC1_MAIN_AS_SC0_SUB = 0x00004000,///<return if sc1 suport PIP 899 #endif 900 901 #if defined(UFO_PUBLIC_HEADER_300) 902 //empty 903 #else 904 E_XC_HW_4K2K_VIP_PEAKING_LIMITATION = 0x00008000, ///return if H/W has vip peaking limitation 905 #endif 906 907 #if defined(UFO_XC_AUTO_DOWNLOAD) 908 E_XC_SUPPORT_AUTODOWNLOAD_CLIENT = 0x00010000, ///return whether the client is supported, refer to XC_AUTODOWNLOAD_CLIENT_SUPPORTED_CAPS 909 #endif 910 911 #ifdef UFO_XC_HDR 912 E_XC_SUPPORT_HDR = 0x00020000, ///return whether HDR is supported, refer to XC_HDR_SUPPORTED_CAPS 913 #endif 914 915 #if defined(UFO_PUBLIC_HEADER_500_3) 916 E_XC_DIP_CHIP_WINDOWBUS = 0x00040000, ///< return DIP window bus length 917 #else 918 E_XC_SUPPORT_3D_DS = 0x00040000, ///return whether 3D DS is supported 919 #endif 920 921 #if defined(UFO_PUBLIC_HEADER_500_3) 922 E_XC_SCALING_LIMITATION = 0x00080000, ///return whether scaling is supported 923 #else 924 E_XC_DIP_CHIP_SOURCESEL = 0x00080000, ///< return if H/W supports output is 4k2k_60P timing 925 #endif 926 927 #if defined(UFO_PUBLIC_HEADER_500_3) 928 //empty 929 #else 930 E_XC_DIP_CHIP_WINDOWBUS = 0x00100000, ///< return DIP window bus length 931 #endif 932 933 #if defined(UFO_PUBLIC_HEADER_500_3) 934 //empty 935 #else 936 E_XC_SCALING_LIMITATION = 0x00800000, ///return whether scaling is supported 937 #endif 938 939 E_XC_FB_CAPS_GET_FB_LEVEL = 0x01000000,//get fb caps 940 941 #if defined(UFO_PUBLIC_HEADER_300) 942 E_XC_SUPPORT_4K2K_60P = 0x02000000, ///< return if H/W supports output is 4k2k_60P timing 943 #endif 944 945 }E_XC_CAPS; 946 947 typedef enum 948 { 949 E_XC_DS_INDEX_MVOP, 950 E_XC_DS_INDEX_SCALER, 951 E_XC_DS_INDEX_MAX, 952 }E_XC_DS_INDEX_SOURCE; 953 954 typedef enum 955 { 956 E_XC_FRC_InputTiming_2K1K, 957 E_XC_FRC_InputTiming_4K2K, 958 E_XC_FRC_InputTiming_MAX, 959 }E_XC_FRC_InputTiming; 960 961 typedef enum 962 { 963 PIXEL_SHIFT_MOVE_MAIN_WINDOW = 0x0001, 964 PIXEL_SHIFT_MOVE_SUB_WINDOW = 0x0002, 965 PIXEL_SHIFT_MOVE_REPORT_WINDOW = 0x0004, 966 PIXEL_SHIFT_MOVE_OSD_LAYER = 0x0008, 967 PIXEL_SHIFT_DO_OVERSCAN = 0x0010, 968 } PIXEL_SHIFT_FEATURE; 969 970 /// OP2 Video/GOP layer switch 971 typedef enum 972 { 973 E_VIDEO_ON_OSD_LAYER_DEAFULT = 0, ///< video -> osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 -> osd layer 4 974 E_VIDEO_ON_OSD_LAYER_0 = 1, ///< osd layer 0 -> video -> osd layer 1 -> osd layer 2 -> osd layer 3 -> osd layer 4 975 E_VIDEO_ON_OSD_LAYER_1 = 2, ///< osd layer 0 -> osd layer 1 -> video -> osd layer 2 -> osd layer 3 -> osd layer 4 976 E_VIDEO_ON_OSD_LAYER_2 = 3, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> video -> osd layer 3 -> osd layer 4 977 E_VIDEO_ON_OSD_LAYER_3 = 4, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 -> video -> osd layer 4 978 E_VIDEO_ON_OSD_LAYER_4 = 5, ///< osd layer 0 -> osd layer 1 -> osd layer 2 -> osd layer 3 -> osd layer 4 -> video 979 E_VIDEO_ON_OSD_LAYER_NUM, 980 } E_VIDEO_ON_OSD_LAYER; 981 982 /// Define panel information 983 typedef struct __attribute__((packed)) 984 { 985 // XC need below information do to frame lock 986 987 MS_U16 u16HStart; ///<DE H start 988 989 MS_U16 u16VStart; ///<DE V start 990 991 MS_U16 u16Width; ///<DE H width 992 993 MS_U16 u16Height; ///< DE V height 994 995 MS_U16 u16HTotal; ///<H total 996 997 MS_U16 u16VTotal; ///<V total 998 999 MS_U16 u16DefaultVFreq; ///<Panel output Vfreq., used in free run 1000 1001 MS_U8 u8LPLL_Mode; ///<0: single mode, 1: dual mode 1002 E_XC_PNL_OUT_TIMING_MODE enPnl_Out_Timing_Mode; ///<Define which panel output timing change mode is used to change VFreq for same panel 1003 1004 // Later need to refine to use Min/Max SET for PDP panel, but for LCD, it maybe no need to check the Min/Max SET 1005 MS_U16 u16DefaultHTotal; ///<default H total 1006 MS_U16 u16DefaultVTotal; ///<default V total 1007 1008 MS_U32 u32MinSET; 1009 MS_U32 u32MaxSET; 1010 E_XC_PNL_LPLL_TYPE eLPLL_Type; /// 1011 } XC_PANEL_INFO; 1012 1013 1014 /// Define the extern special panel information for FPLL or other usage 1015 /// Usage: 1016 /// The first 3 members of below structure must be set as their corresponding description 1017 /// The other members are set according to your request, none used members should be cleared to zero 1018 /// Example code of set VTT slowly: 1019 /// XC_PANEL_INFO_EX stPanelInfoEx; 1020 /// memset(&stPanelInfoEx, 0, sizeof(XC_PANEL_INFO_EX)); 1021 /// stPanelInfoEx.u32PanelInfoEx_Version = PANEL_INFO_EX_VERSION; 1022 /// stPanelInfoEx.u16PanelInfoEX_Length = sizeof(XC_PANEL_INFO_EX); 1023 /// 1024 /// stPanelInfoEx.bVttStepsValid = TRUE; 1025 /// stPanelInfoEx.bVttDelayValid = TRUE; 1026 /// stPanelInfoEx.u16VttSteps = xx; //set how many steps u want to set the vtt 1027 /// stPanelInfoEx.u16VttDelay = xx;// set the delay between steps of setting vtt 1028 /// stPanelInfoEx.u16VFreq = 500; //this step setting info is only for 50hz 1029 /// if(MApi_XC_SetExPanelInfo(TRUE, &stPanelInfoEx))//Check the set is accepted or not 1030 /// stPanelInfoEx.u16VFreq = 600; //set same steps info for 60 hz 1031 /// if(MApi_XC_SetExPanelInfo(TRUE, &stPanelInfoEx))//Check the set is accepted or not 1032 /// 1033 typedef struct __attribute__((packed)) 1034 { 1035 MS_U32 u32PanelInfoEx_Version; ///<Version of current structure. Please always set to "PANEL_INFO_EX_VERSION" as input 1036 MS_U16 u16PanelInfoEX_Length; ///<Length of this structure, u16PanelInfoEX_Length=sizeof(XC_PANEL_INFO_EX) 1037 MS_U16 u16VFreq; ///<Output Vfreq, unit: (1Hz/10), range 0~PANEL_INFO_EX_INVALID_ALL 1038 ///<If disable ex panel info and u16VFreq = 0xFFFF means disable all valid ex panel info 1039 ///<If disable ex panel info and u16VFreq = 600 means disable the valid ex panel info for 60 hz 1040 MS_U16 u16HTotal; ///<H total of output "u16VFreq" 1041 MS_BOOL bHTotalValid; ///H total setting is valid in this structure 1042 MS_U16 u16VTotal; ///<V total of output "u16VFreq" 1043 MS_BOOL bVTotalValid; ///V total setting is valid in this structure 1044 MS_U32 u32DClk; ///<DCLK of output "u16VFreq", unit: KHz 1045 MS_BOOL bDClkValid; ///DCLK, unit: KHz 1046 MS_U16 u16MinHTotal; ///<Min H total 1047 MS_BOOL bMinHTotalValid; ///Min H total 1048 MS_U16 u16MinVTotal; ///<Min V total 1049 MS_BOOL bMinVTotalValid; ///Min V total 1050 MS_U32 u32MinDClk; ///<Min DCLK, unit: KHz 1051 MS_BOOL bMinDClkValid; ///Min DCLK, unit: KHz 1052 MS_U16 u16MaxHTotal; ///<Max H total 1053 MS_BOOL bMaxHTotalValid; ///Max H total 1054 MS_U16 u16MaxVTotal; ///<Max V total 1055 MS_BOOL bMaxVTotalValid; ///Max V total 1056 MS_U32 u32MaxDClk; ///<Min DCLK, unit: KHz 1057 MS_BOOL bMaxDClkValid; ///Min DCLK, unit: KHz 1058 // sync related 1059 MS_U16 u16HSyncWidth; ///<VOP_01[7:0], PANEL_HSYNC_WIDTH 1060 MS_BOOL bHSyncWidthValid; ///< VOP_01[7:0], PANEL_HSYNC_WIDTH 1061 MS_U16 u16HSyncBackPorch; ///<PANEL_HSYNC_BACK_PORCH, no register setting, provide value for query only 1062 ///<not support Manuel VSync Start/End now 1063 ///<VOP_02[10:0] VSync start = Vtt - VBackPorch - VSyncWidth 1064 ///<VOP_03[10:0] VSync end = Vtt - VBackPorch 1065 MS_BOOL bHSyncBackPorchValid; 1066 MS_U16 u16VSyncWidth; ///<define PANEL_VSYNC_WIDTH 1067 MS_BOOL bVSyncWidthValid; 1068 MS_U16 u16VSyncBackPorch; ///<define PANEL_VSYNC_BACK_PORCH 1069 MS_BOOL bVSyncBackPorchValid; 1070 //step by step adjustment when 50/60 HZ Output switch 1071 MS_U16 u16HttSteps; ///<Number of adjusting step from Old Htt to new htt 1072 MS_BOOL bHttStepsValid; 1073 MS_U16 u16HttDelay; ///<Delay time in two steps 1074 MS_BOOL bHttDelayValid; 1075 MS_U16 u16VttSteps; ///<Number of adjusting step from Old Htt to new htt 1076 MS_BOOL bVttStepsValid; 1077 MS_U16 u16VttDelay; ///<Delay time in two steps 1078 MS_BOOL bVttDelayValid; 1079 MS_U16 u16DclkSteps; ///<Number of adjusting step from Old Htt to new htt 1080 MS_BOOL bDclkStepsValid; 1081 MS_U16 u16DclkDelay; ///<Delay time in two steps 1082 MS_BOOL bDclkDelayValid; ///<DclkDelay setting is valid in this structure 1083 }XC_PANEL_INFO_EX; 1084 1085 /// Define new panel information 1086 typedef struct DLL_PACKED 1087 { 1088 MS_U32 u32TimingAdjustSetting_version; ///<Version of current structure. Please always set this value as XC_OUTPUT_TIMING_ADJUST_VERSION 1089 1090 MS_U16 u16HTotal_Step; ///<Number of adjusting step from Old Htt to new htt 1091 MS_U16 u16HTotal_Delay; ///<Delay time in two steps 1092 MS_U16 u16HTotal_Ratio; ///<Ratio of Htt for change to specific framerate (X10). 1093 1094 MS_U16 u16VTotal_Step; ///<Number of adjusting step from Old Vtt to new Vtt 1095 MS_U16 u16VTotal_Delay; ///<Delay time in two steps 1096 MS_U16 u16VTotal_Ratio; ///<Ratio of Vtt for change to specific framerate (X10). 1097 1098 MS_U16 u16Dclk_Step; ///<Number of adjusting step from Old Dclk to new Dclk 1099 MS_U16 u16Dclk_Delay; ///<Delay time in two steps 1100 MS_U16 u16Dclk_Ratio; ///<Ratio of Dclk for change to specific framerate (X10). 1101 1102 }XC_OUTPUT_TIMING_ADJUST_SETTING; 1103 1104 /// Define the initial data for XC 1105 typedef struct __attribute__((packed)) 1106 { 1107 MS_U32 u32XC_version; ///<Version of current structure. 1108 // system related 1109 MS_U32 u32XTAL_Clock; ///<Crystal clock in Hz 1110 1111 // frame buffer related 1112 MS_PHY u32Main_FB_Start_Addr; ///<scaler main window frame buffer start address, absolute without any alignment 1113 MS_PHY u32Main_FB_Size; ///<scaler main window frame buffer size, the unit is BYTES 1114 MS_PHY u32Sub_FB_Start_Addr; ///<scaler sub window frame buffer start address, absolute without any alignment 1115 MS_PHY u32Sub_FB_Size; ///<scaler sub window frame buffer size, the unit is BYTES 1116 1117 // HDMI related, will be moved to HDMI module 1118 MS_BOOL bCEC_Use_Interrupt; ///<CEC use interrupt or not, if not, will use polling 1119 1120 // This is related to chip package. ( Share Ground / Non-Share Ground ) 1121 MS_BOOL bIsShareGround; 1122 1123 // function related 1124 MS_BOOL bEnableIPAutoCoast; ///<Enable IP auto coast 1125 1126 MS_BOOL bMirror; ///<mirror mode 1127 1128 // panel related 1129 XC_PANEL_INFO stPanelInfo; ///<panel infomation 1130 1131 // DLC 1132 MS_BOOL bDLC_Histogram_From_VBlank; ///<If set to TRUE, the Y max/min report value is read from V blanking area 1133 1134 // This is related to layout 1135 MS_U16 eScartIDPort_Sel; ///<This is port selection (E_XC_SCART_ID_PORT) of Scart ID pin 8 1136 1137 // frcm frame buffer related 1138 MS_PHY u32Main_FRCM_FB_Start_Addr; ///<scaler main window frcm frame buffer start address, absolute without any alignment 1139 MS_PHY u32Main_FRCM_FB_Size; ///<scaler main window frcm frame buffer size, the unit is BYTES 1140 MS_PHY u32Sub_FRCM_FB_Start_Addr; ///<scaler sub window frcm frame buffer start address, absolute without any alignment 1141 MS_PHY u32Sub_FRCM_FB_Size; ///<scaler sub window frcm frame buffer size, the unit is BYTES 1142 } XC_INITDATA; 1143 1144 /// define generic API infomation 1145 typedef struct __attribute__((packed)) 1146 { 1147 MS_U8 u8MaxWindowNum; ///<max window number that XC driver supports such as MAIN/SUB window 1148 MS_U8 u8NumOfDigitalDDCRam; ///<indicate how many Digital DDCRam that use can use without external EDID EEPROM 1149 MS_U8 u8MaxFrameNumInMem; ///<indicate maximal number of frames (Progressive mode) supported by scaler simultaneously 1150 MS_U8 u8MaxFieldNumInMem; ///<indicate maximal number of fields (Interlace mode) supported by scaler simultaneously 1151 } XC_ApiInfo; 1152 1153 /// define the information of set window 1154 typedef struct DLL_PACKED 1155 { 1156 //------------- 1157 // Input 1158 //------------- 1159 INPUT_SOURCE_TYPE_t enInputSourceType; ///<Input source 1160 1161 //------------- 1162 // Window 1163 //------------- 1164 MS_WINDOW_TYPE stCapWin; ///<Capture window 1165 MS_WINDOW_TYPE stDispWin; ///<Display window 1166 MS_WINDOW_TYPE stCropWin; ///<Crop window 1167 1168 //------------- 1169 // Timing 1170 //------------- 1171 MS_BOOL bInterlace; ///<Interlaced or Progressive 1172 MS_BOOL bHDuplicate; ///<flag for vop horizontal duplicate, for MVD, YPbPr, indicate input double sampled or not 1173 MS_U16 u16InputVFreq; ///<Input V Frequency, VFreqx10, for calculate output panel timing 1174 MS_U16 u16InputVTotal; ///<Input Vertical total, for calculate output panel timing 1175 MS_U16 u16DefaultHtotal; ///<Default Htotal for VGA/YPbPr input 1176 MS_U8 u8DefaultPhase; ///<Obsolete 1177 1178 //------------------------- 1179 // customized post scaling 1180 //------------------------- 1181 MS_BOOL bHCusScaling; ///<assign post H customized scaling instead of using XC scaling 1182 MS_U16 u16HCusScalingSrc; ///<post H customized scaling src width 1183 MS_U16 u16HCusScalingDst; ///<post H customized scaling dst width 1184 MS_BOOL bVCusScaling; ///<assign post V manuel scaling instead of using XC scaling 1185 MS_U16 u16VCusScalingSrc; ///<post V customized scaling src height 1186 MS_U16 u16VCusScalingDst; ///<post V customized scaling dst height 1187 1188 //-------------- 1189 // 9 lattice 1190 //-------------- 1191 MS_BOOL bDisplayNineLattice; ///<used to indicate where to display in panel and where to put in frame buffer 1192 1193 //------------------------- 1194 // customized pre scaling 1195 //------------------------- 1196 MS_BOOL bPreHCusScaling; ///<assign pre H customized scaling instead of using XC scaling 1197 MS_U16 u16PreHCusScalingSrc; ///<pre H customized scaling src width 1198 MS_U16 u16PreHCusScalingDst; ///<pre H customized scaling dst width 1199 MS_BOOL bPreVCusScaling; ///<assign pre V manuel scaling instead of using XC scaling 1200 MS_U16 u16PreVCusScalingSrc; ///<pre V customized scaling src height 1201 MS_U16 u16PreVCusScalingDst; ///<pre V customized scaling dst height 1202 MS_U16 u16DefaultPhase; ///<Default Phase for VGA/YPbPr input 1203 } XC_SETWIN_INFO; 1204 1205 typedef struct 1206 { //mastering color display: color volumne of a display 1207 MS_U32 u32MaxLuminance; 1208 MS_U32 u32MinLuminance; 1209 MS_U16 u16DisplayPrimaries[3][2]; 1210 MS_U16 u16WhitePoint[2]; 1211 } XC_DS_MasterColorDisplay; 1212 1213 typedef struct 1214 { 1215 //color_description: indicates the chromaticity/opto-electronic coordinates of the source primaries 1216 MS_U8 u8ColorPrimaries; 1217 MS_U8 u8TransferCharacteristics; 1218 // matrix coefficients in deriving YUV signal from RGB 1219 MS_U8 u8MatrixCoefficients; 1220 } XC_DS_ColorDescription; 1221 1222 typedef struct 1223 { 1224 // bit[0]: MS_ColorDescription present or valid, bit[1]: MS_MasterColorDisplay present or valid 1225 MS_U32 u32FrmInfoExtAvail; 1226 // mastering color display: color volumne of a display 1227 XC_DS_ColorDescription stColorDescription; 1228 XC_DS_MasterColorDisplay stMasterColorDisplay; 1229 MS_U8 u8CurrentIndex; 1230 MS_PHY phyRegAddr; 1231 MS_U32 u32RegSize; 1232 MS_PHY phyLutAddr; 1233 MS_U32 u32LutSize; 1234 MS_BOOL bDMEnable; 1235 MS_BOOL bCompEnable; 1236 } XC_DS_HDRInfo; 1237 1238 typedef struct DLL_PACKED{ 1239 //MVOP 1240 MS_U32 u32ApiDSInfo_Version; ///<Version of current structure. Please always set to "API_XCDS_INFO_VERSION" as input 1241 MS_U16 u16ApiDSInfo_Length; 1242 MS_U32 u32MFCodecInfo; 1243 XC_DS_HDRInfo stHDRInfo; 1244 //XC 1245 MS_BOOL bUpdate_DS_CMD[MAX_WINDOW]; 1246 MS_BOOL bEnableDNR[MAX_WINDOW]; 1247 MS_U32 u32DSBufferSize; 1248 MS_BOOL bEnable_ForceP[MAX_WINDOW]; 1249 }XC_DS_INFO; 1250 1251 1252 /// define the information for dynamic scaling (DS) 1253 /// one entry of DS is: 1254 /// 1255 /// 8 bit alignment 1256 /// LSB ----> MSB 1257 /// OP (32bits) -> IP (32bits) 1258 /// [7:0] [15:8] [23:16] [31:24] 1259 /// Data_L Data_H Reg_Addr(16bit) Reg_Bank 1260 /// 1261 /// 16 bit alignment 1262 /// LSB ----> MSB 1263 /// OP (32bits) -> IP (32bits) -> 0xFFFFFFFF, 0xFFFFFFFF (dummy) 1264 /// 1265 /// If bIP_DS_On == FALSE, the DS will ignore the IP information 1266 /// If bOP_DS_On == FALSE, the DS will ignore the OP information 1267 typedef struct DLL_PACKED 1268 { 1269 MS_PHY u32DS_Info_BaseAddr; ///< The memory base address to update IP/OP dynamic scaling registers. Absolute without any alignment. 1270 MS_U8 u8MIU_Select; ///< 0: MIU0, 1: MIU1, etc. 1271 MS_U8 u8DS_Index_Depth; ///< The index depth (how many entries to fire per MVOP Vsync falling) of DS 1272 MS_BOOL bOP_DS_On; ///< OP dynamic scaling on/off 1273 MS_BOOL bIPS_DS_On; ///< IPS dynamic scaling on/off 1274 MS_BOOL bIPM_DS_On; ///< IPM dynamic scaling on/off 1275 } XC_DynamicScaling_Info; 1276 1277 /// Define source type for DIP 1278 typedef enum 1279 { 1280 SCALER_DIP_SOURCE_TYPE_SUB2 = 0, ///< DIP from SUB2(IP_F3) 1281 SCALER_DIP_SOURCE_TYPE_MAIN = 1, ///< DIP from MAIN(IP_MAIN) 1282 SCALER_DIP_SOURCE_TYPE_SUB = 2, ///< DIP from SUB (IP_SUB) 1283 SCALER_DIP_SOURCE_TYPE_OP_MAIN = 3, ///< HVSP MAIN 1284 SCALER_DIP_SOURCE_TYPE_OP_SUB = 4, ///< HVSP SUB 1285 SCALER_DIP_SOURCE_TYPE_DRAM = 5, ///< DIP from DRAM 1286 SCALER_DIP_SOURCE_TYPE_OP_CAPTURE = 6, ///< DIP from OP capture 1287 SCALER_DIP_SOURCE_TYPE_OSD = 7, ///< DIP from OSD capture 1288 SCALER_DIP_SOURCE_TYPE_SC2_OP_CAPTURE = 8, ///< DIP from SC2 OP capture 1289 SCALER_DIP_SOURCE_TYPE_OP_SC1_CAPTURE = 9, ///< DIP from OP SC1 capture 1290 #if defined (UFO_PUBLIC_HEADER_212) ||defined (UFO_PUBLIC_HEADER_500_3) ||defined (UFO_PUBLIC_HEADER_700) 1291 SCALER_DIP_SOURCE_TYPE_MVOP0 =10, ///< DIP from MVOP0 capture 1292 SCALER_DIP_SOURCE_TYPE_MVOP1 =11, ///< DIP from MVOP1 capture 1293 #else 1294 SCALER_DIP_SOURCE_TYPE_VE_CAPTURE = 10, ///< DIP from SC1 OP capture 1295 SCALER_DIP_SOURCE_TYPE_MVOP0 =11, ///< DIP from MVOP0 capture 1296 SCALER_DIP_SOURCE_TYPE_MVOP1 =12, ///< DIP from MVOP1 capture 1297 #endif 1298 MAX_SCALER_DIP_SOURCE_NUM ///< The max support window 1299 }SCALER_DIP_SOURCE_TYPE; 1300 1301 /// Define the path type 1302 typedef enum 1303 { 1304 PATH_TYPE_SYNCHRONOUS, ///<synchronous path type 1305 PATH_TYPE_ASYNCHRONOUS, ///<asynchronous path type 1306 }E_PATH_TYPE; 1307 1308 /// Define the mux path information 1309 typedef struct DLL_PACKED 1310 { 1311 E_PATH_TYPE Path_Type; ///<path type 1312 INPUT_SOURCE_TYPE_t src; ///<source input type 1313 E_DEST_TYPE dest; ///<destination type of output 1314 1315 void (* path_thread)(INPUT_SOURCE_TYPE_t src, MS_BOOL bRealTimeMonitorOnly); ///<path read 1316 void (* SyncEventHandler )(INPUT_SOURCE_TYPE_t src, void* para); ///<sync event handler 1317 void (* DestOnOff_Event_Handler )(INPUT_SOURCE_TYPE_t src, void* para); ///<destination on off event handler 1318 void (* dest_periodic_handler )(INPUT_SOURCE_TYPE_t src, MS_BOOL bRealTimeMonitorOnly) ; ///<destination periodic handler 1319 } XC_MUX_PATH_INFO; 1320 1321 /// Image store format in XC 1322 typedef enum 1323 { 1324 IMAGE_STORE_444_24BIT, ///< (8+8+8) Y Cb Cr / B G R 1325 IMAGE_STORE_422_16BIT, ///< (8+8) Y Cb Y Cr / G B G R 1326 IMAGE_STORE_422_24BIT, ///< (10+10+4) Y Cb Y Cr / G B G R -- Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 - C5 C4 C3 C2 C1 C0 Y9 Y8 - xx xx xx xx C9 C8 C7 C6 1327 } MS_IMAGE_STORE_FMT; 1328 1329 /// XC API status 1330 typedef struct DLL_PACKED 1331 { 1332 //---------------------- 1333 // Customer setting 1334 //---------------------- 1335 INPUT_SOURCE_TYPE_t enInputSourceType; ///< Input source type 1336 1337 //---------------------- 1338 // Window 1339 //---------------------- 1340 MS_WINDOW_TYPE stCapWin; ///<Capture window 1341 MS_WINDOW_TYPE stDispWin; ///<Display window 1342 MS_WINDOW_TYPE stCropWin; ///<Crop window 1343 1344 //---------------------- 1345 // Timing 1346 //---------------------- 1347 MS_BOOL bInterlace; ///<Interlaced or Progressive 1348 MS_BOOL bHDuplicate; ///<flag for vop horizontal duplicate, for MVD, YPbPr, indicate input double sampled or not 1349 MS_U16 u16InputVFreq; ///<Input V Frequency, VFreqx10, for calculate output panel timing 1350 MS_U16 u16InputVTotal; ///<Input Vertical total, for calculate output panel timing 1351 MS_U16 u16DefaultHtotal; ///<Default Htotal for VGA/YPbPr input 1352 MS_U8 u8DefaultPhase; ///<Obsolete, use u16DefaultPhase instead 1353 1354 //---------------------- 1355 // customized scaling 1356 //---------------------- 1357 MS_BOOL bHCusScaling; ///<assign H customized scaling instead of using XC scaling 1358 MS_U16 u16HCusScalingSrc; ///<H customized scaling src width 1359 MS_U16 u16HCusScalingDst; ///<H customized scaling dst width 1360 MS_BOOL bVCusScaling; ///<assign V manuel scaling instead of using XC scaling 1361 MS_U16 u16VCusScalingSrc; ///<V customized scaling src height 1362 MS_U16 u16VCusScalingDst; ///<V customized scaling dst height 1363 1364 //-------------- 1365 // 9 lattice 1366 //-------------- 1367 MS_BOOL bDisplayNineLattice; ///<used to indicate where to display in panel and where to put in frame buffer 1368 1369 //---------------------- 1370 // XC internal setting 1371 //---------------------- 1372 1373 /* scaling ratio */ 1374 MS_U16 u16H_SizeAfterPreScaling; ///<Horizontal size after prescaling 1375 MS_U16 u16V_SizeAfterPreScaling; ///<Vertical size after prescaling 1376 MS_BOOL bPreV_ScalingDown; ///<define whether it's pre-Vertical scaling down 1377 1378 /* real crop win in memory */ 1379 MS_WINDOW_TYPE ScaledCropWin; 1380 1381 /* others */ 1382 MS_U32 u32Op2DclkSet; ///<OP to Dot clock set 1383 1384 /* Video screen status */ 1385 MS_BOOL bBlackscreenEnabled; ///<Black screen status 1386 MS_BOOL bBluescreenEnabled; ///<Blue screen status 1387 MS_U16 u16VideoDark; ///<Video dark 1388 1389 MS_U16 u16V_Length; ///<for MDrv_Scaler_SetFetchNumberLimit 1390 MS_U16 u16BytePerWord; ///<BytePerWord in Scaler 1391 MS_U16 u16OffsetPixelAlignment; ///<Pixel alignment of Offset (including IPM/OPM) 1392 MS_U8 u8BitPerPixel; ///<Bits number Per Pixel 1393 MS_DEINTERLACE_MODE eDeInterlaceMode; ///<De-interlace mode 1394 MS_U8 u8DelayLines; ///<delay lines 1395 MS_BOOL bMemFmt422; ///<whether memory format is 422, for easy usage 1396 MS_IMAGE_STORE_FMT eMemory_FMT; ///<memory format 1397 MS_BOOL bForceNRoff; ///<Force NR off 1398 MS_BOOL bEn3DNR; ///<whether it's 3DNR enabled 1399 MS_BOOL bUseYUVSpace; ///< color format before 3x3 matrix 1400 MS_BOOL bMemYUVFmt; ///< memroy color format 1401 MS_BOOL bForceRGBin; ///<Force set format in memory as RGB (only for RGB input source) 1402 MS_BOOL bLinearMode; ///<Is current memory format LinearMode? 1403 1404 // frame lock related 1405 // only main can select FB/FBL because panel output timing depends on main window, sub will always use FB 1406 MS_BOOL bFBL; ///<whether it's framebufferless case 1407 MS_BOOL bFastFrameLock; ///<whether framelock is enabled or not 1408 MS_BOOL bDoneFPLL; ///<whether the FPLL is done 1409 MS_BOOL bEnableFPLL; ///<enable FPLL or not 1410 MS_BOOL bFPLL_LOCK; ///<whether FPLL is locked (in specific threshold.) 1411 1412 // Capture_Memory 1413 #if defined(UFO_PUBLIC_HEADER_700) 1414 MS_PHY u32IPMBase0; ///<IPM base 0 1415 MS_PHY u32IPMBase1; ///<IPM base 1 1416 MS_PHY u32IPMBase2; ///<IPM base 2 1417 #else 1418 MS_U32 u32IPMBase0; ///<IPM base 0 1419 MS_U32 u32IPMBase1; ///<IPM base 1 1420 MS_U32 u32IPMBase2; ///<IPM base 2 1421 #endif 1422 MS_U16 u16IPMOffset; ///<IPM offset 1423 MS_U32 u16IPMFetch; ///<IPM fetch 1424 }XC_ApiStatus; 1425 1426 /// XC API status 1427 typedef struct DLL_PACKED 1428 { 1429 MS_U32 u32ApiStatusEx_Version; ///<Version of current structure. Please always set to "PANEL_INFO_EX_VERSION" as input 1430 MS_U16 u16ApiStatusEX_Length; ///<Length of this structure, u16PanelInfoEX_Length=sizeof(XC_PANEL_INFO_EX) 1431 1432 //---------------------- 1433 // Customer setting 1434 //---------------------- 1435 INPUT_SOURCE_TYPE_t enInputSourceType; ///< Input source type 1436 1437 //---------------------- 1438 // Window 1439 //---------------------- 1440 MS_WINDOW_TYPE stCapWin; ///<Capture window 1441 MS_WINDOW_TYPE stDispWin; ///<Display window 1442 MS_WINDOW_TYPE stCropWin; ///<Crop window 1443 1444 //---------------------- 1445 // Timing 1446 //---------------------- 1447 MS_BOOL bInterlace; ///<Interlaced or Progressive 1448 MS_BOOL bHDuplicate; ///<flag for vop horizontal duplicate, for MVD, YPbPr, indicate input double sampled or not 1449 MS_U16 u16InputVFreq; ///<Input V Frequency, VFreqx10, for calculate output panel timing 1450 MS_U16 u16InputVTotal; ///<Input Vertical total, for calculate output panel timing 1451 MS_U16 u16DefaultHtotal; ///<Default Htotal for VGA/YPbPr input 1452 MS_U8 u8DefaultPhase; ///<Obsolete, use u16DefaultPhase instead 1453 1454 //---------------------- 1455 // Post customized scaling 1456 //---------------------- 1457 MS_BOOL bHCusScaling; ///<assign H customized scaling instead of using XC scaling 1458 MS_U16 u16HCusScalingSrc; ///<H customized scaling src width 1459 MS_U16 u16HCusScalingDst; ///<H customized scaling dst width 1460 MS_BOOL bVCusScaling; ///<assign V manuel scaling instead of using XC scaling 1461 MS_U16 u16VCusScalingSrc; ///<V customized scaling src height 1462 MS_U16 u16VCusScalingDst; ///<V customized scaling dst height 1463 1464 //-------------- 1465 // 9 lattice 1466 //-------------- 1467 MS_BOOL bDisplayNineLattice; ///<used to indicate where to display in panel and where to put in frame buffer 1468 1469 //---------------------- 1470 // XC internal setting 1471 //---------------------- 1472 1473 /* scaling ratio */ 1474 MS_U16 u16H_SizeAfterPreScaling; ///<Horizontal size after prescaling 1475 MS_U16 u16V_SizeAfterPreScaling; ///<Vertical size after prescaling 1476 MS_BOOL bPreV_ScalingDown; ///<define whether it's pre-Vertical scaling down 1477 1478 /* real crop win in memory */ 1479 MS_WINDOW_TYPE ScaledCropWin; 1480 1481 /* others */ 1482 MS_U32 u32Op2DclkSet; ///<OP to Dot clock set 1483 1484 /* Video screen status */ 1485 MS_BOOL bBlackscreenEnabled; ///<Black screen status 1486 MS_BOOL bBluescreenEnabled; ///<Blue screen status 1487 MS_U16 u16VideoDark; ///<Video dark 1488 1489 MS_U16 u16V_Length; ///<for MDrv_Scaler_SetFetchNumberLimit 1490 MS_U16 u16BytePerWord; ///<BytePerWord in Scaler 1491 MS_U16 u16OffsetPixelAlignment; ///<Pixel alignment of Offset (including IPM/OPM) 1492 MS_U8 u8BitPerPixel; ///<Bits number Per Pixel 1493 MS_DEINTERLACE_MODE eDeInterlaceMode; ///<De-interlace mode 1494 MS_U8 u8DelayLines; ///<delay lines 1495 MS_BOOL bMemFmt422; ///<whether memory format is 422, for easy usage 1496 MS_IMAGE_STORE_FMT eMemory_FMT; ///<memory format 1497 MS_BOOL bForceNRoff; ///<Force NR off 1498 MS_BOOL bEn3DNR; ///<whether it's 3DNR enabled 1499 MS_BOOL bUseYUVSpace; ///< color format before 3x3 matrix 1500 MS_BOOL bMemYUVFmt; ///< memroy color format 1501 MS_BOOL bForceRGBin; ///<Force set format in memory as RGB (only for RGB input source) 1502 MS_BOOL bLinearMode; ///<Is current memory format LinearMode? 1503 1504 // frame lock related 1505 // only main can select FB/FBL because panel output timing depends on main window, sub will always use FB 1506 MS_BOOL bFBL; ///<whether it's framebufferless case 1507 MS_BOOL bFastFrameLock; ///<whether framelock is enabled or not 1508 MS_BOOL bDoneFPLL; ///<whether the FPLL is done 1509 MS_BOOL bEnableFPLL; ///<enable FPLL or not 1510 MS_BOOL bFPLL_LOCK; ///<whether FPLL is locked (in specific threshold.) 1511 1512 // Capture_Memory 1513 #if defined(UFO_PUBLIC_HEADER_700) 1514 MS_PHY u32IPMBase0; ///<IPM base 0 1515 MS_PHY u32IPMBase1; ///<IPM base 1 1516 MS_PHY u32IPMBase2; ///<IPM base 2 1517 #else 1518 MS_U32 u32IPMBase0; ///<IPM base 0 1519 MS_U32 u32IPMBase1; ///<IPM base 1 1520 MS_U32 u32IPMBase2; ///<IPM base 2 1521 #endif 1522 MS_U16 u16IPMOffset; ///<IPM offset 1523 MS_U32 u16IPMFetch; ///<IPM fetch 1524 1525 //---------------------- 1526 // Pre customized scaling 1527 //---------------------- 1528 MS_BOOL bPreHCusScaling; ///<assign H customized scaling instead of using XC scaling 1529 MS_U16 u16PreHCusScalingSrc; ///<H customized scaling src width 1530 MS_U16 u16PreHCusScalingDst; ///<H customized scaling dst width 1531 MS_BOOL bPreVCusScaling; ///<assign V manuel scaling instead of using XC scaling 1532 MS_U16 u16PreVCusScalingSrc; ///<V customized scaling src height 1533 MS_U16 u16PreVCusScalingDst; ///<V customized scaling dst height 1534 1535 MS_BOOL bPQSetHSD;///<H_SizeAfterPreScaling is changed manually, which will skip PQ HSD sampling and filter 1536 1537 MS_U16 u16DefaultPhase; ///<Default Phase for VGA/YPbPr input 1538 MS_BOOL bIsHWDepthAdjSupported; ///<Is hw depth adjustment for real 3d supported or not 1539 MS_BOOL bIs2LineMode; ///<Is 2 line mode or not 1540 MS_BOOL bIsPNLYUVOutput; ///<Is Scaler YUV output 1541 1542 MS_U8 u8HDMIPixelRepetition; ///<the HDMI pixel repetition info 1543 1544 #if defined(UFO_PUBLIC_HEADER_700) 1545 MS_PHY u32FRCMBase0; ///<FRCM base 0 1546 MS_PHY u32FRCMBase1; ///<FRCM base 1 1547 MS_PHY u32FRCMBase2; ///<FRCM base 2 1548 #else 1549 MS_U32 u32FRCMBase0; ///<FRCM base 0 1550 MS_U32 u32FRCMBase1; ///<FRCM base 1 1551 MS_U32 u32FRCMBase2; ///<FRCM base 2 1552 #endif 1553 #ifdef UFO_XC_ZORDER 1554 E_VIDEO_ON_OSD_LAYER enZOrderIndex; ///<VIDEO and the relative position of OSD. 1555 #endif 1556 #if defined(UFO_PUBLIC_HEADER_212) ||defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700) 1557 MS_BOOL bFSCEnabled; ///< used only for FSC enbaled case 1558 #endif 1559 #if defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700) 1560 MS_BOOL bFRCEnabled; ///< used only for FRC enbaled case 1561 #endif 1562 #if defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_700) 1563 #if API_XCSTATUS_EX_VERSION >= 9 1564 MS_U16 u16PanelInterfaceType; ///< Panel Type 1565 #endif 1566 #endif 1567 }XC_ApiStatusEx; 1568 1569 /// XC API status 1570 typedef struct DLL_PACKED 1571 { 1572 MS_U32 u32ApiStatusEx_Version; ///<Version of current structure. Please always set to "PANEL_INFO_EX_VERSION" as input 1573 MS_U16 u16ApiStatusEX_Length; ///<Length of this structure, u16PanelInfoEX_Length=sizeof(XC_PANEL_INFO_EX) 1574 1575 //---------------------- 1576 // Customer setting 1577 //---------------------- 1578 INPUT_SOURCE_TYPE_t enInputSourceType; ///< Input source type 1579 1580 //---------------------- 1581 // Window 1582 //---------------------- 1583 MS_WINDOW_TYPE stDispWin; ///<Display window 1584 1585 } ST_XC_APISTATUSNODELAY; 1586 1587 /// Define the set timing information 1588 typedef struct DLL_PACKED 1589 { 1590 MS_U32 u32HighAccurateInputVFreq; ///<high accurate input V frequency 1591 MS_U16 u16InputVFreq; ///<input V frequency 1592 MS_U16 u16InputVTotal; ///<input vertical total 1593 MS_BOOL bMVOPSrc; ///<MVOP source 1594 MS_BOOL bFastFrameLock; ///<whether it's fast frame lock case 1595 MS_BOOL bInterlace; ///<whether it's interlace 1596 }XC_SetTiming_Info; 1597 1598 //------------------------------ 1599 // XC Auto 1600 //------------------------------ 1601 1602 /// internal calibration 1603 typedef struct 1604 { 1605 MS_U16 u16CH_AVG[3]; 1606 } MS_AUTOADC_TYPE; 1607 1608 /// get IP1 report min/max R/G/B 1609 typedef enum 1610 { 1611 AUTO_MIN_R , 1612 AUTO_MIN_G , 1613 AUTO_MIN_B , 1614 AUTO_MAX_R , 1615 AUTO_MAX_G , 1616 AUTO_MAX_B , 1617 }AUTO_GAIN_TYPE; 1618 1619 /// the tming types for internal calibration 1620 typedef enum 1621 { 1622 E_XC_OFF, 1623 E_XC_480P, 1624 E_XC_576P, 1625 E_XC_720P, 1626 E_XC_1080P, 1627 E_XC_480I, 1628 E_XC_576I, 1629 E_XC_720I, 1630 E_XC_1080I, 1631 }XC_Internal_TimingType; 1632 1633 //------------------------------ 1634 // Software Reset 1635 //------------------------------ 1636 /// software reset type 1637 typedef enum 1638 { 1639 REST_SCALER_ALL = _BIT(0), 1640 REST_IP_F1 = _BIT(1), 1641 REST_IP_F2 = _BIT(2), 1642 REST_OP = _BIT(3), 1643 REST_IP_ALL = _BIT(4), 1644 REST_IP_OFFLINE = _BIT(5), 1645 REST_CLK = (_BIT(6)|_BIT(3)), 1646 }SOFTWARE_REST_TYPE_t; 1647 1648 /// Detect Europe HDTV status type 1649 typedef enum 1650 { 1651 EURO_AUS_HDTV_NORMAL = 0, ///<not detected Euro or Aus HDTV 1652 EURO_HDTV_DETECTED, ///<Euro HDTV detected 1653 AUSTRALIA_HDTV_DETECTED, ///<Aus HDTV detected 1654 }MS_DETECT_EURO_HDTV_STATUS_TYPE; 1655 1656 1657 //Capture_Memory 1658 1659 /// Define the rectangle information 1660 typedef struct 1661 { 1662 MS_S16 s16X_Start; ///<rectangle start x 1663 MS_S16 s16Y_Start; ///<rectangle start x 1664 MS_S16 s16X_Size; ///<rectangle horizontal size 1665 MS_S16 s16Y_Size; ///<rectangle vertical size 1666 1667 MS_U8 *pRect; ///<the buffer address for the rectangle 1668 MS_U32 u32RectPitch; ///<rectangle pitch 1669 MS_U16 u16PointSize; ///<point size, consider the memory size 1670 } MS_RECT_INFO; 1671 1672 /// Define for format of pixel 24 bit 1673 typedef struct 1674 { 1675 MS_U8 R_Cr; 1676 MS_U8 G_Y; 1677 MS_U8 B_Cb; 1678 } MS_PIXEL_24BIT; 1679 1680 /// Define for format of pixel 32 bit 1681 typedef struct 1682 { 1683 MS_U32 B_Cb :10; 1684 MS_U32 G_Y :10; 1685 MS_U32 R_Cr :10; 1686 MS_U32 u8Dummy:2; 1687 }MS_PIXEL_32BIT; 1688 1689 /// Define for format of pixel 16 bit 1690 typedef struct 1691 { 1692 MS_U8 u8G_Y; 1693 MS_U8 u8BR_CbCr; 1694 } MS_PIXEL_422_8BIT; 1695 1696 typedef enum 1697 { 1698 E_XC_OUTPUTDATA_RGB10BITS = 0x00, ///< Dummy[31:30] R[29:20] G[19:10] B[9:0] 1699 E_XC_OUTPUTDATA_RGB8BITS = 0x01, ///< R[23:16] G[15:8] B[7:0] 1700 E_XC_OUTPUTDATA_4228BITS = 0x03, ///< CbCr[15:8] Y[7:0] 1701 1702 E_XC_OUTPUTDATA_FRC_RGB10BITS = 0x04, ///< Dummy[31:30] R[29:20] G[19:10] B[9:0] 1703 E_XC_OUTPUTDATA_FRC_RGB8BITS = 0x05, ///< R[23:16] G[15:8] B[7:0] 1704 E_XC_OUTPUTDATA_FRC_4228BITS = 0x06, ///< CbCr[15:8] Y[7:0] 1705 }E_XC_OUTPUTDATA_TYPE; 1706 1707 typedef enum 1708 { 1709 E_XC_INPUTDATA_RGB10BITS = 0x00, ///< Dummy[31:30] R[29:20] G[19:10] B[9:0] 1710 E_XC_INPUTDATA_RGB8BITS = 0x01, ///< R[23:16] G[15:8] B[7:0] 1711 E_XC_INPUTDATA_4228BITS = 0x03, ///< CbCr[15:8] Y[7:0] 1712 }E_XC_INPUTDATA_TYPE; 1713 1714 1715 /// define for the auto calbration window type 1716 typedef struct 1717 { 1718 MS_U16 u16X; ///<window start x 1719 MS_U16 u16Xsize; ///<window horizontal size 1720 MS_U16 u16Y; ///<window start y 1721 MS_U16 u16Ysize; ///<window vertical size 1722 }MS_AUTO_CAL_WINDOW_t; 1723 1724 typedef struct 1725 { 1726 MS_IMAGE_STORE_FMT eStoreFmt; ///<image store format 1727 MS_AUTO_CAL_WINDOW_t eCal_Win_Size; ///<auto calbration window type 1728 MS_AUTOADC_TYPE pixelMax; ///<maximum value among the pixels 1729 MS_AUTOADC_TYPE pixelMin; ///<minimum value among the pixels 1730 MS_AUTOADC_TYPE pixelAverage; ///<average value among the pixels 1731 } MS_IMAGE_MEM_INFO; 1732 1733 /// defined channel select for contrast adjusting. 1734 typedef enum 1735 { 1736 XC_VOP_CHR = 0, ///< Channel R 1737 XC_VOP_CHG, ///< Channel G 1738 XC_VOP_CHB, ///< Channel B 1739 XC_VOP_ALL, ///< All Channel 1740 }MS_XC_VOP_CHANNEL_t; 1741 1742 /// Define Scaler GOP IP setting. 1743 typedef enum 1744 { 1745 MS_IP0_SEL_GOP0, 1746 MS_IP0_SEL_GOP1, 1747 MS_IP0_SEL_GOP2, 1748 MS_NIP_SEL_GOP0, 1749 MS_NIP_SEL_GOP1, 1750 MS_NIP_SEL_GOP2, 1751 MS_MVOP_SEL, 1752 }MS_XC_IPSEL_GOP; 1753 1754 /// Define Scaler memory format 1755 typedef enum 1756 { 1757 E_MS_XC_MEM_FMT_AUTO = 0, 1758 E_MS_XC_MEM_FMT_444 = 1, 1759 E_MS_XC_MEM_FMT_422 = 2, 1760 }MS_XC_MEM_FMT; 1761 1762 /// Define the PQ path information 1763 /** 1764 * The active Window for PQ function to takes place. 1765 */ 1766 typedef enum 1767 { 1768 /// Main window 1769 PQ_MAIN_WINDOW=0, 1770 /// Sub window 1771 PQ_SUB_WINDOW=1, 1772 /// The max support window of PQ 1773 PQ_MAX_WINDOW 1774 }PQ_WIN; 1775 1776 typedef enum 1777 { 1778 PQ_XC_ID_0, 1779 PQ_XC_ID_1, 1780 PQ_XC_ID_NUM, 1781 }PQ_XC_ID; 1782 1783 /** 1784 * FOURCE COLOR FMT 1785 */ 1786 typedef enum 1787 { 1788 /// Default 1789 PQ_FOURCE_COLOR_DEFAULT, 1790 /// RGB 1791 PQ_FOURCE_COLOR_RGB, 1792 /// YUV 1793 PQ_FOURCE_COLOR_YUV, 1794 }PQ_FOURCE_COLOR_FMT; 1795 1796 /** 1797 * PQ DEINTERLACE MODE 1798 */ 1799 typedef enum DLL_PACKED 1800 { 1801 /// off 1802 PQ_DEINT_OFF=0, 1803 /// 2DDI BOB 1804 PQ_DEINT_2DDI_BOB, 1805 /// 2DDI AVG 1806 PQ_DEINT_2DDI_AVG, 1807 /// 3DDI History(24 bit) 1808 PQ_DEINT_3DDI_HISTORY, 1809 /// 3DDI(16 bit) 1810 PQ_DEINT_3DDI, 1811 } PQ_DEINTERLACE_MODE; 1812 /** 1813 * Video data information to supply when in PQ mode. 1814 */ 1815 typedef struct DLL_PACKED 1816 { 1817 /// is FBL or not 1818 MS_BOOL bFBL; 1819 /// is interlace mode or not 1820 MS_BOOL bInterlace; 1821 /// input Horizontal size 1822 MS_U16 u16input_hsize; 1823 /// input Vertical size 1824 MS_U16 u16input_vsize; 1825 /// input Vertical total 1826 MS_U16 u16input_vtotal; 1827 /// input Vertical frequency 1828 MS_U16 u16input_vfreq; 1829 /// output Vertical frequency 1830 MS_U16 u16ouput_vfreq; 1831 /// Display Horizontal size 1832 MS_U16 u16display_hsize; 1833 /// Display Vertical size 1834 MS_U16 u16display_vsize; 1835 }MS_PQ_Mode_Info; 1836 /** 1837 * INPUT SOURCE TYPE 1838 */ 1839 typedef enum 1840 { 1841 /// VGA 1842 PQ_INPUT_SOURCE_VGA, 1843 /// TV 1844 PQ_INPUT_SOURCE_TV, 1845 1846 /// CVBS 1847 PQ_INPUT_SOURCE_CVBS, 1848 1849 /// S-video 1850 PQ_INPUT_SOURCE_SVIDEO, 1851 1852 /// Component 1853 PQ_INPUT_SOURCE_YPBPR, 1854 /// Scart 1855 PQ_INPUT_SOURCE_SCART, 1856 1857 1858 /// HDMI 1859 PQ_INPUT_SOURCE_HDMI, 1860 1861 /// DTV 1862 PQ_INPUT_SOURCE_DTV, 1863 1864 /// DVI 1865 PQ_INPUT_SOURCE_DVI, 1866 1867 // Application source 1868 /// Storage 1869 PQ_INPUT_SOURCE_STORAGE, 1870 /// KTV 1871 PQ_INPUT_SOURCE_KTV, 1872 /// JPEG 1873 PQ_INPUT_SOURCE_JPEG, 1874 1875 /// The max support number of PQ input source 1876 PQ_INPUT_SOURCE_NUM, 1877 /// None 1878 PQ_INPUT_SOURCE_NONE = PQ_INPUT_SOURCE_NUM, 1879 } PQ_INPUT_SOURCE_TYPE; 1880 1881 1882 // PQ Function 1883 typedef enum 1884 { 1885 E_PQ_IOCTL_NONE = 0x00000000, 1886 E_PQ_IOCTL_HSD_SAMPLING = 0x00000001, 1887 E_PQ_IOCTL_PREVSD_BILINEAR = 0x00000002, 1888 E_PQ_IOCTL_ADC_SAMPLING = 0x00000003, 1889 E_PQ_IOCTL_RFBL_CTRL = 0x00000004, 1890 E_PQ_IOCTL_PQ_SUGGESTED_FRAMENUM = 0x00000008, 1891 E_PQ_IOCTL_SET_UCFEATURE = 0x00000010, 1892 E_PQ_IOCTL_PQ_SUGGESTED_FRCMFRAMENUM = 0x00000020, 1893 1894 E_PQ_IOCTL_NUM, 1895 }PQ_IOCTL_FLAG_TYPE; 1896 1897 typedef struct DLL_PACKED s_PQ_Function 1898 { 1899 1900 void (* pq_disable_filmmode)(PQ_WIN eWindow, MS_BOOL bOn); 1901 1902 MS_BOOL (* pq_load_scalingtable)(PQ_WIN eWindow, MS_U8 eXRuleType, MS_BOOL bPreV_ScalingDown, 1903 MS_BOOL bInterlace, MS_BOOL bColorSpaceYUV, MS_U16 u16InputSize, MS_U16 u16SizeAfterScaling); 1904 1905 MS_BOOL (* pq_set_csc)(PQ_WIN eWindow, PQ_FOURCE_COLOR_FMT enFourceColor); 1906 1907 PQ_DEINTERLACE_MODE (* pq_set_memformat)(PQ_WIN eWindow, MS_BOOL bMemFmt422, MS_BOOL bFBL, MS_U8 *u8BitsPerPixel); 1908 1909 void (* pq_set_420upsampling)(PQ_WIN eWindow, MS_BOOL bFBL, MS_BOOL bPreV_ScalingDown, MS_U16 u16V_CropStart); 1910 1911 void (* pq_set_modeInfo)(PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType, MS_PQ_Mode_Info *pstPQModeInfo); 1912 1913 void (* pq_deside_srctype)(PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType); 1914 1915 MS_BOOL (* pq_get_memyuvfmt)(PQ_WIN eWindow, PQ_FOURCE_COLOR_FMT enFourceColor); 1916 1917 MS_BOOL (* pq_ioctl)(PQ_WIN eWindow, MS_U32 u32Flag, void *pBuf, MS_U32 u32BufSize); 1918 1919 void (* pq_disable_filmmode_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, MS_BOOL bOn); 1920 1921 MS_BOOL (* pq_load_scalingtable_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, MS_U8 eXRuleType, MS_BOOL bPreV_ScalingDown, 1922 MS_BOOL bInterlace, MS_BOOL bColorSpaceYUV, MS_U16 u16InputSize, MS_U16 u16SizeAfterScaling); 1923 1924 MS_BOOL (* pq_set_csc_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, PQ_FOURCE_COLOR_FMT enFourceColor); 1925 1926 PQ_DEINTERLACE_MODE (* pq_set_memformat_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, MS_BOOL bMemFmt422, MS_BOOL bFBL, MS_U8 *u8BitsPerPixel); 1927 1928 void (* pq_set_420upsampling_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, MS_BOOL bFBL, MS_BOOL bPreV_ScalingDown, MS_U16 u16V_CropStart); 1929 1930 void (* pq_set_modeInfo_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType, MS_PQ_Mode_Info *pstPQModeInfo); 1931 1932 void (* pq_deside_srctype_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, PQ_INPUT_SOURCE_TYPE enInputSourceType); 1933 1934 MS_BOOL (* pq_get_memyuvfmt_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, PQ_FOURCE_COLOR_FMT enFourceColor); 1935 1936 MS_BOOL (* pq_ioctl_ex)(PQ_XC_ID eXCID, PQ_WIN eWindow, MS_U32 u32Flag, void *pBuf, MS_U32 u32BufSize); 1937 }PQ_Function_Info; 1938 1939 typedef struct 1940 { 1941 MS_U32 u32ratio; 1942 MS_BOOL bADVMode; 1943 }PQ_HSD_SAMPLING_INFO; 1944 1945 typedef struct 1946 { 1947 PQ_INPUT_SOURCE_TYPE enPQSourceType; 1948 MS_PQ_Mode_Info stPQModeInfo; 1949 MS_U16 u16ratio; 1950 }PQ_ADC_SAMPLING_INFO; 1951 1952 //Display information 1953 typedef struct DLL_PACKED 1954 { 1955 MS_U32 VDTOT; //Output vertical total 1956 MS_U32 DEVST; //Output DE vertical start 1957 MS_U32 DEVEND;//Output DE Vertical end 1958 MS_U32 HDTOT;// Output horizontal total 1959 MS_U32 DEHST; //Output DE horizontal start 1960 MS_U32 DEHEND;// Output DE horizontal end 1961 MS_BOOL bInterlaceMode; 1962 MS_BOOL bYUVInput; 1963 } MS_XC_DST_DispInfo; 1964 1965 typedef enum 1966 { 1967 ///IP2 path. 1968 E_GOP_XCDST_IP2=0, 1969 1970 /// IP man path. 1971 E_GOP_XCDST_IP1_MAIN=1, 1972 1973 ///IP sub path. 1974 E_GOP_XCDST_IP1_SUB=2, 1975 1976 /// op1 main path. 1977 E_GOP_XCDST_OP1_MAIN=3, 1978 1979 MAX_GOP_XCDST_SUPPORT 1980 1981 } EN_GOP_XCDST_TYPE; 1982 1983 /// Set data mux to VE 1984 typedef enum 1985 { 1986 /// GOP mux0 to VE 1987 E_VOP_SEL_OSD_BLEND0, 1988 /// GOP mux1 to VE 1989 E_VOP_SEL_OSD_BLEND1, 1990 /// GOP mux2 to VE 1991 E_VOP_SEL_OSD_BLEND2, 1992 /// mux from XC MACE 1993 E_VOP_SEL_MACE_RGB, 1994 1995 E_VOP_SEL_OSD_NONE, 1996 /// Last GOP mux to VE 1997 E_VOP_SEL_OSD_LAST = 0x80, 1998 } EN_VOP_SEL_OSD_XC2VE_MUX; 1999 2000 // 3D info 2001 typedef enum 2002 { 2003 //range [0000 ~ 1111] reserved for hdmi 3D spec 2004 E_XC_3D_INPUT_FRAME_PACKING = 0x00, //0000 2005 E_XC_3D_INPUT_FIELD_ALTERNATIVE = 0x01, //0001 2006 E_XC_3D_INPUT_LINE_ALTERNATIVE = 0x02, //0010 2007 E_XC_3D_INPUT_SIDE_BY_SIDE_FULL = 0x03, //0011 2008 E_XC_3D_INPUT_L_DEPTH = 0x04, //0100 2009 E_XC_3D_INPUT_L_DEPTH_GRAPHICS_GRAPHICS_DEPTH = 0x05, //0101 2010 E_XC_3D_INPUT_TOP_BOTTOM = 0x06, //0110 2011 E_XC_3D_INPUT_SIDE_BY_SIDE_HALF = 0x08, //1000 2012 2013 E_XC_3D_INPUT_CHECK_BORAD = 0x09, //1001 2014 2015 //user defined 2016 E_XC_3D_INPUT_MODE_USER = 0x10, 2017 E_XC_3D_INPUT_MODE_NONE = E_XC_3D_INPUT_MODE_USER, 2018 E_XC_3D_INPUT_FRAME_ALTERNATIVE, 2019 E_XC_3D_INPUT_SIDE_BY_SIDE_HALF_INTERLACE, 2020 // optimize for format: in:E_XC_3D_INPUT_FRAME_PACKING, out:E_XC_3D_OUTPUT_TOP_BOTTOM,E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF 2021 E_XC_3D_INPUT_FRAME_PACKING_OPT, 2022 // optimize for format: in:E_XC_3D_INPUT_TOP_BOTTOM, out:E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF 2023 E_XC_3D_INPUT_TOP_BOTTOM_OPT, 2024 E_XC_3D_INPUT_NORMAL_2D, 2025 E_XC_3D_INPUT_NORMAL_2D_INTERLACE, 2026 E_XC_3D_INPUT_NORMAL_2D_INTERLACE_PTP, 2027 E_XC_3D_INPUT_SIDE_BY_SIDE_HALF_INTERLACE_OPT, 2028 E_XC_3D_INPUT_NORMAL_2D_HW, //for hw 2D to 3D use 2029 E_XC_3D_INPUT_PIXEL_ALTERNATIVE, 2030 } E_XC_3D_INPUT_MODE; 2031 2032 2033 typedef enum 2034 { 2035 E_XC_3D_OUTPUT_MODE_NONE, 2036 E_XC_3D_OUTPUT_LINE_ALTERNATIVE , 2037 E_XC_3D_OUTPUT_TOP_BOTTOM, 2038 E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF, 2039 E_XC_3D_OUTPUT_FRAME_ALTERNATIVE, //25-->50,30-->60,24-->48,50-->100,60-->120----FRC 1:2 2040 E_XC_3D_OUTPUT_FRAME_L, 2041 E_XC_3D_OUTPUT_FRAME_R, 2042 E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_NOFRC, //50->50, 60->60-------------------------------FRC 1:1 2043 E_XC_3D_OUTPUT_CHECKBOARD_HW, //for hw 2d to 3d use 2044 E_XC_3D_OUTPUT_LINE_ALTERNATIVE_HW, //for hw 2d to 3d use 2045 E_XC_3D_OUTPUT_PIXEL_ALTERNATIVE_HW, //for hw 2d to 3d use 2046 E_XC_3D_OUTPUT_FRAME_L_HW, //for hw 2d to 3d use 2047 E_XC_3D_OUTPUT_FRAME_R_HW, //for hw 2d to 3d use 2048 E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_HW, //for hw 2d to 3d use 2049 E_XC_3D_OUTPUT_TOP_BOTTOM_HW, //for hw 2d to 3d use, it based on E_XC_3D_OUTPUT_TOP_BOTTOM implement 2050 E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF_HW, //for hw 2d to 3d use, it based on E_XC_3D_OUTPUT_SIDE_BY_SIDE_HALF implement 2051 E_XC_3D_OUTPUT_FRAME_PACKING, 2052 E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_LLRR,//for 4k0.5k@240 3D 2053 E_XC_3D_OUTPUT_FRAME_ALTERNATIVE_LLRR_HW,//for HW 2Dto3D 4k0.5k@240 3D 2054 E_XC_3D_OUTPUT_TOP_TOP, 2055 E_XC_3D_OUTPUT_BOTTOM_BOTTOM, 2056 E_XC_3D_OUTPUT_LEFT_LEFT, 2057 E_XC_3D_OUTPUT_RIGHT_RIGHT, 2058 } E_XC_3D_OUTPUT_MODE; 2059 2060 typedef enum 2061 { 2062 E_XC_3D_OUTPUT_FI_MODE_NONE , 2063 E_XC_3D_OUTPUT_FI_1920x1080 , 2064 E_XC_3D_OUTPUT_FI_960x1080 , 2065 E_XC_3D_OUTPUT_FI_1920x540 , 2066 2067 E_XC_3D_OUTPUT_FI_1280x720 , 2068 } E_XC_3D_OUTPUT_FI_MODE; 2069 2070 typedef enum 2071 { 2072 E_XC_3D_AUTODETECT_SW, 2073 E_XC_3D_AUTODETECT_HW, 2074 E_XC_3D_AUTODETECT_HW_COMPATIBLE, 2075 E_XC_3D_AUTODETECT_MAX 2076 }E_XC_3D_AUTODETECT_METHOD; 2077 2078 typedef enum 2079 { 2080 E_XC_3D_PANEL_NONE, 2081 E_XC_3D_PANEL_SHUTTER, //240hz panel, which can process updown, leftright,vertical or horizontal line weave 2082 E_XC_3D_PANEL_PELLICLE, //120hz panel, which can only process horizontal line weave 2083 E_XC_3D_PANEL_4K1K_SHUTTER, //120hz 4K1K panel, which can process updown, leftright,vertical or horizontal line weave 2084 E_XC_3D_PANEL_MAX, 2085 } E_XC_3D_PANEL_TYPE; 2086 2087 //hw 2d to 3d para 2088 typedef struct __attribute__((packed)) 2089 { 2090 MS_U32 u32Hw2dTo3dPara_Version; 2091 MS_U16 u16Concave; 2092 MS_U16 u16Gain; 2093 MS_U16 u16Offset; 2094 MS_U16 u16ArtificialGain; 2095 MS_U16 u16EleSel; 2096 MS_U16 u16ModSel; 2097 MS_U16 u16EdgeBlackWidth; 2098 } MS_XC_3D_HW2DTO3D_PARA; 2099 2100 //detect 3d format para 2101 typedef struct DLL_PACKED 2102 { 2103 MS_U32 u32Detect3DFormatPara_Version; //version control, back compatible 2104 //////////////////obsolete field begin/////////////////////////////////////////////////////////////////////////////////////////////////////////// 2105 MS_U16 u16HorSearchRange; //the horizontal range for find the similar pixel at R image 2106 MS_U16 u16VerSearchRange; //the vertical range for find the similar pixel at R image 2107 MS_U16 u16GYPixelThreshold; //g/y pixel threshold for define the similar pixel 2108 MS_U16 u16RCrPixelThreshold; //r/cr pixel threshold for define the similar pixel 2109 MS_U16 u16BCbPixelThreshold; //b/cb pixel threshold for define the similar pixel 2110 MS_U16 u16HorSampleCount; //the horizontal sample count, the total checked pixel will be u16HorSampleCount*u16VerSampleCount 2111 MS_U16 u16VerSampleCount; //the vertical sample count, the total checked pixel will be u16HorSampleCount*u16VerSampleCount 2112 MS_U16 u16MaxCheckingFrameCount; //the max checking frame count 2113 MS_U16 u16HitPixelPercentage; //the percentage about hit pixel in one frame total checked pixel, for example: 70%, need set as 70 2114 //////////////////obsolete field end///////////////////////////////////////////////////////////////////////////////////////////////////////////// 2115 MS_BOOL bEnableOverscan; //detect 3d format for considering overscan shift 2116 } MS_XC_3D_DETECT3DFORMAT_PARA; 2117 2118 //define 3d fp info para 2119 typedef struct DLL_PACKED 2120 { 2121 MS_U32 u32FPInfoPara_Version; //version control, back compatible 2122 MS_U16 u16HBlank; //horizontal blank 2123 MS_BOOL bEnableUserSetting; //enable user setting 2124 } MS_XC_3D_FPINFO_PARA; 2125 2126 typedef enum 2127 { 2128 DBG_FPLL_MODE_DISABLE_ALL = 0, 2129 DBG_FPLL_MODE_DISABLE = 1, 2130 DBG_FPLL_MODE_ENABLE = 2, 2131 DBG_FPLL_MODE_MAX, 2132 }EN_FPLL_DBG_MODE;//For debug purpose only! 2133 2134 typedef enum 2135 { 2136 DBG_FPLL_FLAG_PHASELIMIT = 0, 2137 DBG_FPLL_FLAG_D5D6D7 = 1, 2138 DBG_FPLL_FLAG_IGAIN = 2, 2139 DBG_FPLL_FLAG_PGAIN = 3, 2140 DBG_FPLL_FLAG_INITSETSTEP = 4, 2141 DBG_FPLL_FLAG_INITSETDELAY= 5, 2142 DBG_FPLL_FLAG_MAX, 2143 }EN_FPLL_DBG_FLAG;//For debug purpose only! 2144 2145 typedef enum 2146 { 2147 E_FPLL_MODE_DISABLE_ALL = 0, /// Disable all current FPLL customer setting(then scaler will auto decide it) 2148 E_FPLL_MODE_DISABLE = 1, /// Disable the specified(by other function parameter) FPLL customer setting 2149 E_FPLL_MODE_ENABLE = 2, /// Enable the specified(by other function parameter) FPLL customer setting 2150 E_FPLL_MODE_MAX, 2151 }EN_FPLL_MODE; 2152 2153 typedef enum 2154 { 2155 E_FPLL_FLAG_PHASELIMIT = 0, ///Set customer setting of PHASE limit 2156 E_FPLL_FLAG_D5D6D7 = 1,///Set customer setting of D5D6D7 limit 2157 E_FPLL_FLAG_IGAIN = 2,///Set customer setting of IGAIN 2158 E_FPLL_FLAG_PGAIN = 3,///Set customer setting of PGAIN 2159 E_FPLL_FLAG_INITSETSTEP = 4, ///steps to set DCLK 2160 E_FPLL_FLAG_INITSETDELAY= 5, ///delay between steps when setting DCLK 2161 E_FPLL_FLAG_MAX, 2162 }EN_FPLL_FLAG; 2163 2164 typedef enum 2165 { 2166 E_MLOAD_UNSUPPORTED = 0, 2167 E_MLOAD_DISABLED = 1, 2168 E_MLOAD_ENABLED = 2, 2169 }MLOAD_TYPE; 2170 2171 typedef enum 2172 { 2173 E_MLCLIENT_MAIN_HDR = 0, 2174 2175 E_MLCLIENT_MAX, 2176 }EN_MLOAD_CLIENT_SELECT; 2177 2178 typedef enum 2179 { 2180 E_MLG_UNSUPPORTED = 0, 2181 E_MLG_DISABLED = 1, 2182 E_MLG_ENABLED = 2, 2183 }MLG_TYPE; 2184 2185 typedef enum 2186 { 2187 HDMI_SYNC_DE, 2188 HDMI_SYNC_HV, 2189 } E_HDMI_SYNC_TYPE; 2190 2191 typedef enum 2192 { 2193 MS_FRC_1_1 = 0, 2194 MS_FRC_1_2 = 1, 2195 MS_FRC_5_12 = 2, 2196 MS_FRC_2_5 = 3, 2197 MS_FRC_1_4 = 4, 2198 MS_FRC_1_3 = 5, 2199 2200 MS_FRC_2_1 = 8, 2201 MS_FRC_4_5 = 9, 2202 } MS_FRC_TYPE; 2203 2204 // scaler FRC table 2205 typedef struct __attribute__((packed)) 2206 { 2207 MS_U16 u16LowerBound; 2208 MS_U16 u16HigherBound; 2209 MS_U8 u8Padding; 2210 MS_U8 u8FRC_In; // ivs 2211 MS_U8 u8FRC_Out; // ovs 2212 MS_FRC_TYPE eFRC_Type; 2213 } SC_FRC_SETTING; 2214 2215 typedef enum 2216 { 2217 E_PQ_IOCTL_GET_HSD_SAMPLING, 2218 E_PQ_IOCTL_MAX, 2219 }E_PQ_IOCTL_FLAG; 2220 2221 2222 typedef enum 2223 { 2224 E_GET_PIXEL_RET_FAIL = 0, ///<Fail 2225 E_GET_PIXEL_RET_OK, ///<OK 2226 E_GET_PIXEL_RET_OUT_OF_RANGE, ///< out of range 2227 } E_APIXC_GET_PixelRGB_ReturnValue; 2228 2229 2230 typedef enum 2231 { 2232 E_XC_GET_PIXEL_STAGE_AFTER_DLC = 0x01, 2233 E_XC_GET_PIXEL_STAGE_PRE_GAMMA = 0x02, 2234 E_XC_GET_PIXEL_STAGE_AFTER_OSD = 0x03, 2235 E_XC_GET_PIXEL_STAGE_MAX = 0xFF, 2236 }EN_XC_GET_PIXEL_RGB_STAGE; 2237 2238 typedef struct DLL_PACKED 2239 { 2240 EN_XC_GET_PIXEL_RGB_STAGE enStage; 2241 MS_U16 u16x; 2242 MS_U16 u16y; 2243 MS_U32 u32r; 2244 MS_U32 u32g; 2245 MS_U32 u32b; 2246 }XC_Get_Pixel_RGB; 2247 2248 typedef struct DLL_PACKED 2249 { 2250 MS_U32 u32ReportPixelInfo_Version; ///<Input: Version of current structure. Please always set to "XC_REPORT_PIXELINFO_VERSION" as input 2251 MS_U16 u16ReportPixelInfo_Length; ///<Input: Length of this structure, u16ReportPixelInfo_Length=sizeof(MS_XC_REPORT_PIXELINFO) 2252 EN_XC_GET_PIXEL_RGB_STAGE enStage; ///<Input: Pixel info report stage 2253 MS_U16 u16RepWinColor; ///<Input:Report window Color 2254 MS_U16 u16XStart; ///<Input: X start location of report window 2255 MS_U16 u16XEnd; ///<Input: X end location of report window 2256 MS_U16 u16YStart; ///<Input: Y start location of report window 2257 MS_U16 u16YEnd; ///<Input: Y end location of report window 2258 MS_U16 u16RCrMin; ///<Output:R or Cr min value 2259 MS_U16 u16RCrMax; ///<Output:R or Cr max value 2260 MS_U16 u16GYMin; ///<Output:G or Y min value 2261 MS_U16 u16GYMax; ///<Output:G or Y max value 2262 MS_U16 u16BCbMin; ///<Output:B or Cb min value 2263 MS_U16 u16BCbMax; ///<Output:B or Cb max value 2264 MS_U32 u32RCrSum; ///<Output:R or Cr sum value 2265 MS_U32 u32GYSum; ///<Output:G or Y sum value 2266 MS_U32 u32BCbSum; ///<Output:B or Cb sum value 2267 MS_BOOL bShowRepWin; ///<Input: Show report window or not 2268 }MS_XC_REPORT_PIXELINFO; 2269 2270 // scaler interrupt sources 2271 typedef enum 2272 { 2273 // 0x00, first 4 bits are unused 2274 SC_INT_DIPW = 1, //DIPW write one frame done interrupt 2275 SC_INT_MEMSYNC_MAIN = 3, // interrupt of memory sync done 2276 SC_INT_START = 4, 2277 SC_INT_RESERVED1 = SC_INT_START, // before is SC_INT_TUNE_FAIL_P, FBL line buffer overrun/underrun 2278 // scaler dosen't have this interrupt now, 2279 2280 SC_INT_VSINT, // output Vsync interrupt, can select polarity with BK0_04[1] 2281 SC_INT_F2_VTT_CHG, // main window, HDMI mute or Vsync polarity changed, Vtt change exceed BK1_1D[11:8] 2282 SC_INT_F1_VTT_CHG, 2283 SC_INT_F2_VS_LOSE, // didn't received Vsync for a while or Vtt count BK1_1F[10:0] exceed max value 2284 SC_INT_F1_VS_LOSE, 2285 SC_INT_F2_JITTER, // H/V start/end didn't be the same with privous value, usually used in HDMI/DVI input 2286 SC_INT_F1_JITTER, 2287 SC_INT_F2_IPVS_SB, // input V sync interrupt, can select which edge to trigger this interrupt with BK0_04[0] 2288 SC_INT_F1_IPVS_SB, 2289 SC_INT_F2_IPHCS_DET, // input H sync interrupt 2290 SC_INT_F1_IPHCS_DET, 2291 2292 // 0x10 2293 SC_INT_PWM_RP_L_INT, // pwm rising edge of left frame 2294 SC_INT_PWM_FP_L_INT, // pwm falling edge of left frame 2295 SC_INT_F2_HTT_CHG, // Hsync polarity changed or Hperiod change exceed BK1_1D[5:0] 2296 SC_INT_F1_HTT_CHG, 2297 SC_INT_F2_HS_LOSE, // didn't received H sync for a while or Hperiod count BK1_20[13:0] exceed max value 2298 SC_INT_F1_HS_LOSE, 2299 SC_INT_PWM_RP_R_INT, // pwm rising edge of right frame 2300 SC_INT_PWM_FP_R_INT, // pwm falling edge of right frame 2301 SC_INT_F2_CSOG, // composite sync or SoG input signal type changed (for example, SoG signal from none -> valid, valid -> none) 2302 SC_INT_F1_CSOG, 2303 SC_INT_F2_RESERVED2, // scaler dosen't have this interrupt now, before is SC_INT_F2_ATS_READY 2304 SC_INT_F1_RESERVED2, // scaler dosen't have this interrupt now, before is SC_INT_F1_ATS_READY 2305 SC_INT_F2_ATP_READY, // auto phase ready interrupt 2306 SC_INT_F1_ATP_READY, 2307 SC_INT_F2_RESERVED3, // scaler dosen't have this interrupt now, before is SC_INT_F2_ATG_READY 2308 SC_INT_F1_RESERVED3, // scaler dosen't have this interrupt now, before is SC_INT_F1_ATG_READY 2309 2310 MAX_SC_INT, 2311 } SC_INT_SRC; 2312 2313 typedef enum 2314 { 2315 // 0x00, first 4 bits are unused 2316 XC_INT_RESERVED1 = 4, ///< scaler dosen't have this interrupt now 2317 XC_INT_VSINT, ///< output Vsync interrupt 2318 XC_INT_F2_VTT_CHG, ///< main window, HDMI mute or Vsync polarity changed, Vtt change exceed BK1_1D[11:8] 2319 XC_INT_F1_VTT_CHG, 2320 XC_INT_F2_VS_LOSE, ///< didn't received Vsync for a while or Vtt count BK1_1F[10:0] exceed max value 2321 XC_INT_F1_VS_LOSE, 2322 XC_INT_F2_JITTER, ///< H/V start/end didn't be the same with privous value, usually used in HDMI/DVI input 2323 XC_INT_F1_JITTER, 2324 XC_INT_F2_IPVS_SB, ///< input V sync interrupt 2325 XC_INT_F1_IPVS_SB, 2326 XC_INT_F2_IPHCS_DET, ///< input H sync interrupt 2327 XC_INT_F1_IPHCS_DET, 2328 2329 // 0x10 2330 XC_INT_PWM_RP_L_INT, ///< pwm rising edge of left frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 2331 XC_INT_PWM_FP_L_INT, ///< pwm falling edge of left frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 2332 XC_INT_F2_HTT_CHG, ///< Hsync polarity changed or Hperiod change exceed BK1_1D[5:0] 2333 XC_INT_F1_HTT_CHG, 2334 XC_INT_F2_HS_LOSE, ///< didn't received H sync for a while or Hperiod count BK1_20[13:0] exceed max value 2335 XC_INT_F1_HS_LOSE, 2336 XC_INT_PWM_RP_R_INT, ///< pwm rising edge of right frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 2337 XC_INT_PWM_FP_R_INT, ///< pwm falling edge of right frame, please use MDrv_XC_InterruptAvaliable() to check if avalible or not 2338 XC_INT_F2_CSOG, ///< composite sync or SoG input signal type changed (for example, SoG signal from none -> valid, valid -> none) 2339 XC_INT_F1_CSOG, 2340 XC_INT_F2_RESERVED2, ///< scaler dosen't have this interrupt now 2341 XC_INT_F1_RESERVED2, 2342 XC_INT_F2_ATP_READY, ///< auto phase ready interrupt 2343 XC_INT_F1_ATP_READY, 2344 XC_INT_F2_RESERVED3, ///< scaler dosen't have this interrupt now 2345 XC_INT_F1_RESERVED3, 2346 } XC_INT_SRC; 2347 2348 /// OP2 Video/GOP layer switch 2349 typedef enum 2350 { 2351 E_VOP_LAYER_VIDEO_MUX1_MUX2 = 0, ///<0: Video->GOP1->GOP2 (GOP2 is one pipe later than GOP1) 2352 E_VOP_LAYER_FRAME_VIDEO_MUX1_MUX2, ///<1: FrameColor->Video->GOP1->GOP2 (GOP1/GOP2 smae pipe) 2353 E_VOP_LAYER_FRAME_VIDEO_MUX2_MUX1, ///<2: FrameColor->Video->GOP2->GOP1 (GOP1/GOP2 smae pipe) 2354 E_VOP_LAYER_FRAME_MUX1_VIDEO_MUX2, ///<3: FrameColor->GOP1->Video->GOP2 (GOP1/GOP2 smae pipe) 2355 E_VOP_LAYER_FRAME_MUX1_MUX2_VIDEO, ///<4: FrameColor->GOP1->GOP2->Video (GOP1/GOP2 smae pipe) 2356 E_VOP_LAYER_FRAME_MUX2_VIDEO_MUX1, ///<5: FrameColor->GOP2->Video->GOP1 (GOP1/GOP2 smae pipe) 2357 E_VOP_LAYER_FRAME_MUX2_MUX1_VIDEO, ///<6: FrameColor->GOP2->GOP1->Video (GOP1/GOP2 smae pipe) 2358 2359 E_VOP_LAYER_VIDEO_MUX1_MUX2_MUX3_MUX4 = E_VOP_LAYER_VIDEO_MUX1_MUX2, /// Video->GOP1->GOP2->GOP3->GOP4 (GOP2 is one pipe later than GOP1) 2360 E_VOP_LAYER_FRAME_VIDEO_MUX1_MUX2_MUX3_MUX4 = 7, /// FrameColor->Video->GOP1->GOP2->GOP3->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) 2361 E_VOP_LAYER_FRAME_MUX1_VIDEO_MUX2_MUX3_MUX4 = E_VOP_LAYER_FRAME_MUX1_VIDEO_MUX2, /// FrameColor->GOP1->Video->GOP2->GOP3->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) 2362 E_VOP_LAYER_FRAME_MUX1_MUX2_VIDEO_MUX3_MUX4 = E_VOP_LAYER_FRAME_MUX1_MUX2_VIDEO, /// FrameColor->GOP1->GOP2->Video->GOP3->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) 2363 E_VOP_LAYER_FRAME_MUX1_MUX2_MUX3_VIDEO_MUX4 = 8, /// FrameColor->GOP1->GOP2->GOP3->Video->GOP4 (GOP1/GOP2/GOP3/GOP4 smae pipe) 2364 E_VOP_LAYER_FRAME_MUX1_MUX2_MUX3_MUX4_VIDEO = 9, 2365 2366 E_VOP_LAYER_RESERVED, 2367 } E_VOP_OSD_LAYER_SEL; 2368 2369 /// OP2VOP de select 2370 typedef enum 2371 { 2372 E_OP2VOPDE_MAINWINDOW = 0, ///<0: capture main display window, no osd 2373 E_OP2VOPDE_SUBWINDOW, ///<1: capture sub display window, no osd 2374 E_OP2VOPDE_WHOLEFRAME, ///<2: Whole frame of panel DE, no osd 2375 E_OP2VOPDE_WHOLEFRAME_WITHOSD, ///<3: Whole frame of panel DE, with osd 2376 } E_OP2VOP_DE_SEL; 2377 2378 typedef void (*SC_InterruptCb) (SC_INT_SRC enIntNum, void *pParam); ///< Interrupt callback function 2379 2380 2381 //Define Output Frame control 2382 typedef struct DLL_PACKED 2383 { 2384 MS_U32 u32XC_version; ///<Version of current structure. 2385 MS_U16 u16InVFreq; ///<input V frequency 2386 MS_U16 u16OutVFreq; ///<output V frequncy 2387 MS_BOOL bInterlace; ///<whether it's interlace 2388 2389 }XC_OUTPUTFRAME_Info; 2390 2391 /// Define XC Init MISC 2392 /// please enum use BIT0 = 1, BIT1 = 2, BIT3 = 4 2393 typedef enum 2394 { 2395 E_XC_INIT_MISC_A_NULL = 0, 2396 E_XC_INIT_MISC_A_IMMESWITCH = 1, 2397 E_XC_INIT_MISC_A_IMMESWITCH_DVI_POWERSAVING = 2, 2398 E_XC_INIT_MISC_A_DVI_AUTO_EQ = 4, 2399 E_XC_INIT_MISC_A_FRC_INSIDE = 8, 2400 2401 E_XC_INIT_MISC_A_OSD_TO_HSLVDS = 0x10, 2402 E_XC_INIT_MISC_A_FRC_INSIDE_60HZ = 0x20, // for 60Hz FRC case 2403 E_XC_INIT_MISC_A_FRC_INSIDE_240HZ = 0x40, // for 240Hz FRC case 2404 E_XC_INIT_MISC_A_FRC_INSIDE_4K1K_120HZ = 0x80, // for 4K1K 120Hz FRC case 2405 2406 E_XC_INIT_MISC_A_ADC_AUTO_SCART_SV = 0x100, // Support S-Video Auto Switch on SCART 2407 E_XC_INIT_MISC_A_FRC_INSIDE_KEEP_OP_4K2K = 0x200, // always keep OP timing as 4K2K 2408 E_XC_INIT_MISC_A_FRC_INSIDE_4K_HALFK_240HZ = 0x400, // for 4K 0.5K 240Hz FRC case 2409 E_XC_INIT_MISC_A_FCLK_DYNAMIC_CONTROL = 0x800, // for Dynamic FCLK control 2410 2411 E_XC_INIT_MISC_A_SKIP_UC_DOWNLOAD = 0x1000, // for iframe case skip UC 2412 E_XC_INIT_MISC_A_SKIP_VIP_PEAKING_CONTROL = 0x2000, // for skipping VIP peaking control related unnecesary timing change 2413 E_XC_INIT_MISC_A_FAST_GET_VFREQ = 0x4000,//for get freq fast 2414 E_XC_INIT_MISC_A_LEGACY_MODE = 0x8000, // for monaco mode 2415 E_XC_INIT_MISC_A_SAVE_MEM_MODE = 0x10000, // for muji save memory 2416 #if defined(UFO_PUBLIC_HEADER_500_3) 2417 E_XC_INIT_MISC_A_IPMUX_HDR_MODE = 0x20000, // for Kano IPMux HDR 2418 #else 2419 E_XC_INIT_MISC_A_FRC_DUAL_MIU = 0x20000, // for Manhattan FRC MEMC dual-MUU 2420 #endif 2421 2422 E_XC_INIT_MISC_A_IS_ANDROID = 0x40000, // android flag 2423 E_XC_S_DISPLAY_INITMISC_A_ENABLE_CVBSOX_ADCX = 0x80000, //enable ADCX code flow 2424 2425 #if defined(UFO_PUBLIC_HEADER_500_3) 2426 //empty 2427 #else 2428 E_XC_INIT_MISC_A_IPMUX_HDR_MODE = 0x100000, // for Kano IPMux HDR 2429 #endif 2430 } XC_INIT_MISC_A; 2431 2432 typedef enum 2433 { 2434 E_XC_INIT_MISC_B_NULL = 0, 2435 E_XC_INIT_MISC_B_PQ_SKIP_PCMODE_NEWFLOW = 1, 2436 E_XC_INIT_MISC_B_SKIP_SR = 2, 2437 E_XC_INIT_MISC_B_HDMITX_ENABLE = 4, 2438 E_XC_INIT_MISC_B_DRAM_DDR4_MODE = 8, 2439 E_XC_INIT_MISC_B_HDMITX_FREERUN_UCNR_ENABLE = 0x10, //Enable UC in SOC+Raptor output freerun case 2440 E_XC_INIT_MISC_B_DISABLE_SUPPORT_4K2K = 0x20, 2441 } XC_INIT_MISC_B; 2442 2443 typedef enum 2444 { 2445 E_XC_INIT_MISC_C_NULL = 0, 2446 } XC_INIT_MISC_C; 2447 2448 2449 typedef enum 2450 { 2451 E_XC_INIT_MISC_D_NULL = 0, 2452 } XC_INIT_MISC_D; 2453 2454 typedef enum 2455 { 2456 E_XC_PQ_4K_PATH = 0, 2457 #if defined(UFO_PUBLIC_HEADER_212) ||defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_700) 2458 E_XC_PQ_UFSC_4K_PATH = 1, 2459 #endif 2460 E_XC_PQ_PATH_MAX, 2461 }E_XC_PQ_Path_Type; 2462 2463 /// Define the initial MISC for XC 2464 typedef struct DLL_PACKED 2465 { 2466 MS_U32 u32XCMISC_version; ///<Version of current structure. 2467 MS_U32 u32MISC_A; 2468 MS_U32 u32MISC_B; 2469 MS_U32 u32MISC_C; 2470 MS_U32 u32MISC_D; 2471 } XC_INITMISC; 2472 2473 typedef enum 2474 { 2475 E_XC_FLOCK_DIV_OFF = 0, 2476 E_XC_FLOCK_DIV_ON, 2477 E_XC_FLOCK_FPLL_ON, 2478 2479 }E_XC_FLOCK_TYPE; 2480 2481 typedef struct __attribute__((packed)) 2482 { 2483 // memory 2484 MS_PHY u32FRC_MEMC_MemAddr; 2485 MS_PHY u32FRC_MEMC_MemSize; 2486 MS_PHY u32FRC_OD_MemAddr; 2487 MS_PHY u32FRC_OD_MemSize; 2488 MS_PHY u32FRC_LD_MemAddr; 2489 MS_PHY u32FRC_LD_MemSize; 2490 MS_PHY u32FRC_ME1_MemAddr; 2491 MS_PHY u32FRC_ME1_MemSize; 2492 MS_PHY u32FRC_ME2_MemAddr; 2493 MS_PHY u32FRC_ME2_MemSize; 2494 MS_PHY u32FRC_2D3D_Render_MemAddr; 2495 MS_PHY u32FRC_2D3D_Render_MemSize; 2496 MS_PHY u32FRC_2D3D_Render_Detection_MemAddr; 2497 MS_PHY u32FRC_2D3D_Render_Detection_MemSize; 2498 MS_PHY u32FRC_Halo_MemAddr; 2499 MS_PHY u32FRC_Halo_MemSize; 2500 MS_PHY u32FRC_R2_MemAddr; 2501 MS_PHY u32FRC_R2_MemSize; 2502 MS_PHY u32FRC_ADL_MemAddr; 2503 MS_PHY u32FRC_ADL_MemSize; 2504 2505 MS_PHY u32FRC_FrameSize; 2506 2507 MS_PHY u16FB_YcountLinePitch; 2508 MS_U16 u16PanelWidth; 2509 MS_U16 u16PanelHeigh; 2510 MS_U8 u8FRC3DPanelType; 2511 MS_U8 u83Dmode; 2512 MS_U8 u8IpMode; 2513 MS_U8 u8MirrorMode; 2514 MS_U8 u83D_FI_out; 2515 MS_BOOL bFRC; 2516 2517 } FRC_INFO_t, *PFRC_INFO_t; 2518 2519 typedef struct __attribute__((packed)) 2520 { 2521 MS_U32 u32XC_PREINIT_version; ///<Version of current structure. 2522 // FRC control info 2523 FRC_INFO_t FRCInfo; 2524 2525 MS_U16 u16VTrigX; 2526 MS_U16 u16VTrigY; 2527 2528 /////////////////////////////////////////////// 2529 // panel timing spec. 2530 /////////////////////////////////////////////// 2531 // sync related 2532 MS_U8 u8PanelHSyncWidth; ///< VOP_01[7:0], PANEL_HSYNC_WIDTH 2533 MS_U8 u8PanelHSyncBackPorch; ///< PANEL_HSYNC_BACK_PORCH, no register setting, provide value for query only 2534 2535 ///< not support Manuel VSync Start/End now 2536 ///< VOP_02[10:0] VSync start = Vtt - VBackPorch - VSyncWidth 2537 ///< VOP_03[10:0] VSync end = Vtt - VBackPorch 2538 MS_U8 u8PanelVSyncWidth; ///< define PANEL_VSYNC_WIDTH 2539 MS_U8 u8PanelVSyncBackPorch; ///< define PANEL_VSYNC_BACK_PORCH 2540 2541 } XC_PREINIT_INFO_t, *p_XC_PREINIT_INFO_t; 2542 2543 typedef struct __attribute__((packed)) 2544 { 2545 // memory 2546 MS_U64 u64FRC_IPM_L_MemAddr; 2547 MS_U64 u64FRC_IPM_L_MemSize; 2548 MS_U64 u64FRC_IPM_R_MemAddr; 2549 MS_U64 u64FRC_IPM_R_MemSize; 2550 MS_U64 u64FRC_PQ_MemAddr; 2551 MS_U64 u64FRC_PQ_MemSize; 2552 } XC_FRC_ADDRESS_INFO, *PXC_FRC_ADDRESS_INFO; 2553 2554 typedef enum 2555 { 2556 E_XC_HDMITX_COLORDEPTH_8BIT, // color depth: 8bits 2557 E_XC_HDMITX_COLORDEPTH_10BIT, // color depth: 10bits 2558 E_XC_HDMITX_COLORDEPTH_12BIT, // color depth: 12bits 2559 E_XC_HDMITX_COLORDEPTH_16BIT, // color depth: 16bits 2560 E_XC_HDMITX_COLORDEPTH_MAX, 2561 } EN_XC_HDMITX_COLORDEPTH; 2562 2563 typedef enum 2564 { 2565 E_XC_PREINIT_NULL = 0x00, 2566 E_XC_PREINIT_FRC = 0x01, 2567 E_XC_PREINIT_FRC_3D_TYPE = 0x02, 2568 E_XC_PREINIT_FRC_ADDRESS = 0x03, 2569 E_XC_PREINIT_HDMITX_COLORDEPTH = 0x04, 2570 E_XC_PREINIT_NUM, 2571 2572 }E_XC_PREINIT_t; 2573 2574 typedef enum 2575 { 2576 MIRROR_NORMAL, 2577 MIRROR_H_ONLY, 2578 MIRROR_V_ONLY, 2579 MIRROR_HV, 2580 MIRROR_MAX, 2581 } MirrorMode_t; 2582 2583 typedef enum 2584 { 2585 E_XC_MEMORY_IP_READ_REQUEST, ///< memory request for IP read 2586 E_XC_MEMORY_IP_WRITE_REQUEST, ///< memory request for IP write 2587 E_XC_MEMORY_OP_READ_REQUEST, ///< memory request for OP read 2588 E_XC_MEMORY_OP_WRITE_REQUEST, ///< memory request for OP write 2589 E_XC_MEMORY_REQUEST_MAX, ///< Invalid request 2590 } E_XC_MEMORY_REQUEST_TYPE; 2591 2592 /// Osd Index 2593 typedef enum 2594 { 2595 E_XC_OSD_0 = 0, ///< osd0 2596 E_XC_OSD_1 = 1, ///< osd1 2597 E_XC_OSD_2 = 2, ///< osd2 2598 E_XC_OSD_3 = 3, ///< osd3 2599 E_XC_OSD_4 = 4, ///< osd3 2600 E_XC_OSD_NUM, 2601 } E_XC_OSD_INDEX; 2602 2603 /// Osd Index 2604 typedef enum 2605 { 2606 E_XC_OSD_BlENDING_MODE0 = 0, ///< a*OSD + (1-a)*Video 2607 E_XC_OSD_BlENDING_MODE1 = 1, ///< OSD + (1-a)*Video 2608 E_XC_OSD_BlENDING_TYPE_NUM, 2609 } E_XC_OSD_BlENDING_TYPE; 2610 2611 /// Scaling type 2612 typedef enum 2613 { 2614 E_XC_PRE_SCALING = 0, 2615 E_XC_POST_SCALING, 2616 E_XC_BOTH_SCALING, 2617 }E_XC_SCALING_TYPE; 2618 2619 /// HV Vector type 2620 typedef enum 2621 { 2622 E_XC_H_VECTOR = 0, 2623 E_XC_V_VECTOR, 2624 E_XC_HV_VECTOR, 2625 }E_XC_VECTOR_TYPE; 2626 2627 /// Define MCDI buffer type 2628 typedef enum 2629 { 2630 E_XC_MCDI_ME1 = 0, ///< Main MDCI ME1 2631 E_XC_MCDI_ME2 = 1, ///< Main MDCI ME2 2632 E_XC_MCDI_BOTH, ///< Main MDCI ME1+ME2 2633 E_XC_MCDI_SUB_ME1, ///< Sub MDCI ME1 2634 E_XC_MCDI_SUB_ME2, ///< Sub MDCI ME2 2635 E_XC_MCDI_SUB_BOTH, ///< Sub MDCI ME1+ME2 2636 E_XC_MCDI_MAX, 2637 }E_XC_MCDI_TYPE; 2638 2639 typedef struct 2640 { 2641 MS_U8 p1; 2642 MS_U8 p2; 2643 MS_U8 p3; 2644 MS_U8 p4; 2645 MS_U8 p5; 2646 MS_U8 p6; 2647 MS_U8 p7; 2648 MS_U8 p8; 2649 } FRC_R2_CMD_PARAMETER_t, *p_FRC_R2_CMD_PARAMETER_t; 2650 2651 typedef enum 2652 { 2653 E_XC_FRC_MB_CMD_NONE = 0x00, 2654 E_XC_FRC_MB_CMD_TEST = 0x01, // Print parameter 2655 E_XC_FRC_MB_CMD_GET_SW_VERSION = 0x02, // ParaCnt=0, return 2 Byte, P0=Main, P1=Minor 2656 E_XC_FRC_MB_CMD_GET_CMD_VERSION = 0x03, // ParaCnt=0, return 2 Byte, P0=Low byte, P1=High byte 2657 E_XC_FRC_MB_CMD_INIT = 0x10, // ParaCnt=5, P0 = Panel 3D type(0=2D, 1=passive, 2=active, 3=PDP) 2658 // P1 = Panel max V Freq, 60/120/240, but 240 Hz is not supported 2659 // P2 = LocalDimming panel type, (0=LG32inch_LR10, 1=LG37inch_LR10, 2=LG42inch_LR16, 3=LG47inch_LR16, 4=LG55inch_LR16, 2660 // 5=TOSHIBA_LR16, 6=TOSHIBA_TB16, 8=LG50inchCinema_TB32, 9=LG60inchCinema_TB32, A=LG47inch_Direct72, B=LG55inch_Direct96, C=LG72inch_Direct480) 2661 // P3 = ChipRevision (0=U01, 1=U02, 2=U03, etc.) 2662 // P4 = Is60HzPackage (0=FALSE, 1=TRUE) 2663 E_XC_FRC_MB_CMD_SET_TIMING = 0x11, // ParaCnt=2, P0 = Input V Freq, P1 = Output V Freq 2664 E_XC_FRC_MB_CMD_SET_INPUT_FRAME_SIZE = 0x12, // ParaCnt=4, P0 = Width[15:8], P1 = width[7:0], P2 = height[15:8], P3 = height[7:0] 2665 E_XC_FRC_MB_CMD_SET_OUTPUT_FRAME_SIZE = 0x13,// ParaCnt=4, P0 = Width[15:8], P1 = width[7:0], P2 = height[15:8], P3 = height[7:0] 2666 E_XC_FRC_MB_CMD_SET_INPUT_3D_FORMAT = 0x14, // ParaCnt=2, P0 = input 3D format(0=2D, 1=Side-by-side, 2=Top-Down, 3=Check-Board, 4=Frame-interleave, 6=Line alternative, 7=Frame-packing) 2667 // P1 = 3DModeConfig(0=Normal, 1=L/R Swap, 2=L-Only, 3=R-Only) 2668 E_XC_FRC_MB_CMD_SET_3D_DEPTH_OFFSET = 0x15, // ParaCnt=2, P0 = Enable3DDepthOffset(0=Disable, 1=Enable) 2669 // P1 = 3DDepthOffset(0~255) 2670 E_XC_FRC_MB_CMD_SET_FPLL_LOCK_DONE = 0x16, // ParaCnt=1, P0 = FPLL lock done(0: free run or not locked yet, 1: Locked) 2671 E_XC_FRC_MB_CMD_SET_MFC_MDOE = 0x20, // ParaCnt=3, P0 = MFCMode(0=ff, 1=Low, 2=Mid, 3=High, 4=User, 5=55 pull down, 6=64 pull down) 2672 // P1 = DeJudderLevel(0~10) [for User mode only] 2673 // P2 = DeBlurLevel(0~10) [for User mode only] 2674 E_XC_FRC_MB_CMD_SET_MFC_DEMO_MODE = 0x21, // ParaCnt=1, P0 = DemoModeEnable(0=Disable,1=Enable) 2675 E_XC_FRC_MB_CMD_SET_MFC_LOW_BANDWIDTH = 0x23, // ParaCnt=1, P0 = MEMC low badnwidth switch(0 :off, 1 on) 2676 E_XC_FRC_MB_CMD_SET_MFC_WAIT_TODO = 0x24, // ParaCnt=1, P0 = MEMC wait to do switch(0: off, 1: on) , P1 = Frame Number 2677 E_XC_FRC_MB_CMD_SET_LOCAL_DIMMING_MODE = 0x30, // ParaCnt=1, P0 = LocalDimmingMode(0=Off, 1=Low, 2=Mid, 3=High, 4=Demo) 2678 E_XC_FRC_MB_CMD_SET_2D_TO_3D_MODE = 0x40, // ParaCnt=5, P0 = 2D to 3D ConversionMode(0=Disable, 1=Enable) 2679 // P1 = 2D to 3D Depth Gain(0~31) 2680 // P2 = 2D to 3D Depth Offset(0~127) 2681 // P3 = Artificial Gain(0~15) 2682 // P4 = L/R Swap (0=Normal, 1=L/R Swap) 2683 ///* the value is not decided yet 2684 E_XC_FRC_MB_CMD_SET_PWM_ENABLE = 0x50, // ParaCnt=1, P0 = PWM Enable(0=Disable, 1=Enable) 2685 E_XC_FRC_MB_CMD_SET_PWM_DUTY_PHASE = 0x51, // ParaCnt=6, P0 = PWM No.(0, 1, 3) 2686 // P1 P2 = PWMX_DutyPercentX100(0~65536) 2687 // P3 P4 = PWMX_360DegreeX100(0~65536) 2688 // P5 = PWMX_Polarity(0=not invert, 1=invert) 2689 E_XC_FRC_MB_CMD_SET_PWM_FREQ = 0x52, // ParaCnt=4, P0 = PWM No.(0, 1, 3) 2690 // P1 = PWMX_FreqMul 2691 // P2 = PWMX_FreqDiv 2692 // P3 = PWMX_VsorHsRST 2693 // P4 = PWMX_SyncRstCnt 2694 E_XC_FRC_MB_CMD_SET_FORCE_PWM = 0x53, // ParaCnt=0 2695 E_XC_FRC_MB_CMD_SET_IR_EMMITER_LR_SHIFT = 0x54, // ParaCnt=3, P0 = Select the CMD(0=Lo, 1=Lc, 2=Ro, 3=Rc) 2696 // P2 P1= Pulse time shift(0~65536) 2697 E_XC_FRC_MB_CMD_SET_IR_EMMITER_LR_MODE = 0x55, // ParaCnt=1, P0 = CMD Shift(0=Lo Lc, 1=Lc Ro, 2=Ro Rc, 3=Rc Lo) 2698 /* 2699 E_XC_FRC_MB_CMD_SET_IR_EMMITER_LR_MODE = 0x55, // ParaCnt=4, P0 = Action Pattern Selection(0=Action Pattern 1, 1=Action Pattern 2) 2700 // P1 = L frame CMD(0=Lo Lc, 1=Lc Ro, 2=Ro Rc, 3=Rc Lo for Pattern 1; 0=Lo Rc, 1=Rc Ro, 2=Ro Lc, 3=Lc Lo for Pattern 2) 2701 // P2 = First CMD shift(0~255) 2702 // P3 = Second CMD shift(0~255) 2703 */ 2704 /* 2705 E_XC_FRC_MB_CMD_SET_PWM_CMD_MODE = 0x56, // ParaCnt=4, P0 = Action Pattern Selection(0=Action Pattern 1, 1=Action Pattern 2) 2706 // P1 = L frame CMD(0=Lo Lc, 1=Lc Ro, 2=Ro Rc, 3=Rc Lo for Pattern 1; 0=Lo Rc, 1=Rc Ro, 2=Ro Lc, 3=Lc Lo for Pattern 2) 2707 // P2 = First CMD shift(0~255) 2708 // P3 = Second CMD shift(0~255) 2709 */ 2710 } E_XC_FRC_MAILBOX_CMD; 2711 2712 //LD 2713 2714 typedef enum 2715 { 2716 E_LD_PANEL_LG32inch_LR10 = 0x0, 2717 E_LD_PANEL_LG37inch_LR10 = 0x1, 2718 E_LD_PANEL_LG42inch_LR16 = 0x2, 2719 E_LD_PANEL_LG47inch_LR16 = 0x3, 2720 E_LD_PANEL_LG55inch_LR16 = 0x4, 2721 E_LD_PANEL_LG55inch_LR12 = 0x5, 2722 E_LD_PANEL_CMO42inch_LR16 = 0x6, 2723 E_LD_PANEL_LG50inch_4K2K_VB1 = 0x7, 2724 E_LD_PANEL_DEFAULT, 2725 E_LD_PANEL_NUMS, 2726 }EN_LD_PANEL_TYPE; 2727 2728 typedef enum 2729 { 2730 E_LD_MODE_OFF = 0, 2731 E_LD_MODE_LOW = 1, 2732 E_LD_MODE_MID = 2, 2733 E_LD_MODE_HIGH = 3, 2734 }EN_LD_MODE; 2735 2736 //parameters for detecting nine lattice 2737 typedef struct DLL_PACKED 2738 { 2739 MS_U16 u16PixelStep; // distance between sample points 2740 MS_U8 u8ColorThreshold; // max color difference 2741 MS_U8 u8TryTimes; // max times for detecting 2742 MS_U16 u16LinearDiff; // difference for every 3 lattice in a line 2743 }ST_DETECTNL_PARA; 2744 2745 #define FRC_PATHCTRL_ALLOFF (0x0000) 2746 #define FRC_PATHCTRL_OP2COLORMATRIX (0x0001) 2747 #define FRC_PATHCTRL_OP2CSCDITHER (0x0002) 2748 #define FRC_PATHCTRL_OP2BRIGHTNESS (0x0004) 2749 #define FRC_PATHCTRL_OP2CONTRAST (0x0008) 2750 #define FRC_PATHCTRL_OP2NOISEROUND (0x0010) 2751 2752 // OSDC TIMING GEN 2753 typedef struct 2754 { 2755 MS_U16 u16OC_Tgen_HTotal; 2756 MS_U16 u16OC_Tgen_VTotal; 2757 2758 MS_U16 u16OC_Tgen_Hsync_Start; 2759 MS_U16 u16OC_Tgen_Hsync_End; 2760 MS_U16 u16OC_Tgen_HframDE_Start; 2761 MS_U16 u16OC_Tgen_HframDE_End; 2762 2763 MS_U16 u16OC_Tgen_Vsync_Start; 2764 MS_U16 u16OC_Tgen_Vsync_End; 2765 MS_U16 u16OC_Tgen_VframDE_Start; 2766 MS_U16 u16OC_Tgen_VframDE_End; 2767 }MS_XC_OSDC_TGEN_INFO; 2768 2769 // OSDC MISC Control 2770 typedef struct 2771 { 2772 MS_BOOL bOC_ClK_En; 2773 MS_BOOL bOC_Mixer_Bypass_En; 2774 MS_BOOL bOC_Mixer_InvAlpha_En; 2775 MS_BOOL bOC_Mixer_Hsync_Vfde_Out; // 1:hs_out = hs&vfde 2776 MS_BOOL bOC_Mixer_Hfde_Vfde_Out; // 1:hs_out = de(hfde)&vfde 2777 MS_U16 u16OC_Lpll_type; 2778 MS_U8 u8OC_OutputFormat; // output bit order 2779 }MS_XC_OSDC_CTRL_INFO; 2780 2781 typedef enum 2782 { 2783 E_XC_OSDC_TGEN_MANUAL = 0, 2784 E_XC_OSDC_TGEN_1366x768, 2785 E_XC_OSDC_TGEN_1920x1080, 2786 E_XC_OSDC_TGEN_3840x2160, 2787 E_XC_OSDC_TGEN_3840x1080, 2788 2789 E_XC_OSDC_TGEN_MAX, 2790 }E_XC_OSDC_TGEN_Type; 2791 2792 typedef enum 2793 { 2794 E_XC_OSDC_INIT = 0, 2795 E_XC_OSDC_CTRL_TGEN, 2796 E_XC_OSDC_CTRL_MISC, 2797 E_XC_OSDC_CTRL_OUTPUT_FORMAT, 2798 }E_XC_OSDC_CTRL_TYPE; 2799 2800 //OSDC Display information 2801 typedef struct DLL_PACKED 2802 { 2803 MS_U32 ODSC_DISPInfo_Version; ///<Version of current structure. Please always set to "u32Osdc_dispinfo_Version" as input 2804 2805 MS_U32 VDTOT; //Output vertical total 2806 MS_U32 DEVST; //Output DE Vertical start 2807 MS_U32 DEVEND; //Output DE Vertical end 2808 MS_U32 HDTOT; // Output horizontal total 2809 MS_U32 DEHST; //Output DE horizontal start 2810 MS_U32 DEHEND; // Output DE horizontal end 2811 2812 MS_U32 SYNCHST; 2813 MS_U32 SYNCHEND; 2814 MS_U32 SYNCVST; 2815 MS_U32 SYNCVEND; 2816 2817 MS_BOOL bCLK_EN; // OUTPUT ENABLE 2818 MS_BOOL bMIXER_BYPASS_EN; // MIXER BYPASS ENABLE 2819 MS_BOOL bMIXER_INVALPHA_EN; 2820 MS_BOOL bMIXER_HSTVFDEOUT_EN;// 1:hs_out = hs&vfde 2821 MS_BOOL bMIXER_HFDEVFDEOUT_EN;// 1:hs_out = de(hfde)&vfde 2822 2823 } MS_OSDC_DST_DispInfo; 2824 2825 //select the input for bypass mode. 2826 typedef enum 2827 { 2828 E_XC_BYPASS_HDMI = 0, 2829 E_XC_BYPASS_DC_MAIN, 2830 E_XC_BYPASS_DC_SUB, 2831 }E_XC_BYPASS_InputSource; 2832 2833 2834 // For HW internal test pattern 2835 typedef enum 2836 { 2837 E_XC_OP1_PATGEN_DISP_LB_MODE, // pattern gen on display line buffer, can't support post-sclaing 2838 E_XC_OP1_PATGEN_OPM_MODE, // pattern gen before post scaling engine, can support post-scaling, but not implement now 2839 }EN_XC_OP1_PATGEN_MODE; 2840 2841 typedef enum{ 2842 E_XC_OP1_PATTERN_OFF = 0, 2843 E_XC_OP1_WB_PATTERN, // 1: 2844 E_XC_OP1_PURE_RED_PATTERN, // 2: red 2845 E_XC_OP1_PURE_GREEN_PATTERN, // 3: green 2846 E_XC_OP1_PURE_BLUE_PATTERN, // 4: blue 2847 E_XC_OP1_PURE_WHITE_PATTERN, // 5: white 2848 E_XC_OP1_PURE_BLACK_PATTERN, // 6: black 2849 E_XC_OP1_PURE_GREY_PATTERN, // 7: gray 2850 E_XC_OP1_PURE_COLOR_V_BAR_PATTERN, // 8: vertical color-bar 2851 E_XC_OP1_PURE_COLOR_H_BAR_PATTERN, // 9: horizontal color-bar 2852 E_XC_OP1_PURE_GREY_BAR_16_PATTERN, // 10: 16 vertical gray-bar 2853 E_XC_OP1_PURE_GREY_BAR_32_PATTERN, // 11: 32 vertical gray-bar 2854 E_XC_OP1_PURE_GREY_BAR_64_PATTERN, // 12: 64 vertical gray-bar 2855 E_XC_OP1_PURE_GREY_RGB_32_PATTERN, // 13: 32 vertical 4 color bar 2856 E_XC_OP1_PURE_RGB_CHECKERBOARD_PATTERN, // 14: 3x3 checkerboard R/B/G 2857 E_XC_OP1_DOAFADE_GRAY_PATTERN, // 15: dotfade gary 2858 E_XC_OP1_CALIBRATION_COLOR_DOTFADE_PATTERN, // 16: checkerboard + dotfade gary 2859 E_XC_OP1_CALIBRATION_PATTERN, // 17: checkerboard 2860 E_XC_OP1_PATTERN_1, // 18 2861 E_XC_OP1_PATTERN_2, // 19: 2862 E_XC_OP1_PATTERN_3, // 20: same as pattern2, but not full screen 2863 E_XC_OP1_3D_PATTERN, // 21: side-by-side, if enable 3D effect, can see the word "3D" 2864 E_XC_OP1_PURE_RED_100IRE_PATTERN, // 22: red 2865 E_XC_OP1_PURE_GREEN_100IRE_PATTERN, // 23: green 2866 E_XC_OP1_PURE_BLUE_100IRE_PATTERN, // 24: blue 2867 E_XC_OP1_PURE_RED_70IRE_PATTERN, // 25 2868 E_XC_OP1_PURE_GREEN_70IRE_PATTERN, // 26 2869 E_XC_OP1_PURE_BLUE_70IRE_PATTERN, // 27 2870 E_XC_OP1_PURE_RED_40IRE_PATTERN, // 28 2871 E_XC_OP1_PURE_GREEN_40IRE_PATTERN, // 29 2872 E_XC_OP1_PURE_BLUE_40IRE_PATTERN, // 30 2873 E_XC_OP1_PURE_RED_20IRE_PATTERN, // 31 2874 E_XC_OP1_PURE_GREEN_20IRE_PATTERN, // 32 2875 E_XC_OP1_PURE_BLUE_20IRE_PATTERN, // 33 2876 E_XC_OP1_PURE_RED_10IRE_PATTERN, // 34 2877 E_XC_OP1_PURE_GREEN_10IRE_PATTERN, // 35 2878 E_XC_OP1_PURE_BLUE_10IRE_PATTERN, // 36 2879 E_XC_OP1_PURE_WHITE_100IRE_PATTERN, // 37 2880 E_XC_OP1_PURE_WHITE_90IRE_PATTERN, // 38 2881 E_XC_OP1_PURE_WHITE_80IRE_PATTERN, // 39 2882 E_XC_OP1_PURE_WHITE_70IRE_PATTERN, // 40 2883 E_XC_OP1_PURE_WHITE_60IRE_PATTERN, // 41 2884 E_XC_OP1_PURE_WHITE_50IRE_PATTERN, // 42 2885 E_XC_OP1_PURE_WHITE_40IRE_PATTERN, // 43 2886 E_XC_OP1_PURE_WHITE_30IRE_PATTERN, // 44 2887 E_XC_OP1_PURE_WHITE_20IRE_PATTERN, // 45 2888 E_XC_OP1_PURE_WHITE_10IRE_PATTERN, // 46 2889 E_XC_OP1_PURE_GAMMA_GREY1_PATTERN, // 47: gray 2890 E_XC_OP1_PURE_GAMMA_GREY2_PATTERN, // 48: gray 2891 E_XC_OP1_PURE_RGB_CHECKERBOARD_PATTERN_2, // 49: 3x3 checkerboard R/G/B 2892 }EN_XC_OP1_PATTERN; 2893 2894 //white balance pattern mode 2895 typedef enum 2896 { 2897 E_XC_OP1_PATTERN_MODE, // OP1 tset Pattern 2898 E_XC_OP2_PATTERN_MODE, // OP2 tset Pattern 2899 }EN_XC_WB_PATTERN_MODE; 2900 2901 2902 typedef struct 2903 { 2904 // Output timing 2905 MS_U16 u16HStart; ///< DE H start 2906 MS_U16 u16VStart; ///< DE V start 2907 MS_U16 u16Width; ///< DE H width 2908 MS_U16 u16Height; ///< DE V height 2909 MS_U16 u16HTotal; ///< H total 2910 MS_U16 u16VTotal; ///< V total 2911 2912 MS_U16 u16DefaultVFreq; ///< Panel output Vfreq., used in free run 2913 2914 // sync 2915 MS_U8 u8HSyncWidth; ///< H sync width 2916 MS_U16 u16VSyncStart; ///< V sync start = Vtotal - backporch - VSyncWidth 2917 MS_U8 u8VSyncWidth; ///< V sync width 2918 MS_BOOL bManuelVSyncCtrl; ///< enable manuel V sync control 2919 2920 // output control 2921 MS_U16 u16OCTRL; ///< Output control such as Swap port, etc. 2922 MS_U16 u16OSTRL; ///< Output control sync as Invert sync/DE, etc. 2923 MS_U16 u16ODRV; ///< Driving current 2924 MS_U16 u16DITHCTRL; ///< Dither control 2925 2926 } MS_XC_VOP_Data; 2927 2928 #ifdef UFO_XC_SETBLACKVIDEOBYMODE 2929 // Black video mode 2930 typedef enum 2931 { 2932 E_XC_BLACK_VIDEO_BASIC, 2933 E_XC_BLACK_VIDEO_MEMSYNC, // HW auto memory sync 2934 }EN_XC_BLACK_VIDEO_MODE; 2935 #endif 2936 2937 typedef enum 2938 { 2939 /* 2940 __________________________________________________________________________________________________________________________________________ 2941 |Vby1 Output Format|D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D12|D13|D14|D15|D16|D17|D18|D19|D20|D21|D22|D23|D24|D25|D26|D27|D28|D29|D30|D31| 2942 |------------------|--|--|--|--|--|--|--|--|--|--|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| 2943 | ARGB 1 |R0|R1|R2|R3|R4|R5|R6|R7|G0|G1|G2 |G3 |G4 |G5 |G6 |G7 |B0 |B1 |B2 |B3 |B4 |B5 |B6 |B7 |A1 |A0 |A2 |A3 |A4 |A5 |A6 |A7 | 2944 |------------------|--|--|--|--|--|--|--|--|--|--|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| 2945 | ARGB 2 |R2|R3|R4|R5|R6|R7|A6|A7|G2|G3|G4 |G5 |G6 |G7 |A4 |A5 |B2 |B3 |B4 |B5 |B6 |B7 |A2 |A3 |A0 |A1 |B0 |B1 |G0 |G1 |R0 |R1 | 2946 ------------------------------------------------------------------------------------------------------------------------------------------ 2947 */ 2948 E_XC_OSDC_OUTPUT_FORMAT_VBY1_ARGB1, 2949 E_XC_OSDC_OUTPUT_FORMAT_VBY1_ARGB2, 2950 } E_XC_OSDC_OUTPUT_FORMAT; 2951 2952 typedef struct DLL_PACKED 2953 { 2954 MS_PHYADDR u32FBSize[2]; 2955 MS_U16 u16VBox_Htotal[2]; 2956 MS_U16 u16VBox_Vtotal[2]; 2957 MS_U16 u16VBox_PanelHsize; 2958 MS_U16 u16VBox_PanelVsize; 2959 MS_U16 u16Vfreq[2]; 2960 MS_BOOL bInterface[2]; 2961 }XC_VBOX_INFO; 2962 2963 typedef enum 2964 { 2965 E_XC_BWD_UPDATE_BWR_CONFIG = 0, // Update bwr configuration 2966 } E_XC_BWD_CONFIG_TYPE; 2967 2968 #ifdef UFO_XC_TEST_PATTERN 2969 //xc test pattern type 2970 typedef enum 2971 { 2972 E_XC_ADC_PATTERN_MODE, //adc test pattern 2973 E_XC_IPMUX_PATTERN_MODE, // ipmux test Pattern 2974 E_XC_IP1_PATTERN_MODE, // ip test Pattern 2975 E_XC_OP_PATTERN_MODE, // op test Pattern 2976 E_XC_VOP_PATTERN_MODE, // vop test Pattern 2977 E_XC_VOP2_PATTERN_MODE, // vop2 test Pattern 2978 E_XC_MOD_PATTERN_MODE, // mod test Pattern 2979 }EN_XC_TEST_PATTERN_MODE; 2980 2981 //adc test pattern 2982 typedef struct 2983 { 2984 MS_U8 u8EnableADCType; 2985 MS_U16 u16Ramp; 2986 } XC_SET_ADC_TESTPATTERN_t, *p_XC_SET_ADC_TESTPATTERN_t; 2987 2988 //ipmux test Pattern 2989 typedef struct 2990 { 2991 MS_BOOL bEnable; 2992 MS_U16 u16R_CR_Data; 2993 MS_U16 u16G_Y_Data; 2994 MS_U16 u16B_CB_Data; 2995 } XC_SET_IPMUX_TESTPATTERN_t, *p_XC_SET_IPMUX_TESTPATTERN_t; 2996 2997 //ip test Pattern 2998 typedef struct 2999 { 3000 MS_U16 u16Enable; 3001 MS_U32 u32Pattern_type; 3002 SCALER_WIN eWindow; 3003 } XC_SET_IP1_TESTPATTERN_t, *p_XC_SET_IP1_TESTPATTERN_t; 3004 3005 //op test Pattern 3006 typedef struct 3007 { 3008 MS_BOOL bMiuLineBuff; 3009 MS_BOOL bLineBuffHVSP; 3010 } XC_SET_OP_TESTPATTERN_t, *p_XC_SET_OP_TESTPATTERN_t; 3011 3012 //vop test Pattern 3013 typedef struct 3014 { 3015 MS_BOOL bEnable; 3016 } XC_SET_VOP_TESTPATTERN_t, *p_XC_SET_VOP_TESTPATTERN_t; 3017 3018 //vop2 test Pattern 3019 typedef struct 3020 { 3021 MS_BOOL bEnable; 3022 MS_U16 u16R_CR_Data; 3023 MS_U16 u16G_Y_Data; 3024 MS_U16 u16B_CB_Data; 3025 } XC_SET_VOP2_TESTPATTERN_t, *p_XC_SET_VOP2_TESTPATTERN_t; 3026 3027 //mod test Pattern 3028 typedef struct 3029 { 3030 MS_BOOL bEnable; 3031 MS_U16 u16R_CR_Data; 3032 MS_U16 u16G_Y_Data; 3033 MS_U16 u16B_CB_Data; 3034 } XC_SET_MOD_TESTPATTERN_t, *p_XC_SET_MOD_TESTPATTERN_t; 3035 #endif 3036 3037 //------------------------------------------------------------------------------------------------- 3038 //MApi_XC_VideoPlaybackController enum of cmd 3039 //------------------------------------------------------------------------------------------------- 3040 typedef enum 3041 { 3042 E_XC_VPC_MULTI_SPEED_PLAYBACK_CTRL, 3043 }E_XC_VIDEO_PLAYBACK_CTRL_ID; 3044 //------------------------------------------------------------------------------------------------- 3045 //MApi_XC_VideoPlaybackController struct of cmd 3046 //------------------------------------------------------------------------------------------------- 3047 typedef struct 3048 { 3049 MS_BOOL bEnable; 3050 SCALER_WIN eWindow; 3051 }ST_XC_VPC_MULTI_SPEED_PLAYBACK_CTRL; 3052 //------------------------------------------------------------------------------------------------- 3053 3054 #ifdef UFO_XC_AUTO_DOWNLOAD 3055 /// AUTODOWNLOAD_CONFIG_INFO version of current XC lib 3056 #define AUTODOWNLOAD_CONFIG_INFO_VERSION 1 3057 /// AUTODOWNLOAD_DATA_INFO version of current XC lib 3058 #define AUTODOWNLOAD_DATA_INFO_VERSION 1 3059 /// AUTODOWNLOAD_FORMAT_INFO version of current XC lib 3060 #define AUTODOWNLOAD_FORMAT_INFO_VERSION 1 3061 3062 typedef enum 3063 { 3064 E_XC_AUTODOWNLOAD_CLIENT_HDR, 3065 E_XC_AUTODOWNLOAD_CLIENT_OP2GAMMA, 3066 E_XC_AUTODOWNLOAD_CLIENT_FRCOP2GAMMA, 3067 E_XC_AUTODOWNLOAD_CLIENT_XVYCC, 3068 E_XC_AUTODOWNLOAD_CLIENT_ODTABLE1, 3069 E_XC_AUTODOWNLOAD_CLIENT_ODTABLE2, 3070 E_XC_AUTODOWNLOAD_CLIENT_ODTABLE3, 3071 E_XC_AUTODOWNLOAD_CLIENT_DEMURA, 3072 E_XC_AUTODOWNLOAD_CLIENT_OP2LUT, 3073 E_XC_AUTODOWNLOAD_CLIENT_T3D_0, /// t3d of sc0 3074 E_XC_AUTODOWNLOAD_CLIENT_T3D_1, /// t3d of sc1 3075 E_XC_AUTODOWNLOAD_CLIENT_FRCSPTPOPM, 3076 E_XC_AUTODOWNLOAD_CLIENT_FOOPM, 3077 E_XC_AUTODOWNLOAD_CLIENT_MAX, 3078 } EN_XC_AUTODOWNLOAD_CLIENT; 3079 3080 typedef enum 3081 { 3082 E_XC_AUTODOWNLOAD_TRIGGER_MODE, 3083 E_XC_AUTODOWNLOAD_ENABLE_MODE, 3084 } EN_XC_AUTODOWNLOAD_MODE; 3085 3086 typedef enum 3087 { 3088 E_XC_AUTODOWNLOAD_HDR_SUB_TMO, 3089 E_XC_AUTODOWNLOAD_HDR_SUB_3DLUT, 3090 E_XC_AUTODOWNLOAD_HDR_SUB_GAMMA, 3091 E_XC_AUTODOWNLOAD_HDR_SUB_DEGAMMA, 3092 } EN_XC_AUTODOWNLOAD_SUB_CLIENT; 3093 3094 typedef struct 3095 { 3096 MS_U32 u32ConfigInfo_Version; ///<Version of current structure. Please always set to "AUTODOWNLOAD_CONFIG_INFO_VERSION" as input 3097 MS_U16 u16ConfigInfo_Length; ///<Length of this structure, u16ConfigInfo_Length=sizeof(XC_AUTODOWNLOAD_CONFIG_INFO) 3098 3099 EN_XC_AUTODOWNLOAD_CLIENT enClient; /// current client 3100 MS_PHY phyBaseAddr; /// baseaddr 3101 MS_U32 u32Size; /// size 3102 MS_BOOL bEnable; /// enable/disable the client 3103 EN_XC_AUTODOWNLOAD_MODE enMode; /// work mode 3104 } XC_AUTODOWNLOAD_CONFIG_INFO; 3105 3106 typedef struct 3107 { 3108 MS_U32 u32FormatInfo_Version; ///<Version of current structure. Please always set to "AUTODOWNLOAD_FORMAT_INFO_VERSION" as input 3109 MS_U16 u16FormatInfo_Length; ///<Length of this structure, u16FormatInfo_Length=sizeof(XC_AUTODOWNLOAD_FORMAT_INFO) 3110 3111 EN_XC_AUTODOWNLOAD_SUB_CLIENT enSubClient; /// sub client 3112 MS_BOOL bEnableRange; /// whether enable range, 0: write data to (0-511), 1: write data to (u32StartAddr-u16EndAddr) 3113 #if defined(UFO_PUBLIC_HEADER_700) 3114 MS_PHY u16StartAddr; /// start addr, range: 0-511, startaddr <= endaddr 3115 MS_PHY u16EndAddr; /// end addr: range: 0-511, startaddr <= endaddr 3116 #else 3117 MS_U16 u16StartAddr; /// start addr, range: 0-511, startaddr <= endaddr 3118 MS_U16 u16EndAddr; /// end addr: range: 0-511, startaddr <= endaddr 3119 #endif 3120 } XC_AUTODOWNLOAD_FORMAT_INFO; 3121 3122 typedef struct 3123 { 3124 MS_U32 u32DataInfo_Version; ///<Version of current structure. Please always set to "AUTODOWNLOAD_DATA_INFO_VERSION" as input 3125 MS_U16 u16DataInfo_Length; ///<Length of this structure, u16ConfigInfo_Length=sizeof(XC_AUTODOWNLOAD_DATA_INFO) 3126 3127 EN_XC_AUTODOWNLOAD_CLIENT enClient; /// current client 3128 MS_U8* pu8Data; /// pointer to data 3129 MS_U32 u32Size; /// data size 3130 void* pParam; /// pointer to XC_AUTODOWNLOAD_FORMAT_INFO 3131 } XC_AUTODOWNLOAD_DATA_INFO; 3132 3133 typedef struct 3134 { 3135 EN_XC_AUTODOWNLOAD_CLIENT enClient; /// current client 3136 MS_BOOL bSupported; /// whether it is supported 3137 } XC_AUTODOWNLOAD_CLIENT_SUPPORTED_CAPS; 3138 #endif 3139 3140 #ifdef UFO_XC_HDR 3141 #if (UFO_XC_HDR_VERSION == 2) 3142 #define HDR_3DLUT_INFO_VERSION 1 3143 #define HDR_OPEN_METADATA_INFO_VERSION 1 3144 #define HDR_DMA_CONFIG_INFO_VERSION 1 3145 #define HDR_DMA_INIT_INFO_VERSION 1 3146 #define HDR_OTT_SHARE_MEMORY_INFO_VERSION 1 3147 3148 typedef enum 3149 { 3150 E_XC_HDR_CTRL_NONE, 3151 E_XC_HDR_CTRL_ENABLE, /// enable/disable hdr, pParam: pointer to MS_BOOL 3152 E_XC_HDR_CTRL_SET_TYPE, /// set hdr type, pParam: pointer to EN_XC_HDR_TYPE 3153 E_XC_HDR_CTRL_SET_3DLUT, /// set 3dlut, pParam: pointer to XC_HDR_3DLUT_INFO, for dobly hdr only 3154 E_XC_HDR_CTRL_INIT_DMA, /// init dma info, pParam: pointer to XC_HDR_DMA_INIT_INFO 3155 E_XC_HDR_CTRL_CONFIG_DMA, /// config dma info, pParam: pointer to XC_HDR_DMA_CONFIG_INFO 3156 E_XC_HDR_CTRL_SET_OTT_SHARE_MEMORY, /// set share memory, pParam: pointer to XC_HDR_OTT_SHARE_MEMORY_INFO, communcation for VDEC and XC driver, for OTT only 3157 E_XC_HDR_CTRL_SET_OPEN_METADATA, /// set open metadata, pParam: pointer to XC_HDR_OPEN_METADATA_INFO, for open hdr only 3158 E_XC_HDR_CTRL_SET_COLOR_FORMAT, /// set color format, pParam: pointer to EN_XC_HDR_COLOR_FORMAT 3159 E_XC_HDR_CTRL_CFD_CONTROL, /// CFD control 3160 E_XC_HDR_CTRL_GET_TYPE, /// get hdr type, pParam: pointer to EN_XC_HDR_TYPE 3161 #ifdef UFO_XC_HDMI_4K2K_DMA 3162 E_XC_HDR_CTRL_INIT_DMA_HDMI, /// init dma info, pParam: pointer to XC_HDR_DMA_INIT_INFO 3163 #endif 3164 E_XC_HDR_CTRL_MAX, 3165 } EN_XC_HDR_CTRL_TYPE; 3166 3167 typedef enum 3168 { 3169 E_XC_HDR_DMA_MODE_NONE, 3170 #if defined(UFO_PUBLIC_HEADER_500_3) 3171 E_XC_HDR_DMA_MODE_YC12, 3172 E_XC_HDR_DMA_MODE_YUV444, 3173 E_XC_HDR_DMA_MODE_YC8, 3174 E_XC_HDR_DMA_MODE_YC10, 3175 #else 3176 E_XC_HDR_DMA_MODE_8BIT, // color depth: 8bits 3177 E_XC_HDR_DMA_MODE_10BIT, // color depth: 10bits 3178 E_XC_HDR_DMA_MODE_12BIT, // color depth: 12bits 3179 #endif 3180 E_XC_HDR_DMA_MODE_MAX, 3181 } EN_XC_HDR_DMA_MODE; 3182 3183 typedef enum 3184 { 3185 E_XC_HDR_COLOR_NONE, 3186 E_XC_HDR_COLOR_YUV420, 3187 E_XC_HDR_COLOR_YUV422, 3188 E_XC_HDR_COLOR_YUV444, 3189 E_XC_HDR_COLOR_RGB, 3190 E_XC_HDR_COLOR_MAX, 3191 } EN_XC_HDR_COLOR_FORMAT; 3192 3193 typedef struct 3194 { 3195 MS_U32 u32OpenInfo_Version; ///<Version of current structure. Please always set to "HDR_OPEN_METADATA_INFO_VERSION" as input 3196 MS_U16 u16OpenInfo_Length; ///<Length of this structure, u16OpenInfo_Length=sizeof(XC_HDR_OPEN_METADATA_INFO) 3197 3198 // the flowing metadata info 3199 // to do 3200 } XC_HDR_OPEN_METADATA_INFO; 3201 3202 typedef struct 3203 { 3204 MS_U32 u323DLutInfo_Version; ///<Version of current structure. Please always set to "HDR_3DLUT_INFO_VERSION" as input 3205 MS_U16 u163DLutInfo_Length; ///<Length of this structure, u163DLutInfo_Length=sizeof(XC_HDR_3DLUT_INFO) 3206 3207 MS_U8* pu8Data; /// pointer to data 3208 MS_U32 u32Size; /// data size 3209 } XC_HDR_3DLUT_INFO; 3210 3211 typedef struct 3212 { 3213 MS_U32 u32DMAConfigInfo_Version; ///<Version of current structure. Please always set to "HDR_DMA_CONFIG_INFO_VERSION" as input 3214 MS_U16 u16DMAConfigInfo_Length; ///<Length of this structure, u16DMAConfigInfo_Length=sizeof(XC_HDR_DMA_CONFIG_INFO) 3215 3216 EN_XC_HDR_DMA_MODE enMode; /// DMA mode 3217 } XC_HDR_DMA_CONFIG_INFO; 3218 3219 typedef struct 3220 { 3221 MS_U32 u32DMAInitInfo_Version; ///<Version of current structure. Please always set to "HDR_DMA_INIT_INFO_VERSION" as input 3222 MS_U16 u16DMAInitInfo_Length; ///<Length of this structure, u16DMAInitInfo_Length=sizeof(XC_HDR_DMA_INIT_INFO) 3223 3224 MS_PHY phyBaseAddr; /// DMA baseaddr 3225 MS_U32 u32Size; /// DMA size 3226 } XC_HDR_DMA_INIT_INFO; 3227 3228 typedef struct 3229 { 3230 MS_U32 u32ShareMemInfo_Version; ///<Version of current structure. Please always set to "HDR_OTT_SHARE_MEMORY_INFO_VERSION" as input 3231 MS_U16 u16ShareMemInfo_Length; ///<Length of this structure, u16ShareMemInfo_Length=sizeof(XC_HDR_SHARE_MEMORY_INFO) 3232 3233 MS_PHY phyBaseAddr; /// Share memory baseaddr 3234 MS_U32 u32Size; /// Share memory size 3235 } XC_HDR_OTT_SHARE_MEMORY_INFO; 3236 3237 3238 #endif 3239 #endif 3240 3241 #ifdef UFO_XC_HDR 3242 typedef enum 3243 { 3244 E_XC_HDR_TYPE_NONE, 3245 E_XC_HDR_TYPE_OPEN, 3246 E_XC_HDR_TYPE_DOLBY, 3247 E_XC_HDR_TYPE_TECHNICOLOR, 3248 E_XC_HDR_TYPE_HLG, 3249 E_XC_HDR_TYPE_MAX, 3250 } EN_XC_HDR_TYPE; 3251 3252 typedef struct DLL_PACKED 3253 { 3254 EN_XC_HDR_TYPE enHDRType; /// HDR type 3255 MS_BOOL bSupported; /// whether it is supported 3256 3257 MS_U32 u32Version; 3258 MS_S32 s32MaxLuminanceData; 3259 MS_S32 s32MinLuminanceData; 3260 MS_S32 s32MaxFrameAveLumiance; 3261 } XC_HDR_SUPPORTED_CAPS; 3262 3263 #endif 3264 3265 3266 #define CFD_INIT_VERSION 0 3267 #define CFD_HDMI_VERSION 0 3268 /// CFD Panel structure version 3269 /// Version 0: Init structure 3270 /// Version 1: Add Linear RGB setting and customer color primaries. 3271 #define CFD_PANEL_VERSION 1 3272 #define CFD_ANALOG_VERSION 0 3273 /// CFD HDR structure version 3274 /// Version 0: Init structure 3275 /// Version 1: Add TMO level 3276 #define CFD_HDR_VERSION 1 3277 #define CFD_EDID_VERSION 0 3278 /// CFD OSD structure version 3279 /// Version 0: Init structure 3280 /// Version 1: Add backlight and hue/contrast/saturation valid flag 3281 /// Version 2: Add color range and main/sub window. 3282 /// Version 3: Add ultra black / white 3283 /// Version 4: Add skip picture setting (hue/ contrast/ saturation) 3284 /// Version 5: Add color correction matrix 3285 /// Version 6: Add view Mode (switch view mode for dolby) 3286 #if defined(UFO_PUBLIC_HEADER_500_3) 3287 #define CFD_OSD_VERSION 2 3288 #elif defined(UFO_PUBLIC_HEADER_500) 3289 #define CFD_OSD_VERSION 5 3290 #else 3291 #define CFD_OSD_VERSION 6 3292 #endif 3293 #define CFD_DLC_VERSION 0 3294 #define CFD_LINEAR_RGB_VERSION 0 3295 #define CFD_FIRE_VERSION 0 3296 /// Version 0: Init structure 3297 /// Version 1: Add content is full range and ultra black & white active 3298 /// Version 2: Add color type of the source 3299 /// Version 3: Add HDR metadata of the source(ott or hdmi) 3300 #if defined(UFO_PUBLIC_HEADER_700) || defined(UFO_PUBLIC_HEADER_500) 3301 #define CFD_STATUS_VERSION 3 3302 #else 3303 #define CFD_STATUS_VERSION 2 3304 #endif 3305 #define CFD_TMO_VERSION 1 3306 /// CFD control type. This enum sync from mdrv_xc_st.h in kernel 3307 typedef enum 3308 { 3309 /// Initialize 3310 E_XC_CFD_CTRL_TYPE_INIT = 0, 3311 /// VGA 3312 E_XC_CFD_CTRL_TYPE_VGA = 1, 3313 /// TV (ATV) 3314 E_XC_CFD_CTRL_TYPE_TV = 2, 3315 /// CVBS (AV) 3316 E_XC_CFD_CTRL_TYPE_CVBS = 3, 3317 /// S-Video 3318 E_XC_CFD_CTRL_TYPE_SVIDEO = 4, 3319 /// YPbPr 3320 E_XC_CFD_CTRL_TYPE_YPBPR = 5, 3321 /// Scart 3322 E_XC_CFD_CTRL_TYPE_SCART = 6, 3323 /// HDMI 3324 E_XC_CFD_CTRL_TYPE_HDMI = 7, 3325 /// DTV 3326 E_XC_CFD_CTRL_TYPE_DTV = 8, 3327 /// DVI 3328 E_XC_CFD_CTRL_TYPE_DVI = 9, 3329 /// MM 3330 E_XC_CFD_CTRL_TYPE_MM = 10, 3331 /// Panel 3332 E_XC_CFD_CTRL_TYPE_PANEL = 11, 3333 /// HDR 3334 E_XC_CFD_CTRL_TYPE_HDR = 12, 3335 /// EDID 3336 E_XC_CFD_CTRL_TYPE_EDID = 13, 3337 /// OSD 3338 E_XC_CFD_CTRL_TYPE_OSD = 14, 3339 /// Fire 3340 E_XC_CFD_CTRL_TYPE_FIRE = 15, 3341 /// DLC 3342 E_XC_CFD_CTRL_TYPE_DLC = 16, 3343 /// Linear RGB 3344 E_XC_CFD_CTRL_TYPE_LINEAR_RGB = 17, 3345 /// Get CFD Output to HDMI Status and dicison. 3346 E_XC_CFD_CTRL_GET_HDMI_STATUS = 18, 3347 /// Set force HDR OnOff or auto select 3348 E_XC_CFD_CTRL_SET_HDR_ONOFF_SETTING = 19, 3349 #if defined(UFO_PUBLIC_HEADER_500_3) 3350 /// Status 3351 E_XC_CFD_CTRL_GET_STATUS = 20, 3352 #else 3353 /// Status 3354 E_XC_CFD_CTRL_TYPE_STATUS = 20, 3355 #endif 3356 /// TMO 3357 E_XC_CFD_CTRL_SET_TMO = 21, 3358 3359 /// (Set this base is 0x40000000 for int type) 3360 E_XC_CFD_CTRL_TYPE_EX_BASE = 0x40000000, 3361 3362 /// OSD_STATUS 3363 E_XC_CFD_CTRL_GET_OSD_PROCESS_CONFIGS= 0x40000001, 3364 /// Max 3365 E_XC_CFD_CTRL_TYPE_MAX, 3366 } EN_XC_CFD_CTRL_TYPE; 3367 3368 /// HDR type. This enum define is the same with E_CFIO_HDR_STATUS in CFD document. 3369 typedef enum 3370 { 3371 /// None HDR 3372 E_XC_CFD_HDR_TYPE_NONE = 0x0000, 3373 /// Dolby HDR (HDR1) 3374 E_XC_CFD_HDR_TYPE_DOLBY = 0x0001, 3375 /// Open HDR (HDR2) 3376 E_XC_CFD_HDR_TYPE_OPEN = 0x0002, 3377 /// TechniColor HDR (HDR3) 3378 E_XC_CFD_HDR_TYPE_TCH = 0x0004, 3379 /// HLG (HDR3) 3380 E_XC_CFD_HDR_TYPE_HLG = 0x0008, 3381 /// Max 3382 E_XC_CFD_HDR_TYPE_MAX = 0xff 3383 } EN_XC_CFD_HDR_TYPE; 3384 3385 /// Update type, reference mhal_xc.h in kernel. 3386 typedef enum 3387 { 3388 /// Update all 3389 E_XC_CFD_UPDATE_TYPE_ALL, 3390 /// Update OSD only 3391 E_XC_CFD_UPDATE_TYPE_OSD_ONLY, 3392 /// Max 3393 E_XC_CFD_UPDATE_TYPE_MAX 3394 } EN_XC_CFD_UPDATE_TYPE; 3395 3396 /// TMO level enum 3397 typedef enum 3398 { 3399 /// Low 3400 E_XC_CFD_TMO_LEVEL_LOW, 3401 /// Middle 3402 E_XC_CFD_TMO_LEVEL_MIDDLE, 3403 /// High 3404 E_XC_CFD_TMO_LEVEL_HIGH, 3405 /// Max 3406 E_XC_CFD_TMO_LEVEL_MAX 3407 } EN_XC_CFD_TMO_LEVEL; 3408 3409 /// CFD init structure, reference mhal_xc.h in kernel. 3410 typedef struct 3411 { 3412 /// Structure version 3413 MS_U32 u32Version; 3414 /// Structure length 3415 MS_U16 u16Length; 3416 3417 /// Window (main or sub window) 3418 MS_U8 u8Win; 3419 /// Input source 3420 MS_U8 u8InputSource; 3421 } XC_CFD_INIT; 3422 3423 /// CFD HDMI structure, reference mhal_xc.h in kernel. 3424 typedef struct 3425 { 3426 /// Structure version 3427 MS_U32 u32Version; 3428 /// Structure length 3429 MS_U16 u16Length; 3430 3431 /// Window (main or sub window) 3432 MS_U8 u8Win; 3433 3434 /// Full range 3435 MS_BOOL bIsFullRange; 3436 3437 /// AVI infoframe 3438 /// Pixel Format 3439 MS_U8 u8PixelFormat; 3440 /// Color imetry 3441 MS_U8 u8Colorimetry; 3442 /// Extended Color imetry 3443 MS_U8 u8ExtendedColorimetry; 3444 /// Rgb Quantization Range 3445 MS_U8 u8RgbQuantizationRange; 3446 /// Ycc Quantization Range 3447 MS_U8 u8YccQuantizationRange; 3448 3449 /// HDR infoframe 3450 /// HDR infoframe valid 3451 MS_BOOL bHDRInfoFrameValid; 3452 /// EOTF (/// 0:SDR gamma, 1:HDR gamma, 2:SMPTE ST2084, 3:Future EOTF, 4-7:Reserved) 3453 MS_U8 u8EOTF; 3454 /// Static metadata ID (0: Static Metadata Type 1, 1-7:Reserved for future use) 3455 MS_U8 u8SMDID; 3456 /// Display primaries x 3457 MS_U16 u16Display_Primaries_x[3]; 3458 /// Display primaries y 3459 MS_U16 u16Display_Primaries_y[3]; 3460 /// White point x 3461 MS_U16 u16White_point_x; 3462 /// White point y 3463 MS_U16 u16White_point_y; 3464 /// Panel max luminance 3465 MS_U16 u16MasterPanelMaxLuminance; 3466 /// Panel min luminance 3467 MS_U16 u16MasterPanelMinLuminance; 3468 /// Max content light level 3469 MS_U16 u16MaxContentLightLevel; 3470 /// Max frame average light level 3471 MS_U16 u16MaxFrameAvgLightLevel; 3472 3473 } XC_CFD_HDMI; 3474 3475 /// CFD analog structure, reference mhal_xc.h in kernel. 3476 typedef struct 3477 { 3478 /// Structure version 3479 MS_U32 u32Version; 3480 /// Structure length 3481 MS_U16 u16Length; 3482 3483 /// Window (main or sub window) 3484 MS_U8 u8Win; 3485 3486 /// Color format, reference EN_KDRV_XC_CFD_COLOR_FORMAT. 3487 MS_U8 u8ColorFormat; 3488 /// Color data format, reference EN_KDRV_XC_CFD_COLOR_DATA_FORMAT. 3489 MS_U8 u8ColorDataFormat; 3490 /// Full range 3491 MS_BOOL bIsFullRange; 3492 /// Color primaries 3493 MS_U8 u8ColorPrimaries; 3494 /// Transfer characteristics 3495 MS_U8 u8TransferCharacteristics; 3496 /// Matrix coefficients 3497 MS_U8 u8MatrixCoefficients; 3498 3499 } XC_CFD_ANALOG; 3500 3501 /// CFD panel structure, reference mhal_xc.h in kernel. 3502 typedef struct 3503 { 3504 /// Structure version 3505 MS_U32 u32Version; 3506 /// Structure length 3507 MS_U16 u16Length; 3508 3509 /// Color format, reference CFD document. 3510 MS_U8 u8ColorFormat; 3511 /// Color data format, reference CFD document. 3512 MS_U8 u8ColorDataFormat; 3513 /// Full range 3514 MS_BOOL bIsFullRange; 3515 3516 /// Display primaries x, data *0.00002 0xC350 = 1 3517 MS_U16 u16Display_Primaries_x[3]; 3518 /// Display primaries y, data *0.00002 0xC350 = 1 3519 MS_U16 u16Display_Primaries_y[3]; 3520 /// White point x, data *0.00002 0xC350 = 1 3521 MS_U16 u16White_point_x; 3522 /// White point y, data *0.00002 0xC350 = 1 3523 MS_U16 u16White_point_y; 3524 /// Max luminance, data * 1 nits 3525 MS_U16 u16MaxLuminance; 3526 /// Med luminance, data * 1 nits 3527 MS_U16 u16MedLuminance; 3528 /// Min luminance, data * 0.0001 nits 3529 MS_U16 u16MinLuminance; 3530 /// Linear RGB 3531 MS_BOOL bLinearRgb; 3532 /// Customer color primaries 3533 MS_BOOL bCustomerColorPrimaries; 3534 /// Source white x 3535 MS_U16 u16SourceWx; 3536 /// Source white y 3537 MS_U16 u16SourceWy; 3538 } XC_CFD_PANEL; 3539 3540 /// CFD EDID structure, reference mhal_xc.h in kernel. 3541 typedef struct 3542 { 3543 /// Structure version 3544 MS_U32 u32Version; 3545 /// Structure length 3546 MS_U16 u16Length; 3547 3548 /// HDR data block valid 3549 MS_U8 u8HDMISinkHDRDataBlockValid; 3550 /// HDR EOTF 3551 MS_U8 u8HDMISinkEOTF; 3552 /// HDR static metadata descriptor 3553 MS_U8 u8HDMISinkSM; 3554 /// Desired content max luminance 3555 MS_U8 u8HDMISinkDesiredContentMaxLuminance; 3556 /// Desired content max frame average luminance 3557 MS_U8 u8HDMISinkDesiredContentMaxFrameAvgLuminance; 3558 /// Desired content min luminance 3559 MS_U8 u8HDMISinkDesiredContentMinLuminance; 3560 /// HDR data block length 3561 MS_U8 u8HDMISinkHDRDataBlockLength; 3562 3563 /// Display primaries x 3564 MS_U16 u16Display_Primaries_x[3]; 3565 /// Display primaries y 3566 MS_U16 u16Display_Primaries_y[3]; 3567 /// White point x 3568 MS_U16 u16White_point_x; 3569 /// White point y 3570 MS_U16 u16White_point_y; 3571 3572 /// EDID version 3573 MS_U8 u8HDMISinkEDIDBaseBlockVersion; 3574 /// EDID reversion 3575 MS_U8 u8HDMISinkEDIDBaseBlockReversion; 3576 /// CEA block reversion 3577 MS_U8 u8HDMISinkEDIDCEABlockReversion; 3578 3579 /// Video capability data block valid 3580 MS_U8 u8HDMISinkVCDBValid; 3581 /// Support YUV format, bit0: YUV444, bit1: YUV422, bit2: YUV420, bit3: QY, bit4: QS 3582 MS_U8 u8HDMISinkSupportYUVFormat; 3583 3584 /// Colorimetry 3585 MS_U8 u8HDMISinkExtendedColorspace; 3586 /// EDID valid 3587 MS_U8 u8HDMISinkEDIDValid; 3588 } XC_CFD_EDID; 3589 3590 /// CFD HDR structure, reference mhal_xc.h in kernel. 3591 typedef struct 3592 { 3593 /// Structure version 3594 MS_U32 u32Version; 3595 /// Structure length 3596 MS_U16 u16Length; 3597 3598 /// Window (main or sub window) 3599 MS_U8 u8Win; 3600 /// HDR type, reference EN_MAPI_CFD_HDR_TYPE 3601 MS_U8 u8HdrType; 3602 /// HDR10/HLG TMO level. 0: low, 1: middle, 2: high, 3: reference mode 3603 MS_U8 u8TmoLevel; 3604 } XC_CFD_HDR; 3605 3606 /// CFD HDR structure, reference mhal_xc.h in kernel. 3607 typedef struct 3608 { 3609 /// Structure version 3610 MS_U32 u32Version; 3611 /// Structure length 3612 MS_U16 u16Length; 3613 3614 /// customer dlc curve 3615 MS_BOOL bUseCustomerDlcCurve; 3616 } XC_CFD_DLC; 3617 3618 /// CFD linear structure, reference mhal_xc.h in kernel. 3619 typedef struct 3620 { 3621 /// Structure version 3622 MS_U32 u32Version; 3623 /// Structure length 3624 MS_U16 u16Length; 3625 3626 /// Window (main or sub window) 3627 MS_U8 u8Win; 3628 /// Linear RGB enable 3629 MS_BOOL bEnable; 3630 } XC_CFD_LINEAR_RGB; 3631 3632 //controls from Panel OSD 3633 typedef struct 3634 { 3635 MS_U32 u32Version; ///<Version of current structure. Please always set to "CFD_OSD_VERSION" as input 3636 MS_U16 u16Length; ///<Length of this structure, u16Length=sizeof(XC_CFD_OSD_CONTROL) 3637 3638 MS_U16 u16Hue; 3639 MS_U16 u16Saturation; 3640 MS_U16 u16Contrast; 3641 3642 //default on , not in the document 3643 MS_U8 u8OSDUIEn; 3644 3645 //Mode 0: update matrix by OSD and color format driver 3646 //Mode 1: only update matrix by OSD controls 3647 //for mode1 : the configures of matrix keep the same as the values by calling CFD last time 3648 MS_U8 u8OSDUIMode; 3649 3650 /// 3651 MS_BOOL bHueValid; 3652 MS_BOOL bSaturationValid; 3653 MS_BOOL bContrastValid; 3654 3655 MS_BOOL bBacklightValid; 3656 MS_U32 u32MinBacklight; 3657 MS_U32 u32MaxBacklight; 3658 MS_U32 u32Backlight; 3659 3660 MS_U8 u8Win; 3661 MS_BOOL bColorRangeValid; 3662 MS_U8 u8ColorRange; // 0: Auto, 1: Full Range (0~255), 2: Limit Range (16~235) 3663 3664 #if defined(UFO_PUBLIC_HEADER_700) || defined(UFO_PUBLIC_HEADER_500) || defined(UFO_PUBLIC_HEADER_300) || defined(UFO_PUBLIC_HEADER_212) 3665 MS_BOOL bUltraBlackLevelValid; 3666 MS_U8 u8UltraBlackLevel; 3667 MS_BOOL bUltraWhiteLevelValid; 3668 MS_U8 u8UltraWhiteLevel; 3669 3670 MS_BOOL bSkipPictureSettingValid; 3671 MS_BOOL bSkipPictureSetting; 3672 #endif 3673 3674 #if defined(UFO_PUBLIC_HEADER_700) || defined(UFO_PUBLIC_HEADER_500) ||defined(UFO_PUBLIC_HEADER_300) || defined(UFO_PUBLIC_HEADER_212) 3675 MS_BOOL bColorCorrectionValid; 3676 MS_S16 s16ColorCorrectionMatrix[32]; 3677 #endif 3678 3679 MS_BOOL bViewModeValid; 3680 MS_U8 u8ViewMode; 3681 3682 } XC_CFD_OSD_CONTROL; 3683 3684 //controls for CFD OSD PROCESS 3685 typedef struct 3686 { 3687 3688 MS_U32 u32Version; ///<Version of current structure. Please always set to "CFD_HDMI_INFOFRAME_ST_VERSION" as input 3689 MS_U16 u16Length; ///<Length of this structure, u16Length=sizeof(STU_CFDAPI_OSD_PROCESS_CONFIGS) 3690 3691 //for this function 3692 //1: on 0:off 3693 MS_U8 u8OSD_SDR2HDR_en; 3694 3695 //0:limit 1:full 3696 //default = full 3697 MS_U8 u8OSD_IsFullRange; 3698 3699 //default = RGB444 3700 MS_U8 u8OSD_Dataformat; 3701 3702 //default = SDR 3703 MS_U8 u8OSD_HDRMode; 3704 3705 //E_OSD_CFIO_CP 3706 //default = BT709 3707 MS_U8 u8OSD_colorprimary; 3708 3709 //default = BT709 3710 MS_U8 u8OSD_transferf; 3711 3712 //default = 600 3713 MS_U16 u16OSD_MaxLumInNits; 3714 3715 //default = BT2020 3716 MS_U8 u8Video_colorprimary; 3717 3718 //default = BT2020 3719 MS_U8 u8Video_MatrixCoefficients; 3720 3721 //default 2 = tr use PQ 3722 MS_U8 u8Video_HDRMode; 3723 3724 //default = 4000 3725 MS_U16 u16Video_MaxLumInNits; 3726 3727 //0:limit 1:full 3728 //default = limit 3729 MS_U8 u8Video_IsFullRange; 3730 3731 //default = YUV444 3732 MS_U8 u8Video_Dataformat; 3733 3734 MS_U16 u16AntiTMO_SourceInNits; 3735 3736 } XC_CFD_OSD_PROCESS_CONFIGS; 3737 3738 typedef struct 3739 { 3740 MS_U8 u8CurrentIndex; 3741 MS_U8 u8InputFormat; 3742 MS_U8 u8InputDataFormat; 3743 MS_BOOL u8Video_Full_Range_Flag; 3744 3745 MS_BOOL bVUIValid; 3746 MS_U8 u8Colour_primaries; 3747 MS_U8 u8Transfer_Characteristics; 3748 MS_U8 u8Matrix_Coeffs; 3749 3750 MS_BOOL bSEIValid; 3751 MS_U16 u16Display_Primaries_x[3]; 3752 MS_U16 u16Display_Primaries_y[3]; 3753 MS_U16 u16White_point_x; 3754 MS_U16 u16White_point_y; 3755 MS_U32 u32Master_Panel_Max_Luminance; 3756 MS_U32 u32Master_Panel_Min_Luminance; 3757 3758 MS_BOOL bContentLightLevelEnabled; 3759 MS_U16 u16maxContentLightLevel; 3760 MS_U16 u16maxPicAverageLightLevel; 3761 } XC_HDR_CFD_MEMORY_FORMAT; 3762 3763 typedef struct 3764 { 3765 /// Structure version 3766 MS_U32 u32Version; 3767 /// Structure length 3768 MS_U16 u16Length; 3769 3770 /// Window (main or sub window) 3771 MS_U8 u8Win; 3772 /// HDR type (0: SDR, 1: Dolby HDR, 2: Open HDR) 3773 MS_U8 u8VideoHdrType; 3774 /// HDR running 3775 MS_BOOL bIsHdrRunning; 3776 /// Is full range 3777 MS_BOOL bIsFullRange; 3778 /// Ultra black & white active 3779 MS_BOOL bUltraBlackWhiteActive; 3780 /// Color Type 3781 MS_U8 u8ColorType; 3782 #if defined(UFO_PUBLIC_HEADER_700) || defined(UFO_PUBLIC_HEADER_500_3) || defined(UFO_PUBLIC_HEADER_300) || defined(UFO_PUBLIC_HEADER_212) || defined(UFO_PUBLIC_HEADER_500) 3783 /// open HDR metadata 3784 union 3785 { 3786 XC_CFD_HDMI stHdmiInfoCFD; 3787 XC_HDR_CFD_MEMORY_FORMAT stHDRMemFormatCFD; 3788 } HDRMetadata; 3789 #endif 3790 } XC_CFD_STATUS; 3791 3792 typedef struct 3793 { 3794 MS_U32 u16HdrType; 3795 MS_U16 u16Level; 3796 3797 MS_U16 u16ControlSize; 3798 MS_U8 *pu8data; 3799 #if !defined (__aarch64__) 3800 /// Dummy parameter 3801 void *pDummy; 3802 #endif 3803 3804 }ST_TMO_LEVEL; 3805 3806 typedef struct 3807 { 3808 /// Structure version 3809 MS_U32 u32Version; 3810 /// Structure length 3811 MS_U16 u16Length; 3812 3813 //Array of TMO 3*3 parameter. just for compatibilty and is abandoned after TMO 12P 3814 MS_U16 u16Hdr10Smin[E_XC_CFD_TMO_LEVEL_MAX]; 3815 MS_U16 u16Hdr10Smed[E_XC_CFD_TMO_LEVEL_MAX]; 3816 MS_U16 u16Hdr10Smax[E_XC_CFD_TMO_LEVEL_MAX]; 3817 MS_U16 u16Hdr10Tmin[E_XC_CFD_TMO_LEVEL_MAX]; 3818 MS_U16 u16Hdr10Tmed[E_XC_CFD_TMO_LEVEL_MAX]; 3819 MS_U16 u16Hdr10Tmax[E_XC_CFD_TMO_LEVEL_MAX]; 3820 3821 MS_U16 u16HlgSmin[E_XC_CFD_TMO_LEVEL_MAX]; 3822 MS_U16 u16HlgSmed[E_XC_CFD_TMO_LEVEL_MAX]; 3823 MS_U16 u16HlgSmax[E_XC_CFD_TMO_LEVEL_MAX]; 3824 MS_U16 u16HlgTmin[E_XC_CFD_TMO_LEVEL_MAX]; 3825 MS_U16 u16HlgTmed[E_XC_CFD_TMO_LEVEL_MAX]; 3826 MS_U16 u16HlgTmax[E_XC_CFD_TMO_LEVEL_MAX]; 3827 //End of Array of TMO 3*3 parameter 3828 3829 MS_U16 u16LevelCount; 3830 ST_TMO_LEVEL *pstTmoLevel; 3831 #if !defined (__aarch64__) 3832 /// Dummy parameter 3833 void *pDummy; 3834 #endif 3835 3836 } ST_KDRV_XC_CFD_TMO; 3837 3838 /// CFD fire structure, reference mhal_xc.h in kernel. 3839 typedef struct 3840 { 3841 /// Structure version 3842 MS_U32 u32Version; 3843 /// Structure length 3844 MS_U16 u16Length; 3845 3846 /// Window (main or sub window) 3847 MS_U8 u8Win; 3848 /// Input source, reference PQ_INPUT_SOURCE_TYPE in apxXC.h 3849 MS_U8 u8InputSource; 3850 /// Update type, reference EN_MAPI_CFD_UPDATE_TYPE 3851 MS_U8 u8UpdateType; 3852 /// RGB bypass 3853 MS_BOOL bIsRgbBypass; 3854 /// HD mode 3855 MS_BOOL bIsHdMode; 3856 } XC_CFD_FIRE; 3857 3858 /// CFD control information, reference mdrv_xc_st.h in kernel. 3859 typedef struct __attribute__((packed)) 3860 { 3861 /// Control type, reference EN_MAPI_CFD_CTRL_TYPE 3862 EN_XC_CFD_CTRL_TYPE enCtrlType; 3863 /// Control parameter 3864 void *pParam; 3865 #if !defined (__aarch64__) 3866 /// Dummy parameter 3867 void *pDummy; 3868 #endif 3869 /// Control parameter length 3870 MS_U32 u32ParamLen; 3871 /// Error code 3872 MS_U16 u16ErrCode; 3873 } XC_CFD_CONTROL_INFO; 3874 3875 typedef struct 3876 { 3877 MS_WINDOW_TYPE stCropWin; ///<Crop window 3878 MS_WINDOW_TYPE stDispWin; ///<Display window 3879 MS_BOOL bInterlace; 3880 //out value 3881 E_XC_FB_LEVEL eFBLevel; ///return for FB or FBL mode 3882 MS_U16 u16HSizeAfterPrescaling; 3883 MS_U16 u16VSizeAfterPrescaling; 3884 SCALER_WIN eWindow; 3885 } XC_GET_FB_LEVEL; 3886 3887 //////////////////////////////////////////// 3888 3889 /// OPTEE 3890 typedef struct __attribute__((__packed__)) 3891 { 3892 MS_U32 ID[4]; 3893 } RESOURCE; 3894 #define OP_TEE_XC_REG_MAX_CNT 0x10 3895 #define OP_TEE_XC_DRAM_MAX_CNT 0x10 3896 typedef enum 3897 { 3898 E_XC_OPTEE_GET_PIPE_ID, 3899 E_XC_OPTEE_ENABLE, 3900 E_XC_OPTEE_DISABLE, 3901 E_XC_OPTEE_SET_HANDLER, 3902 E_XC_OPTEE_SYNC_HANDLER, 3903 E_XC_OPTEE_GET_HANDLER, 3904 E_XC_OPTEE_UPDATE_HANDLER, 3905 E_XC_OPTEE_SET_MUX, 3906 E_XC_OPTEE_SYNC_MUX, 3907 E_XC_OPTEE_GET_MUX, 3908 E_XC_OPTEE_MAX, 3909 } EN_XC_OPTEE_ACTION; 3910 typedef struct __attribute__((__packed__)) 3911 { 3912 MS_U32 bk; 3913 MS_U16 value; 3914 MS_U16 mask; 3915 } XC_OPTEE_REG_DATA; 3916 typedef struct __attribute__((__packed__)) 3917 { 3918 #if defined(UFO_PUBLIC_HEADER_700) ||defined(UFO_PUBLIC_HEADER_500_3) 3919 MS_PHY address; 3920 #else 3921 MS_U32 address; 3922 #endif 3923 MS_U32 length; 3924 } XC_OPTEE_DRAM_DATA; 3925 typedef struct __attribute__((__packed__)) 3926 { 3927 MS_U16 version; 3928 MS_U32 length; 3929 SCALER_WIN eWindow; 3930 // EN_XC_OPTEE_ACTION action; 3931 /* E_XC_OPTEE_GET_PIPE_ID */ 3932 MS_U32 pipeID; 3933 /* E_XC_OPTEE_ENABLE / E_XC_OPTEE_DISABLE */ 3934 MS_BOOL isEnable; 3935 /* E_XC_OPTEE_SET_HANDLER / E_XC_OPTEE_GET_HANDLER / E_XC_OPTEE_UPDATE_HANDLER */ 3936 MS_U32 regs_cnt; 3937 XC_OPTEE_REG_DATA regs_data[OP_TEE_XC_REG_MAX_CNT]; 3938 MS_U32 drams_cnt; 3939 XC_OPTEE_DRAM_DATA drams_data[OP_TEE_XC_DRAM_MAX_CNT]; 3940 3941 } XC_OPTEE_HANDLER; 3942 typedef struct __attribute__((__packed__)) 3943 { 3944 MS_U16 version; 3945 MS_U32 length; 3946 SCALER_WIN eWindow; 3947 MS_U32 regs_cnt; 3948 XC_OPTEE_REG_DATA regs_data[OP_TEE_XC_REG_MAX_CNT]; 3949 MS_BOOL bfire; 3950 } XC_OPTEE_MUX_DATA; 3951 3952 //define 3D attribute type 3953 typedef enum 3954 { 3955 E_XC_3D_ATTRIBUTE_OSD, 3956 E_XC_3D_ATTRIBUTE_NUM, 3957 } E_XC_3D_ATTRIBUTE_TYPE; 3958 3959 //define 3D OSD blending point 3960 typedef enum 3961 { 3962 E_XC_3D_OSD_BLENDING_SC_IP, //scaler IP 3963 E_XC_3D_OSD_BLENDING_SC_OP, //scaler IP 3964 E_XC_3D_OSD_BLENDING_FRC_IP, // inside FRC IP 3965 E_XC_3D_OSD_BLENDING_FRC_OP, // inside FRC IP 3966 E_XC_3D_OSD_BLENDING_NUM, 3967 } E_XC_3D_OSD_BLENDING_POINT; 3968 3969 #ifdef UFO_XC_SCAN_TYPE 3970 //define enum for different scan type 3971 typedef enum 3972 { 3973 E_XC_NORMAL_MODE = 0, 3974 E_XC_FORCE_P_MODE, 3975 E_XC_FORCE_I_MODE, 3976 }E_XC_SCAN_TYPE; 3977 #endif 3978 3979 //SWDR information 3980 typedef struct DLL_PACKED 3981 { 3982 MS_BOOL bDRE_En; //1: enable; 0: disable 3983 MS_BOOL bDRE_SWDR_En; //1: enable; 0: disable 3984 MS_U8 u8DRE_DR_Set_BasicStrength; //default = 4, max = 32 3985 MS_U8 u8DRE_SWDR_Set_BasicStrength; //default = 4, max = 32 3986 MS_U16 u16DRE_SWDR_Set_StrengthDk; //dentity = 0x100; max = 0x200 3987 MS_U16 u16DRE_SWDR_Set_StrengthBr; //dentity = 0x100; max = 0x200 3988 MS_U8 u8DRE_SWDR_Set_SceneProtectLevel; //default = 0x08, max = 0x20 3989 MS_U8 u8DRE_Set_TemporalFilterLevel; //default = 0x06, max = 0x20 3990 MS_U8 u8DRE_Set_ColorCorrectLevel; //default = 0x10, max = 0x20 3991 }XC_SWDR_INFO; 3992 3993 //////////////////////////////////////////// 3994 3995 //------------------------------------------------------------------------------------------------- 3996 // Function and Variable 3997 //------------------------------------------------------------------------------------------------- 3998 3999 4000 //---------------------------- 4001 // Must have functions 4002 //---------------------------- 4003 //------------------------------------------------------------------------------------------------- 4004 /// Get XC library version 4005 /// @ingroup XC_INFO 4006 /// @param ppVersion \b OUT: store the version in this member 4007 /// @return @ref E_APIXC_ReturnValue 4008 //------------------------------------------------------------------------------------------------- 4009 E_APIXC_ReturnValue MApi_XC_GetLibVer(const MSIF_Version **ppVersion); 4010 4011 //------------------------------------------------------------------------------------------------- 4012 /// Get XC Information 4013 /// @ingroup XC_ToBeRemove 4014 /// @return @ref XC_ApiInfo returnthe XC information in this member 4015 //------------------------------------------------------------------------------------------------- 4016 const XC_ApiInfo * MApi_XC_GetInfo(void); 4017 4018 //------------------------------------------------------------------------------------------------- 4019 /// Get XC Status of specific window(Main/Sub) 4020 /// @ingroup XC_ToBeRemove 4021 /// @param pDrvStatus \b OUT: store the status 4022 /// @param eWindow \b IN: which window(Main/Sub) is going to get status 4023 /// @return @ref MS_BOOL 4024 //------------------------------------------------------------------------------------------------- 4025 MS_BOOL MApi_XC_GetStatus(XC_ApiStatus *pDrvStatus, SCALER_WIN eWindow); 4026 4027 //------------------------------------------------------------------------------------------------- 4028 /// Extended interface to Get XC Status of specific window(Main/Sub) with version info 4029 /// usage: 4030 /// XC_ApiStatusEx stXCStatus; 4031 /// memset(&stXCStatus, 0, sizeof(XC_ApiStatusEx)); 4032 /// stXCStatus.u16ApiStatusEX_Length = sizeof(XC_ApiStatusEx); 4033 /// stXCStatus.u32ApiStatusEx_Version = API_STATUS_EX_VERSION; 4034 /// if(MApi_XC_GetStatusEx(&stXCStatusEx, MAIN_WINDOW) == sizeof(XC_ApiStatusEx)) 4035 /// { 4036 /// ...... 4037 /// } 4038 /// @ingroup XC_INFO 4039 /// @param pDrvStatusEx \b OUT: store the status 4040 /// @param eWindow \b IN: which window(Main/Sub) is going to get status 4041 /// @return @ref MS_U16 return the copied length of input structure 4042 //------------------------------------------------------------------------------------------------- 4043 MS_U16 MApi_XC_GetStatusEx(XC_ApiStatusEx *pDrvStatusEx, SCALER_WIN eWindow); 4044 4045 //------------------------------------------------------------------------------------------------- 4046 /// Get XC Status of specific window(Main/Sub) for no lock method 4047 /// @ingroup XC_ToBeRemove 4048 /// @param pDrvStatus \b OUT: store the status 4049 /// @param eWindow \b IN: which window(Main/Sub) is going to get status 4050 /// @return @ref MS_BOOL 4051 //------------------------------------------------------------------------------------------------- 4052 MS_BOOL MApi_XC_GetStatusNodelay(ST_XC_APISTATUSNODELAY *pDrvStatus, SCALER_WIN eWindow); 4053 4054 //------------------------------- 4055 // Set Debug Level 4056 /// @ingroup XC_INFO 4057 // @para u16DbgSwitch: XC_DBGLEVEL_OFF,XC_DBGLEVEL_SETWINDOW,XC_DBGLEVEL_SETTIMING,XC_DBGLEVEL_SYNCDETECT,XC_DBGLEVEL_MUX 4058 // currently, only used XC_DBGLEVEL_OFF,XC_DBGLEVEL_SETTIMING 4059 //------------------------------- 4060 MS_BOOL MApi_XC_SetDbgLevel(MS_U16 u16DbgSwitch); 4061 4062 //For debug purpose only! 4063 //------------------------------- 4064 // Set Debug Mode for scaler framelock 4065 /// @ingroup XC_INFO 4066 // @para DbgMode: Disable/Enable debug 4067 // @para DbgFlag: The debug item 4068 // @para u32Data: The debug data 4069 //------------------------------- 4070 void MApi_XC_FPLLDbgMode(EN_FPLL_DBG_MODE DbgMode, EN_FPLL_DBG_FLAG DbgFlag, MS_U32 u32Data); 4071 4072 //------------------------------- 4073 // Set customer mode for scaler framelock 4074 /// @ingroup XC_SCALER 4075 // @para eMode: Disable/Enable customer mode 4076 // @para eFlag: The customer item 4077 // @para u32Data: The customer data 4078 //------------------------------- 4079 void MApi_XC_FPLLCustomerMode(EN_FPLL_MODE eMode, EN_FPLL_FLAG eFlag, MS_U32 u32Data); 4080 4081 //---------------------------- 4082 // Initialize 4083 //---------------------------- 4084 MS_BOOL MDrv_XC_SetIOMapBase(void); 4085 //------------------------------------------------------------------------------------------------- 4086 4087 /// Initialize the XC 4088 /// @ingroup XC_INIT 4089 /// @param pXC_InitData \b IN: the Initialized Data 4090 /// @param u32InitDataLen \b IN: the length of the initialized data 4091 /// @return @ref MS_BOOL 4092 //------------------------------------------------------------------------------------------------- 4093 MS_BOOL MApi_XC_Init(XC_INITDATA *pXC_InitData, MS_U32 u32InitDataLen); 4094 4095 //------------------------------------------------------------------------------------------------- 4096 /// Get the config data of XC 4097 /// @param pXC_InitData \b IN: the Initialized Data 4098 /// @return @ref E_APIXC_ReturnValue 4099 //------------------------------------------------------------------------------------------------- 4100 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_GetConfig(XC_INITDATA *pXC_InitData); 4101 4102 //------------------------------------------------------------------------------------------------- 4103 /// Initialize the XC MISC 4104 /// @ingroup XC_INIT 4105 /// @param pXC_Init_Misc \b IN: the Initialized XC MISC 4106 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 4107 //------------------------------------------------------------------------------------------------- 4108 E_APIXC_ReturnValue MApi_XC_Init_MISC(XC_INITMISC *pXC_Init_Misc, MS_U32 u32InitMiscDataLen); 4109 4110 4111 //------------------------------------------------------------------------------------------------- 4112 /// Get XC Init MISC Status 4113 /// @ingroup XC_INFO 4114 /// @param pXC_Init_Misc \b OUT: store the status 4115 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 4116 //------------------------------------------------------------------------------------------------- 4117 E_APIXC_ReturnValue MApi_XC_GetMISCStatus(XC_INITMISC *pXC_Init_Misc); 4118 4119 4120 //------------------------------------------------------------------------------------------------- 4121 /// Get XC Capability 4122 /// @ingroup XC_ToBeRemove 4123 /// @param u32Id (you can get detail from E_XC_CAPABILITY enum) 4124 /// @return output data for each query item. 4125 //------------------------------------------------------------------------------------------------- 4126 MS_U32 MApi_XC_GetCapability(MS_U32 u32Id); 4127 4128 //------------------------------------------------------------------------------------------------- 4129 /// Get XC Capability 2 4130 /// @ingroup XC_INFO 4131 /// @param eCapType \b IN: u32Id (you can get detail from E_XC_CAPABILITY enum) 4132 /// @param pRet \b IN: -- 4133 /// @param ret_size \b IN: -- 4134 /// @return @E_APIXC_ReturnValue 4135 //------------------------------------------------------------------------------------------------- 4136 E_APIXC_ReturnValue MApi_XC_GetChipCaps(E_XC_CAPS eCapType, MS_U32* pRet, MS_U32 ret_size); 4137 //------------------------------------------------------------------------------------------------- 4138 /// Exit the XC 4139 /// @ingroup XC_INIT 4140 /// @return @ref MS_BOOL 4141 //------------------------------------------------------------------------------------------------- 4142 MS_BOOL MApi_XC_Exit(void); 4143 4144 //------------------------------- 4145 // Set Window & Scaling 4146 //------------------------------- 4147 4148 //------------------------------------------------------------------------------------------------- 4149 /// Set Dynamic Scaling 4150 /// @ingroup XC_DS 4151 /// @param pstDSInfo \b IN: the information of Dynamic Scaling 4152 /// @param u32DSInforLen \b IN: the length of the pstDSInfo 4153 /// @param eWindow \b IN: which window we are going to set 4154 /// @return @ref MS_BOOL 4155 //------------------------------------------------------------------------------------------------- 4156 MS_BOOL MApi_XC_SetDynamicScaling(XC_DynamicScaling_Info *pstDSInfo, MS_U32 u32DSInfoLen, SCALER_WIN eWindow); 4157 4158 //------------------------------------------------------------------------------------------------- 4159 /// Set Dynamic Scaling flag 4160 /// @ingroup XC_DS 4161 /// @param bEnable \b IN: enable or disable Dynamic Scaling 4162 //------------------------------------------------------------------------------------------------- 4163 void MApi_XC_Set_DynamicScalingFlag(MS_BOOL bEnable); 4164 4165 //------------------------------------------------------------------------------------------------- 4166 /// Get Dynamic Scaling Status 4167 /// @ingroup XC_DS 4168 /// @return @ref MS_BOOL TRUE: dynamic scaling is enabled; FALSE: dynamic scaling is not enabled. 4169 //------------------------------------------------------------------------------------------------- 4170 MS_BOOL MApi_XC_GetDynamicScalingStatus(void); 4171 4172 //------------------------------------------------------------------------------------------------- 4173 /// Set SWDS force I mode film de interlate mode 4174 /// @param bPmode \b IN: current decoded stream progressive/interlace mode 4175 /// @param bIsTopField \b IN: current decoded stream top/bottom field 4176 /// @param u16FrameRate \b IN: current decoded stream framerate 4177 /// @param eWindow \b IN: which window we are going to set 4178 //------------------------------------------------------------------------------------------------- 4179 #ifdef UFO_XC_SWDS_SW_FILM_ENABLE 4180 E_APIXC_ReturnValue MApi_XC_Set_DS_ForceI_DeInterlaceMode(MS_BOOL bPmode, MS_BOOL bIsTopField, MS_U16 u16FrameRate, SCALER_WIN eWindow); 4181 #endif 4182 4183 //------------------------------------------------------------------------------------------------- 4184 /// Get DNR Base offset 4185 /// @ingroup XC_SCALER 4186 /// @param eWindow \b IN: which window we are going to set 4187 /// @return @ref MS_U32 return the DNR Base offset 4188 //------------------------------------------------------------------------------------------------- 4189 #if defined(UFO_PUBLIC_HEADER_700) 4190 MS_PHY MApi_XC_Get_DNRBaseOffset(SCALER_WIN eWindow); 4191 #else 4192 MS_U32 MApi_XC_Get_DNRBaseOffset(SCALER_WIN eWindow); 4193 #endif 4194 4195 //------------------------------------------------------------------------------------------------- 4196 /// Get the FrameStoreNum's factor number, which is usually to calcuate buffer offset 4197 /// @ingroup XC_SCALER 4198 /// @param eWindow \b IN: which window we are going to set 4199 /// @return @ref MS_U8 return the store frame number factor 4200 //------------------------------------------------------------------------------------------------- 4201 #define MApi_XC_Get_StoreFrameNum MApi_XC_Get_FrameNumFactor 4202 MS_U8 MApi_XC_Get_FrameNumFactor(SCALER_WIN eWindow); 4203 4204 //------------------------------------------------------------------------------------------------- 4205 /// Get the FRCM FrameStoreNum's factor number, which is usually to calcuate buffer offset 4206 /// @param eWindow \b IN: which window we are going to set 4207 /// @return @ref MS_U8 return the store frame number factor 4208 //------------------------------------------------------------------------------------------------- 4209 MS_U8 MApi_XC_Get_FRCMFrameNum(SCALER_WIN eWindow); 4210 4211 //------------------------------------------------------------------------------------------------- 4212 /// Set the specific window 4213 /// @ingroup XC_SCALER 4214 /// @param pstXC_SetWin_Info \b IN: the information of the window setting 4215 /// @param u32InitDataLen \b IN: the length of the pstXC_SetWin_Info 4216 /// @param eWindow \b IN: which window we are going to set 4217 /// @return @ref MS_BOOL 4218 //------------------------------------------------------------------------------------------------- 4219 MS_BOOL MApi_XC_SetWindow(XC_SETWIN_INFO *pstXC_SetWin_Info, MS_U32 u32InitDataLen, SCALER_WIN eWindow); 4220 4221 //------------------------------------------------------------------------------------------------- 4222 /// Set main and sub window 4223 /// @ingroup XC_SCALER 4224 /// @param pstXC_SetWin_Info_Main \b IN: the information of the main window setting 4225 /// @param pstXC_SetWin_Info_Sub \b IN: the information of the sub window setting 4226 /// @return @ref MS_BOOL 4227 //------------------------------------------------------------------------------------------------- 4228 MS_BOOL MApi_XC_SetDualWindow(XC_SETWIN_INFO *pstXC_SetWin_Info_Main, XC_SETWIN_INFO *pstXC_SetWin_Info_Sub); 4229 4230 //------------------------------------------------------------------------------------------------- 4231 /// Set the specific window for traveling mode(VE capture function) 4232 /// @ingroup XC_SCALER 4233 /// @param pstXC_SetWin_Info \b IN: the information of the window setting 4234 /// @param u32InitDataLen \b IN: the length of the pstXC_SetWin_Info 4235 /// @param eWindow \b IN: which window we are going to set 4236 /// @return @ref MS_BOOL 4237 //------------------------------------------------------------------------------------------------- 4238 MS_BOOL MApi_XC_SetTravelingWindow(XC_SETWIN_INFO *pstXC_SetWin_Info, MS_U32 u32InitDataLen, SCALER_WIN eWindow); 4239 4240 //------------------------------- 4241 // Mode Related 4242 //------------------------------- 4243 //------------------------------------------------------------------------------------------------- 4244 /// Set input source type 4245 /// @ingroup XC_SCALER 4246 /// @param enInputSourceType \b IN: which input source typewe are going to set 4247 /// @param eWindow \b IN: which window we are going to set 4248 /// @return void 4249 //------------------------------------------------------------------------------------------------- 4250 void MApi_XC_SetInputSource( INPUT_SOURCE_TYPE_t enInputSourceType, SCALER_WIN eWindow ); 4251 #ifdef UFO_PUBLIC_HEADER_212 4252 //------------------------------------------------------------------------------------------------- 4253 /// Set field detect 4254 /// @ingroup XC_SCALER 4255 /// @param enInputSourceType \b IN: which input source typewe are going to set 4256 /// @param enScanType \b IN: which scan type we are going to set 4257 /// @param eWindow \b IN: which window we are going to set 4258 /// @return void 4259 //------------------------------------------------------------------------------------------------- 4260 void MApi_XC_Set_FieldDetect(INPUT_SOURCE_TYPE_t enInputSrcType, EN_VIDEO_SCAN_TYPE enScanType, SCALER_WIN eWindow); 4261 #endif 4262 4263 //------------------------------------------------------------------------------------------------- 4264 /// check whether the specific window is YUV space 4265 /// @ingroup XC_SCALER 4266 /// @param eWindow \b IN: which window we are going to set 4267 /// @return @ref MS_BOOL 4268 //------------------------------------------------------------------------------------------------- 4269 MS_BOOL MApi_XC_IsYUVSpace(SCALER_WIN eWindow); 4270 4271 //------------------------------------------------------------------------------------------------- 4272 /// check whether specific window is memory format 422 4273 /// @ingroup XC_SCALER 4274 /// @param eWindow \b IN: which window we are going to query 4275 /// @return @ref MS_BOOL 4276 //------------------------------------------------------------------------------------------------- 4277 MS_BOOL MApi_XC_IsMemoryFormat422(SCALER_WIN eWindow); 4278 4279 //------------------------------------------------------------------------------------------------- 4280 /// Enable/Disable force RGB in 4281 /// @ingroup XC_SCALER 4282 /// @param bEnable \b IN: enable or disable 4283 /// @param eWindow \b IN: which window we are going to enable or disable 4284 //------------------------------------------------------------------------------------------------- 4285 void MApi_XC_EnableForceRGBin(MS_BOOL bEnable, SCALER_WIN eWindow); 4286 4287 //------------------------------------------------------------------------------------------------- 4288 /// Set XC mirror mode for main or sub window 4289 /// @ingroup XC_SCALER 4290 /// @param eMirrorMode \b IN: enable or disable XC mirror mode 4291 /// @param eWindow \b IN: main or sub window 4292 /// @return @ref MS_BOOL 4293 //------------------------------------------------------------------------------------------------- 4294 MS_BOOL MApi_XC_EnableMirrorModeEx( MirrorMode_t eMirrorMode, SCALER_WIN eWindow); 4295 4296 //------------------------------------------------------------------------------------------------- 4297 /// Get XC mirror mode for main or sub window 4298 /// @ingroup XC_SCALER 4299 /// @param eWindow \b IN: main or sub window 4300 /// @return @ref MirrorMode_t 4301 //------------------------------------------------------------------------------------------------- 4302 MirrorMode_t MApi_XC_GetMirrorModeTypeEx(SCALER_WIN eWindow); 4303 4304 4305 //------------------------------------------------------------------------------------------------- 4306 /// Get whether support SWDS or not 4307 /// @ingroup XC_SCALER 4308 /// @return @ref MS_BOOL 4309 //------------------------------------------------------------------------------------------------- 4310 MS_BOOL MApi_XC_Is_SupportSWDS(void); 4311 4312 //------------------------------------------------------------------------------------------------- 4313 /// Set DS info to XC global variable/// 4314 //------------------------------------------------------------------------------------------------- 4315 void SYMBOL_WEAK MApi_XC_SetDSInfo(XC_DS_INFO *pstSetDSInfo, MS_U32 u32DSInfoLen, SCALER_WIN eWindow); 4316 4317 //------------------------------------------------------------------------------------------------- 4318 /// Get the SWDS index number 4319 /// @param eWindow \b IN: which window we are going to get 4320 /// @return @ref MS_U8 retun the number of SWDS index 4321 //------------------------------------------------------------------------------------------------- 4322 MS_U8 SYMBOL_WEAK MApi_XC_GetSWDSIndex(SCALER_WIN eWindow); 4323 4324 //------------------------------- 4325 // Timing detect 4326 //------------------------------- 4327 4328 //------------------------------------------------------------------------------------------------- 4329 /// Get the specific window's sync status 4330 /// @ingroup XC_TIMING_DETECT 4331 /// @param eCurrentSrc \b IN: the current input source 4332 /// @param sXC_Sync_Status \b OUT:store the sync status 4333 /// @param eWindow \b IN: which window we are going to get 4334 //------------------------------------------------------------------------------------------------- 4335 void MApi_XC_GetSyncStatus(INPUT_SOURCE_TYPE_t eCurrentSrc , XC_IP_SYNC_STATUS *sXC_Sync_Status, SCALER_WIN eWindow); 4336 4337 //------------------------------------------------------------------------------------------------- 4338 /// wait for output sync 4339 /// @ingroup XC_TIMING_DETECT 4340 /// @param u8NumVSyncs \b IN: the number of VSync we are going to wait 4341 /// @param u16Timeout \b IN: time out 4342 /// @return @ref MS_U8 retun the number of left Vsync if timeout 4343 //------------------------------------------------------------------------------------------------- 4344 MS_U8 MApi_XC_WaitOutputVSync(MS_U8 u8NumVSyncs, MS_U16 u16Timeout, SCALER_WIN eWindow); 4345 4346 //------------------------------------------------------------------------------------------------- 4347 /// wait for input sync 4348 /// @ingroup XC_TIMING_DETECT 4349 /// @param u8NumVSyncs \b IN: the number of VSync we are going to wait 4350 /// @param u16Timeout \b IN: time out 4351 /// @return @ref MS_U8 retun the number of left Vsync if timeout 4352 //------------------------------------------------------------------------------------------------- 4353 MS_U8 MApi_XC_WaitInputVSync(MS_U8 u8NumVSyncs, MS_U16 u16Timeout, SCALER_WIN eWindow); 4354 4355 //------------------------------------------------------------------------------------------------- 4356 /// Set HDMI detect mode. (HDMI has DE and HV mode. You can set what you want to use.) 4357 /// @ingroup XC_TIMING_DETECT 4358 /// @param esynctype \b IN: HDMI detect mode 4359 //------------------------------------------------------------------------------------------------- 4360 void MApi_XC_SetHdmiSyncMode(E_HDMI_SYNC_TYPE esynctype); 4361 4362 //------------------------------------------------------------------------------------------------- 4363 /// Set HDMI detect mode. (HDMI has DE and HV mode. You can set what you want to use.) 4364 /// @ingroup XC_TIMING_DETECT 4365 /// @return @ref E_HDMI_SYNC_TYPE Get current HDMI sync type 4366 //------------------------------------------------------------------------------------------------- 4367 E_HDMI_SYNC_TYPE MApi_XC_GetHdmiSyncMode(void); 4368 4369 //------------------------------- 4370 // Display control 4371 //------------------------------- 4372 //------------------------------------------------------------------------------------------------- 4373 /// Set report window 4374 /// @ingroup XC_SCALER 4375 /// @param bEnable \b IN: enable or disable report window 4376 /// @param Window \b IN: the window position and size 4377 /// @param u8Color \b IN: report window's color 4378 //------------------------------------------------------------------------------------------------- 4379 void MApi_XC_SetRepWindow(MS_BOOL bEnable,MS_WINDOW_TYPE Window,MS_U8 u8Color); 4380 4381 //------------------------------------------------------------------------------------------------- 4382 /// update the _bSkipDisableOPWriteOffInFPLL variable status 4383 /// if TRUE, disable OPWriteOff in FPLL will be skipped 4384 /// @ingroup XC_SCALER 4385 /// @param bEnable \b IN: disable OPWriteOff in FPLL will be skipped or not. 4386 /// @param eWindow \b IN: Main or sub window 4387 //------------------------------------------------------------------------------------------------- 4388 void MApi_XC_SetSkipDisableOPWriteOffInFPLL(MS_BOOL bEnable, SCALER_WIN eWindow); 4389 4390 //------------------------------------------------------------------------------------------------- 4391 /// update the OPWriteOff variable status instead of direcly modifying the register itself 4392 /// instead, the state machine will take care of modifying the register by checking this status. 4393 /// @ingroup XC_SCALER 4394 /// @param bMCNRPQSetting \b IN: MCNR PQ status enable or not. 4395 /// @param eWindow \b IN: Main or sub window 4396 //------------------------------------------------------------------------------------------------- 4397 void MApi_XC_Set_OPWriteOffEnable(MS_BOOL bEnable, SCALER_WIN eWindow); 4398 4399 //------------------------------------------------------------------------------------------------- 4400 /// update the OPWriteOff variable status, set force flag, and direcly modifying the register 4401 /// @ingroup XC_SCALER 4402 /// @param bMCNRPQSetting \b IN: MCNR PQ status enable or not. 4403 /// @param eWindow \b IN: Main or sub window 4404 //------------------------------------------------------------------------------------------------- 4405 void MApi_XC_ForceSet_OPWriteOffEnable(MS_BOOL bEnable ,SCALER_WIN eWindow); 4406 4407 //------------------------------------------------------------------------------------------------- 4408 /// update the OPWriteOff variable status and also direcly modifying the register itself 4409 /// @ingroup XC_SCALER 4410 /// @param bMCNRPQSetting \b IN: MCNR PQ status enable or not. 4411 /// @param eWindow \b IN: Main or sub window 4412 //------------------------------------------------------------------------------------------------- 4413 void MApi_XC_Set_OPWriteOffEnableToReg(MS_BOOL bEnable, SCALER_WIN eWindow); 4414 4415 //------------------------------------------------------------------------------------------------- 4416 /// get the OPWriteOff variable status 4417 /// @ingroup XC_SCALER 4418 /// @param eWindow \b IN: Main or sub window 4419 /// @return @ref MS_BOOL 4420 //------------------------------------------------------------------------------------------------- 4421 MS_BOOL MApi_XC_Get_OPWriteOffEnable(SCALER_WIN eWindow); 4422 4423 //------------------------------------------------------------------------------------------------- 4424 /// skip the opwrite off operation in setwindow 4425 /// zoom no need to set panel timing, so skip the opwriteoff to save time 4426 /// @ingroup XC_SCALER 4427 /// @param bEnable \b IN: TRUE: skip, FALSE: don's skip 4428 /// @param eWindow \b IN: Main or sub window 4429 //------------------------------------------------------------------------------------------------- 4430 void MApi_XC_SkipOPWriteOffInSetWindow(MS_BOOL bEnable, SCALER_WIN eWindow); 4431 4432 //------------------------------------------------------------------------------------------------- 4433 /// return the status of skip the opwrite off operation in setwindow 4434 /// @ingroup XC_SCALER 4435 /// @param eWindow \b IN: Main or sub window 4436 /// @return @ref MS_BOOL 4437 //------------------------------------------------------------------------------------------------- 4438 MS_BOOL MApi_XC_GetSkipOPWriteOffInSetWindow(SCALER_WIN eWindow); 4439 4440 //------------------------------------------------------------------------------------------------- 4441 /// update display window registers with input window 4442 /// note: 4443 /// driver will update pstDspwin to hw directly, no any transform 4444 /// for ap user: should call MApi_XC_Is2K2KToFrcMode first to check whether xc under 2K2K mode or not, 4445 /// if TURE, need cut pstDspwin's x and width by half(x=x/2; width=width/2), and then pass through to this API 4446 /// @ingroup XC_SCALER 4447 /// @param eWindow \b IN: Main or sub window 4448 /// @param pdspwin \b IN: window info that will be setted to registers 4449 //------------------------------------------------------------------------------------------------- 4450 void MApi_XC_SetDispWinToReg(MS_WINDOW_TYPE *pstDspwin, SCALER_WIN eWindow); 4451 4452 //------------------------------------------------------------------------------------------------- 4453 /// get current display window registers setting 4454 /// note: 4455 /// driver will return pstDspwin from hw directly, no any transform 4456 /// for ap user: should call MApi_XC_Is2K2KToFrcMode first to check whether xc under 2K2K mode or not, 4457 /// if TURE, need double pstDspwin's x and width(x=x*2; width=width*2) from this API 4458 /// @ingroup XC_SCALER 4459 /// @param eWindow \b IN : Main or sub window 4460 /// @param pdspwin \b OUT: Pointer for ouput disp window register 4461 //------------------------------------------------------------------------------------------------- 4462 void MApi_XC_GetDispWinFromReg(MS_WINDOW_TYPE *pstDspwin, SCALER_WIN eWindow); 4463 4464 //------------------------------------------------------------------------------------------------- 4465 /// let display video freeze by disable scaler buffer write 4466 /// @ingroup XC_SCALER 4467 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 4468 /// @param eWindow \b IN: which window we are going to set 4469 //------------------------------------------------------------------------------------------------- 4470 void MApi_XC_FreezeImg(MS_BOOL bEnable, SCALER_WIN eWindow); 4471 4472 //------------------------------------------------------------------------------------------------- 4473 /// Query whether the specific window is freeze image status or not 4474 /// @ingroup XC_SCALER 4475 /// @param eWindow \b IN: which window we are going to query 4476 /// @return @ref MS_BOOL 4477 //------------------------------------------------------------------------------------------------- 4478 MS_BOOL MApi_XC_IsFreezeImg(SCALER_WIN eWindow); 4479 4480 //------------------------------------------------------------------------------------------------- 4481 /// This function will enable/diable output black pattern 4482 /// @ingroup XC_SCALER 4483 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 4484 //------------------------------------------------------------------------------------------------- 4485 void MApi_XC_GenerateBlackVideoForBothWin( MS_BOOL bEnable); 4486 4487 //------------------------------------------------------------------------------------------------- 4488 /// This function will enable/diable output black pattern 4489 /// @ingroup XC_SCALER 4490 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 4491 //------------------------------------------------------------------------------------------------- 4492 void MApi_XC_Set_BLSK(MS_BOOL bEnable); 4493 4494 //------------------------------------------------------------------------------------------------- 4495 /// This function will enable/diable output black pattern 4496 /// @ingroup XC_SCALER 4497 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 4498 //------------------------------------------------------------------------------------------------- 4499 void MApi_XC_GenerateBlackVideo(MS_BOOL bEnable, SCALER_WIN eWindow); 4500 4501 //------------------------------------------------------------------------------------------------- 4502 /// Query whether current XC is black video enabled or not 4503 /// @ingroup XC_SCALER 4504 /// @return @ref MS_BOOL 4505 //------------------------------------------------------------------------------------------------- 4506 MS_BOOL MApi_XC_IsBlackVideoEnable(SCALER_WIN eWindow); 4507 4508 //------------------------------------------------------------------------------------------------- 4509 /// This function will enable/diable framebufferless mode 4510 /// @ingroup XC_SCALER 4511 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 4512 //------------------------------------------------------------------------------------------------- 4513 void MApi_XC_EnableFrameBufferLess(MS_BOOL bEnable); 4514 4515 //------------------------------------------------------------------------------------------------- 4516 /// Query whether current XC is framebufferless or not 4517 /// @ingroup XC_SCALER 4518 /// @return @ref MS_BOOL 4519 //------------------------------------------------------------------------------------------------- 4520 MS_BOOL MApi_XC_IsCurrentFrameBufferLessMode(void); 4521 4522 4523 //------------------------------------------------------------------------------------------------- 4524 /// This function will enable/diable request framebufferless mode 4525 /// @ingroup XC_SCALER 4526 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 4527 //------------------------------------------------------------------------------------------------- 4528 void MApi_XC_EnableRequest_FrameBufferLess(MS_BOOL bEnable); 4529 4530 //------------------------------------------------------------------------------------------------- 4531 /// Query whether current XC is request framebufferless or not 4532 /// @ingroup XC_SCALER 4533 /// @return @ref MS_BOOL 4534 //------------------------------------------------------------------------------------------------- 4535 MS_BOOL MApi_XC_IsCurrentRequest_FrameBufferLessMode(void); 4536 4537 //------------------------------- 4538 // 3D control 4539 //------------------------------- 4540 //------------------------------------------------------------------------------------------------------ 4541 /// MApi_XC_Get_3D_HW_Version 4542 /// @ingroup XC_3D 4543 /// @return MS_BOOL \b OUT: yes or not 4544 //------------------------------------------------------------------------------------------------------ 4545 MS_U16 MApi_XC_Get_3D_HW_Version(void); 4546 4547 //------------------------------------------------------------------------------------------------------ 4548 /// MApi_XC_Get_3D_IsSupportedHW2DTo3D 4549 /// @ingroup XC_3D 4550 /// @return MS_BOOL \b OUT: yes or not 4551 //------------------------------------------------------------------------------------------------------ 4552 MS_BOOL MApi_XC_Get_3D_IsSupportedHW2DTo3D(void); 4553 4554 //------------------------------------------------------------------------------------------------------ 4555 /// MApi_XC_Set_3D_Mode 4556 /// @ingroup XC_3D 4557 /// @param e3dInputMode \b IN: 3d input format 4558 /// @param e3dOutputMode \b IN: 3d output format 4559 /// @param e3dPanelType \b IN: 3d panel type 4560 /// @param eWindow \b IN: main or sub 4561 /// @return MS_BOOL \b OUT: success or not 4562 //------------------------------------------------------------------------------------------------------ 4563 MS_BOOL MApi_XC_Set_3D_Mode(E_XC_3D_INPUT_MODE e3dInputMode, 4564 E_XC_3D_OUTPUT_MODE e3dOutputMode, 4565 E_XC_3D_PANEL_TYPE e3dPanelType, 4566 SCALER_WIN eWindow); 4567 //------------------------------------------------------------------------------------------------------ 4568 /// MApi_XC_Set_3D_MainWin_FirstMode 4569 /// @ingroup XC_3D 4570 /// @param bMainFirst \b IN: main first or not 4571 /// @return MS_BOOL \b OUT: success or not 4572 //------------------------------------------------------------------------------------------------------ 4573 MS_BOOL MApi_XC_Set_3D_MainWin_FirstMode(MS_BOOL bMainFirst); 4574 4575 //------------------------------------------------------------------------------------------------------ 4576 /// MApi_XC_Set_3D_LR_Frame_Exchg 4577 /// @ingroup XC_3D 4578 /// @param eWindow \b IN: main or sub 4579 /// @return MS_BOOL \b OUT: yes or no 4580 //------------------------------------------------------------------------------------------------------ 4581 MS_BOOL MApi_XC_Set_3D_LR_Frame_Exchg(SCALER_WIN eWindow); 4582 4583 //------------------------------------------------------------------------------------------------------ 4584 /// MApi_XC_3D_Is_LR_Frame_Exchged 4585 /// @ingroup XC_3D 4586 /// @param eWindow \b IN: main or sub 4587 /// @return MS_BOOL \b OUT: yes or no 4588 //------------------------------------------------------------------------------------------------------ 4589 MS_BOOL MApi_XC_3D_Is_LR_Frame_Exchged(SCALER_WIN eWindow); 4590 4591 //------------------------------------------------------------------------------------------------------ 4592 /// MApi_XC_Get_3D_Input_Mode 4593 /// @ingroup XC_ToBeModified 4594 /// @param eWindow \b IN: main or sub 4595 /// @return E_XC_3D_INPUT_MODE \b OUT: 3D input mode 4596 //------------------------------------------------------------------------------------------------------ 4597 E_XC_3D_INPUT_MODE MApi_XC_Get_3D_Input_Mode(SCALER_WIN eWindow); 4598 4599 //------------------------------------------------------------------------------------------------------ 4600 /// MApi_XC_Get_3D_Output_Mode 4601 /// @ingroup XC_ToBeModified 4602 /// @return E_XC_3D_OUTPUT_MODE \b OUT: 3D output mode 4603 //------------------------------------------------------------------------------------------------------ 4604 E_XC_3D_OUTPUT_MODE MApi_XC_Get_3D_Output_Mode(void); 4605 4606 //------------------------------------------------------------------------------------------------------ 4607 /// MApi_XC_Get_3D_Panel_Type 4608 /// @ingroup XC_ToBeModified 4609 /// @return E_XC_3D_PANEL_TYPE \b OUT: 3D panel type 4610 //------------------------------------------------------------------------------------------------------ 4611 E_XC_3D_PANEL_TYPE MApi_XC_Get_3D_Panel_Type(void); 4612 4613 //------------------------------------------------------------------------------------------------------ 4614 /// MApi_XC_Get_3D_MainWin_First 4615 /// @ingroup XC_3D 4616 /// @return MS_BOOL \b OUT: yes or no 4617 //------------------------------------------------------------------------------------------------------ 4618 MS_BOOL MApi_XC_Get_3D_MainWin_First(void); 4619 4620 //------------------------------------------------------------------------------------------------------ 4621 /// MApi_XC_3DMainSub_IPSync 4622 /// @ingroup XC_3D 4623 /// @return MS_BOOL \b OUT: yes or no 4624 //------------------------------------------------------------------------------------------------------ 4625 MS_BOOL MApi_XC_3DMainSub_IPSync(void); 4626 4627 //------------------------------------------------------------------------------------------------------ 4628 /// MApi_XC_Set_3D_VerVideoOffset 4629 /// @ingroup XC_3D 4630 /// @param u163DVerVideoOffset \b IN: 3d offset 4631 /// @return MS_BOOL \b OUT: success or not 4632 //------------------------------------------------------------------------------------------------------ 4633 MS_BOOL MApi_XC_Set_3D_VerVideoOffset(MS_U16 u163DVerVideoOffset); 4634 4635 //------------------------------------------------------------------------------------------------------ 4636 /// MApi_XC_Get_3D_VerVideoOffset 4637 /// @ingroup XC_3D 4638 /// @return MS_U16 \b OUT: H shift value 4639 //------------------------------------------------------------------------------------------------------ 4640 MS_U16 MApi_XC_Get_3D_VerVideoOffset(void); 4641 4642 //------------------------------------------------------------------------------------------------------ 4643 /// MApi_XC_Is3DFormatSupported 4644 /// @ingroup XC_3D 4645 /// @param e3dInputMode \b IN: input format 4646 /// @param e3dOutputMode \b IN: output format 4647 /// @return MS_BOOL \b OUT: success or not 4648 //------------------------------------------------------------------------------------------------------ 4649 MS_BOOL MApi_XC_Is3DFormatSupported(E_XC_3D_INPUT_MODE e3dInputMode, 4650 E_XC_3D_OUTPUT_MODE e3dOutputMode); 4651 //------------------------------------------------------------------------------------------------------ 4652 /// MApi_XC_Set_3D_HShift 4653 /// @ingroup XC_3D 4654 /// @param u16HShift \b IN: setup H shift value 4655 /// @return MS_BOOL \b OUT: success or not 4656 //------------------------------------------------------------------------------------------------------ 4657 MS_BOOL MApi_XC_Set_3D_HShift(MS_U16 u16HShift); 4658 //------------------------------------------------------------------------------------------------------ 4659 /// MApi_XC_Enable_3D_LR_Sbs2Line 4660 /// @ingroup XC_3D 4661 /// @param bEnable \b IN: Enable feature 4662 /// @return MS_BOOL \b OUT: success or not 4663 //------------------------------------------------------------------------------------------------------ 4664 MS_BOOL MApi_XC_Enable_3D_LR_Sbs2Line(MS_BOOL bEnable); 4665 //------------------------------------------------------------------------------------------------------ 4666 /// MApi_XC_Get_3D_HShift 4667 /// @ingroup XC_3D 4668 /// @return MS_U16 \b OUT: H shift value 4669 //------------------------------------------------------------------------------------------------------ 4670 MS_U16 MApi_XC_Get_3D_HShift(void); 4671 4672 //------------------------------------------------------------------------------------------------------ 4673 /// MApi_XC_Set_3D_HW2DTo3D_Buffer 4674 /// @ingroup XC_3D 4675 /// @param u32HW2DTO3D_DD_Buf \b IN: DD physical address for 2D3D 4676 /// @param u32HW2DTO3D_DR_Buf \b IN: DR physical address for 2D3D 4677 /// @return MS_BOOL \b OUT: success or not 4678 //------------------------------------------------------------------------------------------------------ 4679 MS_BOOL MApi_XC_Set_3D_HW2DTo3D_Buffer(MS_PHY u32HW2DTO3D_DD_Buf, MS_PHY u32HW2DTO3D_DR_Buf); 4680 4681 //------------------------------------------------------------------------------------------------------ 4682 /// MApi_XC_Set_3D_HW2DTo3D_Parameters 4683 /// @ingroup XC_ToBeModified 4684 /// @param st3DHw2DTo3DPara \b IN: 2D3D parameter 4685 /// @return MS_BOOL \b OUT: success or not 4686 //------------------------------------------------------------------------------------------------------ 4687 MS_BOOL MApi_XC_Set_3D_HW2DTo3D_Parameters(MS_XC_3D_HW2DTO3D_PARA st3DHw2DTo3DPara); 4688 4689 //------------------------------------------------------------------------------------------------------ 4690 /// MApi_XC_Get_3D_HW2DTo3D_Parameters 4691 /// @ingroup XC_ToBeRemove 4692 /// @param st3DHw2DTo3DPara \b IN: 2D3D parameter 4693 /// @return MS_BOOL \b OUT: success or not 4694 //------------------------------------------------------------------------------------------------------ 4695 MS_BOOL MApi_XC_Get_3D_HW2DTo3D_Parameters(MS_XC_3D_HW2DTO3D_PARA *pst3DHw2DTo3DPara); 4696 4697 //------------------------------------------------------------------------------------------------------ 4698 /// MApi_XC_Set_3D_Detect3DFormat_Parameters 4699 /// @ingroup XC_3D 4700 /// @param pstDetect3DFormatPara \b IN: 3D format parameter 4701 /// @return E_XC_3D_INPUT_MODE \b OUT: 3D input format 4702 //------------------------------------------------------------------------------------------------------ 4703 MS_BOOL MApi_XC_Set_3D_Detect3DFormat_Parameters(MS_XC_3D_DETECT3DFORMAT_PARA *pstDetect3DFormatPara); 4704 4705 //------------------------------------------------------------------------------------------------------ 4706 /// MApi_XC_Get_3D_Detect3DFormat_Parameters 4707 /// @ingroup XC_ToBeRemove 4708 /// @param pstDetect3DFormatPara \b IN: 3D format parameter 4709 /// @return E_XC_3D_INPUT_MODE \b OUT: 3D input format 4710 //------------------------------------------------------------------------------------------------------ 4711 MS_BOOL MApi_XC_Get_3D_Detect3DFormat_Parameters(MS_XC_3D_DETECT3DFORMAT_PARA *pstDetect3DFormatPara); 4712 4713 //------------------------------------------------------------------------------------------------------ 4714 /// MApi_XC_3D_PostPQSetting 4715 /// @ingroup XC_3D 4716 /// @param eWindow \b IN: select main or sub window 4717 /// @return E_XC_3D_INPUT_MODE \b OUT: 3D input format 4718 //------------------------------------------------------------------------------------------------------ 4719 E_XC_3D_INPUT_MODE MApi_XC_Detect3DFormatByContent(SCALER_WIN eWindow); 4720 4721 //------------------------------------------------------------------------------------------------------ 4722 /// MApi_XC_DetectNL 4723 /// @ingroup XC_SCALER 4724 /// @param eWindow \b IN: select main or sub window 4725 /// @param pstDetectNLatticePara \b IN: Nine lattice parameter 4726 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 4727 //------------------------------------------------------------------------------------------------------ 4728 MS_BOOL MApi_XC_DetectNL(SCALER_WIN eWindow, ST_DETECTNL_PARA* pstDetectNLatticePara); 4729 4730 //------------------------------------------------------------------------------------------------------ 4731 /// MApi_XC_3D_PostPQSetting 4732 /// @ingroup XC_3D 4733 /// @param eWindow \b IN: select main or sub window 4734 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 4735 //------------------------------------------------------------------------------------------------------ 4736 MS_BOOL MApi_XC_3D_PostPQSetting(SCALER_WIN eWindow); 4737 4738 //------------------------------------------------------------------------------------------------------ 4739 /// MApi_XC_Set_3D_FPInfo 4740 /// @ingroup XC_3D 4741 /// @param pstFPInfoPara \b IN: Frame packing info 4742 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 4743 //------------------------------------------------------------------------------------------------------ 4744 MS_BOOL MApi_XC_Set_3D_FPInfo(MS_XC_3D_FPINFO_PARA *pstFPInfoPara); 4745 4746 //------------------------------------------------------------------------------------------------------ 4747 /// MApi_XC_EnableAutoDetect3D 4748 /// @ingroup XC_3D 4749 /// @param bEnable \b IN: TRUE: enable, FALSE: disable 4750 /// @param enDetectMethod \b IN: select auto detect mode 4751 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 4752 //------------------------------------------------------------------------------------------------------ 4753 MS_BOOL MApi_XC_EnableAutoDetect3D(MS_BOOL bEnable, E_XC_3D_AUTODETECT_METHOD enDetectMethod); 4754 4755 //------------------------------------------------------------------------------------------------------ 4756 /// MApi_XC_GetAutoDetect3DFlag 4757 /// @ingroup XC_3D 4758 /// @param penDetectMethod \b IN: select auto detect mode 4759 /// @param pbEnable \b IN: TRUE: enable, FALSE: disable 4760 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 4761 //------------------------------------------------------------------------------------------------------ 4762 MS_BOOL MApi_XC_GetAutoDetect3DFlag(E_XC_3D_AUTODETECT_METHOD *penDetectMethod, MS_BOOL *pbEnable); 4763 4764 //------------------------------------------------------------------------------------------------------ 4765 /// MApi_XC_Set_3D_SubWinClk 4766 /// @ingroup XC_3D 4767 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 4768 //------------------------------------------------------------------------------------------------------ 4769 MS_BOOL MApi_XC_Set_3D_SubWinClk(void); 4770 4771 //------------------------------------------------------------------------------------------------------ 4772 /// Is 3D reg_3dlr_side2line_en enabled or not 4773 /// @ingroup XC_3D 4774 /// @return MS_BOOL \b OUT: TRUE: enabled FALSE: is not enabled 4775 //------------------------------------------------------------------------------------------------------ 4776 MS_BOOL MApi_XC_3D_Is_LR_Sbs2Line(void); 4777 4778 //------------------------------------------------------------------------------------------------- 4779 /// This function will get the skip status of default flag 4780 /// @ingroup XC_3D 4781 /// @return @ref MS_BOOL return the the skip status of default flag 4782 //------------------------------------------------------------------------------------------------- 4783 MS_BOOL MApi_SC_3D_Is_Skip_Default_LR_Flag(void); 4784 4785 //------------------------------------------------------------------------------------------------- 4786 /// This function will enable/diable skip default LR flag 4787 /// @ingroup XC_3D 4788 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 4789 /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed 4790 //------------------------------------------------------------------------------------------------- 4791 MS_BOOL MApi_XC_3D_Enable_Skip_Default_LR_Flag(MS_BOOL bEnable); 4792 4793 //------------------------------- 4794 // Mux control 4795 //------------------------------- 4796 #define MAX_SYNC_DATA_PATH_SUPPORTED (6) // (3),3 is not enough, because Main+SUB+Scart 1+Scart 2 =4, but in order to support off-line det + DWIN, modify to 6 first 4797 #define MAX_ASYNC_DATA_PATH_SUPPORTED (2) 4798 #define MAX_DATA_PATH_SUPPORTED (MAX_SYNC_DATA_PATH_SUPPORTED+MAX_ASYNC_DATA_PATH_SUPPORTED) 4799 4800 //------------------------------------------------------------------------------------------------- 4801 /// Initialize Mux before using Mux controller 4802 /// @ingroup XC_MUX 4803 /// @param input_source_to_input_port \b IN: a function to map from input source to input port 4804 //------------------------------------------------------------------------------------------------- 4805 void MApi_XC_Mux_Init(void (*input_source_to_input_port)(INPUT_SOURCE_TYPE_t src_ids , E_MUX_INPUTPORT* port_ids , MS_U8* u8port_count ) ); 4806 4807 //------------------------------------------------------------------------------------------------- 4808 /// Monitor the source of Mux 4809 /// @ingroup XC_MUX 4810 /// @param bRealTimeMonitorOnly \b IN: define whether do the monitor routine only for real time 4811 //------------------------------------------------------------------------------------------------- 4812 void MApi_XC_Mux_SourceMonitor(MS_BOOL bRealTimeMonitorOnly); 4813 4814 //------------------------------------------------------------------------------------------------- 4815 /// Create a path in Mux Controller. 4816 /// @ingroup XC_MUX 4817 /// @param Path_Info \b IN: the information of the path 4818 /// @param u32InitDataLen \b IN: the length of the Path_Info 4819 /// @return @ref MS_S16 return the path id, or -1 when any error is happened 4820 //------------------------------------------------------------------------------------------------- 4821 MS_S16 MApi_XC_Mux_CreatePath(XC_MUX_PATH_INFO* Path_Info, MS_U32 u32InitDataLen); 4822 4823 //------------------------------------------------------------------------------------------------- 4824 /// delete a path from Mux Controller. 4825 /// @ingroup XC_MUX 4826 /// @param src \b IN: Type of input source of a path you want to delete 4827 /// @param dest \b IN: Type of destination of a path you want to delete 4828 /// @return 1 if delete successfuly. Return -1 if delete fail 4829 //------------------------------------------------------------------------------------------------- 4830 MS_S16 MApi_XC_Mux_DeletePath(INPUT_SOURCE_TYPE_t src, E_DEST_TYPE dest); 4831 4832 //------------------------------------------------------------------------------------------------- 4833 /// A path is disabled after creating it (\ref MApi_XC_Mux_CreatePath) 4834 /// If a path is not enabled, \ref MApi_XC_Mux_SourceMonitor will bypass it. 4835 /// @ingroup XC_MUX 4836 /// @param PathId \b IN: PathId The Path you want to enable 4837 /// @return 1 if enable successfuly. Return -1 if enable fail 4838 //------------------------------------------------------------------------------------------------- 4839 MS_S16 MApi_XC_Mux_EnablePath(MS_U16 PathId); 4840 4841 //------------------------------------------------------------------------------------------------- 4842 /// Trigger Sync Event on Mux Controller. 4843 /// The Mux Controller will pass src and *para to each Sync Event Handler (refer synchronous_event_handler of MUX_DATA_PATH also). 4844 /// ( Delegate Function: 4845 /// Send necessary parameter to SyncEventHandler of each synchronous_path which source is 'src' ) 4846 /// @ingroup XC_MUX 4847 /// @param src \b IN: The input source which triggers Sync Event 4848 /// @param para \b IN: A pointer points to parameters which need to pass to Event Handler 4849 //------------------------------------------------------------------------------------------------- 4850 void MApi_XC_Mux_TriggerPathSyncEvent( INPUT_SOURCE_TYPE_t src , void* para); 4851 4852 //------------------------------------------------------------------------------------------------- 4853 /// Set the specific window 4854 /// @ingroup XC_MUX 4855 /// @param src \b IN: the source type for handler 4856 /// @param para \b IN: A pointer points to parameters which need to pass to Event Handler 4857 //------------------------------------------------------------------------------------------------- 4858 void MApi_XC_Mux_TriggerDestOnOffEvent( INPUT_SOURCE_TYPE_t src , void* para); 4859 4860 //------------------------------------------------------------------------------------------------- 4861 /// This function was used to enable/disable the destination periodic handler 4862 /// After enabled periodic hander, Mux Controller will pass the parameters to this handler and execute it periodically 4863 /// @ingroup XC_MUX 4864 /// @param src \b IN: the source type for handler 4865 /// @param bEnable \b IN: Enable/Disable the priodic handler. 4866 /// @return 1 if successfuly. Return -1 if failed. 4867 //------------------------------------------------------------------------------------------------- 4868 MS_S16 MApi_XC_Mux_OnOffPeriodicHandler( INPUT_SOURCE_TYPE_t src, MS_BOOL bEnable); 4869 4870 //------------------------------------------------------------------------------------------------- 4871 /// Get Paths in driver. 4872 /// @ingroup XC_MUX 4873 /// @param Paths \b OUT: Path information 4874 /// @return @ref MS_U8 4875 //------------------------------------------------------------------------------------------------- 4876 MS_U8 MApi_XC_Mux_GetPathInfo(XC_MUX_PATH_INFO* Paths); // Return current all path info. Max path number is MAX_DATA_PATH_SUPPORTED 4877 4878 //------------------------------------------------------------------------------------------------- 4879 /// Set Support MHL Path Info 4880 /// @ingroup XC_MUX 4881 /// @param u8MhlSupportInfo \b IN: MHL Support Info 4882 ///@return @ref MS_BOOL True if query success. 4883 //------------------------------------------------------------------------------------------------- 4884 E_APIXC_ReturnValue MApi_XC_Mux_SetSupportMhlPathInfo(MS_U8 u8MhlSupportInfo); 4885 4886 //------------------------------------------------------------------------------------------------- 4887 /// Set MHL Hot Plug Inverse Info 4888 /// @ingroup XC_MUX 4889 /// @param bIsMhlHotPlugInverse \b IN: MHL Hot Plug Inverse Info 4890 ///@return @ref MS_BOOL True if query success. 4891 //------------------------------------------------------------------------------------------------- 4892 E_APIXC_ReturnValue MApi_XC_Mux_SetMhlHotPlugInverseInfo(MS_BOOL bIsMhlHotPlugInverse); 4893 4894 //------------------------------------------------------------------------------------------------- 4895 /// Get input port from input HDMI source type 4896 /// @ingroup XC_MUX 4897 /// @param src \b IN: the query based on the input HDMI type 4898 /// @return @ref E_MUX_INPUTPORT 4899 //------------------------------------------------------------------------------------------------- 4900 E_MUX_INPUTPORT MApi_XC_Mux_GetHDMIPort( INPUT_SOURCE_TYPE_t src ); 4901 4902 void MApi_XC_Mux_GetPortMappingMatrix(XC_MUX_INPUTSRCTABLE *mapping_tab,MS_U32 length); 4903 //------------------------------------------------------------------------------------------------- 4904 /// Map input source to VD Ymux port 4905 /// @ingroup XC_MUX 4906 /// @param u8InputSourceType \b IN: input source type 4907 /// @return @ref MS_U8 4908 //------------------------------------------------------------------------------------------------- 4909 MS_U8 MApi_XC_MUX_MapInputSourceToVDYMuxPORT( INPUT_SOURCE_TYPE_t u8InputSourceType ); 4910 4911 //------------------------------ 4912 /// MApi_XC_Set_NR 4913 /// @ingroup XC_PQ 4914 /// @param bEn \b IN: enable 4915 /// @param eWindow \b IN: main or sub 4916 //------------------------------ 4917 void MApi_XC_Set_NR(MS_BOOL bEn, SCALER_WIN eWindow); 4918 4919 //------------------------------ 4920 /// MApi_XC_FilmMode_P 4921 /// @ingroup XC_PQ 4922 //------------------------------ 4923 void MApi_XC_FilmMode_P(void); 4924 4925 //------------------------------------------------------------------------------------------------- 4926 /// Check if UC is enabled 4927 /// @ingroup XC_PQ 4928 /// @param eWindow \b IN: which window(main or sub) to get 4929 /// @return MS_BOOL TRUE: UC enabled, FALSE: UC disabled 4930 //------------------------------------------------------------------------------------------------- 4931 MS_BOOL MApi_XC_GetUCEnabled(SCALER_WIN eWindow); 4932 4933 //------------------------------ 4934 /// MApi_XC_GenSpecificTiming 4935 /// @ingroup XC_TEST_PATTERN 4936 /// @param timingtype \b IN: internal timing gen 4937 //------------------------------ 4938 void MApi_XC_GenSpecificTiming(XC_Internal_TimingType timingtype); 4939 4940 //------------------------------ 4941 // Scaler IP Related 4942 //------------------------------ 4943 // DE-Bypass Mode 4944 //------------------------------------------------------------------------------------------------- 4945 /// This function get DE-Bypass Mode 4946 /// @ingroup XC_TIMING_DETECT 4947 /// @param eWindow \b IN: which window(main or sub) to get 4948 /// @return @ref MS_BOOL 4949 //------------------------------------------------------------------------------------------------- 4950 MS_BOOL MApi_XC_GetDEBypassMode(SCALER_WIN eWindow); 4951 4952 // Data enable 4953 //------------------------------------------------------------------------------------------------- 4954 /// This function get DE window 4955 /// @ingroup XC_TIMING_DETECT 4956 /// @param psWin \b OUT: window info to get 4957 /// @param eWindow \b IN: which window(main or sub) to get 4958 //------------------------------------------------------------------------------------------------- 4959 void MApi_XC_GetDEWindow(MS_WINDOW_TYPE *psWin, SCALER_WIN eWindow); 4960 4961 //------------------------------------------------------------------------------------------------- 4962 /// This function get DE window in DE ByPass Mode. (T12 / T13 can not support HDMI HV mode. So DE window from BK1 can not be retrieved if set to HV mode.) 4963 /// We Bypass pre-scaling and get H/V size from BK2 MDrv_SC_get_vsd_line_count & MDrv_SC_get_hsd_pixel_count. 4964 /// Prepare this function for using in the feature. 4965 /// @ingroup XC_TIMING_DETECT 4966 /// @param psWin \b OUT: window info to get 4967 /// @param eWindow \b IN: which window(main or sub) to get 4968 //------------------------------------------------------------------------------------------------- 4969 void MApi_XC_GetDEWidthHeightInDEByPassMode(MS_U16* pu16Width,MS_U16* pu16Height ,SCALER_WIN eWindow); 4970 4971 //Get Capture Window 4972 //------------------------------------------------------------------------------------------------- 4973 /// Get the capture window for specific window 4974 /// @ingroup XC_SCALER 4975 /// @param capture_win \b OUT: the window info to get 4976 /// @param eWindow \b IN: which window(main or sub) to get 4977 //------------------------------------------------------------------------------------------------- 4978 void MApi_XC_GetCaptureWindow(MS_WINDOW_TYPE* capture_win, SCALER_WIN eWindow); 4979 4980 4981 //Set Capture Window 4982 //------------------------------------------------------------------------------------------------- 4983 /// Set the Vertical start of capture window for specific window 4984 /// @ingroup XC_SCALER 4985 /// @param u16Vstart \b IN: the window info to get 4986 /// @param eWindow \b IN: which window(main or sub) to set 4987 //------------------------------------------------------------------------------------------------- 4988 void MApi_XC_SetCaptureWindowVstart(MS_U16 u16Vstart , SCALER_WIN eWindow); 4989 4990 //------------------------------------------------------------------------------------------------- 4991 /// Set the horizontal start of capture window for specific window 4992 /// @ingroup XC_SCALER 4993 /// @param u16Hstart \b IN: the window info to get 4994 /// @param eWindow \b IN: which window(main or sub) to set 4995 //------------------------------------------------------------------------------------------------- 4996 void MApi_XC_SetCaptureWindowHstart(MS_U16 u16Hstart , SCALER_WIN eWindow); 4997 4998 //------------------------------------------------------------------------------------------------- 4999 /// Set the Vertical size of capture window for specific window 5000 /// @ingroup XC_SCALER 5001 /// @param u16Vsize \b IN: the window info to get 5002 /// @param eWindow \b IN: which window(main or sub) to set 5003 //------------------------------------------------------------------------------------------------- 5004 void MApi_XC_SetCaptureWindowVsize(MS_U16 u16Vsize , SCALER_WIN eWindow); 5005 5006 //------------------------------------------------------------------------------------------------- 5007 /// Set the Horizontal size of capture window for specific window 5008 /// @ingroup XC_SCALER 5009 /// @param u16Hsize \b IN: the window info to get 5010 /// @param eWindow \b IN: which window(main or sub) to set 5011 //------------------------------------------------------------------------------------------------- 5012 void MApi_XC_SetCaptureWindowHsize(MS_U16 u16Hsize , SCALER_WIN eWindow); 5013 5014 // Utility 5015 //------------------------------------------------------------------------------------------------- 5016 /// do the software reset for the specific window 5017 /// @ingroup XC_UTILITY 5018 /// @param u8Reset \b IN: reset IP @ref SOFTWARE_REST_TYPE_t 5019 /// @param eWindow \b IN: which window we are going to set 5020 //------------------------------------------------------------------------------------------------- 5021 void MApi_XC_SoftwareReset(MS_U8 u8Reset, SCALER_WIN eWindow); 5022 5023 //------------------------------------------------------------------------------------------------- 5024 /// This function will calculate and return H Frequency x 10 5025 /// @ingroup XC_UTILITY 5026 /// @param u16HPeriod \b IN: Horizontal period 5027 /// @return MS_U16: H Frequency x 10 5028 //------------------------------------------------------------------------------------------------- 5029 MS_U16 MApi_XC_CalculateHFreqx10(MS_U16 u16HPeriod); 5030 5031 //------------------------------------------------------------------------------------------------- 5032 /// This function will calculate and return H Frequency x 1000 5033 /// @ingroup XC_UTILITY 5034 /// @param u16HPeriod \b IN: Horizontal period 5035 /// @return MS_U32: H Frequency x 1000 5036 //------------------------------------------------------------------------------------------------- 5037 MS_U32 MApi_XC_CalculateHFreqx1K(MS_U16 u16HPeriod); 5038 5039 //------------------------------------------------------------------------------------------------- 5040 /// This function will calculate and return V Frequency x 10 5041 /// @ingroup XC_UTILITY 5042 /// @param u16HFreqx10 \b IN: Horizontal frequency x 10 5043 /// @param u16VTotal \b IN: Vertical Total, usually the scan lines counts of a frame 5044 /// @return MS_U16: V Frequency x 10 5045 //------------------------------------------------------------------------------------------------- 5046 MS_U16 MApi_XC_CalculateVFreqx10(MS_U16 u16HFreqx10, MS_U16 u16VTotal); 5047 5048 //------------------------------------------------------------------------------------------------- 5049 /// This function will calculate and return V Frequency x 1000 5050 /// @ingroup XC_UTILITY 5051 /// @param u32HFreqx1K \b IN: Horizontal frequency x 1000 5052 /// @param u16VTotal \b IN: Vertical Total, usually the scan lines counts of a frame 5053 /// @return MS_U32: V Frequency x 1000 5054 //------------------------------------------------------------------------------------------------- 5055 MS_U32 MApi_XC_CalculateVFreqx1K(MS_U32 u32HFreqx1K, MS_U16 u16VTotal); 5056 5057 //------------------------------------------------------------------------------------------------- 5058 /// Attach a Call back function info Interrupt. 5059 /// @ingroup XC_UTILITY 5060 /// @param eIntNum \b IN: The interrupt type (@ref SC_INT_SRC) 5061 /// @param pIntCb \b IN: Call back function prototype. 5062 /// @param pParam \b IN: Parameter for IntCb 5063 /// @return MS_BOOL True: Success , False: Fail 5064 //------------------------------------------------------------------------------------------------- 5065 MS_BOOL MApi_XC_InterruptAttach(SC_INT_SRC enIntNum, SC_InterruptCb pIntCb, void * pParam); 5066 5067 //------------------------------------------------------------------------------------------------- 5068 /// DeAttach a Call back function info Interrupt. 5069 /// @ingroup XC_UTILITY 5070 /// @param eIntNum \b IN: The interrupt type (@ref SC_INT_SRC) 5071 /// @param pIntCb \b IN: Call back function prototype. 5072 /// @param pParam \b IN: Parameter for IntCb 5073 /// @return MS_BOOL True: Success , False: Fail 5074 //------------------------------------------------------------------------------------------------- 5075 MS_BOOL MApi_XC_InterruptDeAttach(SC_INT_SRC enIntNum, SC_InterruptCb pIntCb, void * pParam); 5076 5077 //------------------------------------------------------------------------------------------------- 5078 /// This function will disable input source 5079 /// @ingroup XC_UTILITY 5080 /// @param bDisable \b IN: TRUE : Disable; FALSE: Enable 5081 //------------------------------------------------------------------------------------------------- 5082 void MApi_XC_DisableInputSource(MS_BOOL bDisable, SCALER_WIN eWidnow); 5083 5084 //------------------------------------------------------------------------------------------------- 5085 /// This function will check is input source disabled or not 5086 /// @ingroup XC_UTILITY 5087 /// @param eWindow \b IN: which window(main or sub) to set 5088 /// @return MS_BOOL True: inputsource is disabled, False: inputsource is not disabled 5089 //------------------------------------------------------------------------------------------------- 5090 MS_BOOL MApi_XC_IsInputSourceDisabled(SCALER_WIN eWindow); 5091 5092 //------------------------------------------------------------------------------------------------- 5093 /// This function will change panel type dynamically 5094 /// @ingroup XC_SCALER 5095 /// @param pstPanelInfo \b IN: the new panel type 5096 //------------------------------------------------------------------------------------------------- 5097 void MApi_XC_ChangePanelType(XC_PANEL_INFO *pstPanelInfo); 5098 5099 //------------------------------------------------------------------------------------------------- 5100 /// MApi_XC_GetCurrentReadBank 5101 /// Attention! This function should only be used in the xc interrupt!!! 5102 /// @ingroup XC_SCALER 5103 /// This function will tell the current read bank 5104 /// @param eWindow \b IN: Window 5105 /// @return MS_U16 Current read bank 5106 //------------------------------------------------------------------------------------------------- 5107 MS_U16 MApi_XC_GetCurrentReadBank(SCALER_WIN eWindow); 5108 5109 //------------------------------------------------------------------------------------------------- 5110 /// MApi_XC_GetCurrentWriteBank 5111 /// Attention! This function should only be used in the xc interrupt!!! 5112 /// @ingroup XC_SCALER 5113 /// This function will tell the current write bank 5114 /// @param eWindow \b IN: Window 5115 /// @return MS_U16 Current write bank 5116 //------------------------------------------------------------------------------------------------- 5117 MS_U16 MApi_XC_GetCurrentWriteBank(SCALER_WIN eWindow); 5118 5119 //------------------------------------------------------------------------------------------------- 5120 /// 1. calculate H/V pre-scaling down ratio accroding to frame buffer size 5121 /// 2. must be called after MApi_XC_SetFrameBufferAddress() and before MApi_XC_SetWindow() 5122 /// @ingroup XC_SCALER 5123 /// @param bEnable \b IN: Enable auto pre scaling 5124 /// @param eWindow \b IN: Window 5125 //------------------------------------------------------------------------------------------------- 5126 void MApi_XC_SetAutoPreScaling(MS_BOOL bEnable, SCALER_WIN eWindow); 5127 5128 //------------------------------------------------------------------------------------------------- 5129 /// Get V sync width of current input source. 5130 /// @ingroup XC_SCALER 5131 /// @param eWindow \b IN: The Vsync width of specific window. 5132 /// @return MS_U8 Sync width of input V sync 5133 //------------------------------------------------------------------------------------------------- 5134 MS_U8 MApi_XC_GetVSyncWidth(SCALER_WIN eWindow); 5135 5136 //------------------------------------------------------------------------------ 5137 /// Set blanding point of GOP in Scaler. 5138 /// @ingroup XC_OSD 5139 /// @param MaxGOP \b IN: The mux number. 5140 /// @param UseNum \b IN: GOP selection. 5141 /// @param u8MuxNum \b IN: The mux number. 5142 /// @param bEnable \b IN: Enable GOP 5143 /// @return MS_BOOL TRUE: Success FALSE: Fail 5144 //------------------------------------------------------------------------------ 5145 MS_BOOL MApi_XC_set_GOP_Enable(MS_U8 MaxGOP, MS_U8 UseNum, MS_U8 u8MuxNum, MS_BOOL bEnable); 5146 5147 //------------------------------------------------------------------------------ 5148 /// Set blanding point of GOP in Scaler. 5149 /// @ingroup XC_OSD 5150 /// @param u8MuxNum \b IN: The mux number. 5151 /// @param ipSelGop \b IN: GOP selection. 5152 //------------------------------------------------------------------------------ 5153 void MApi_XC_ip_sel_for_gop(MS_U8 u8MuxNum , MS_XC_IPSEL_GOP ipSelGop); 5154 5155 //------------------------------------------------------------------------------ 5156 /// Set Scaler VOP New blending level 5157 /// @ingroup XC_OSD 5158 //------------------------------------------------------------------------------ 5159 void MApi_XC_SetVOPNBL(void); 5160 5161 //------------------------------------------------------------------------------ 5162 /// XC IP0 Get Destination Information for GOP mixer 5163 /// @ingroup XC_OSD 5164 /// @param pDstInfo \b IN: destination info 5165 /// @param u32SizeofDstInfo \b IN: size of destination info 5166 /// @param XCDstType \b IN: destination type 5167 /// @return @ref MS_BOOL 5168 //------------------------------------------------------------------------------ 5169 MS_BOOL MApi_XC_GetDstInfo(MS_XC_DST_DispInfo *pDstInfo, MS_U32 u32SizeofDstInfo, EN_GOP_XCDST_TYPE XCDstType); 5170 5171 //------------------------------------------------------------------------------------------------- 5172 /// Allow decoder to control Field R / W bank status of scaler. 5173 /// @ingroup XC_SCALER 5174 /// @param u8Enable \b IN: True: Decoder can control the R/W bank status. False: Decoder can not control the R/W bank status 5175 /// @param eWindow \b IN: @ref SCALER_WIN 5176 //------------------------------------------------------------------------------------------------- 5177 void MApi_XC_set_FD_Mask_byWin(MS_BOOL bEnable, SCALER_WIN eWindow); 5178 5179 //------------------------------------------------------------------------------------------------- 5180 /// Get XC FD_Mask master swtich status. 5181 /// @ingroup XC_SCALER 5182 /// @param eWindow \b IN: @ref SCALER_WIN 5183 /// @return TRUE/FALSE 5184 //------------------------------------------------------------------------------------------------- 5185 MS_BOOL MApi_XC_Get_FD_Mask_byWin(SCALER_WIN eWindow); 5186 5187 //------------------------------------------------------------------------------------------------- 5188 /// Get XC FD_Mask read back status from decoder. 5189 /// @ingroup XC_SCALER 5190 /// @param eWindow \b IN: @ref SCALER_WIN 5191 /// @return TRUE/FALSE 5192 //------------------------------------------------------------------------------------------------- 5193 MS_BOOL MApi_XC_Get_FD_Mask_Status(SCALER_WIN eWindow); 5194 5195 #if defined(UFO_PUBLIC_HEADER_500_3) 5196 //------------------------------------------------------------------------------------------------- 5197 /// Set Scaler IP input test pattern. 5198 /// @param u8Enable \b IN: Set 1 to enable. Bit(0) is horizontal pattern and Bit(1) is vertical pattern 5199 /// @param u6Pattern_type \b IN: The pattern type. (the width of each pattern) 5200 /// @param eWindow \b IN: @ref SCALER_WIN 5201 //------------------------------------------------------------------------------------------------- 5202 void MApi_XC_SetIP1TestPattern(MS_U8 u8Enable, MS_U16 u6Pattern_type, SCALER_WIN eWindow); 5203 #endif 5204 5205 //------------------------------------------------------------------------------------------------- 5206 /// Auto create input timing. To use this feature, the system must provide clock to scaler. 5207 /// @ingroup XC_TEST_PATTERN 5208 /// @param timingtype \b IN: the timing type. 5209 //------------------------------------------------------------------------------------------------- 5210 void MApi_XC_InitIPForInternalTiming(XC_Internal_TimingType timingtype); 5211 5212 //------------------------------------------------------------------------------------------------- 5213 /// Set Main window IP mux directly. 5214 /// @ingroup XC_MUX 5215 /// @param u8Val \b IN: The value need to be set into register 5216 //------------------------------------------------------------------------------------------------- 5217 void MApi_XC_SetIPMux(MS_U8 u8Val); 5218 5219 /// status of input H/V sync 5220 //------------------------------------------------------------------------------------------------- 5221 /// Return true if input H sync of scaler is exist. 5222 /// @ingroup XC_INFO 5223 /// @param eWindow \b IN: @ref SCALER_WIN 5224 /// @return @ref MS_BOOL TRUE: Exist FALSE: not Exist 5225 //------------------------------------------------------------------------------------------------- 5226 MS_BOOL MApi_XC_Is_H_Sync_Active(SCALER_WIN eWindow); 5227 5228 //------------------------------------------------------------------------------------------------- 5229 /// Return true if input V sync of scaler is exist. 5230 /// @ingroup XC_INFO 5231 /// @param eWindow \b IN: @ref SCALER_WIN 5232 /// @return @ref MS_BOOL TRUE: Exist FALSE: not Exist 5233 //------------------------------------------------------------------------------------------------- 5234 MS_BOOL MApi_XC_Is_V_Sync_Active(SCALER_WIN eWindow); 5235 5236 //------------------------------------------------------------------------------------------------- 5237 /// get auto position window with the corresponding valid data threshold 5238 /// @ingroup XC_INFO 5239 /// @param u8ValidData \b IN: valid data threshold 5240 /// @param eWindow \b IN: which window we are going to get 5241 /// @param pstAutoPositionWindow \b OUT: auto position window parameters 5242 /// @return MS_BOOL TRUE: auto position window is valid FALSE: auto position window is invalid 5243 //------------------------------------------------------------------------------------------------- 5244 MS_BOOL MApi_XC_GetAutoPositionWindow(MS_U8 u8ValidData, SCALER_WIN eWindow, MS_WINDOW_TYPE *pstAutoPositionWindow); 5245 5246 5247 //------------------------------ 5248 // Scaler & Memory 5249 //------------------------------ 5250 //------------------------------------------------------------------------------------------------- 5251 /// Set Frame buffer address and size for scaler. 5252 /// @ingroup XC_SCALER 5253 /// @param u32FBAddress \b IN: Start address of frame buffer. 5254 /// @param u32FBSize \b IN: Frame buffer size for Scaler 5255 /// @param eWindow \b IN: @ref SCALER_WIN 5256 //------------------------------------------------------------------------------------------------- 5257 void MApi_XC_SetFrameBufferAddress(MS_PHY u32FBAddress, MS_PHY u32FBSize, SCALER_WIN eWindow); 5258 5259 //------------------------------ 5260 // Scaler FRCM Memory // monaco mode 5261 //------------------------------ 5262 //------------------------------------------------------------------------------------------------- 5263 /// Set FRCM Frame buffer address and size for scaler. 5264 /// @ingroup XC_SCALER 5265 /// @param u32FBAddress \b IN: Start address of frame buffer. 5266 /// @param u32FBSize \b IN: Frame buffer size for Scaler 5267 /// @param eWindow \b IN: @ref SCALER_WIN 5268 //------------------------------------------------------------------------------------------------- 5269 void MApi_XC_SetFRCMFrameBufferAddress(MS_PHY u32FBAddress, MS_PHY u32FBSize, SCALER_WIN eWindow); 5270 5271 //------------------------------------------------------------------------------------------------- 5272 /// Check if the buffer size is enough or not. 5273 /// @ingroup XC_SCALER 5274 /// @param pstXC_SetWin_Info \b IN: @ref E_XC_MEMORY_REQUEST_TYPE 5275 /// @param eWindow \b IN: @ref SCALER_WIN 5276 /// @return @ref MS_BOOL TRUE: Buffer size is enough FALSE: Buffer is not enough 5277 //------------------------------------------------------------------------------------------------- 5278 MS_BOOL MApi_XC_IsFrameBufferEnoughForCusScaling(XC_SETWIN_INFO *pstXC_SetWin_Info, SCALER_WIN eWindow); 5279 5280 //------------------------------------------------------------------------------------------------- 5281 /// Enable or disable scaler memory read/write request 5282 /// @ingroup XC_SCALER 5283 /// @param bEnable \b IN: TURE=Enable memory request of 'eType'; FALSE= Disable memory request of 'eType' 5284 /// @param eType \b IN: @ref E_XC_MEMORY_REQUEST_TYPE 5285 /// @param eWindow \b IN: @ref SCALER_WIN 5286 /// @return @ref E_APIXC_ReturnValue 5287 //------------------------------------------------------------------------------------------------- 5288 E_APIXC_ReturnValue MApi_XC_SetScalerMemoryRequest(MS_BOOL bEnable, E_XC_MEMORY_REQUEST_TYPE eType, SCALER_WIN eWindow); 5289 5290 //Capture_Memory 5291 5292 //------------------------------------------------------------------------------------------------- 5293 /// Get pixel data specify by u16CorX and u16CorY. 5294 /// This pixel data is catured after scaler memory (not after OSD or gamma). And it will latch 20ms for retrieving data. 5295 /// Also note the x , y coordinate should be small or equel to input source size. (not panel size) 5296 /// @ingroup XC_SCALER 5297 /// @param u16CorX \b IN: X coordinate 5298 /// @param u16CorY \b IN: Y coordinate. 5299 /// @param eWindow \b IN: @ref SCALER_WIN 5300 /// @return void 5301 //------------------------------------------------------------------------------------------------- 5302 void MApi_XC_Get_PixelData(MS_U16 u16CorX, MS_U16 u16CorY, MS_PIXEL_32BIT* pixel); 5303 5304 //------------------------------------------------------------------------------------------------- 5305 /// calc widht or height based on existed dnr buffer and byte/pixel 5306 /// Fomula : Scaler buffer size / u8FBNum / (byte / pixel) / InputSize 5307 /// @ingroup XC_SCALER 5308 /// @param eWindow \b IN: The window need to be calc 5309 /// @param u8FBNum \b IN: frame cout 5310 /// @param u32InputSize \b IN: The input source size. 5311 /// @return MS_U32 The size of frames. 5312 //------------------------------------------------------------------------------------------------- 5313 MS_U32 MApi_XC_GetAvailableSize(SCALER_WIN eWindow, MS_U8 u8FBNum, MS_U32 u32InputSize); 5314 5315 //------------------------------ 5316 // Display & Output 5317 //------------------------------ 5318 // Display related 5319 5320 //------------------------------------------------------------------------------------------------- 5321 /// Set Scaler Frame color 5322 /// @ingroup XC_TEST_PATTERN 5323 /// @param u32aRGB \b IN: the 4 bytes in aRGB are "a: no use, R 23:16, G 15:8, B 7:0" (B is in LSB) 5324 //------------------------------------------------------------------------------------------------- 5325 void MApi_XC_SetFrameColor(MS_U32 u32aRGB); 5326 5327 //------------------------------------------------------------------------------------------------- 5328 /// Set color of main / sub window. This color will be shown when black screen enabled. 5329 /// @ingroup XC_TEST_PATTERN 5330 /// @param u8Color \b IN: format in a byte => R 7:5, G 4:2, B 1:0 5331 /// @param eWindow \b IN: The window which need to be set. 5332 //------------------------------------------------------------------------------------------------- 5333 void MApi_XC_SetDispWindowColor(MS_U8 u8Color, SCALER_WIN eWindow); 5334 5335 //------------------------------------------------------------------------------------------------- 5336 /// Query the capability of scaler about source to Video encoder(VE) 5337 /// @ingroup XC_VE 5338 /// @param OutputCapability \b OUT: Which part of scaler can output data to Video Encoder (VE). 5339 ///Check E_XC_SOURCE_TO_VE for capability bit. Take an example, if bit0 of OutputCapability equal to 1, 5340 ///Scaler can output data to ve from its E_XC_IP(IP) 5341 ///@return @ref MS_BOOL True if query success. 5342 //------------------------------------------------------------------------------------------------- 5343 E_APIXC_ReturnValue MApi_XC_SupportSourceToVE(MS_U16* pOutputCapability); 5344 5345 //------------------------------------------------------------------------------------------------- 5346 /// Enable output capture for output data to VE. Return False if current platform does not support E_XC_SOURCE_TO_VE 5347 /// Note: this source is not only for VE, but Scaler IP or DIP 5348 /// @ingroup XC_VE 5349 /// @param bEnable \b IN: Enable output capture function 5350 /// @param eSourceToVE \b IN: Specific output source. The source listed in E_XC_SOURCE_TO_VE is a "point" which can be retrieve data. 5351 //------------------------------------------------------------------------------------------------- 5352 E_APIXC_ReturnValue MApi_XC_SetOutputCapture(MS_BOOL bEnable,E_XC_SOURCE_TO_VE eSourceToVE); 5353 5354 //------------------------------------------------------------------------------------------------- 5355 /// Setup Gamma function ON/OFF 5356 /// @ingroup XC_GAMMA 5357 /// @param bEnable \b IN: Enable or Disable 5358 //------------------------------------------------------------------------------------------------- 5359 void MApi_XC_SetGammaOnOff (MS_BOOL bEnable); 5360 5361 //------------------------------------------------------------------------------------------------- 5362 /// Set VOP Gain for Main Window(after 3x3 before Gamma) 5363 /// @ingroup XC_GAMMA 5364 /// @param eVop_Channel \b IN: Select VOP R/G/B 5365 /// @param u16Val \b IN: Set value 5366 //------------------------------------------------------------------------------------------------- 5367 void MApi_XC_SetPreGammaGain(SCALER_WIN eWindow, MS_XC_VOP_CHANNEL_t eVop_Channel, MS_U16 u16Val); 5368 5369 //------------------------------------------------------------------------------------------------- 5370 /// Set VOP Offset for Main Window(after 3x3 before Gamma) 5371 /// @ingroup XC_GAMMA 5372 /// @param eVop_Channel \b IN: Select VOP R/G/B 5373 /// @param u16Val \b IN: Set value 5374 //------------------------------------------------------------------------------------------------- 5375 void MApi_XC_SetPreGammaOffset(SCALER_WIN eWindow, MS_XC_VOP_CHANNEL_t eVop_Channel, MS_U16 u16Val); 5376 5377 //------------------------------------------------------------------------------------------------- 5378 // Output timing related 5379 //------------------------------------------------------------------------------------------------- 5380 //------------------------------------------------------------------------------------------------- 5381 /// Setup panel timing (output DCLK)/FRC/FramePLL, and enable input source 5382 /// @ingroup XC_DISPLAY 5383 /// @param pTimingInfo \b IN: the information of the timing to set @ref XC_SetTiming_Info 5384 //------------------------------------------------------------------------------------------------- 5385 void MApi_XC_SetPanelTiming(XC_SetTiming_Info *pTimingInfo, SCALER_WIN eWindow); 5386 5387 //------------------------------------------------------------------------------------------------- 5388 /// Set current output type. This is set in Panel structure. You can adjust it here. 5389 /// @ingroup XC_DISPLAY 5390 /// @param enPnl_Out_Timing_Mode \b IN: The output type 5391 //------------------------------------------------------------------------------------------------- 5392 void MApi_XC_SetOutTimingMode(E_XC_PNL_OUT_TIMING_MODE enPnl_Out_Timing_Mode); 5393 5394 //------------------------------------------------------------------------------------------------- 5395 /// set free run display window timing 5396 /// @ingroup XC_DISPLAY 5397 /// @return void Output type. 5398 //------------------------------------------------------------------------------------------------- 5399 void MApi_XC_SetFreeRunTiming(void); 5400 5401 //------------------------------------------------------------------------------------------------- 5402 /// Adjust V sync FrontPorch , Sync Width for specific output frame rate (You can adjust in advance by using MApi_XC_SetExPanelInfo) 5403 /// @ingroup XC_DISPLAY 5404 /// @param u16FrontPorch \b IN: Front porch of output Vsync 5405 /// @param u16SyncWidth \b IN: Sync width of output Vsync 5406 /// @param u16OutputVfreq \b IN: The output frame rate you want to adjust. 5407 /// @return MS_BOOL True: Success False : Fail 5408 //------------------------------------------------------------------------------------------------- 5409 MS_BOOL MApi_XC_Set_CustomerSyncInfo(MS_U16 u16FrontPorch, MS_U16 u16SyncWidth, MS_U16 u16OutputVfreq); 5410 5411 //------------------------------------------------------------------------------------------------- 5412 /// Wait FPLL finished 5413 /// @ingroup XC_DISPLAY 5414 /// @return @ref MS_BOOL indicate FPLL finished or not (frame lock finished or not) 5415 //------------------------------------------------------------------------------------------------- 5416 MS_BOOL MApi_XC_WaitFPLLDone(void); 5417 5418 //------------------------------------------------------------------------------------------------- 5419 /// Get scaler output vertical frequency 5420 /// @ingroup XC_DISPLAY 5421 /// @return @ref MS_U16 return output vertical frequency x 100 5422 //------------------------------------------------------------------------------------------------- 5423 MS_U16 MApi_XC_GetOutputVFreqX100(void); 5424 5425 //------------------------------------------------------------------------------------------------- 5426 /// Get scaler output vertical frequency 5427 /// @ingroup XC_DISPLAY 5428 /// @return @ref MS_U16 return output vertical frequency x 100 5429 //------------------------------------------------------------------------------------------------- 5430 MS_U16 MApi_XC_GetOP1OutputVFreqX100(void); 5431 5432 //------------------------------------------------------------------------------------------------- 5433 /// Frame Lock Check 5434 /// @ingroup XC_DISPLAY 5435 /// @ref MS_BOOL TURE=Frame Lock ; FALSE= Not Frame Lock 5436 //------------------------------------------------------------------------------------------------- 5437 MS_BOOL MApi_XC_FrameLockCheck(void); 5438 5439 //------------------------------------------------------------------------------------------------- 5440 /// Set a customize FRC table into driver 5441 /// You can customize frc table in driver. The max number of FRC setting is 5 (Can be changed in driver layer). 5442 /// 5443 /// Here is an example of 5 FRC items with 6 maximal number of FRC setting. 5444 /// Please fill {0xFFFF, 0xFFFF, 1, 1, MS_FRC_1_1} at unused FRC item slot. 5445 /// 5446 /// {0, 160, 1, 4, MS_FRC_1_4}, <-- FRC item 0 5447 /// {160, 245, 2, 5, MS_FRC_2_5}, <-- FRC item 1 5448 /// {245, 260, 1, 2, MS_FRC_1_2}, <-- FRC item 2 5449 /// {260, 400, 1, 2, MS_FRC_1_2}, <-- FRC item 3 5450 /// {400, 0xFFFF, 1, 1, MS_FRC_1_1}, <-- FRC item 4 5451 /// {0xFFFF, 0xFFFF, 1, 1, MS_FRC_1_1} <-- FRC item 5 (Unused) 5452 /// @ingroup XC_DISPLAY 5453 /// @param stFRCTable \b IN: The pointer which point to a FRC table. You can refer above description. 5454 /// if pass NULL, driver will use default frc table. 5455 /// @return @ref E_APIXC_ReturnValue Return status. 5456 //------------------------------------------------------------------------------------------------- 5457 E_APIXC_ReturnValue MApi_XC_CustomizeFRCTable(SC_FRC_SETTING* stFRCTable); 5458 5459 //------------------------------------------------------------------------------------------------- 5460 /// Set specific in / out framerate control (Using in Box proejct only.) 5461 /// @ingroup XC_DISPLAY 5462 /// @param bEnable \b IN: TRUE: Enable ouput frame control 5463 /// @param pPanelInfoEx \b IN: The information about in / out framerate. 5464 /// @param pPanelInfoEx \b IN: The window which need to be controlled. 5465 /// @return @ref E_APIXC_ReturnValue return type. 5466 //------------------------------------------------------------------------------------------------- 5467 E_APIXC_ReturnValue MApi_XC_OutputFrameCtrl(MS_BOOL bEnable,XC_OUTPUTFRAME_Info * stOutFrameInfo,SCALER_WIN eWindow); 5468 5469 //------------------------------------------------------------------------------------------------- 5470 /// Set the FPLL mode: 5471 /// @ingroup XC_DISPLAY 5472 /// @param bTrue \b IN: True: FSM mode, False: Non FSM mode 5473 //------------------------------------------------------------------------------------------------- 5474 void MApi_SC_Enable_FPLL_FSM(MS_BOOL bTrue); 5475 5476 //------------------------------------------------------------------------------------------------- 5477 /// This function will force freerun in MDrv_Scaler_SetPanelTiming(), 5478 /// otherwise MDrv_Scaler_SetPanelTiming() will decide to do framelock or not by itself. 5479 /// 5480 /// Note: this function is difference with MDrv_SC_set_fpll() which is used to 5481 /// unlock framelock after MDrv_Scaler_SetPanelTiming(). 5482 /// But this function is used to affect MDrv_Scaler_SetPanelTiming()'s behavior. 5483 /// @ingroup XC_DISPLAY 5484 /// @param bEnable \b IN: TRUE: Enable force freerun. FALSE: disable force free run. 5485 //------------------------------------------------------------------------------------------------- 5486 void MApi_SC_ForceFreerun(MS_BOOL bEnable); 5487 5488 //------------------------------------------------------------------------------------------------- 5489 /// Get Force freerun status. 5490 /// @ingroup XC_DISPLAY 5491 /// @return @ref MS_BOOL True: Current is in Force freerun mode. False: Current is not in Force Freerun mode 5492 //------------------------------------------------------------------------------------------------- 5493 MS_BOOL MApi_SC_IsForceFreerun(void); 5494 5495 //------------------------------------------------------------------------------------------------- 5496 /// Set specific in / out framerate control (Using in Box proejct only.) 5497 /// @ingroup XC_DISPLAY 5498 /// @param bEnable \b IN: TRUE: Enable ouput frame control 5499 /// @param pPanelInfoEx \b IN: The information about in / out framerate. 5500 /// @param pPanelInfoEx \b IN: The window which need to be controlled. 5501 /// @return @ref E_APIXC_ReturnValue return type. 5502 //------------------------------------------------------------------------------------------------- 5503 void MApi_SC_SetFreerunVFreq(E_VFREQ_SEL VFreq); 5504 5505 //------------------------------------------------------------------------------------------------- 5506 /// Set external panel info for output 5507 /// Currently, only support setting of two different vfreqs at same time 5508 /// The set ExPanelInfo will take effect after running of function MApi_XC_SetPanelTiming 5509 /// @ingroup XC_DISPLAY 5510 /// @param bEnable \b IN: TRUE: Enable this XC_PANEL_INFO_EX, FALSE: Disable this XC_PANEL_INFO_EX 5511 /// @param pPanelInfoEx \b IN: The extern panel information to set @ref XC_PANEL_INFO_EX 5512 /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed 5513 //------------------------------------------------------------------------------------------------- 5514 MS_BOOL MApi_XC_SetExPanelInfo(MS_BOOL bEnable, XC_PANEL_INFO_EX *pPanelInfoEx); 5515 5516 //------------------------------------------------------------------------------------------------- 5517 /// Set the FPLL thresh mode: 5518 /// @ingroup XC_DISPLAY 5519 /// @param bEnable \b IN: TRUE: Thresh mode, FALSE: Non-Thresh mode 5520 //------------------------------------------------------------------------------------------------- 5521 void MApi_XC_Enable_FPLL_Thresh_Mode(MS_BOOL bEnable); 5522 5523 //------------------------------------------------------------------------------------------------- 5524 /// Get the FPLL Thresh mode: 5525 /// @ingroup XC_DISPLAY 5526 /// @return TRUE: Thresh mode, FALSE: Non-Thresh mode 5527 //------------------------------------------------------------------------------------------------- 5528 MS_BOOL MApi_XC_Get_FPLL_Thresh_Mode(void); 5529 5530 //------------------------------------------------------------------------------------------------- 5531 /// Enable auto no signal mode 5532 /// @ingroup XC_TIMING_DETECT 5533 /// @param bEnable \b IN: True: Enable auto no signal mode. 5534 /// @eWindow \b IN: The window (main or sub) which need to be controled. 5535 /// @return @ref E_APIXC_ReturnValue TRUE: eWindow is in auto no signal mode. FALSE: eWindow is not in auto no signal mode 5536 //------------------------------------------------------------------------------------------------- 5537 E_APIXC_ReturnValue MApi_XC_EnableIPAutoNoSignal(MS_BOOL bEnable, SCALER_WIN eWindow ); 5538 5539 //------------------------------------------------------------------------------------------------- 5540 /// Return true is current is in auto nosignal mode. 5541 /// @ingroup XC_TIMING_DETECT 5542 /// @param eWindow \b IN: IP auto nosignal in specific window 5543 /// @return @ref MS_BOOL TRUE: eWindow is in auto no signal mode. FALSE: eWindow is not in auto no signal mode 5544 //------------------------------------------------------------------------------------------------- 5545 MS_BOOL MApi_XC_GetIPAutoNoSignal(SCALER_WIN eWindow ); 5546 5547 //------------------------------------------------------------------------------------------------- 5548 /// Enable or disable IP auto coast 5549 /// @ingroup XC_TIMING_DETECT 5550 /// @param bEnable \b IN: Enable or Disable 5551 //------------------------------------------------------------------------------------------------- 5552 void MApi_XC_EnableIPAutoCoast(MS_BOOL bEnable); 5553 5554 //------------------------------------------------------------------------------------------------- 5555 /// Enable IP auto Coast debounce (the debounce time is 1 (default) in driver) 5556 /// @ingroup XC_TIMING_DETECT 5557 //------------------------------------------------------------------------------------------------- 5558 void MApi_XC_EnableIPCoastDebounce(void); 5559 5560 //------------------------------------------------------------------------------------------------- 5561 /// Clear IP auto Coast debounce 5562 /// @ingroup XC_TIMING_DETECT 5563 //------------------------------------------------------------------------------------------------- 5564 void MApi_XC_ClearIPCoastStatus(void); 5565 5566 //------------------------------------------------------------------------------------------------- 5567 /// Enable FPLL related settings not by program but by user's setting from TV tool 5568 /// @ingroup XC_DISPLAY 5569 /// Including PhaseLimit, limitD5D6D7_RK 5570 /// @param bEnable @ref MS_BOOL \b IN: enable or not 5571 //------------------------------------------------------------------------------------------------- 5572 void MApi_XC_EnableFpllManualSetting(MS_BOOL bEnable); // debug purpose 5573 5574 //-------------------------------------------------------------------------------------------------------------------- 5575 /// Test if panel output is ok by changing output DClk, this is to test max range that FPLL can do 5576 /// @ingroup XC_DISPLAY 5577 /// @param u32FpllSetOffset @ref MS_U32 \b IN: the offset to be add/minus the typical DClk output, unit is SET 5578 /// @param u16TestCnt @ref MS_U16 \b IN: the times to do boundary test 5579 //-------------------------------------------------------------------------------------------------------------------- 5580 void MApi_XC_FpllBoundaryTest(MS_U32 u32FpllSetOffset, MS_U16 u16TestCnt); // debug purpose 5581 5582 //------------------------------ 5583 // Offline signal detection related 5584 //------------------------------ 5585 //----------------------------------------------------------------------------- 5586 /// Set the source need to be detect in offline detection. 5587 /// @ingroup XC_TIMING_DETECT 5588 /// @param INPUT_SOURCE_TYPE_t \b IN: The source need to be monitor 5589 //------------------------------------------------------------------------------------------------- 5590 void MApi_XC_SetOffLineDetection (INPUT_SOURCE_TYPE_t); 5591 //------------------------------------------------------------------------------------------------- 5592 /// Get Offline detection status to specific input source 5593 /// @ingroup XC_TIMING_DETECT 5594 /// @param u8InputSourceType \b IN: the specific input source type to do offline detection 5595 /// @return @ref MS_U8 TRUE: Success, FALSE: Failed 5596 //------------------------------------------------------------------------------------------------- 5597 MS_U8 MApi_XC_GetOffLineDetection( INPUT_SOURCE_TYPE_t); 5598 //------------------------------------------------------------------------------------------------- 5599 /// Set Offline detection Sog Threshold 5600 /// @ingroup XC_TIMING_DETECT 5601 /// @param u8Threshold \b IN: threshold value t2,u3,u4: 0~31 other chip: 0~255 5602 /// @Return TRUE: Successful FALSE: Fail 5603 //------------------------------------------------------------------------------------------------- 5604 MS_BOOL MApi_XC_SetOffLineSogThreshold(MS_U8 u8Threshold); //t2,u3,u4: 0~31 other chip: 0~255 5605 //------------------------------------------------------------------------------------------------- 5606 /// Set Offline Detection Sog filter bandwidth 5607 /// @ingroup XC_TIMING_DETECT 5608 /// @param u8BW \b IN: bandwidth value t2,u3,u4: 0~7 other chip: 0~31 5609 /// @Return TRUE: Successful FALSE: Fail 5610 //------------------------------------------------------------------------------------------------- 5611 MS_BOOL MApi_XC_SetOffLineSogBW(MS_U8 u8BW); 5612 5613 //----------------------------------------------------------------------------- 5614 /// Initial offline detect procedure. 5615 /// @ingroup XC_TIMING_DETECT 5616 /// @return @ref MS_BOOL TRUE: Success, FALSE: Failed 5617 //----------------------------------------------------------------------------- 5618 MS_BOOL MApi_XC_OffLineInit(void); 5619 5620 //------------------------------ 5621 // PIP 5622 //------------------------------ 5623 //------------------------------------------------------------------------------------------------- 5624 /// Set Extra fetch number. (This setting is usually used in PIP mode. Please set carefully) 5625 /// @ingroup XC_SCALER 5626 /// @param u8val \b IN: The extra fetch number. 5627 //------------------------------------------------------------------------------------------------- 5628 void MApi_XC_Set_Extra_fetch_adv_line(MS_U8 u8val); 5629 5630 //------------------------------------------------------------------------------------------------- 5631 /// Set the VGA SOG on or off 5632 /// @ingroup XC_INFO 5633 /// @param bEnable \b IN: bEnable =1, Turn on the VGA SOG; bEnable =0, Turn off the VGA SOG 5634 //------------------------------------------------------------------------------------------------- 5635 E_APIXC_ReturnValue MApi_XC_SetVGASogEn(MS_BOOL bVGASogEn); 5636 5637 //------------------------------------------------------------------------------------------------- 5638 /// Control the output window(Main/Sub) on or off 5639 /// @ingroup XC_SCALER 5640 /// @param bEnable \b IN: bEnable =1, Turn on the window; bEnable =0, Turn off the window 5641 /// @param eWindow \b IN: eWindow =0, for MAIN; eWindow =1, for SUB; 5642 //------------------------------------------------------------------------------------------------- 5643 void MApi_XC_EnableWindow(MS_BOOL bEnable, SCALER_WIN eWindow); 5644 5645 //------------------------------------------------------------------------------------------------- 5646 /// whether sub window is enable 5647 /// @ingroup XC_SCALER 5648 /// @param void \b IN: none 5649 //------------------------------------------------------------------------------------------------- 5650 MS_BOOL MApi_XC_Is_SubWindowEanble(void); 5651 5652 //------------------------------------------------------------------------------------------------- 5653 /// Set Border format 5654 /// @ingroup XC_SCALER 5655 /// @param u8WidthIn \b IN: In-box width 5656 /// @param u8WidthOut \b IN: Out-box width 5657 /// @param u8color \b IN: border color 5658 /// @param eWindow \b IN: which window we are going to set 5659 //------------------------------------------------------------------------------------------------- 5660 void MApi_XC_SetBorderFormat( MS_U8 u8Left, MS_U8 u8Right, MS_U8 u8Up, MS_U8 u8Down, MS_U8 u8color, SCALER_WIN eWindow ); 5661 5662 //------------------------------------------------------------------------------------------------- 5663 /// enable or disable Border 5664 /// @ingroup XC_SCALER 5665 /// @param bEnable \b IN: Enable or Disable 5666 /// @param eWindow \b IN: which window we are going to set 5667 //------------------------------------------------------------------------------------------------- 5668 void MApi_XC_EnableBorder(MS_BOOL bEnable, SCALER_WIN eWindow); 5669 5670 //------------------------------------------------------------------------------------------------- 5671 /// Set Z-order main window first or not 5672 /// @ingroup XC_SCALER 5673 /// @param bMainFirst \b IN: TRUE: Main window first; FALSE: Sub window first 5674 //------------------------------------------------------------------------------------------------- 5675 void MApi_XC_ZorderMainWindowFirst(MS_BOOL bMainFirst); 5676 5677 //------------------------------ 5678 // PQ Load Function 5679 //------------------------------ 5680 //------------------------------------------------------------------------------------------------- 5681 /// Create a function for PQ in SC. 5682 /// @ingroup XC_PQ 5683 /// @param PQ_Function_Info \b IN: the information of the function 5684 /// @param u32InitDataLen \b IN: the length of the PQ_Function_Info 5685 //------------------------------------------------------------------------------------------------- 5686 void MApi_XC_PQ_LoadFunction(PQ_Function_Info* function_Info , MS_U32 u32InitDataLen); 5687 //------------------------------------------------------------------------------------------------- 5688 /// Return true if current status is H nonlinear scaling 5689 /// @ingroup XC_PQ 5690 /// @param u32InitDataLen \b IN: the length of the PQ_Function_Info 5691 /// @return @ref MS_U8 True: Using HNonLinearScaling False: Not in Nonlinear status 5692 //------------------------------------------------------------------------------------------------- 5693 MS_BOOL MApi_XC_Check_HNonLinearScaling(void); 5694 5695 //------------------------------ 5696 // EURO Function 5697 //------------------------------ 5698 5699 // Enable/Disable Euro/Australia Hdtv Detection support in driver 5700 //----------------------------------------------------------------------------- 5701 /// Enable/Disable Euro/Australia Hdtv Detection support in driver 5702 /// @ingroup XC_TIMING_DETECT 5703 /// @param bEnable: 5704 /// - ENABLE : enable support 5705 /// - DISABLE : disable disable 5706 /// @return None. 5707 //----------------------------------------------------------------------------- 5708 void MApi_XC_EnableEuroHdtvSupport(MS_BOOL bEnable); 5709 5710 //----------------------------------------------------------------------------- 5711 /// Enable Euro/Australia Hdtv Detection 5712 /// @ingroup XC_TIMING_DETECT 5713 /// @param bEnable: 5714 /// - ENABLE : enable detection 5715 /// - DISABLE : disable detection 5716 /// @return None. 5717 //----------------------------------------------------------------------------- 5718 void MApi_XC_EnableEuroHdtvDetection(MS_BOOL bEnable, SCALER_WIN eWindow); 5719 5720 //------------------------------ 5721 // Genenal R/W Function 5722 //------------------------------ 5723 5724 //------------------------------------------------------------------------------------------------- 5725 /// General Read Byte Function 5726 /// @ingroup XC_UTILITY 5727 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 5728 /// @return @ref MS_U8 5729 //------------------------------------------------------------------------------------------------- 5730 MS_U8 MApi_XC_ReadByte(MS_U32 u32Reg); 5731 5732 //------------------------------------------------------------------------------------------------- 5733 /// General Write Byte Function 5734 /// @ingroup XC_UTILITY 5735 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 5736 /// @return @ref MS_U8 5737 //------------------------------------------------------------------------------------------------- 5738 void MApi_XC_WriteByte(MS_U32 u32Reg, MS_U8 u8Val); 5739 5740 //------------------------------------------------------------------------------------------------- 5741 /// General Write Byte Function 5742 /// @ingroup XC_UTILITY 5743 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 5744 /// @param u8Val \b IN: setting value 5745 /// @param u8Msk \b IN: setting value 5746 //------------------------------------------------------------------------------------------------- 5747 void MApi_XC_WriteByteMask(MS_U32 u32Reg, MS_U8 u8Val, MS_U8 u8Msk); 5748 5749 //------------------------------------------------------------------------------------------------- 5750 /// General 2 Write Byte Function 5751 /// @ingroup XC_UTILITY 5752 /// @param u32Reg \b IN: which value shouldn't contain xc sub bank and address 5753 /// @param u16Val \b IN: setting value 5754 /// @param u16Msk \b IN: setting value 5755 //------------------------------------------------------------------------------------------------- 5756 void MApi_XC_Write2ByteMask(MS_U32 u32Reg, MS_U16 u16val, MS_U16 u16Mask); 5757 5758 //------------------------------ 5759 // XC R/W Function, using mutex to protect 5760 //------------------------------ 5761 5762 //------------------------------------------------------------------------------------------------- 5763 /// Scaler Write 2 Byte Function, and use mutex to protect while switch bank and write address 5764 /// @ingroup XC_UTILITY 5765 /// @param u32Reg \b IN: which value contain xc sub bank and address 5766 /// @param u16Val \b IN: setting value 5767 //------------------------------------------------------------------------------------------------- 5768 void MApi_XC_W2BYTE(MS_U32 u32Reg, MS_U16 u16Val); 5769 5770 //------------------------------------------------------------------------------------------------- 5771 /// Scaler Read 2 Byte Function, and use mutex to protect while switch bank and write address 5772 /// @ingroup XC_UTILITY 5773 /// @param u32Reg \b IN: which value contain xc sub bank and address 5774 /// @return @ref MS_U16 5775 //------------------------------------------------------------------------------------------------- 5776 MS_U16 MApi_XC_R2BYTE(MS_U32 u32Reg); 5777 5778 //------------------------------------------------------------------------------------------------- 5779 /// Scaler Write 4 Byte Function, and use mutex to protect while switch bank and write address 5780 /// @ingroup XC_UTILITY 5781 /// @param u32Reg \b IN: which value contain xc sub bank and address 5782 /// @param u32Val \b IN: setting value 5783 //------------------------------------------------------------------------------------------------- 5784 void MApi_XC_W4BYTE(MS_U32 u32Reg, MS_U32 u32Val); 5785 5786 //------------------------------------------------------------------------------------------------- 5787 /// Scaler Read 4 Byte Function, and use mutex to protect while switch bank and write address 5788 /// @ingroup XC_UTILITY 5789 /// @param u32Reg \b IN: which value contain xc sub bank and address 5790 /// @return @ref MS_U32 5791 //------------------------------------------------------------------------------------------------- 5792 MS_U32 MApi_XC_R4BYTE(MS_U32 u32Reg); 5793 5794 //------------------------------------------------------------------------------------------------- 5795 /// Scaler Read 2 Byte Mask Function, and use mutex to protect while switch bank and write address 5796 /// @ingroup XC_UTILITY 5797 /// @param u32Reg \b IN: which value contain xc sub bank and address 5798 /// @param u16mask \b IN: decide which bit is valied 5799 /// @return @ref MS_U16 5800 //------------------------------------------------------------------------------------------------- 5801 MS_U16 MApi_XC_R2BYTEMSK(MS_U32 u32Reg, MS_U16 u16Mask); 5802 5803 //------------------------------------------------------------------------------------------------- 5804 /// Scaler Write 2 Byte Mask Function, and use mutex to protect while switch bank and write address 5805 /// @ingroup XC_UTILITY 5806 /// @param u32Reg \b IN: which value contain xc sub bank and address 5807 /// @param u16Val \b IN: Setting value 5808 /// @param u16mask \b IN: decide which bit is valied 5809 //------------------------------------------------------------------------------------------------- 5810 void MApi_XC_W2BYTEMSK(MS_U32 u32Reg, MS_U16 u16Val, MS_U16 u16Mask); 5811 5812 //------------------------------ 5813 // MLoad Function, xc command burst 5814 //------------------------------ 5815 //------------------------------------------------------------------------------------------------- 5816 /// Initialize the Menuload 5817 /// @ingroup XC_UTILITY 5818 /// @param PhyAddr \b IN: the physical address for the menuload 5819 /// @param u32BufByteLen \b IN: the buffer length of the menu load commands 5820 //------------------------------------------------------------------------------------------------- 5821 void MApi_XC_MLoad_Init(MS_PHY PhyAddr, MS_U32 u32BufByteLen); 5822 5823 //------------------------------------------------------------------------------------------------- 5824 /// Enable/Disable the MLoad 5825 /// @ingroup XC_UTILITY 5826 /// @return void 5827 //------------------------------------------------------------------------------------------------- 5828 void MApi_XC_MLoad_Enable(MS_BOOL bEnable); 5829 5830 /// Initialize the Menuload by different client 5831 /// @ingroup XC_UTILITY 5832 /// @param eMloadSelect \b IN: the client id for the different Mload user 5833 /// @param PhyAddr \b IN: the physical address for the menuload 5834 /// @param u32BufByteLen \b IN: the buffer length of the menu load commands 5835 //------------------------------------------------------------------------------------------------- 5836 void SYMBOL_WEAK MApi_XC_MLoad_Cus_Init(EN_MLOAD_CLIENT_SELECT eMloadSelect, MS_PHY PhyAddr, MS_U32 u32BufByteLen); 5837 5838 //------------------------------------------------------------------------------------------------- 5839 /// Enable/Disable the MLoad by different client 5840 /// @ingroup XC_UTILITY 5841 /// @param eMloadSelect \b IN: the client id for the different Mload user 5842 /// @param bEnable \b IN: Enable/Disable 5843 /// @return void 5844 //------------------------------------------------------------------------------------------------- 5845 void SYMBOL_WEAK MApi_XC_MLoad_Cus_Enable(EN_MLOAD_CLIENT_SELECT eMloadSelect, MS_BOOL bEnable); 5846 5847 //------------------------------------------------------------------------------------------------- 5848 /// Get the status of MLoad 5849 /// @ingroup XC_UTILITY 5850 /// @return @ref MLOAD_TYPE 5851 //------------------------------------------------------------------------------------------------- 5852 MLOAD_TYPE MApi_XC_MLoad_GetStatus(void); 5853 5854 //------------------------------------------------------------------------------------------------- 5855 /// write signal command to Mload and fire 5856 /// @ingroup XC_UTILITY 5857 /// @param u32Addr \b IN: register 5858 /// @param u16Data \b IN: value 5859 /// @param u16Mask \b IN: mask 5860 /// @return @ref MS_BOOL 5861 //------------------------------------------------------------------------------------------------- 5862 MS_BOOL MApi_XC_MLoad_WriteCmd_And_Fire(MS_U32 u32Addr, MS_U16 u16Data, MS_U16 u16Mask); 5863 5864 //------------------------------------------------------------------------------------------------- 5865 /// write multi commands to Mload and fire 5866 /// @ingroup XC_UTILITY 5867 /// @param pu32Addr \b IN: buffer of register 5868 /// @param pu16Data \b IN: buffer of value 5869 /// @param pu16Mask \b IN: buffer of mask 5870 /// @param u16CmdCnt \b IN: counter of command 5871 //------------------------------------------------------------------------------------------------- 5872 MS_BOOL MApi_XC_MLoad_WriteCmds_And_Fire(MS_U32 *pu32Addr, MS_U16 *pu16Data, MS_U16 *pu16Mask, MS_U16 u16CmdCnt); 5873 5874 //------------------------------ 5875 // Menuload Gamma Function 5876 //------------------------------ 5877 //------------------------------------------------------------------------------------------------- 5878 /// Initialize the Menuload Gamma 5879 /// @ingroup XC_UTILITY 5880 /// @param PhyAddr \b IN: the physical address for the menuload 5881 /// @param u32BufByteLen \b IN: the buffer length of the menu load commands 5882 //------------------------------------------------------------------------------------------------- 5883 void MApi_XC_MLG_Init(MS_PHY PhyAddr, MS_U32 u32BufByteLen); 5884 5885 //------------------------------------------------------------------------------------------------- 5886 /// Enable/Disable the Menuload Gamma 5887 /// @ingroup XC_UTILITY 5888 /// @return void 5889 //------------------------------------------------------------------------------------------------- 5890 void MApi_XC_MLG_Enable(MS_BOOL bEnable); 5891 5892 //------------------------------------------------------------------------------------------------- 5893 /// Get the caps of Menuload Gamma 5894 /// @ingroup XC_UTILITY 5895 /// @return TRUE if succeed, FALSE if failed 5896 //------------------------------------------------------------------------------------------------- 5897 MS_BOOL MApi_XC_MLG_GetCaps(void); 5898 5899 //------------------------------------------------------------------------------------------------- 5900 /// Get the status of MLoad 5901 /// @ingroup XC_UTILITY 5902 /// @return @ref MLG_TYPE 5903 //------------------------------------------------------------------------------------------------- 5904 MLG_TYPE MApi_XC_MLG_GetStatus(void); 5905 5906 //------------------------------ 5907 // For U4 set VOP data mux to VE 5908 //------------------------------ 5909 //------------------------------------------------------------------------------------------------- 5910 /// Select the source which need to connect to VE. 5911 /// @ingroup XC_OSD 5912 /// @param eVOPSelOSD_MUX \b IN: The source need to connect to VE. 5913 //------------------------------------------------------------------------------------------------- 5914 void MApi_XC_SetOSD2VEMode(EN_VOP_SEL_OSD_XC2VE_MUX eVOPSelOSD_MUX); 5915 5916 //------------------------------------------------------------------------------------------------- 5917 /// Enable or disable prefilter in Scaler. 5918 /// @ingroup XC_SCALER 5919 /// @param bEnable \b IN: True: Enable: pre-filter. Disable: pre-filter 5920 //------------------------------------------------------------------------------------------------- 5921 void MApi_XC_IP2_PreFilter_Enable(MS_BOOL bEnable); 5922 5923 //------------------------------------------------------------------------------------------------- 5924 /// Get pixel data with RGB format. 5925 /// @ingroup XC_SCALER 5926 /// @param u16x \b IN: X coordinate 5927 /// @param u16Y \b IN: Y coordinate 5928 /// @param eWindow \b IN: The window for retrieving data. 5929 /// @return @ref u32r return the R data 5930 /// @return @ref u32g return the G data 5931 /// @return @ref u32b return the B data 5932 //------------------------------------------------------------------------------------------------- 5933 E_APIXC_GET_PixelRGB_ReturnValue MApi_XC_Get_Pixel_RGB(XC_Get_Pixel_RGB *pData, SCALER_WIN eWindow); 5934 5935 //------------------------------------------------------------------------------------------------- 5936 /// During retrieve pixel data, system have a cursor on the screen. This function can keep the cursor on the screen. 5937 /// @ingroup XC_SCALER 5938 /// @param bEnable \b IN: Enable if you want to keep cursor on the screen 5939 //------------------------------------------------------------------------------------------------- 5940 void MApi_XC_KeepPixelPointerAppear(MS_BOOL bEnable); 5941 5942 //------------------------------------------------------------------------------------------------- 5943 /// @param eMemFmt \b IN: the format of memory 5944 /// @ingroup XC_SCALER 5945 /// Set memory format 5946 /// @ref MS_BOOL 5947 //------------------------------------------------------------------------------------------------- 5948 MS_BOOL MApi_XC_Set_MemFmtEx(MS_XC_MEM_FMT eMemFmt, SCALER_WIN eWindow); 5949 5950 //------------------------------------------------------------------------------------------------- 5951 /// Get frame buffer less mode status 5952 /// @ingroup XC_SCALER 5953 /// @return @ref MS_BOOL retun the status about FrameBufferLess mode 5954 //------------------------------------------------------------------------------------------------- 5955 MS_BOOL MApi_XC_IsRequestFrameBufferLessMode(void); 5956 5957 //------------------------------------------------------------------------------------------------- 5958 /// Set Flag to bypass software reset in MApi_XC_Init() 5959 /// @ingroup XC_SCALER 5960 /// @param bFlag \b TRUE: initialize XC by skipping SW reset; FALSE: initialize XC in normal case 5961 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 5962 //------------------------------------------------------------------------------------------------- 5963 E_APIXC_ReturnValue MApi_XC_SkipSWReset(MS_BOOL bFlag); 5964 5965 //------------------------------------------------------------------------------------------------- 5966 /// MApi_XC_EnableRepWindowForFrameColor 5967 /// @ingroup XC_SCALER 5968 /// @param bEnable \b IN: enable 5969 //------------------------------------------------------------------------------------------------- 5970 void MApi_XC_EnableRepWindowForFrameColor(MS_BOOL bEnable); 5971 5972 //------------------------------------------------------------------------------------------------- 5973 /// Set VOP Video and OSD Laler 5974 //------------------------------------------------------------------------------------------------- 5975 //------------------------------------------------------------------------------------------------- 5976 /// Set OSD Layer in Box Project ( In TV chips, please use MApi_XC_SetVideoOnOSD) 5977 /// @ingroup XC_OSD 5978 /// @param eVOPOSDLayer \b IN: OSD and Video layer selection 5979 /// @param eWindow \b IN: The window The alpha value of current window. 5980 //------------------------------------------------------------------------------------------------- 5981 E_APIXC_ReturnValue MApi_XC_SetOSDLayer(E_VOP_OSD_LAYER_SEL eVOPOSDLayer, SCALER_WIN eWindow); 5982 //------------------------------------------------------------------------------------------------- 5983 /// Get OSD Layer in Box Project 5984 /// @ingroup XC_OSD 5985 /// @param eWindow \b IN: The window The alpha value of current window. 5986 //------------------------------------------------------------------------------------------------- 5987 E_VOP_OSD_LAYER_SEL MApi_XC_GetOSDLayer(SCALER_WIN eWindow); 5988 5989 //------------------------------------------------------------------------------------------------- 5990 /// Set Constant Alpha of Video 5991 //------------------------------------------------------------------------------------------------- 5992 //------------------------------------------------------------------------------------------------- 5993 /// Set alpha value of video (now only support in box) 5994 /// @ingroup XC_SCALER 5995 /// @param u8Val \b IN: The alpha value of video with specific window 5996 /// @param eWindow \b IN: The window which need to be adjust 5997 //------------------------------------------------------------------------------------------------- 5998 E_APIXC_ReturnValue MApi_XC_SetVideoAlpha(MS_U8 u8Val, SCALER_WIN eWindow); 5999 6000 //------------------------------------------------------------------------------------------------- 6001 /// Get alpha value of video (now only support in box) 6002 /// @ingroup XC_SCALER 6003 /// @param pu8Val \b IN: The alpha value of video with specific window 6004 /// @param eWindow \b IN: The alpha value of a window. 6005 //------------------------------------------------------------------------------------------------- 6006 E_APIXC_ReturnValue MApi_XC_GetVideoAlpha(MS_U8 *pu8Val, SCALER_WIN eWindow); 6007 6008 //------------------------------------------------------------------------------------------------- 6009 /// Skip Wait Vsync 6010 /// @ingroup XC_UTILITY 6011 /// @param eWindow \b IN: Enable 6012 /// @param Skip wait Vsync \b IN: Disable wait Vsync 6013 //------------------------------------------------------------------------------------------------- 6014 E_APIXC_ReturnValue MApi_XC_SkipWaitVsync( MS_BOOL eWindow,MS_BOOL bIsSkipWaitVsyn); 6015 6016 //------------------------------------------------------------------------------------------------- 6017 /// Set XC CMA Heap ID 6018 /// @param u8CMAHeapID \b IN: CMA Heap ID 6019 /// @param eWindow \b IN: which window we are going to set 6020 //------------------------------------------------------------------------------------------------- 6021 E_APIXC_ReturnValue MApi_XC_SetCMAHeapID(MS_U8 u8CMAHeapID, SCALER_WIN eWindow); 6022 6023 //------------------------------------------------------------------------------------------------- 6024 /// Select which DE to vop 6025 /// @ingroup XC_SCALER 6026 /// @param bFlag \b IN: @ref E_OP2VOP_DE_SEL 6027 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6028 //------------------------------------------------------------------------------------------------- 6029 E_APIXC_ReturnValue MApi_XC_OP2VOPDESel(E_OP2VOP_DE_SEL eVopDESel); 6030 6031 //------------------------------------------------------------------------------------------------- 6032 /// Set FRC Window 6033 /// @ingroup XC_FRC 6034 /// @param e3dInputMode \b IN: @ref E_XC_3D_INPUT_MODE 6035 /// @param e3dOutputMode \b IN: @ref E_XC_3D_OUTPUT_MODE 6036 /// @param e3dPanelType \b IN: @ref E_XC_3D_PANEL_TYPE 6037 //------------------------------------------------------------------------------------------------- 6038 void MApi_XC_FRC_SetWindow(E_XC_3D_INPUT_MODE e3dInputMode, E_XC_3D_OUTPUT_MODE e3dOutputMode, E_XC_3D_PANEL_TYPE e3dPanelType); 6039 6040 //------------------------------------------------------------------------------------------------- 6041 /// XC update bwd configuration 6042 /// @param eType \b IN: bwd configuration type 6043 /// @param pstParam \b IN: data 6044 /// @param eWindow \b IN: window type 6045 /// @return result of power state control. 6046 //------------------------------------------------------------------------------------------------- 6047 #ifdef SUPPORT_BWD 6048 MS_BOOL SYMBOL_WEAK MApi_XC_SetBwdConfig(E_XC_BWD_CONFIG_TYPE eType, void *pstParam, SCALER_WIN eWindow); 6049 #endif 6050 //------------------------------------------------------------------------------------------------- 6051 /// XC config cma configuration 6052 /// @param pstXC_CMA_Config \b IN: XC_CMA_CONFIG cma config struct 6053 /// @param enCmaClient \b IN: cma client 6054 /// @param u32DataLen \b IN: data len 6055 /// @param eWindow \b IN: window type 6056 //------------------------------------------------------------------------------------------------- 6057 MS_BOOL MApi_XC_ConfigCMA(XC_CMA_CONFIG *pstXC_CMA_Config, XC_CMA_CLIENT enCmaClient, MS_U32 u32DataLen, SCALER_WIN eWindow); 6058 6059 //------------------------------------------------------------------------------------------------- 6060 /// Set two initial factors mode to improve quality in FBL 6061 /// @ingroup XC_PQ 6062 /// @param bEnable \b IN: enable or disable two initial factors mode 6063 /// @param eWindow \b IN: @ref SCALER_WIN 6064 //------------------------------------------------------------------------------------------------- 6065 MS_BOOL MApi_XC_Enable_TwoInitFactor(MS_BOOL bEnable, SCALER_WIN eWindow); 6066 6067 //------------------------------------------------------------------------------------------------- 6068 /// Get field packing mode support status 6069 /// @ingroup XC_3D 6070 /// @return TRUE(success) or FALSE(fail) 6071 //------------------------------------------------------------------------------------------------- 6072 MS_BOOL MApi_XC_IsFieldPackingModeSupported(void); 6073 6074 //------------------------------------------------------------------------------------------------- 6075 /// Pre Init before XC Init 6076 /// @ingroup XC_INIT 6077 /// @param u16Type \b IN: @ref E_OP2VOP_DE_SEL 6078 /// @param para \b IN: parameter 6079 /// @param u32Length \b IN: size of parameter 6080 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6081 //------------------------------------------------------------------------------------------------- 6082 E_APIXC_ReturnValue MApi_XC_PreInit( E_XC_PREINIT_t eType ,void* para, MS_U32 u32Length); 6083 6084 //------------------------------------------------------------------------------------------------- 6085 /// Get RGB data from memory buffer 6086 /// @ingroup XC_SCALER 6087 /// @param eBufType \b IN: get RGB 8 bits or 10 bits format data 6088 /// @param pRect \b IN: the widnow for getting data area in memory, need to refer to pre-scaling 6089 /// @param pRectBuf \b IN: the buffer for getting data, the buffer typs must be the same as eBufType 6090 /// @param eWindow \b IN: get main or sub video data from memory 6091 //------------------------------------------------------------------------------------------------- 6092 void MApi_XC_Get_BufferData(E_XC_OUTPUTDATA_TYPE eBufType, MS_WINDOW_TYPE *pRect, void *pRectBuf, SCALER_WIN eWindow); 6093 6094 //------------------------------------------------------------------------------------------------- 6095 /// Set RGB data to memory buffer 6096 /// @ingroup XC_SCALER 6097 /// @param eBufType \b IN: set RGB 8 bits or 10 bits format data 6098 /// @param pDstRect \b IN: the widnow for setting data area in memory, need to refer to pre-scaling 6099 /// @param pSrcBuf \b IN: the buffer with RGB data for setting to memory, the buffer typs must be the same as eBufType 6100 /// @param pSrcRect \b IN: the widnow for picking data area in pSrcBuf 6101 /// @param eWindow \b IN: set main or sub video data to memory 6102 //------------------------------------------------------------------------------------------------- 6103 void MApi_XC_Set_BufferData(E_XC_INPUTDATA_TYPE eBufType, MS_WINDOW_TYPE *pDstRect, void *pSrcBuf, MS_WINDOW_TYPE *pSrcRect, SCALER_WIN eWindow); 6104 6105 //------------------------------------------------------------------------------------------------- 6106 /// Control the main window on or off 6107 /// @ingroup XC_ToBeModified 6108 /// @param bEnable \b IN: bEnable =1, Turn on the window; bEnable =0, Turn off the window 6109 //------------------------------------------------------------------------------------------------- 6110 void MApi_XC_EnableMainWindow(MS_BOOL bEnable); // Turn on/off main/sub window 6111 6112 //------------------------------------------------------------------------------------------------- 6113 /// Enable sub window and control the window size 6114 /// @ingroup XC_ToBeRemove 6115 /// @param *pstDispWin \b IN: Window type 6116 //------------------------------------------------------------------------------------------------- 6117 void MApi_XC_EnableSubWindow(MS_WINDOW_TYPE *pstDispWin); 6118 6119 //------------------------------------------------------------------------------------------------- 6120 /// Disable sub window 6121 /// @ingroup XC_ToBeRemove 6122 /// @param void \b IN: none 6123 //------------------------------------------------------------------------------------------------- 6124 void MApi_XC_DisableSubWindow(void); 6125 6126 //------------------------------------------------------------------------------------------------- 6127 /// Set pixel shift 6128 /// @ingroup XC_DISPLAY 6129 /// @param s8H \b IN: pixel shift H 6130 /// @param s8V \b IN: pixel shift V 6131 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6132 //------------------------------------------------------------------------------------------------- 6133 E_APIXC_ReturnValue MApi_XC_SetPixelShift(MS_S8 s8H, MS_S8 s8V); 6134 6135 //------------------------------------------------------------------------------------------------- 6136 /// Set Pixel Shift Features 6137 /// @ingroup XC_DISPLAY 6138 /// @param u16HPixelShiftRange \b IN: horizontal shift range, if it is +/- 4, please assign 4 to this parameter 6139 /// @param u16VPixelShiftRange \b IN: vertical shift range, if it is +/- 3, please assign 3 to this parameter 6140 /// @param ePixelShiftFeature \b IN: decide which feature to be used, use "|" for multiple features 6141 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6142 //------------------------------------------------------------------------------------------------- 6143 E_APIXC_ReturnValue MApi_XC_SetPixelShiftFeatures(MS_U16 u16HPixelShiftRange, 6144 MS_U16 u16VPixelShiftRange, 6145 PIXEL_SHIFT_FEATURE ePixelShiftFeature); 6146 //------------------------------------------------------------------------------------------------- 6147 /// MApi_XC_Combine_MLoadEn 6148 /// @ingroup XC_UTILITY 6149 /// @param bEnable \b IN: whether to menuload 6150 /// Do an example when you want to menuload OSDLayer : 6151 /// MApi_XC_Combine_MLoadEn(TRUE) 6152 /// xc function 6153 /// MApi_XC_Combine_MLoadEn(FALSE) 6154 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6155 //------------------------------------------------------------------------------------------------- 6156 E_APIXC_ReturnValue MApi_XC_Combine_MLoadEn(MS_BOOL bEn); 6157 6158 //------------------------------------------------------------------------------------------------- 6159 /// MApi_XC_SetVideoOnOSD 6160 /// @ingroup XC_OSD 6161 /// @param E_VDO_ON_OSD_LAYER \b IN: set video show on which osd layer 6162 /// @param eWindow \b IN: set main or sub video data to memory 6163 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6164 //------------------------------------------------------------------------------------------------- 6165 E_APIXC_ReturnValue MApi_XC_SetVideoOnOSD(E_VIDEO_ON_OSD_LAYER enlayer, SCALER_WIN eWindow); 6166 6167 //------------------------------------------------------------------------------------------------- 6168 /// MApi_XC_SetOSDLayerBlending 6169 /// @ingroup XC_OSD 6170 /// @param u8Layer \b IN: which osd layer will blend 6171 /// @param bEnable \b IN: whether to blend 6172 /// @param eWindow \b IN: which window blend with 6173 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6174 //------------------------------------------------------------------------------------------------- 6175 E_APIXC_ReturnValue MApi_XC_SetOSDLayerBlending(MS_U8 u8Layer, MS_BOOL bEnable, SCALER_WIN eWindow); 6176 6177 //------------------------------------------------------------------------------------------------- 6178 /// MApi_XC_SetOSDLayerAlpha 6179 /// @ingroup XC_OSD 6180 /// @param u8Layer \b IN: which osd layer will blend 6181 /// @param u8Alpha \b IN: blending alpha 6182 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6183 //------------------------------------------------------------------------------------------------- 6184 E_APIXC_ReturnValue MApi_XC_SetOSDLayerAlpha(MS_U8 u8Layer, MS_U8 u8Alpha); 6185 6186 //------------------------------------------------------------------------------------------------- 6187 /// MApi_XC_SetOSDBlendingFormula 6188 /// @ingroup XC_OSD 6189 /// @param enOsdIndex \b IN: osd index 6190 /// @param enType \b IN: osd blending type 6191 /// @param eWindow \b IN: blending with main or sub video 6192 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6193 //------------------------------------------------------------------------------------------------- 6194 E_APIXC_ReturnValue MApi_XC_SetOSDBlendingFormula(E_XC_OSD_INDEX enOsdIndex, E_XC_OSD_BlENDING_TYPE enType, SCALER_WIN eWindow); 6195 6196 //------------------------------------------------------------------------------------------------- 6197 // usage: 6198 // MS_XC_REPORT_PIXELINFO stRepPixInfo; 6199 // memset(&stRepPixInfo, 0, sizeof(MS_XC_REPORT_PIXELINFO)); 6200 // stRepPixInfo.u32ReportPixelInfo_Version = XC_REPORT_PIXELINFO_VERSION; 6201 // stRepPixInfo.u16ReportPixelInfo_Length = sizeof(MS_XC_REPORT_PIXELINFO); 6202 // stRepPixInfo.enStage = E_XC_GET_PIXEL_STAGE_AFTER_OSD; 6203 // stRepPixInfo.u16XStart = xxxx; 6204 // stRepPixInfo.u16XEnd = xxxx; 6205 // stRepPixInfo.u16YStart = xxxx; 6206 // stRepPixInfo.u16YEnd = xxxx; 6207 // MApi_XC_ReportPixelInfo(&stRepPixInfo); 6208 // 6209 /// Report Pixel Info 6210 /// @ingroup XC_SCALER 6211 /// @param pstRepPixInfo \b IN: pointer to struct MS_XC_REPORT_PIXELINFO 6212 /// @return TRUE if succeed, FALSE if failed 6213 //------------------------------------------------------------------------------------------------- 6214 MS_BOOL MApi_XC_ReportPixelInfo(MS_XC_REPORT_PIXELINFO *pstRepPixInfo); 6215 6216 //------------------------------------------------------------------------------------------------- 6217 /// MApi_XC_SetScaling 6218 /// @ingroup XC_SCALER 6219 /// @param bEnable \b IN: set enable or disable 6220 /// @param eScaling_type \b IN: set scaling type, pre-scaling, post-scaling, both-scaling 6221 /// @param eVector_type \b IN: set H vector, v vector, and HV vector 6222 /// @param eWindow \b IN: set main or sub video data to memory 6223 //------------------------------------------------------------------------------------------------- 6224 void MApi_XC_SetScaling( MS_BOOL bEnable, E_XC_SCALING_TYPE eScaling_type, E_XC_VECTOR_TYPE eVector_type, SCALER_WIN eWindow ); 6225 6226 //------------------------------------------------------------------------------------------------- 6227 /// MApi_XC_SetMCDIBufferAddress 6228 /// @ingroup XC_PQ 6229 /// @param u32FBAddress \b IN: frame buffer base addr 6230 /// @param u32FBSize \b IN: frame buffer size 6231 /// @param eType \b IN: set frame buffer for MCDI ME1 or ME2 6232 //------------------------------------------------------------------------------------------------- 6233 void MApi_XC_SetMCDIBufferAddress(MS_PHY u32FBAddress, MS_PHY u32FBSize, E_XC_MCDI_TYPE eType); 6234 6235 //------------------------------------------------------------------------------------------------- 6236 /// MApi_XC_EnableMCDI 6237 /// @ingroup XC_PQ 6238 /// @param bEnable \b IN: enable/disable MCDI 6239 /// @param eType \b IN: control MCDI ME1 or ME2 or both 6240 //------------------------------------------------------------------------------------------------- 6241 void MApi_XC_EnableMCDI(MS_BOOL bEnable, E_XC_MCDI_TYPE eType); 6242 6243 6244 //------------------------------------------------------------------------------------------------- 6245 /// MApi_XC_SendCmdToFRC 6246 /// @ingroup XC_FRC 6247 /// @param u8Cmd \b IN: CMD 6248 /// @param count \b IN: parameter Counter 6249 /// @param pFRC_R2_Para \b IN: input parameter 6250 /// @return TRUE if succeed, FALSE if failed 6251 //------------------------------------------------------------------------------------------------- 6252 MS_BOOL MApi_XC_SendCmdToFRC( MS_U8 u8Cmd, MS_U8 count, FRC_R2_CMD_PARAMETER_t pFRC_R2_Para ); 6253 6254 //------------------------------------------------------------------------------------------------- 6255 /// MApi_XC_GetMsgFromFRC 6256 /// @ingroup XC_FRC 6257 /// @param u8Cmd \b IN: CMD 6258 /// @param pu8ParaCount \b IN: Counter 6259 /// @param pu8Para \b IN: input parameter 6260 /// @return TRUE if succeed, FALSE if failed 6261 //------------------------------------------------------------------------------------------------- 6262 MS_BOOL MApi_XC_GetMsgFromFRC(MS_U8* pu8Cmd, MS_U8* pu8ParaCount, MS_U8* pu8Para); 6263 6264 //------------------------------------------------------------------------------------------------- 6265 /// Enable/Disable RW bank auto 6266 /// @ingroup XC_SCALER 6267 /// @param bEnable \b IN: enable or disable 6268 /// @param eWindow \b IN: which window we are going to enable or disable 6269 //------------------------------------------------------------------------------------------------- 6270 void MApi_XC_EnableRWBankAuto(MS_BOOL bEnable, SCALER_WIN eWindow); 6271 6272 void MApi_XC_Dump_SHM(void); 6273 //------------------------------------------------------------------------------------------------- 6274 /// Set XC W/R Bank Mapping Number 6275 /// @ingroup XC_SCALER 6276 /// @param u8Val \b IN: W/R bank mapping value 6277 /// @param eWindow \b IN: which window we are going to set 6278 //------------------------------------------------------------------------------------------------- 6279 void MApi_XC_SetWRBankMappingNum(MS_U8 u8Val, SCALER_WIN eWindow); 6280 6281 //------------------------------------------------------------------------------------------------- 6282 /// Get XC W/R Bank Mapping Number 6283 /// @ingroup XC_SCALER 6284 /// @param eWindow \b IN: which window we are going to get 6285 /// @return MS_U8 W/R bank mapping number 6286 //------------------------------------------------------------------------------------------------- 6287 MS_U8 MApi_XC_GetWRBankMappingNum(SCALER_WIN eWindow); 6288 6289 //------------------------------------------------------------------------------------------------- 6290 /// Get XC W/R Bank Mapping Number for Zap (including UC effect) 6291 /// @ingroup XC_SCALER 6292 /// @param eWindow \b IN: which window we are going to get 6293 /// @return MS_U8 W/R bank mapping number 6294 //------------------------------------------------------------------------------------------------- 6295 MS_U8 MApi_XC_GetWRBankMappingNumForZap(SCALER_WIN eWindow); 6296 6297 //------------------------------------------------------------------------------------------------- 6298 /// Set BOB mode 6299 /// @ingroup XC_PQ 6300 /// @param bEnable \b IN: Enable BOB mode or not 6301 /// @param eWindow \b IN: which window we are going to set 6302 /// @return TRUE - succeed, FALSE - fail 6303 //------------------------------------------------------------------------------------------------- 6304 MS_BOOL MApi_XC_SetBOBMode(MS_BOOL bEnable, SCALER_WIN eWindow); 6305 6306 //------------------------------------------------------------------------------------------------- 6307 /// Set XC force read bank 6308 /// @ingroup XC_SCALER 6309 /// @param bEnable \b IN: Enable force read bank or not 6310 /// @param u8Bank \b IN: Force read bank index 6311 /// @param eWindow \b IN: which window we are going to set 6312 //------------------------------------------------------------------------------------------------- 6313 void MApi_XC_SetForceReadBank(MS_BOOL bEnable, MS_U8 u8Bank, SCALER_WIN eWindow); 6314 6315 //------------------------------------------------------------------------------------------------- 6316 /// Set XC lock point 6317 /// @ingroup XC_SCALER 6318 /// @param u16LockPoint \b IN: lock point count 6319 /// @param eWindow \b IN: which window we are going to set 6320 //------------------------------------------------------------------------------------------------- 6321 void MApi_XC_SetLockPoint(MS_U16 u16LockPoint, SCALER_WIN eWindow); 6322 6323 //------------------------------ 6324 // LD 6325 //------------------------------------------------------------------------------------------------- 6326 /// LD set panel type 6327 /// @ingroup XC_LD 6328 /// @param eLdPanelType \b IN: panel type 6329 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6330 //------------------------------------------------------------------------------------------------- 6331 MS_BOOL MApi_XC_LD_Init(EN_LD_PANEL_TYPE eLDPanelType ); 6332 6333 //------------------------------------------------------------------------------------------------- 6334 /// LD set memory address 6335 /// @ingroup XC_LD 6336 /// @param u8MIU \b IN: MIU Select 6337 /// @param u32LDFBase0 \b IN: LDF memeory0 address 6338 /// @param u32LDFBase1 \b IN: LDF memeory1 address 6339 /// @param u32LDBBase0 \b IN: LDB memeory0 address 6340 /// @param u32LDBBase1 \b IN: LDB memeory1 address 6341 /// @param u32EDGE2DBase \b IN: EDGE2D memeory address 6342 /// @param u32LEDoffset \b IN: LED data offset 6343 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6344 //------------------------------------------------------------------------------------------------- 6345 MS_BOOL MApi_XC_LD_SetMemoryAddress(MS_U8 u8MIU ,MS_PHY u32LDFBase0,MS_PHY u32LDFBase1,MS_PHY u32LDBBase0,MS_PHY u32LDBBase1,MS_PHY u32EDGE2DBase,MS_PHY u32LEDoffset); 6346 6347 //------------------------------------------------------------------------------------------------- 6348 /// Get LD value 6349 /// @ingroup XC_LD 6350 /// @param pu8LDValue @ref MS_U8 \b OUT: get the LD back light value (The amount is u8WSize x u8HSize) 6351 /// @param u8WSize @ref MS_U8 \b IN: set the LD back light width 6352 /// @param u8HSize @ref MS_U8 \b IN: set the LD back light height 6353 /// @Return TRUE: Successful FALSE: Fail 6354 //------------------------------------------------------------------------------------------------- 6355 MS_BOOL MApi_XC_LD_Get_Value(MS_U8 *pu8LDValue, MS_U8 u8WSize, MS_U8 u8HSize); 6356 6357 //------------------------------------------------------------------------------------------------- 6358 /// set LD Level 6359 /// @ingroup XC_LD 6360 /// @param eMode \b IN: LD level 6361 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6362 //------------------------------------------------------------------------------------------------- 6363 MS_BOOL MApi_XC_LD_SetLevel(EN_LD_MODE eMode); 6364 //------------------------------------------------------------------------------------------------- 6365 /// set LD backlight is zero flags 6366 /// @ingroup XC_LD 6367 /// @param eMode \b IN: backlight is zero flags 6368 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6369 //------------------------------------------------------------------------------------------------- 6370 MS_BOOL MApi_Set_TurnoffLDBL(MS_BOOL bturnoffbl); 6371 //------------------------------------------------------------------------------------------------- 6372 /// set not update SPI data Flags 6373 /// @ingroup XC_LD 6374 /// @param brefreshSpidata \b IN: refresh Spi data flags 6375 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6376 //------------------------------------------------------------------------------------------------- 6377 MS_BOOL MApi_Set_notUpdateSPIDataFlags(MS_BOOL brefreshSpidata); 6378 //------------------------------------------------------------------------------------------------- 6379 /// set User mode LD Flags 6380 /// @ingroup XC_LD 6381 /// @param buserLDFlags \b IN: User mode LD Flags 6382 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6383 //------------------------------------------------------------------------------------------------- 6384 MS_BOOL MApi_Set_UsermodeLDFlags(MS_BOOL buserLDFlags); 6385 //------------------------------------------------------------------------------------------------- 6386 /// set LD backlight level 6387 /// @ingroup XC_LD 6388 /// @param u8BLLeve \b IN: backlight level 6389 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6390 //------------------------------------------------------------------------------------------------- 6391 MS_BOOL MApi_Set_BLLevel(MS_U8 u8BLLeve); 6392 6393 //------------------------------------------------------------------------------------------------- 6394 /// set XC bandwidth saving X-mode 6395 /// @ingroup XC_PQ 6396 /// @param bEnable \b IN: enable or disable 6397 /// @param eWindow \b IN: which window we are going to enable or disable 6398 //------------------------------------------------------------------------------------------------- 6399 void MApi_XC_Set_BWS_Mode(MS_BOOL bEnable, SCALER_WIN eWindow); 6400 6401 //------------------------------------------------------------------------------------------------- 6402 /// set FRC ColorPathCtrl 6403 /// @ingroup XC_FRC 6404 /// @param epath_type \b IN: Select one of path in the FRC_COLOR_PATH_TYPE 6405 /// @param bEnable \b IN: enable or disable 6406 //------------------------------------------------------------------------------------------------- 6407 void MApi_XC_FRC_ColorPathCtrl(MS_U16 u16Path_sel, MS_BOOL bEnable); 6408 6409 //------------------------------------------------------------------------------------------------- 6410 /// set FRC_OP2 SetRGBGain 6411 /// @ingroup XC_FRC 6412 /// @param u16RedGain \b IN: Red Gain 6413 /// @param u16GreenGain \b IN: Green Gain 6414 /// @param u16BlueGain \b IN: Blue Gain 6415 //------------------------------------------------------------------------------------------------- 6416 void MApi_XC_FRC_OP2_SetRGBGain(MS_U16 u16RedGain, MS_U16 u16GreenGain, MS_U16 u16BlueGain); 6417 6418 //------------------------------------------------------------------------------------------------- 6419 /// set FRC_OP2 SetRGBOffset 6420 /// @ingroup XC_FRC 6421 /// @param u16RedOffset \b IN: Red Offset 6422 /// @param u16GreenOffset \b IN: Green Offset 6423 /// @param u16BlueOffset \b IN: Blue Offset 6424 //------------------------------------------------------------------------------------------------- 6425 void MApi_XC_FRC_OP2_SetRGBOffset(MS_U16 u16RedOffset, MS_U16 u16GreenOffset, MS_U16 u16BlueOffset); 6426 6427 //------------------------------------------------------------------------------------------------- 6428 /// set FRC_OP2 SetDither 6429 /// @ingroup XC_FRC 6430 /// @param u16dither \b IN: Dither setting 6431 //------------------------------------------------------------------------------------------------- 6432 void MApi_XC_FRC_OP2_SetDither(MS_U16 u16dither); 6433 6434 //------------------------------------------------------------------------------------------------- 6435 /// set XC Bypass MFC 6436 /// @ingroup XC_FRC 6437 /// @param eEnable \b IN: Enable or Disable 6438 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6439 //------------------------------------------------------------------------------------------------- 6440 MS_BOOL MApi_XC_FRC_BypassMFC(MS_BOOL bEnable); 6441 6442 //------------------------------------------------------------------------------------------------- 6443 /// set XC FRC Mute 6444 /// @ingroup XC_FRC 6445 /// @param bEnable \b IN: Enable or Disable 6446 //------------------------------------------------------------------------------------------------- 6447 void MApi_XC_FRC_Mute(MS_BOOL bEnable); 6448 6449 //------------------------------------------------------------------------------------------------- 6450 /// MApi_XC_ForceReadFrame 6451 /// @ingroup XC_SCALER 6452 /// @param bEnable \b IN: enable/disable keep specified frame 6453 /// @param u16FrameIndex \b IN: control specified frame to show 6454 //------------------------------------------------------------------------------------------------- 6455 E_APIXC_ReturnValue MApi_XC_ForceReadFrame(MS_BOOL bEnable, MS_U16 u16FrameIndex); 6456 //------------------------------------------------------------------------------------------------- 6457 /// MApi_XC_SetCsc 6458 /// @ingroup XC_PQ 6459 /// @param bEnable \b IN: enable/disable keep specified frame 6460 /// @param eWindow \b IN: which window we are going to enable or disable 6461 //------------------------------------------------------------------------------------------------- 6462 void MApi_XC_SetCsc( MS_BOOL bEnable, SCALER_WIN eWindow ); 6463 6464 //------------------------------------------------------------------------------------------------- 6465 /// Register PQ Set FPLL thresh mode function 6466 /// @ingroup XC_DISPLAY 6467 /// @param fpPQCB \b IN: function pointer of PQ set FPLL thresh mode 6468 //------------------------------------------------------------------------------------------------- 6469 void MApi_XC_RegisterPQSetFPLLThreshMode(void (*fpPQCB)(MS_U8 u8PQWin)); 6470 6471 //------------------------------------------------------------------------------------------------- 6472 /// Get XC free run status 6473 /// @ingroup XC_DISPLAY 6474 /// @return TRUE if it is free run, FALSE if not 6475 //------------------------------------------------------------------------------------------------- 6476 MS_BOOL MApi_XC_GetFreeRunStatus(void); 6477 6478 //------------------------------------------------------------------------------------------------- 6479 /// MApi_XC_Get_DSForceIndexSupported 6480 /// @ingroup XC_DS 6481 /// @param eWindow \b IN: which window we are going to enable or disable 6482 //------------------------------------------------------------------------------------------------- 6483 E_APIXC_ReturnValue MApi_XC_Get_DSForceIndexSupported(SCALER_WIN eWindow); 6484 6485 //------------------------------------------------------------------------------------------------- 6486 /// MApi_XC_Set_DSForceIndex 6487 /// @ingroup XC_DS 6488 /// @param bEnable \b IN: ENABLE/DISABLE force DS index or not 6489 /// @param u8Index \b IN: the index that needs to be forced in. 6490 /// @param eWindow \b IN: which window we are going to enable or disable 6491 //------------------------------------------------------------------------------------------------- 6492 E_APIXC_ReturnValue MApi_XC_Set_DSForceIndex(MS_BOOL bEnable, MS_U8 u8Index, SCALER_WIN eWindow); 6493 6494 //------------------------------------------------------------------------------------------------- 6495 /// MApi_XC_Set_DSIndexSourceSelect 6496 /// @ingroup XC_DS 6497 /// @param eDSIdxSrc \b IN: choose where the DS index comes from. 6498 /// @param eWindow \b IN: which window we are going to enable or disable 6499 //------------------------------------------------------------------------------------------------- 6500 E_APIXC_ReturnValue MApi_XC_Set_DSIndexSourceSelect(E_XC_DS_INDEX_SOURCE eDSIdxSrc, SCALER_WIN eWindow); 6501 6502 //------------------------------------------------------------------------------------------------- 6503 /// Use Dynamic Scaling to write register 6504 /// @param bEnable \b IN: enable or disable DS write reg mode 6505 /// @param u32Flag \b IN: options for this function 6506 /// @param eWindow \b IN: which window we are going to enable or disable 6507 //------------------------------------------------------------------------------------------------- 6508 E_APIXC_ReturnValue MApi_XC_EnableDSRegMode(MS_BOOL bEnable, SCALER_WIN eWindow); 6509 6510 //------------------------------------------------------------------------------------------------- 6511 /// MApi_XC_Set_DSForceIndex 6512 /// @ingroup XC_OSD 6513 /// @param bEnable \b IN: ENABLE/DISABLE force DS index or not 6514 /// @param u8Index \b IN: the index that needs to be forced in. 6515 /// @param eWindow \b IN: which window we are going to enable or disable 6516 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6517 //------------------------------------------------------------------------------------------------- 6518 E_APIXC_ReturnValue MApi_XC_OSDC_InitSetting(E_XC_OSDC_TGEN_Type E_XC_OSDC_TGEN_Type, 6519 MS_XC_OSDC_TGEN_INFO *pstOC_Tgen_Cus, 6520 MS_XC_OSDC_CTRL_INFO *pstOC_Ctrl); 6521 //------------------------------------------------------------------------------------------------- 6522 /// MApi_XC_Set_DSForceIndex 6523 /// @ingroup XC_OSD 6524 /// @param eCtrl_type \b IN: ENABLE/DISABLE force DS index or not 6525 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6526 //------------------------------------------------------------------------------------------------- 6527 E_APIXC_ReturnValue MApi_XC_OSDC_Control(MS_U32 eCtrl_type); 6528 6529 //------------------------------------------------------------------------------------------------- 6530 /// MApi_XC_OSDC_GetDstInfo 6531 /// @ingroup XC_OSD 6532 /// @param pDstInfo \b IN: get the Desternation info 6533 /// @param u32SizeofDstInfo \b IN: size check 6534 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6535 //------------------------------------------------------------------------------------------------- 6536 E_APIXC_ReturnValue MApi_XC_OSDC_GetDstInfo(MS_OSDC_DST_DispInfo *pDstInfo, MS_U32 u32SizeofDstInfo); 6537 6538 //------------------------------------------------------------------------------------------------- 6539 /// MApi_XC_OSDC_SetOutVfreqx10 6540 /// @ingroup XC_OSD 6541 /// @param u16Vfreq \b IN: output V freq x10 6542 //------------------------------------------------------------------------------------------------- 6543 void MApi_XC_OSDC_SetOutVfreqx10(MS_U16 u16Vfreq); 6544 6545 //------------------------------------------------------------------------------------------------- 6546 /// MApi_XC_SetByPassOSDVsyncPos 6547 /// @ingroup XC_OSD 6548 /// @param u16VsyncStart \b IN: OSD vsync start 6549 /// @param u16VsyncEnd \b IN: OSD vsync end 6550 //------------------------------------------------------------------------------------------------- 6551 void MApi_XC_BYPASS_SetOSDVsyncPos(MS_U16 u16VsyncStart, MS_U16 u16VsyncEnd); 6552 6553 //------------------------------------------------------------------------------------------------- 6554 /// MApi_XC_BYPASS_SetInputSrc 6555 /// @ingroup XC_SCALER 6556 /// @param bEnable \b IN: ENABLE/DISABLE bypass mode 6557 /// @param input \b IN: Select the input source for bypass mode 6558 //------------------------------------------------------------------------------------------------- 6559 void MApi_XC_BYPASS_SetInputSrc(MS_BOOL bEnable,E_XC_BYPASS_InputSource input); 6560 6561 //------------------------------------------------------------------------------------------------- 6562 /// MApi_XC_BYPASS_SetCSC 6563 /// @ingroup XC_SCALER 6564 /// @param bEnable \b IN: ENABLE/DISABLE the color space convert 6565 //------------------------------------------------------------------------------------------------- 6566 void MApi_XC_BYPASS_SetCSC(MS_BOOL bEnable); 6567 6568 //------------------------------------------------------------------------------------------------- 6569 /// MApi_XC_SetSeamlessZapping 6570 /// @ingroup XC_UTILITY 6571 /// @param eWindow \b IN: which window we are going to enable or disable 6572 /// @param bEnable \b IN: ENABLE/DISABLE seamless zapping 6573 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6574 //------------------------------------------------------------------------------------------------- 6575 E_APIXC_ReturnValue MApi_XC_SetSeamlessZapping(SCALER_WIN eWindow, MS_BOOL bEnable); 6576 6577 //------------------------------------------------------------------------------------------------- 6578 /// MApi_XC_GetSeamlessZappingStatus 6579 /// @ingroup XC_UTILITY 6580 /// @ingroup XC_SCALER 6581 /// @param eWindow \b IN: which window we are going to get status 6582 /// @param pbEnable \b IN: get current seamless zapping status 6583 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6584 //------------------------------------------------------------------------------------------------- 6585 E_APIXC_ReturnValue MApi_XC_GetSeamlessZappingStatus(SCALER_WIN eWindow, MS_BOOL* pbEnable); 6586 6587 //------------------------------------------------------------------------------------------------- 6588 /// MApi_XC_Vtrack_SetPayloadData 6589 /// @ingroup XC_PQ 6590 /// @param u16Timecode \b IN: The time code is coded on 16 bits. It is calculated based on the number of days from January 1st. 6591 /// @param u8ID \b IN: Operator ID 6592 //------------------------------------------------------------------------------------------------- 6593 E_APIXC_ReturnValue MApi_XC_Vtrack_SetPayloadData(MS_U16 u16Timecode, MS_U8 u8OperatorID); 6594 6595 6596 //------------------------------------------------------------------------------------------------- 6597 /// MApi_XC_Vtrack_SetUserDefindedSetting 6598 /// @ingroup XC_PQ 6599 /// @param bEnable \b IN: ENABLE/DISABLE Customized Setting 6600 /// @param pu8Setting \b IN: pointer to targert user definded setting data (include setting1 to setting3) 6601 //------------------------------------------------------------------------------------------------- 6602 E_APIXC_ReturnValue MApi_XC_Vtrack_SetUserDefindedSetting(MS_BOOL bUserDefinded, MS_U8 *pu8Setting); 6603 6604 6605 //------------------------------------------------------------------------------------------------- 6606 /// MApi_XC_Vtrack_Enable 6607 /// @ingroup XC_PQ 6608 /// @param u8FrameRate \b IN: ENABLE/DISABLE The FrameRateIn is based on the output format of the box 6609 /// @param bEnable \b IN: ENABLE/DISABLE Vtrack 6610 //------------------------------------------------------------------------------------------------- 6611 E_APIXC_ReturnValue MApi_XC_Vtrack_Enable(MS_U8 u8FrameRate, MS_BOOL bEnable); 6612 6613 //------------------------------------------------------------------------------------------------- 6614 /// Pre-set the specific window with PQ info 6615 /// @ingroup XC_PQ 6616 /// @param pstXC_SetWin_Info \b IN: the information of the window setting 6617 /// @param eWindow \b IN: which window we are going to set 6618 //------------------------------------------------------------------------------------------------- 6619 void MApi_XC_PreSetPQInfo(XC_SETWIN_INFO *pstXC_SetWin_Info, SCALER_WIN eWindow); 6620 6621 6622 //------------------------------------------------------------------------------------------------- 6623 /// Mapi_XC_Is_OP1_TestPattern_Enabled 6624 /// @ingroup XC_TEST_PATTERN 6625 /// @return MS_BOOL: TRUE - enabled, FALSED - disabled 6626 //------------------------------------------------------------------------------------------------- 6627 MS_BOOL MApi_XC_Is_OP1_TestPattern_Enabled(void); 6628 6629 //------------------------------------------------------------------------------------------------- 6630 /// MApi_XC_Set_OP1_TestPattern 6631 /// @ingroup XC_TEST_PATTERN 6632 /// @param ePattern \b IN: select test pattern 6633 /// @param eMode \b IN: choose the patgen mode (only support E_XC_OP1_PATGEN_DISP_LB_MODE now) 6634 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6635 //------------------------------------------------------------------------------------------------- 6636 E_APIXC_ReturnValue MApi_XC_Set_OP1_TestPattern(EN_XC_OP1_PATTERN ePattern, EN_XC_OP1_PATGEN_MODE eMode); 6637 6638 //------------------------------------------------------------------------------------------------- 6639 /// MApi_XC_CheckWhiteBalancePatternModeSupport 6640 /// @ingroup XC_TEST_PATTERN 6641 /// @param eWBPatternMode \b IN: White balance Pattern gen Mode 6642 /// @return MS_BOOL: TRUE - support, FALSED - unsupport 6643 //------------------------------------------------------------------------------------------------- 6644 MS_BOOL MApi_XC_CheckWhiteBalancePatternModeSupport(EN_XC_WB_PATTERN_MODE enWBPatternMode); 6645 6646 //------------------------------------------------------------------------------------------------- 6647 /// MApi_XC_SetHLinearScaling 6648 /// @ingroup XC_PQ 6649 /// @param bEnable \b IN: enable or disalbe h linear scaling 6650 /// @param bSign \b IN: sign of delta 6651 /// @param u16Delta \b IN: the slop of scaling 6652 /// @param eWindow \b IN: which window we are going to set 6653 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6654 //------------------------------------------------------------------------------------------------- 6655 E_APIXC_ReturnValue MApi_XC_SetHLinearScaling(MS_BOOL bEnable, MS_BOOL bSign, MS_U16 u16Delta, SCALER_WIN eWindow); 6656 6657 //------------------------------------------------------------------------------------------------- 6658 /// XC power state control for fastboot 6659 /// @ingroup XC_UTILITY 6660 /// @param u16PowerState \b IN: power state 6661 /// @return result of power state control. 6662 //------------------------------------------------------------------------------------------------- 6663 MS_U32 MApi_XC_SetPowerState(EN_POWER_MODE enPowerState); 6664 6665 //------------------------------------------------------------------------------------------------- 6666 /// MApi_XC_EnableT3D 6667 /// @ingroup XC_3D 6668 /// @param bEnable \b IN: enable or disalbe T3D 6669 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6670 //------------------------------------------------------------------------------------------------- 6671 E_APIXC_ReturnValue MApi_XC_EnableT3D(MS_BOOL bEnable); 6672 6673 6674 //------------------------------------------------------------------------------------------------- 6675 /// MApi_XC_Set_FRC_InputTiming 6676 /// @ingroup XC_FRC 6677 /// @param enFRC_InputTiming \b IN: FRC input timing 6678 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6679 //------------------------------------------------------------------------------------------------- 6680 E_APIXC_ReturnValue MApi_XC_Set_FRC_InputTiming(E_XC_FRC_InputTiming enFRC_InputTiming); 6681 6682 //------------------------------------------------------------------------------------------------- 6683 /// MApi_XC_Get_FRC_InputTiming 6684 /// @ingroup XC_FRC 6685 /// @param penFRC_InputTiming \b IN: FRC input timing 6686 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6687 //------------------------------------------------------------------------------------------------- 6688 E_APIXC_ReturnValue MApi_XC_Get_FRC_InputTiming(E_XC_FRC_InputTiming *penFRC_InputTiming); 6689 6690 //------------------------------------------------------------------------------------------------- 6691 /// MApi_XC_Get_VirtualBox_Info 6692 /// @ingroup XC_SCALER 6693 /// @param pstXC_VboxInfo \b IN: virtual box info 6694 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6695 //------------------------------------------------------------------------------------------------- 6696 E_APIXC_ReturnValue MApi_XC_Get_VirtualBox_Info(XC_VBOX_INFO *pstXC_VboxInfo); 6697 6698 6699 6700 //------------------------------------------------------------------------------------------------- 6701 /// MApi_XC_Set_OSD_Detect 6702 /// @ingroup XC_OSD 6703 /// @param bEnable \b IN: enable or disalbe OSD detect 6704 /// @param Threhold \b IN: setup the threashold 6705 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6706 //------------------------------------------------------------------------------------------------- 6707 E_APIXC_ReturnValue MApi_XC_Set_OSD_Detect(MS_BOOL bEnable, MS_U32 Threhold); 6708 //------------------------------------------------------------------------------------------------- 6709 /// MApi_XC_Get_OSD_Detect 6710 /// @ingroup XC_OSD 6711 /// @param bEnable \b IN: enable or disalbe OSD detect 6712 /// @param Threhold \b IN: setup the threashold 6713 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6714 //------------------------------------------------------------------------------------------------- 6715 E_APIXC_ReturnValue MApi_XC_Get_OSD_Detect(MS_BOOL *pbOSD); 6716 6717 //------------------------------------------------------------------------------------------------- 6718 /// Get XC work mode: 2K2K mode or normal mode 6719 /// @ingroup XC_FRC 6720 /// @return MS_BOOL: TRUE - 2K2K mode, FALSE - Normal mode 6721 //------------------------------------------------------------------------------------------------- 6722 MS_BOOL MApi_XC_Is2K2KToFrcMode(void); 6723 6724 //------------------------------------------------------------------------------------------------- 6725 /// The Main and Sub Window will switch zorder alternately. 6726 /// @param bEnable \b IN: enable or disalbe 6727 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6728 //------------------------------------------------------------------------------------------------- 6729 E_APIXC_ReturnValue __attribute__((weak)) MApi_XC_EnableSwitchMainSubZorder(MS_BOOL bEnable); 6730 6731 //------------------------------------------------------------------------------------------------- 6732 /// Set XC work mode: 2P mode or 4K2K@50/60Hz 6733 /// @return MS_BOOL: TRUE - Success, FALSE - Fail 6734 //------------------------------------------------------------------------------------------------- 6735 //MS_BOOL MApi_XC_Set_2P_Mode(MS_BOOL bEnable,SCALER_WIN eWindow); 6736 6737 //------------------------------------------------------------------------------------------------- 6738 /// MApi_XC_Enable_LockFreqOnly 6739 /// @param bEnable \b IN: enable or disalbe LPLL LockFreqOnly mode 6740 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6741 //------------------------------------------------------------------------------------------------- 6742 E_APIXC_ReturnValue MApi_XC_Enable_LockFreqOnly(MS_BOOL bEnable); 6743 6744 #ifdef UFO_XC_TEST_PATTERN 6745 //------------------------------------------------------------------------------------------------- 6746 /// To generate designated test pattern,you should follow the following example 6747 /// Ex: 6748 /// XC_SET_IPMUX_TESTPATTERN_t ipmux_test_pattern; 6749 /// ipmux_test_pattern.bEnable = TRUE; 6750 /// ipmux_test_pattern.u16R_CR_Data = xxx; 6751 /// ipmux_test_pattern.u16G_Y_Data = xxx; 6752 /// ipmux_test_pattern.u16B_CB_Data = xxx; 6753 /// MApi_XC_GenerateTestPattern(E_XC_IPMUX_PATTERN_MODE,(void *)&ipmux_test_pattern,sizeof(XC_SET_IPMUX_TESTPATTERN_t)); 6754 /// ------------------------------------------------------------------------------------------------ 6755 /// @param ePatternMode \b IN: pattern type 6756 /// @param para \b IN: test pattern struct point 6757 /// @param u16Length \b IN: data length 6758 /// ePatternMode = E_XC_ADC_PATTERN_MODE; para = p_XC_SET_ADC_TESTPATTERN_t struct point; 6759 /// ePatternMode = E_XC_IPMUX_PATTERN_MODE; para = p_XC_SET_IPMUX_TESTPATTERN_t struct point; 6760 /// ePatternMode = E_XC_IP1_PATTERN_MODE; para = p_XC_SET_IP1_TESTPATTERN_t struct point; 6761 /// ePatternMode = E_XC_OP_PATTERN_MODE; para = p_XC_SET_OP_TESTPATTERN_t struct point; 6762 /// ePatternMode = E_XC_VOP_PATTERN_MODE; para = p_XC_SET_VOP_TESTPATTERN_t struct point; 6763 /// ePatternMode = E_XC_VOP2_PATTERN_MODE; para = p_XC_SET_VOP2_TESTPATTERN_t struct point; 6764 /// ePatternMode = E_XC_MOD_PATTERN_MODE; para = p_XC_SET_MOD_TESTPATTERN_t struct point; 6765 //------------------------------------------------------------------------------------------------- 6766 void SYMBOL_WEAK MApi_XC_GenerateTestPattern (EN_XC_TEST_PATTERN_MODE ePatternMode,void* para, MS_U16 u16Length); 6767 #endif 6768 6769 //================================ Obsolete Function Start ======================================= 6770 //------------------------------------------------------------------------------------------------- 6771 /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6772 /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6773 /// !!! below function will be "REMOVED" or "REFACTORING" later, please do not use it !!!!!!!!! 6774 //------------------------------------------------------------------------------------------------- 6775 6776 //------------------------------------------------------------------------------------------------- 6777 /// mvideo_sc_get_output_vfreq 6778 /// @ingroup XC_ToBeRemove 6779 //------------------------------------------------------------------------------------------------- 6780 MS_U16 mvideo_sc_get_output_vfreq(void); //Replaced by MApi_XC_GetOutputVFreqX100 6781 //------------------------------------------------------------------------------------------------- 6782 /// MApi_XC_Get_Current_OutputVFreqX100 6783 /// @ingroup XC_ToBeRemove 6784 //------------------------------------------------------------------------------------------------- 6785 MS_U32 MApi_XC_Get_Current_OutputVFreqX100(void); //Replaced by MApi_XC_GetOutputVFreqX100 6786 //------------------------------------------------------------------------------------------------- 6787 /// MApi_XC_SetMemoryWriteRequest 6788 /// @ingroup XC_ToBeRemove 6789 //------------------------------------------------------------------------------------------------- 6790 E_APIXC_ReturnValue MApi_XC_SetMemoryWriteRequest(MS_BOOL bEnable); //Replaced by MApi_XC_SetScalerMemoryRequest 6791 //------------------------------------------------------------------------------------------------- 6792 /// MApi_XC_Set_MemFmt 6793 /// @ingroup XC_ToBeRemove 6794 //------------------------------------------------------------------------------------------------- 6795 MS_BOOL MApi_XC_Set_MemFmt(MS_XC_MEM_FMT eMemFmt); 6796 //------------------------------------------------------------------------------------------------- 6797 /// MApi_XC_SetOutputAdjustSetting 6798 /// @ingroup XC_ToBeRemove 6799 //------------------------------------------------------------------------------------------------- 6800 E_APIXC_ReturnValue MApi_XC_SetOutputAdjustSetting(XC_OUTPUT_TIMING_ADJUST_SETTING *stAdjSetting); // Replaced by MApi_XC_SetExPanelInfo 6801 //------------------------------------------------------------------------------------------------- 6802 /// msAPI_Scaler_FPLL_FSM 6803 /// @ingroup XC_ToBeRemove 6804 //------------------------------------------------------------------------------------------------- 6805 void msAPI_Scaler_FPLL_FSM(SCALER_WIN eWindow); 6806 //------------------------------------------------------------------------------------------------- 6807 /// MApi_XC_EnableMirrorMode 6808 /// @ingroup XC_ToBeRemove 6809 //------------------------------------------------------------------------------------------------- 6810 void MApi_XC_EnableMirrorMode( MS_BOOL bEnable ); 6811 //------------------------------------------------------------------------------------------------- 6812 /// MApi_XC_EnableMirrorMode2 6813 /// @ingroup XC_ToBeRemove 6814 //------------------------------------------------------------------------------------------------- 6815 void MApi_XC_EnableMirrorMode2( MirrorMode_t eMirrorMode ); 6816 //------------------------------------------------------------------------------------------------- 6817 /// MApi_XC_GetMirrorModeType 6818 /// @ingroup XC_ToBeRemove 6819 //------------------------------------------------------------------------------------------------- 6820 MirrorMode_t MApi_XC_GetMirrorModeType( void ); 6821 //------------------------------------------------------------------------------------------------- 6822 /// MApi_XC_set_FD_Mask 6823 /// @ingroup XC_ToBeRemove 6824 //------------------------------------------------------------------------------------------------- 6825 void MApi_XC_set_FD_Mask(MS_BOOL bEnable); 6826 //------------------------------------------------------------------------------------------------- 6827 /// MApi_XC_Get_FD_Mask 6828 /// @ingroup XC_ToBeRemove 6829 //------------------------------------------------------------------------------------------------- 6830 MS_BOOL MApi_XC_Get_FD_Mask(void); 6831 //------------------------------------------------------------------------------------------------- 6832 /// MApi_XC_GetAccurateVFreqx1K is obsolete, please use MApi_XC_CalculateVFreqx10 instead! 6833 /// the return vfreq of this function is not accurate when signal is not stable or have noise, so it's not 6834 /// suitable as interface for Ap use at any time. 6835 /// @ingroup XC_ToBeRemove 6836 //------------------------------------------------------------------------------------------------- 6837 6838 //------------------------------------------------------------------------------------------------- 6839 MS_U32 MApi_XC_GetAccurateVFreqx1K(SCALER_WIN eWindow); 6840 //================================ Obsolete Function End ======================================= 6841 //------------------------------------------------------------------------------------------------- 6842 /// Handler xc customer request. 6843 /// @param u32Cmd \b IN:cmd type 6844 /// @param pbuf \b IN:input value depend on cmd type 6845 /// @param u32Cmd \b IN:input structure size for validatition 6846 /// @return MS_BOOL: TRUE - Success, FALSE - Fail 6847 //------------------------------------------------------------------------------------------------- 6848 MS_BOOL MApi_XC_S_Disp_Ctrl(MS_U32 u32Cmd,void *pbuf,MS_U32 u32BufSize); 6849 6850 #ifdef UFO_XC_SETBLACKVIDEOBYMODE 6851 //------------------------------------------------------------------------------------------------- 6852 /// This function will enable/diable output black pattern by mode 6853 /// @param bEnable \b IN: TRUE: enable, FALSE: otherwise 6854 /// @param eWindow \b IN: which window we are going to query 6855 /// @param eMode \b IN: which black video mode we are going to use 6856 //------------------------------------------------------------------------------------------------- 6857 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_GenerateBlackVideoByMode(MS_BOOL bEnable, SCALER_WIN eWindow, EN_XC_BLACK_VIDEO_MODE eMode); 6858 #endif 6859 6860 //================================ Obsolete Function End ======================================= 6861 6862 //------------------------------------------------------------------------------------------------- 6863 /// MApi_XC_IsSupport2StepScaling 6864 /// @return MS_BOOL: TRUE - Support 2 Step Scaling, FALSE - Not Support 2 Step Scaling 6865 //------------------------------------------------------------------------------------------------- 6866 MS_BOOL MApi_XC_IsSupport2StepScaling(void); 6867 6868 //------------------------------------------------------------------------------------------------- 6869 /// MApi_XC_GetPQFlowStatus 6870 /// @param u16Width \b IN: timing width 6871 /// @param u16Height \b IN: timing height 6872 /// @return MS_BOOL: TRUE - is 4k timing, FALSE - Not 4k timing 6873 //------------------------------------------------------------------------------------------------- 6874 #ifdef UFO_XC_PQ_PATH 6875 MS_BOOL SYMBOL_WEAK MApi_XC_GetPQPathStatus(E_XC_PQ_Path_Type ePqPathType, MS_U16 u16Width, MS_U16 u16Height); 6876 #endif 6877 6878 //------------------------------------------------------------------------------------------------- 6879 /// Set Scaler IP input test pattern. 6880 /// @ingroup XC_TEST_PATTERN 6881 /// @param u8Enable \b IN: Set 1 to enable. Bit(0) is horizontal pattern and Bit(1) is vertical pattern 6882 /// @param u6Pattern_type \b IN: The pattern type. (the width of each pattern) 6883 /// @param eWindow \b IN: @ref SCALER_WIN 6884 //------------------------------------------------------------------------------------------------- 6885 void MApi_XC_SetIP1TestPattern(MS_U8 u8Enable, MS_U16 u16Pattern_type, SCALER_WIN eWindow); 6886 6887 //------------------------------------------------------------------------------------------------- 6888 /// MApi_XC_Set_OP2_Pattern 6889 /// @ingroup XC_TEST_PATTERN 6890 /// @param bEnable \b IN: enable/disable OP2 pattern 6891 /// @param u16R_Data \b IN: when enable OP2 patter ,Data Generator for r_cr constant 6892 /// @param u16G_Data \b IN: when enable OP2 patter ,Data Generator for g_y constant 6893 /// @param u16B_Data \b IN: when enable OP2 patter ,Data Generator for b_cb constant 6894 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL or E_APIXC_RET_FAIL_FUN_NOT_SUPPORT 6895 //------------------------------------------------------------------------------------------------- 6896 E_APIXC_ReturnValue MApi_XC_Set_OP2_Pattern(MS_BOOL bEnable, MS_U16 u16R_Data, MS_U16 u16G_Data ,MS_U16 u16B_Data); 6897 6898 #ifdef UFO_XC_FORCEWRITE_V2 6899 //------------------------------------------------------------------------------------------------- 6900 /// When the muteType is enabled, the vsync will be skipped and the registers will be written directly 6901 /// @param enMuteType \b IN: the mute type could be MainWindow, SubWindow and Panel 6902 /// @param bIsForceWrite \b IN: Force write or not 6903 //------------------------------------------------------------------------------------------------- 6904 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_SetForceWrite( EN_MUTE_TYPE enMuteType, MS_BOOL bIsForceWrite); 6905 6906 //------------------------------------------------------------------------------------------------- 6907 /// Get the status of enMuteType which is writen directly or not. 6908 /// @param enMuteType \b IN: the mute type could be MainWindow, SubWindow and Panel 6909 //------------------------------------------------------------------------------------------------- 6910 MS_BOOL SYMBOL_WEAK MApi_XC_GetForceWrite( EN_MUTE_TYPE enMuteType); 6911 #endif 6912 6913 //------------------------------------------------------------------------------------------------- 6914 /// Video Playback Controller. 6915 /// @param u32Cmd \b IN:cmd type 6916 /// @param pbuf \b IN:input value depend on cmd type 6917 /// @param u32Cmd \b IN:input structure size for validatition 6918 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6919 //------------------------------------------------------------------------------------------------- 6920 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_VideoPlaybackCtrl(MS_U32 u32Cmd,void *pCmdArgs,MS_U32 u32CmdArgsSize); 6921 6922 #ifdef UFO_XC_AUTO_DOWNLOAD 6923 //------------------------------------------------------------------------------------------------- 6924 /// Config auto download. 6925 /// note: 6926 /// Please call MApi_XC_GetChipCaps(E_XC_SUPPORT_AUTODOWNLOAD_CLIENT) before calling the api. 6927 /// if the client is supported, and then call the api, otherwise, it would be fail. 6928 /// @param pstConfigInfo \b IN: pointer to config info, refer to XC_AUTODOWNLOAD_CONFIG_INFO 6929 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6930 //------------------------------------------------------------------------------------------------- 6931 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_AutoDownload_Config(XC_AUTODOWNLOAD_CONFIG_INFO *pstConfigInfo); 6932 6933 //------------------------------------------------------------------------------------------------- 6934 /// Write data to auto download. 6935 /// note: 6936 /// Please call MApi_XC_GetChipCaps(E_XC_SUPPORT_AUTODOWNLOAD_CLIENT) before calling the api. 6937 /// if the client is supported, and then call the api, otherwise, it would be fail. 6938 /// @param pstConfigInfo \b IN: pointer to data info, refer to XC_AUTODOWNLOAD_DATA_INFO 6939 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6940 //------------------------------------------------------------------------------------------------- 6941 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_AutoDownload_Write(XC_AUTODOWNLOAD_DATA_INFO *pstDataInfo); 6942 6943 //------------------------------------------------------------------------------------------------- 6944 /// fire auto download for writting data into SRAM. 6945 /// note: 6946 /// Please call MApi_XC_GetChipCaps(E_XC_SUPPORT_AUTODOWNLOAD_CLIENT) before calling the api. 6947 /// if the client is supported, and then call the api, otherwise, it would be fail. 6948 /// @param enClient \b IN: current client 6949 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 6950 //------------------------------------------------------------------------------------------------- 6951 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_AutoDownload_Fire(EN_XC_AUTODOWNLOAD_CLIENT enClient); 6952 #endif 6953 6954 #ifdef UFO_XC_HDR 6955 #if (UFO_XC_HDR_VERSION == 2) 6956 //------------------------------------------------------------------------------------------------- 6957 /// Control HDR. 6958 /// HDMI dobly case usage: 6959 /// 6960 /// FILE * pFile = fopen("/xxx/3d_lut.bin","rw"); 6961 /// MS_U32 u32ReadSize = 0; 6962 /// MS_U32 u32Size = ftell (pFile); 6963 /// MS_U8 *pu8Data = (MS_U8 *)malloc(u32Size); 6964 /// u32ReadSize = fread(pData, 1, u32Size, pFile); 6965 /// 6966 /// XC_HDR_3DLUT_INFO st3DLutInfo; 6967 /// memset(&st3DLutInfo, 0, sizeof(XC_HDR_3DLUT_INFO)); 6968 /// st3DLutInfo.u323DLutInfo_Version = HDR_3DLUT_INFO_VERSION; 6969 /// st3DLutInfo.u163DLutInfo_Length = sizeof(XC_HDR_3DLUT_INFO); 6970 /// st3DLutInfo.pu8Data = pu8Data; 6971 /// st3DLutInfo.u32Size = u32ReadSize; 6972 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_3DLUT, &st3DLutInfo); 6973 /// 6974 /// EN_XC_HDR_TYPE enType = E_XC_HDR_TYPE_DOLBY; 6975 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_TYPE, &enType); 6976 /// 6977 /// MMapInfo_t *minfo = MMAPInfo::GetInstance()->get_mmap(MMAPInfo::GetInstance()->StrToMMAPID("XXXX")); 6978 /// 6979 /// XC_HDR_DMA_INIT_INFO stDMAInitInfo; 6980 /// memset(&stDMAInitInfo, 0, sizeof(XC_HDR_DMA_INIT_INFO)); 6981 /// stDMAInitInfo.u32DMAInitInfo_Version = HDR_DMA_INIT_INFO_VERSION; 6982 /// stDMAInitInfo.u16DMAInitInfo_Length = sizeof(XC_HDR_DMA_INIT_INFO); 6983 /// stDMAInitInfo.phyBaseAddr = minfo->u32Addr; 6984 /// stDMAInitInfo.u32Size = minfo->u32Size; 6985 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_INIT_DMA, &stDMAInitInfo); 6986 /// 6987 /// EN_XC_HDR_COLOR_FORMAT enColorFormat = E_XC_HDR_COLOR_YUV422; 6988 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_COLOR_FORMAT, &enColorFormat); 6989 /// 6990 /// XC_HDR_DMA_CONFIG_INFO stDMAConfigInfo; 6991 /// memset(&stDMAConfigInfo, 0, sizeof(XC_HDR_DMA_CONFIG_INFO)); 6992 /// stDMAConfigInfo.u32DMAConfigInfo_Version = HDR_DMA_CONFIG_INFO_VERSION; 6993 /// stDMAConfigInfo.u16DMAConfigInfo_Length = sizeof(XC_HDR_DMA_CONFIG_INFO); 6994 /// stDMAConfigInfo.eMode = E_XC_HDR_DMA_MODE_12BIT; 6995 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_CONFIG_DMA, &stDMAConfigInfo); 6996 /// 6997 /// MS_BOOL bEnable = TRUE; 6998 /// //after these previous API are called, then call it. 6999 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_ENABLE, &bEnable); 7000 /// 7001 /// HDMI open case usage: 7002 /// EN_XC_HDR_TYPE enType = E_XC_HDR_TYPE_OPEN; 7003 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_TYPE, &enType); 7004 /// 7005 /// EN_XC_HDR_COLOR_FORMAT enColorFormat = E_XC_HDR_COLOR_YUV422; 7006 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_COLOR_FORMAT, &enColorFormat); 7007 /// 7008 /// XC_HDR_OPEN_METADATA_INFO stOpenMetadtaInfo; 7009 /// ...... 7010 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_SET_OPEN_METADATA, &stOpenMetadtaInfo); 7011 /// 7012 /// MS_BOOL bEnable = TRUE; 7013 /// //after these previous API are called, then call it. 7014 /// MApi_XC_HDR_Control(E_XC_HDR_CTRL_ENABLE, &bEnable); 7015 /// 7016 /// @param enCtrlType \b IN: ctrl type 7017 /// @param pParam \b IN: param, refer to EN_XC_HDR_CTRL_TYPE 7018 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 7019 //------------------------------------------------------------------------------------------------- 7020 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_HDR_Control(EN_XC_HDR_CTRL_TYPE enCtrlType, void *pParam); 7021 #endif 7022 #endif 7023 7024 #ifdef UFO_XC_SCAN_TYPE 7025 //------------------------------------------------------------------------------------------------- 7026 /// Set different scan type. 7027 /// @param enScanType \b IN: scan type. Normal/ForceP/ForceI 7028 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 7029 //------------------------------------------------------------------------------------------------- 7030 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_SetScanType(E_XC_SCAN_TYPE enScanType); 7031 #endif 7032 7033 //------------------------------------------------------------------------------------------------- 7034 /// This function will set FB level which decide the method of how to use xc buffer 7035 /// @param eFBLevel \b IN: FB level 7036 /// @param eWindow \b IN: which window we are going to query 7037 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 7038 //------------------------------------------------------------------------------------------------- 7039 E_APIXC_ReturnValue SYMBOL_WEAK MApi_XC_Set_FB_Level(E_XC_FB_LEVEL eFBLevel, SCALER_WIN eWindow); 7040 7041 //---------------------------------------------------------------------------------------------- 7042 /// This function will get current FB level which decide the method of how to use xc buffer 7043 /// @param peFBLevel \b OUT: FB level 7044 /// @param eWindow \b IN: which window we are going to query 7045 /// @return E_APIXC_RET_OK or E_APIXC_RET_FAIL 7046 //------------------------------------------------------------------------------------------------- 7047 E_XC_FB_LEVEL SYMBOL_WEAK MApi_XC_Get_FB_Level(SCALER_WIN eWindow); 7048 7049 //------------------------------------------------------------------------------------------------- 7050 /// fire DS comment 7051 /// @param eWindow \b IN:main win / sub win 7052 //------------------------------------------------------------------------------------------------- 7053 void SYMBOL_WEAK MApi_SWDS_Fire(SCALER_WIN eWindow ); 7054 7055 //------------------------------------------------------------------------------------------------- 7056 /// OPTEE secure lock xc 7057 /// note: 7058 /// @param u32PipeID \b IN: pipeline ID 7059 /// @param U32RetResNum \b IN: RetResNum 7060 /// @param pResource \b IN: Resource 7061 /// @return U32 7062 //------------------------------------------------------------------------------------------------- 7063 MS_U32 MApi_XC_GetResourceByPipeID(MS_U32 u32PipeID, MS_U32* u32RetResNum, RESOURCE* pResource); 7064 //------------------------------------------------------------------------------------------------- 7065 /// OPTEE secure update xc setting 7066 /// note: 7067 /// @param u32PipeID \b IN: pipeline ID 7068 /// @param u32SecureDMA \b IN: SecureDMA 7069 /// @param u32OperationMode \b IN: OperationMode 7070 /// @return U32 7071 //------------------------------------------------------------------------------------------------- 7072 MS_BOOL MApi_XC_OPTEE_CheckRBase(SCALER_WIN eWindow); 7073 //------------------------------------------------------------------------------------------------- 7074 /// OPTEE secure check memory access is legal 7075 /// note: 7076 /// @param eWindow \b IN:main win / sub win 7077 /// @return BOOL 7078 7079 //------------------------------------------------------------------------------------------------- 7080 MS_U32 MApi_XC_ConfigPipe(MS_U32 u32PipeID, MS_U32 u32SecureDMA, MS_U32 u32OperationMode); 7081 //------------------------------------------------------------------------------------------------- 7082 /// OPTEE check pipleline ID 7083 /// note: 7084 /// @param u32PipeID \b IN: pipeline ID 7085 /// @param u32SecureDMA \b IN: SecureDMA 7086 /// @param u32OperationMode \b IN: OperationMode 7087 /// @return U32 7088 //------------------------------------------------------------------------------------------------- 7089 MS_U32 MApi_XC_CheckPipe(MS_U32 u32PipeID, MS_U32 u32SecureDMA, MS_U32 u32OperationMode); 7090 //------------------------------------------------------------------------------------------------- 7091 /// Set OPTEE control action for xc part 7092 /// note: 7093 /// @param action \b IN: control action type 7094 /// @param xc_handler \b IN: xc handler data 7095 /// @return BOOL 7096 //------------------------------------------------------------------------------------------------- 7097 MS_BOOL MApi_XC_OPTEE_Control(EN_XC_OPTEE_ACTION action,XC_OPTEE_HANDLER* xc_handler); 7098 //------------------------------------------------------------------------------------------------- 7099 /// Set OPTEE control action for ipmux part 7100 /// note: 7101 /// @param action \b IN: control action type 7102 /// @param xc_mux_data \b IN: ipmux handler data 7103 /// @return BOOL 7104 //------------------------------------------------------------------------------------------------- 7105 MS_BOOL MApi_XC_OPTEE_Mux(EN_XC_OPTEE_ACTION action,XC_OPTEE_MUX_DATA xc_mux_data); 7106 //---------------------------------------------------------------------------------------------- 7107 /// This function is uesd for Poll kernel event 7108 /// @return TURE/FALSE 7109 //------------------------------------------------------------------------------------------------- 7110 MS_BOOL SYMBOL_WEAK MApi_XC_PollEvent(void); 7111 7112 #ifdef UFO_XC_DE_MODE 7113 void SYMBOL_WEAK MApi_XC_Set_HandshakeMode(MS_U8 u8MD, SCALER_WIN eWindow); 7114 #endif 7115 7116 //------------------------------------------------------------------------------------------------- 7117 /// XC scmi dual miu control 7118 /// @param bEnable \b IN:Disable or enable Dual. 7119 /// @param u32LeftFactor \b IN:Dual bw ratio left factor. XC BW use will be u32LeftFactor:u32RightFactor 7120 /// @param u32RightFactor \b IN:Dual bw ratio right factor. This Ratio should is recomanded between 1:3 and 3:1. 7121 /// @param eWindow \b IN:main win / sub win 7122 /// @return TRUE or FALSE 7123 //------------------------------------------------------------------------------------------------- 7124 MS_BOOL SYMBOL_WEAK MApi_XC_EnableMiuDualMode(MS_BOOL bEnable, MS_U32 u32LeftFactor, MS_U32 u32RightFactor, SCALER_WIN eWindow); 7125 7126 //------------------------------------------------------------------------------------------------------ 7127 /// MApi_XC_Get3DFormat 7128 /// @param e3DAttrType \b IN: The attribute of 3D 7129 /// @param para \b IN: A pointer points to parameters which need to pass value according to attribute type 7130 /// @param p3DFormat \b out: A pointer points to 3D format. It may input 3D format or output 3D format depending 7131 /// value of para. If value of para is HW IP, the 3D format is input 3D format. If value of para is HW OP, the 3D format is 7132 /// output 3D format. 7133 /// example: 7134 /// 1 *para == E_XC_3D_OSD_BLENDING_SC_IP or E_XC_3D_OSD_BLENDING_FRC_IP 7135 /// => *p3DFormat == E_XC_3D_INPUT_MODE 7136 /// 2 *para == E_XC_3D_OSD_BLENDING_SC_OP or E_XC_3D_OSD_BLENDING_FRC_OP 7137 /// => *p3DFormat == E_XC_3D_OUTPUT_MODE 7138 /// @return MS_BOOL \b OUT: TRUE->get 3D format successfully, FALSE->fail to get 3D format 7139 //------------------------------------------------------------------------------------------------------ 7140 MS_BOOL SYMBOL_WEAK MApi_XC_Get3DFormat(E_XC_3D_ATTRIBUTE_TYPE e3DAttrType, void* para, void* p3DFormat); 7141 7142 //------------------------------------------------------------------------------------------------- 7143 /// Set SWDR Information 7144 /// @ingroup CFD 7145 /// @param pSWDR_INFO \b IN: SWDR information 7146 /// @return TRUE or FALSE 7147 //------------------------------------------------------------------------------------------------- 7148 MS_BOOL SYMBOL_WEAK MApi_XC_SetSWDRInfo(XC_SWDR_INFO *pSWDR_INFO); 7149 7150 //------------------------------------------------------------------------------------------------- 7151 /// Get SWDR Information 7152 /// @ingroup CFD 7153 /// @param pSWDR_INFO \b IN: SWDR information 7154 /// @return TRUE or FALSE 7155 //------------------------------------------------------------------------------------------------- 7156 MS_BOOL SYMBOL_WEAK MApi_XC_GetSWDRInfo(XC_SWDR_INFO *pSWDR_INFO); 7157 7158 #ifdef UFO_XC_SUPPORT_HDMI_DOWNSCALE_OUTPUT_POLICY 7159 //------------------------------------------------------------------------------------------------- 7160 /// Get policy Information 7161 /// @ingroup OPTEE 7162 /// @return policy information 7163 // +-----+-----+-----+-----+ 7164 // |8bits|8bits|8bits|8bits| 7165 // +-----+-----+-----+-----+ 7166 // | 4K | FHD | HD | SD | 7167 // +-----+-----+-----+-----+ 7168 // 8bits info: 0->none, 1->BLUESCREEN, 2->SD, 3->HD, 4->FHD, 5->4K2K 7169 //------------------------------------------------------------------------------------------------- 7170 MS_U32 SYMBOL_WEAK MApi_XC_GetHDMIPolicy(void); 7171 #endif 7172 7173 #undef INTERFACE 7174 #ifdef __cplusplus 7175 } 7176 #endif 7177 7178 #endif /* _API_XC_H_ */ 7179 7180 7181