hv_comm_Define.h 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342
  1. /**
  2. * @file hv_comm_Define.h
  3. * @brief Header file of mute module.
  4. *
  5. * @verbatim
  6. * ==============================================================================
  7. * ##### How to use #####
  8. * ==============================================================================
  9. *
  10. * @endverbatim
  11. *
  12. * @author HiView SoC Software Team
  13. * @version 1.0.0
  14. * @date 2022-08-23
  15. */
  16. #ifndef __SDK_COMMON_COMMON_H__
  17. #define __SDK_COMMON_COMMON_H__
  18. #define HV_ENABLE 1
  19. #define HV_DISABLE 0
  20. #define HV_FALSE 0
  21. #define HV_TRUE 1
  22. #define HV_SUCCESS 0
  23. #define HV_FAILURE 1
  24. #define HV_CONTINUE 2
  25. #define HV_FINISH 3
  26. #define HV_TIMEOUT 4
  27. #define HV_BUSY 5
  28. #define HV_INVALID 6
  29. #define HV_NOREADY 7
  30. #define HV_ON 1
  31. #define HV_OFF 0
  32. #define HV_SET 1
  33. #define HV_RESET 0
  34. #ifdef _cplusplus
  35. #define NULL 0
  36. #else
  37. #define NULL ((void *)0)
  38. #endif
  39. #define HV_VENDOR_NAME_LEN 8
  40. #define HV_VENDOR_DESCRIP_LEN 16
  41. #define HV_EDID_BLOCK_DATA_SIZE 128
  42. #define HV_EDID_SEGMENT_DATA_SIZE 256
  43. #define HV_EDID_CTA_BLOCK_TAG 0x2
  44. #define HV_HDCP_1X_SIZE_BKSV 0x05 /**< Bksv Size */
  45. #define HV_HDCP_1X_SIZE_DKS_BYTE 280 /**< Device Key Set Size */
  46. #define HV_HDCP_2X_RX_LC128_SIZE 16 /** Lc128 global constant size in bytes */
  47. #define HV_HDCP_2X_RX_CERT_SIZE 522 /** DCP certificate size in bytes */
  48. #define HV_HDCP_2X_RX_PRIVATEKEY_SIZE 320 /** RSA private key size (64*5) in bytes */
  49. #define HV_ATTR_ISR_SECTION
  50. #define HV_PANEL_NAME_BYTE_MAX (40)
  51. #define CM_SET_HUE (0)
  52. #define CM_SET_SAT (1)
  53. #define CM_SET_LUM (2)
  54. #define HV_DP_VER14 0x14 /* DPCD version 1.4 */
  55. #define HV_DP_VER13 0x13 /* DPCD/SDP version 1.3 */
  56. #define HV_DP_VER12 0x12 /* DPCD/SDP version 1.2 */
  57. #define HV_DP_VER11 0x11 /* DPCD/SDP version 1.1 */
  58. typedef enum _ChannelFlashConfigIndex
  59. {
  60. CHANNEL_FLASH_PORT_INDEX,
  61. CHANNEL_FLASH_MAGNIFY_SW,
  62. CHANNEL_FLASH_PXP_MODE,
  63. }ChannelFlashConfigIndex;
  64. typedef enum _LinkPortIndex
  65. {
  66. LINK_PORT_INDEX_HDMI_RX0,
  67. LINK_PORT_INDEX_HDMI_RX1,
  68. LINK_PORT_INDEX_DP_RX0,
  69. LINK_PORT_INDEX_DP_RX1,
  70. LINK_PORT_INDEX_INVALID,
  71. }LinkPortIndex;
  72. typedef enum _EdpTxPortIndex
  73. {
  74. EDP_TX_PROT_INDEX0 = 0,
  75. EDP_TX_PROT_INDEX1 = 1,
  76. }EdpTxPortIndex;
  77. typedef enum _EdpAuxPortIndex
  78. {
  79. EDP_AUX_PROT_INDEX0 = 0,
  80. EDP_AUX_PROT_INDEX1 = 1,
  81. }EdpAuxPortIndex;
  82. typedef enum _EdpHpdPortIndex
  83. {
  84. EDP_HPD_PROT_INDEX0 = 0,
  85. EDP_HPD_PROT_INDEX1 = 1,
  86. }EdpHpdPortIndex;
  87. typedef enum _MprtType
  88. {
  89. MPRT_PWM_CLOSE = 0,
  90. MPRT_PWM_ENABLE,
  91. MPRT_PWM_VRR_ENABLE,
  92. }MprtType;
  93. typedef enum _VendorType
  94. {
  95. VendorType_UnKnown,
  96. VendorType_HDMI_14b,
  97. VendorType_HDMI_FORUM, /* VRR */
  98. VendorType_AMD, /* FreeSync */
  99. VendorType_AMD_AdaptSync, /* AdaptSync */
  100. VendorType_NVIDIA, /* G-Sync */
  101. VendorType_Num
  102. }VendorType;
  103. /* 顺序跟数字是按照协议排序,如果需要修改需要Re-View HDMI & DP VideoColorParam */
  104. typedef enum _ColorFormatType
  105. {
  106. ColorFormatType_RGB = 0x00,
  107. ColorFormatType_YCbCr422 = 0x01,
  108. ColorFormatType_YCbCr444 = 0x02,
  109. ColorFormatType_YCbCr420 = 0x03,
  110. ColorFormatType_IDODefined,
  111. ColorFormatType_Reserved
  112. }ColorFormatType;
  113. typedef enum _PicAspRatioType
  114. {
  115. PicAspRatioType_Nodata = 0x00,
  116. PicAspRatioType_4_3 = 0x01,
  117. PicAspRatioType_16_9 = 0x02,
  118. PicAspRatioType_Reserved
  119. }PicAspRatioType;
  120. /* 顺序跟数字是按照协议排序,如果需要修改需要Re-View HDMI & DP VideoColorParam */
  121. typedef enum _ColorSpaceType
  122. {
  123. ColorSpaceType_SRGB = 0,
  124. ColorSpaceType_BT601 = 1,
  125. ColorSpaceType_BT709 = 2,
  126. ColorSpaceType_XV_YCC_601 = 0x18,
  127. ColorSpaceType_XV_YCC_709 = 0x19,
  128. ColorSpaceType_S_YCC_601 = 0x1A,
  129. ColorSpaceType_OP_YCC_601 = 0x1B,
  130. ColorSpaceType_OP_RGB = 0x1C,
  131. ColorSpaceType_BT2020_cYCC = 0x1D,
  132. ColorSpaceType_BT2020_RGB = 0x1E,
  133. ColorSpaceType_BT2020_YCC = 0x1F,
  134. ColorSpaceType_ST2113_P3D65 = 0x7C,
  135. ColorSpaceType_ST2113_P3DCI = 0x7D,
  136. ColorSpaceType_BT2100_ICTCP = 0x7E
  137. }ColorSpaceType;
  138. /* 顺序跟数字是按照协议排序,如果需要修改需要Re-View HDMI & DP VideoColorParam */
  139. typedef enum _ColorDepthType
  140. {
  141. ColorDepthType_6Bit = 3,
  142. ColorDepthType_8Bit = 4,
  143. ColorDepthType_10Bit,
  144. ColorDepthType_12Bit,
  145. ColorDepthType_16Bit,
  146. ColorDepthType_NUM,
  147. ColorDepthType_Invalid
  148. }ColorDepthType;
  149. /* RGB 跟 YCC 对应的Limited 跟 FUll 正好错位,处理需要注意:
  150. * 下面是YCC的协议定义
  151. typedef enum _YccColorRangeType
  152. {
  153. YccColorRangeType_Limited_Range = 0,
  154. YccColorRangeType_Full_Range,
  155. YccColorRangeType_Range_Reserved
  156. }YccColorRangeType;
  157. */
  158. typedef enum _ColorRangeType
  159. {
  160. ColorRangeType_Default = 0,
  161. ColorRangeType_Limited_Range,
  162. ColorRangeType_Full_Range,
  163. ColorRangeType_Range_Reserved
  164. }ColorRangeType;
  165. /* 顺序跟数字是按照协议排序,如果需要修改需要Re-View HDMI & DP VideoColorParam */
  166. typedef enum _CorlorContentType
  167. {
  168. CorlorContentType_NoDef,
  169. CorlorContentType_Graphics,
  170. CorlorContentType_Photo,
  171. CorlorContentType_Cinema,
  172. CorlorContentType_Game
  173. }CorlorContentType;
  174. typedef enum _HDRSwitch
  175. {
  176. HDR_Switch_AutoOff = 0,
  177. HDR_Switch_AutoOn,
  178. HDR_Switch_ForceOff,
  179. HDR_Switch_Num
  180. }HDRSwitch;
  181. typedef enum _HDREOTF
  182. {
  183. SDR_TYPE,
  184. HDR_TYPE,
  185. HDR10_TYPE,
  186. HLG_TYPE,
  187. HDR_TYPE_NUM
  188. }HDREOTF;
  189. typedef enum _GCMODE
  190. {
  191. GC_DEFAULT,
  192. GC_DYNAMICCONTRAST,
  193. GC_DARKSTABLIZER,
  194. }GCMODE;
  195. typedef enum _GamutType
  196. {
  197. PQ_GAMUT_SRGB,
  198. PQ_GAMUT_709,
  199. PQ_GAMUT_P3,
  200. PQ_GAMUT_NATIVE,
  201. PQ_GAMUT_ADOBE,
  202. PQ_GAMUT_DISPLAY_P3,
  203. PQ_GAMUT_2020,
  204. PQ_GAMUT_NUM,
  205. }PQGamutType;
  206. typedef enum _UserColorSpace
  207. {
  208. PQ_COLOR_SPACE_RGB,
  209. PQ_COLOR_SPACE_YUV,
  210. PQ_COLOR_SPACE_AUTO,
  211. PQ_COLOR_SPACE_NUM,
  212. }PQColorSpace;
  213. typedef enum _UserBrightRange
  214. {
  215. PQ_BRIGHT_RANGE_AUTO,
  216. PQ_BRIGHT_RANGE_FULL,
  217. PQ_BRIGHT_RANGE_LIMIT,
  218. PQ_BRIGHT_RANGE_NUM,
  219. }PQBrightRange;
  220. typedef enum _PQGammaType{
  221. PQ_GAMMA1_6,
  222. PQ_GAMMA1_8,
  223. PQ_GAMMA2_0,
  224. PQ_GAMMA2_2,
  225. PQ_GAMMA2_4,
  226. PQ_GAMMA2_6,
  227. PQ_GAMMA2_8,
  228. PQ_GAMMA_SRGB,
  229. PQ_GAMMA_1886,
  230. PQ_GAMMA_NUM,
  231. }PQGammaType;
  232. typedef enum _PQOdLevel{
  233. PQ_OD_OFF,
  234. PQ_OD_FAST,
  235. PQ_OD_FASTER,
  236. PQ_OD_FASTEST,
  237. PQ_OD_ULTRAFAST,
  238. PQ_OD_NUM,
  239. }PQOdLevel;
  240. typedef enum _PQHdrSwitch{
  241. PQ_HDR_OFF,
  242. PQ_HDR_ON,
  243. PQ_HDR_MAX,
  244. }PQHdrSwitch;
  245. typedef enum _PQColorTemp{
  246. PQ_COLOR_TEMP_COOL,
  247. PQ_COLOR_TEMP_STANDARD,
  248. PQ_COLOR_TEMP_WARM,
  249. PQ_COLOR_TEMP_CUSTOM,
  250. PQ_COLOR_TEMP_LOWBLUE,
  251. PQ_COLOR_TEMP_SRGB,
  252. PQ_COLOR_TEMP_BLUSH,
  253. PQ_COLOR_TEMP_MAX,
  254. }PQColorTemp;
  255. typedef enum _PQCALLBACKMODE
  256. {
  257. PQCALLBACK_VSYNC,
  258. PQCALLBACK_TIMECHANGED,
  259. PQCALLBACK_RATIOMAPPING,
  260. PQCALLBACK_VSYNC_DPU,
  261. PQCALLBACK_HSYNC1,
  262. PQCALLBACK_HSYNC2,
  263. PQCALLBACK_HSYNC3,
  264. PQCALLBACK_HSYNC4,
  265. PQCALLBACK_HSYNC5,
  266. PQCALLBACK_HSYNC6,
  267. PQCALLBACK_HSYNC7,
  268. PQCALLBACK_HSYNC8,
  269. }PQCALLBACKMODE;
  270. typedef enum _PQ_LDCMODE
  271. {
  272. PQ_LDCMODE_OFF,
  273. PQ_LDCMODE_LOW,
  274. PQ_LDCMODE_MEDIUM,
  275. PQ_LDCMODE_HIGH,
  276. }PQ_LDCMODE;
  277. typedef enum _CmColorType
  278. {
  279. PQ_CM_R = 0,
  280. PQ_CM_G = 1,
  281. PQ_CM_B = 2,
  282. PQ_CM_C = 3,
  283. PQ_CM_Y = 4,
  284. PQ_CM_M = 5,
  285. PQ_CM_SKIN = 6,
  286. PQ_CM_MAX
  287. }CmColorType;
  288. typedef enum _VideoRatio
  289. {
  290. OUTPUTRATIO_AUTO,
  291. OUTPUTRATIO_16TO9,
  292. OUTPUTRATIO_4TO3,
  293. OUTPUTRATIO_21TO9,
  294. OUTPUTRATIO_5TO3,
  295. OUTPUTRATIO_1TO1,
  296. OUTPUTRATIO_16TO10,
  297. OUTPUTRATIO_5TO4,
  298. OUTPUTRATIO_FULL,
  299. /* 如果图像比例和屏幕大小无关在OUTPUTRATIO_17INCH_4TO3前面添加枚举
  300. 否则在后面添加枚举 */
  301. OUTPUTRATIO_17INCH_4TO3,
  302. OUTPUTRATIO_19INCH_4TO3,
  303. OUTPUTRATIO_19INCH_5TO4,
  304. OUTPUTRATIO_19INCH_16TO10,
  305. OUTPUTRATIO_21P5INCH_16TO9,
  306. OUTPUTRATIO_22INCH_16TO10,
  307. OUTPUTRATIO_23INCH_16TO9,
  308. OUTPUTRATIO_23P6INCH_16TO9,
  309. OUTPUTRATIO_24INCH_16TO9,
  310. OUTPUTRATIO_MAX
  311. }VideoRatio;
  312. typedef struct _PanelInchParam{
  313. USHORT16 usPanelInchW;
  314. USHORT16 usPanelInchH;
  315. }PanelInchParam;
  316. typedef struct _RatioParam{
  317. USHORT16 usRatioW;
  318. USHORT16 usRatioH;
  319. }RatioParam;
  320. typedef struct _VideoColorParam
  321. {
  322. ColorFormatType eClrFormat;
  323. ColorSpaceType eClrSpace;
  324. ColorDepthType eClrDepth;
  325. ColorRangeType eClrRange;
  326. CorlorContentType eContent;
  327. UCHAR8 ucPixelRepe;
  328. }VideoColorParam;
  329. typedef enum _DisplayDataMode
  330. {
  331. DIS_TIMING_MODE_FRAMESYNC,
  332. DIS_TIMING_MODE_FREE_RUN,
  333. DIS_TIMING_MODE_TCON,
  334. DIS_TIMING_MODE_FREE_RUN_MODE1,
  335. }DisplayTimingMode;
  336. typedef enum _DisplayDataPathMode
  337. {
  338. DATA_PATH_MODE_FRAMESYNC,
  339. DATA_PATH_MODE_THROUGH_COLORFORMAT_RX,
  340. DATA_PATH_MODE_COMPRESS_COLORFORMAT_RX,
  341. DATA_PATH_MODE_THROUGH_COLORFORMAT_YUV444,
  342. DATA_PATH_MODE_THROUGH_COLORFORMAT_YUV422,
  343. /*直通的YUV420占用的带宽内存 一定比压缩的YUV422多,且显示效果更差,仅辅通道才选择这种方式*/
  344. DATA_PATH_MODE_THROUGH_COLORFORMAT_YUV420,
  345. DATA_PATH_MODE_COMPRESS_COLORFORMAT_YUV444,
  346. DATA_PATH_MODE_COMPRESS_COLORFORMAT_YUV422,
  347. DATA_PATH_MODE_COMPRESS_RATIO_3_COLORFORMAT_YUV444,
  348. DATA_PATH_MODE_COMPRESS_RATIO_3_COLORFORMAT_YUV422,
  349. }DisplayDataPathMode;
  350. typedef enum _ChanelSignalState
  351. {
  352. ChanelSignalState_Invalid,
  353. ChanelSignalState_SearchState,
  354. ChanelSignalState_NoSignal,
  355. ChanelSignalState_SignalSync,
  356. }ChanelSignalState;
  357. typedef enum _ChannelType
  358. {
  359. CHANNEL_TYPE_MAIN = 0,
  360. CHANNEL_TYPE_SUB = 1,
  361. }ChannelType;
  362. typedef enum _PxpMode
  363. {
  364. PXP_MODE_CLOSE = 0,
  365. PXP_MODE_PIP_ENABLE = 1,
  366. PXP_MODE_PBP_ENABLE = 2,
  367. PXP_MODE_MAGNIFY_GLASS_ENABLE = 3,
  368. }PxpMode;
  369. typedef enum _PipSize
  370. {
  371. PIP_SIZE_SMALL = 0,
  372. PIP_SIZE_MIDDLE = 1,
  373. PIP_SIZE_BIG = 2,
  374. }PipSize;
  375. typedef enum _PipPos
  376. {
  377. PIP_POS_LEFT_TOP = 0,
  378. PIP_POS_LEFT_BOTTOM = 1,
  379. PIP_POS_RIGHT_TOP = 2,
  380. PIP_POS_RIGHT_BOTTOM = 3,
  381. }PipPos;
  382. /*为了不使用浮点数,并且方便计算将压缩比枚举直接放大十倍*/
  383. typedef enum _CompressRatio
  384. {
  385. COMPRESS_RATIO_1 = 10, /*非压缩模式,压缩比可以当成1*/
  386. COMPRESS_RATIO_TWO_POINT_FIVE = 25,
  387. COMPRESS_RATIO_THREE = 30,
  388. COMPRESS_RATIO_FOUR = 40,
  389. }CompressRatio;
  390. typedef struct _FrameBufferConfig
  391. {
  392. BOOL bUseFrameBuffer; /*false-frame sync use water buffer dont use FrameBuffer, true: other case*/
  393. UCHAR8 ucFrameBufferNumber; /*framebuffer中缓存的帧数*/
  394. ColorFormatType enFBColorFormat; /*frame buffer缓存的帧中使用的颜色格式*/
  395. ColorDepthType enFBColorDepth; /*frame buffer存储的色深*/
  396. BOOL bUseCompress; /*frameBuffer 中的数据是否使用压缩模式*/
  397. CompressRatio enCompressRatio; /*压缩模式配置的压缩比*/
  398. }FrameBufferConfig;
  399. typedef enum _SouceInfoType
  400. {
  401. SouceInfoType_UnKnown,
  402. SouceInfoType_DigitalSTB,
  403. SouceInfoType_DVDPlayer,
  404. SouceInfoType_DVHS,
  405. SouceInfoType_HDD_VideoRecorder,
  406. SouceInfoType_DVC,
  407. SouceInfoType_DSC,
  408. SouceInfoType_VideoCD,
  409. SouceInfoType_Game,
  410. SouceInfoType_PCGeneral,
  411. SouceInfoType_BluRayDisc,
  412. SouceInfoType_SuperAudioCD,
  413. SouceInfoType_HD_DVD,
  414. SouceInfoType_PMP,
  415. SouceInfoType_Reserved
  416. }SouceInfoType;
  417. typedef enum _HDMIFormat
  418. {
  419. HDMI_FORMAT_STANDARD,
  420. HDMI_FORMAT_ENHANCE,
  421. HDMI_FORMAT_FRL_ENHANCE,
  422. HDMI_FORMAT_NUM
  423. }HDMIFormat;
  424. typedef enum _EDIDType
  425. {
  426. EDID_TYPE_DEFAULT = 0,
  427. EDID_TYPE_DEFAULT_NOHDR,
  428. EDID_TYPE_TMDS,
  429. EDID_TYPE_TMDS_VRR,
  430. EDID_TYPE_FRL,
  431. EDID_TYPE_FRL_VRR,
  432. EDID_TYPE_FRL_ENHANCED,
  433. EDID_TYPE_FRL_ENHANCED_VRR,
  434. EDID_TYPE_PBP,
  435. EDID_TYPE_PIP,
  436. EDID_TYPE_TMDS_1_4,
  437. EDID_TYPE_ADAPTIVESYNC,
  438. EDID_TYPE_ADAPTIVESYNC_NOHDR,
  439. EDID_TYPE_USR_DEF,
  440. EDID_TYPE_PRO_ESPORT,
  441. EDID_TYPE_END,
  442. EDID_TYPE_CLOSE_HDR = BIT_5, /* Only Used for HDMI */
  443. EDID_TYPE_INVALID = 0xFF,
  444. }EDIDType;
  445. //DTC特殊处理原因
  446. typedef enum _SpecResType
  447. {
  448. SPECIAL_RESOLUTION_NORMAL,
  449. SPECIAL_RESOLUTION_UNSUPPORT,
  450. SPECIAL_RESOLUTION_FRAME_SYNC,
  451. SPECIAL_RESOLUTION_FRC,
  452. SPECIAL_RESOLUTION_FRC_444,
  453. SPECIAL_RESOLUTION_FRC_422,
  454. SPECIAL_RESOLUTION_FRC_420,
  455. SPECIAL_RESOLUTION_DTC_LINE_RATE,
  456. }SpecResType;
  457. typedef struct _VideoTimingParam
  458. {
  459. USHORT16 usHTotal;
  460. USHORT16 usHFProch;
  461. USHORT16 usHSyncW;
  462. USHORT16 usHBProch;
  463. USHORT16 usHActive;
  464. USHORT16 usHPol;
  465. USHORT16 usVTotal;
  466. USHORT16 usVFProch;
  467. USHORT16 usVSyncW;
  468. USHORT16 usVBProch;
  469. USHORT16 usVActive;
  470. USHORT16 usVPol;
  471. USHORT16 usFrameRate;
  472. BOOL bInterlacedMode; /* Interlace mode or not */
  473. BOOL bIsEnterALLM; /* ALLM Mode Open or Closed */
  474. BOOL bIsNoSignal; /* Ture:表示HDMI未解析出信号,无法SyncOK ,提示"No Signal";
  475. False:表示HDMI可以正确识别信号,但是无法解析出Timing 及关键参数 AVI etc,提示"Not Support".
  476. Only 返回 HV_FAILURE 时候该字段有意义 */
  477. UINT32 uiFreqKHz; /* RX Received Pixel Clock KHz */
  478. UINT32 uiHFreqHz; /*horizontal frequency*/
  479. UINT32 uiRxDpllSetFreqKHz; /* RX dpll set Pixel Clock KHz: 0表示未配置,非0表示已经配置 */
  480. FLOAT32 fFrameRate; /* Detail of the Frame rate Detected */
  481. }VideoTimingParam;
  482. typedef enum _DynamicColorWin
  483. {
  484. MAIN_COLOR_WIN = 0,
  485. DYNAMIC_COLOR_WIN = 1,
  486. }DynamicColorWin;
  487. typedef struct _AudioTimingParam
  488. {
  489. UINT32 uiCTS;
  490. UINT32 uiN;
  491. UINT32 uiMaud;
  492. UINT32 uiNaud;
  493. }AudioTimingParam;
  494. typedef struct _AmdSpdInfoParam
  495. {
  496. BOOL bFreeSyncSupported;
  497. BOOL bFreeSyncEnabled; /* Sync Should Prapared to Entered FreeSync */
  498. BOOL bFreeSyncActive; /* Entered the Frame changed status */
  499. BOOL bNativeColorSpaceActive;
  500. BOOL bLocalDimmingDisabled; /* 1: disabled Local Dimming. 0: enable the Local Dimming */
  501. BOOL bGamma26EOTFActive;
  502. BOOL bGamma22EOTFActive;
  503. BOOL bBT709EOTFActive;
  504. BOOL bSRGBEOTFActive;
  505. UCHAR8 ucVersion;
  506. UCHAR8 ucFreeSyncMinReFresh;
  507. UCHAR8 ucFreeSyncMaxReFresh;
  508. UCHAR8 ucBrightneesControl;
  509. }AmdSpdInfoParam;
  510. typedef struct _NvidiaVendSpecInfoParam
  511. {
  512. UCHAR8 ucModeName[HV_VENDOR_DESCRIP_LEN];
  513. SouceInfoType eSourceInfoCode;
  514. }NvidiaVendSpecInfoParam;
  515. typedef struct _SourceProductDesc
  516. {
  517. UCHAR8 uclVendorName[HV_VENDOR_NAME_LEN];
  518. UCHAR8 uclVendorDescript[HV_VENDOR_DESCRIP_LEN];
  519. SouceInfoType eSourceInfoCode;
  520. }SourceProductDesc;
  521. typedef enum _VfrVRRType
  522. {
  523. VfrVRRType_HDMIMDGaming,
  524. VfrVRRType_HDMIMDGamingFVA,
  525. VfrVRRType_HDMIMDQMS,
  526. VfrVRRType_HDMIMDNotSupport
  527. }VfrVRRType;
  528. typedef struct _VRRMDContent
  529. {
  530. VfrVRRType eVfrVrrType;
  531. BOOL bVRREnable; /* Including All VfrVRRType: bVRRGamingEnable and bVRRQMSEnable */
  532. UCHAR8 ucFVAFactorM1; /* VfrVRRType_HDMIMDGamingFVA Only */
  533. UCHAR8 ucBase_Vfront;
  534. UCHAR8 ucNextTFR; /* VfrVRRType_HDMIMDQMS Only */
  535. USHORT16 usBaseRefreshRate;
  536. }VRRMDContent;
  537. typedef struct _VRRInfoParam
  538. {
  539. BOOL bVRREnable; /* HV_TRUE:Source Entered VRR; HV_HV_FALSE:Source Out Of VRR */
  540. VendorType eVendor; /* Type == VendorType_UnKnown±íʾ·ÇVRR±¨ÎÄ */
  541. union
  542. {
  543. AmdSpdInfoParam stAmdSpdInfPara;
  544. NvidiaVendSpecInfoParam stNvidiaVSIPara;
  545. VRRMDContent stCommVRRinMD; /* HF-VRR with EMP */
  546. } uvsi;
  547. }VRRInfoParam;
  548. typedef struct _HDRParam
  549. {
  550. HDREOTF xType;
  551. UCHAR8 ucMetaID;
  552. USHORT16 usPrimX0;
  553. USHORT16 usPrimY0;
  554. USHORT16 usPrimX1;
  555. USHORT16 usPrimY1;
  556. USHORT16 usPrimX2;
  557. USHORT16 usPrimY2;
  558. USHORT16 usWhtX;
  559. USHORT16 usWhtY;
  560. USHORT16 usMaxLum;
  561. USHORT16 usMinLum;
  562. USHORT16 usMaxCntn;
  563. USHORT16 usMaxFrmAvg;
  564. }HDRParam;
  565. typedef struct _FreesyncInfo
  566. {
  567. UCHAR8 ucType; /*0: none 1: DRR 2:DRR+HDR*/
  568. UCHAR8 ucSupported;
  569. UCHAR8 ucEnabled;
  570. UCHAR8 ucActive;
  571. UCHAR8 ucMinRate;
  572. UCHAR8 ucMaxRate;
  573. UCHAR8 ucNative;
  574. UCHAR8 ucLDDisable;
  575. UCHAR8 ucGamma2p2EOTF;
  576. }FreesyncInfo;
  577. typedef enum _AudioSampleRate
  578. {
  579. E_RATE_REFERENCE_STREAM_HEADER = 0,
  580. E_32K = 1,
  581. E_44P1K = 2,
  582. E_48K = 3,
  583. E_88P2K = 4,
  584. E_96K = 5,
  585. E_176P4K = 6,
  586. E_192K = 7,
  587. E_768K = 8
  588. }AudioSampleRate;
  589. typedef enum _AudioSampleDepth
  590. {
  591. E_DEPTH_REF_STREAM_HEADER = 0,
  592. E_AUD_16BIT = 1,
  593. E_AUD_20BIT = 2,
  594. E_AUD_24BIT = 3
  595. }AudioSampleDepth;
  596. typedef enum _AudioCodingType
  597. {
  598. E_AUD_TYPE_REF_STREAM_HEAD = 0,
  599. E_AUD_TYPE_L_PCM = 1,
  600. E_AUD_TYPE_AC_3 = 2,
  601. E_AUD_TYPE_MPEG_1 = 3,
  602. E_AUD_TYPE_MP3 = 4,
  603. E_AUD_TYPE_MPEG_2 = 5,
  604. E_AUD_TYPE_AAC_LC = 6,
  605. E_AUD_TYPE_DTS_TS_102 = 7,
  606. E_AUD_TYPE_ATRAC = 8,
  607. E_AUD_TYPE_ONE_BIT_AUD = 9,
  608. E_AUD_TYPE_ENHENCE_AC_3 = 10,
  609. E_AUD_TYPE_DTS_HD_UHD = 11,
  610. E_AUD_TYPE_MAT = 12,
  611. E_AUD_TYPE_DTS_IEC = 13,
  612. E_AUD_TYPE_WMA_PRO = 14,
  613. E_AUD_TYPE_REF_ACET = 15
  614. }AudioCodingType;
  615. typedef struct _AudioPara
  616. {
  617. AudioSampleRate enSampleRate;
  618. AudioSampleDepth enSampleDepth;
  619. AudioCodingType enCodingType;
  620. BOOL bAudClkStable;
  621. UCHAR8 ucChnlCnt;
  622. UINT32 uiCtsValue;
  623. UINT32 uiNValue;
  624. }AudioPara;
  625. typedef struct _DpuInterruptDefine
  626. {
  627. /*ldg_int*/
  628. UINT32 uiKspiVs :1;
  629. UINT32 uiKspiTconVsL :1;
  630. UINT32 uiKspiTconVsH :1;
  631. UINT32 uiLdgTblGo :1;
  632. UINT32 uiKspiIntRdma :1;
  633. UINT32 uiKspiIntWbuf :1;
  634. /*cap_int*/
  635. UINT32 uiMainVdmTblCaGo :1;
  636. UINT32 uiMainSpchVendIrq :1;
  637. UINT32 uiSubVdmTblCaGo :1;
  638. UINT32 uiSubSpchVendIrq :1;
  639. /*srp_int*/
  640. UINT32 uiSrTblGo :1;
  641. UINT32 uiSrCtMhiHibEndIrq :1;
  642. UINT32 uiSrCtMhiHiaEndIrq :1;
  643. }DpuInterruptDefine;
  644. typedef struct _DtcInterruptDefine
  645. {
  646. UINT32 uiMainFrcAbnormConflict :1;
  647. UINT32 uiSubFrcAbnormConflict :1;
  648. UINT32 uiBufferOverflow :1;
  649. UINT32 uiBufferUnderflow :1;
  650. UINT32 uiBufferHigh :15;
  651. UINT32 uiBufferLow :15;
  652. }DtcInterruptDefine;
  653. typedef enum _DisplayInterruptType
  654. {
  655. DisplayInterruptType_HsIp0,
  656. DisplayInterruptType_HsIp1,
  657. DisplayInterruptType_HsDisplay,
  658. DisplayInterruptType_Dpu,
  659. DisplayInterruptType_Dtc,
  660. DisplayInterruptType_Kspi,
  661. DisplayInterruptType_Mute0,
  662. DisplayInterruptType_Mute1,
  663. }DisplayInterruptType;
  664. typedef struct _HsIpInterruptDefine
  665. {
  666. UINT32 uiHsIntSource0 :1;
  667. UINT32 uiHsIntSource1 :1;
  668. UINT32 uiHsIntSource2 :1;
  669. UINT32 uiHsIntSource3 :1;
  670. UINT32 uiHsIntSource4 :1;
  671. UINT32 uiHsIntSource5 :1;
  672. UINT32 uiHsIntSource6 :1;
  673. UINT32 uiHsIntSource7 :1;
  674. UINT32 uiHsIntSource8 :1;
  675. UINT32 uiHsIntSource9 :1;
  676. UINT32 uiHsIntSource10 :1;
  677. UINT32 uiHsIntSource11 :1;
  678. UINT32 uiHsIntSource12 :1;
  679. UINT32 uiHsIntSource13 :1;
  680. UINT32 uiHsIntSource14 :1;
  681. UINT32 uiHsIntSource15 :1;
  682. UINT32 uiHsIntSource16 :1;
  683. UINT32 uiHsIntSource17 :1;
  684. UINT32 uiHsIntSource18 :1;
  685. UINT32 uiHsIntSource19 :1;
  686. UINT32 uiHsIntSource20 :1;
  687. UINT32 uiHsIntSource21 :1;
  688. UINT32 uiHsIntSource22 :1;
  689. UINT32 uiHsIntSource23 :1;
  690. }HsIpInterruptDefine;
  691. typedef struct _DisplayInterrupt
  692. {
  693. HsIpInterruptDefine stHsIp0;
  694. HsIpInterruptDefine stHsIp1;
  695. HsIpInterruptDefine stHsDisplay;
  696. DpuInterruptDefine stDpuInterrupt;
  697. DtcInterruptDefine stDtcInterrupt;
  698. UINT32 uiInterruptCount;
  699. DisplayInterruptType enInterruptType;
  700. }DisplayInterrupt;
  701. typedef struct _EDPTXInterruptDefine
  702. {
  703. UINT32 uiHpdEvt;
  704. UINT32 uiHpdIrq;
  705. UINT32 uiAuxTransDone;
  706. UINT32 uiRegEdptxSwIrq;
  707. UINT32 uiHpdPlug;
  708. }EdpTxInterruptDefine;
  709. typedef void (*HV_MW_VSYNC_CALLBACK)(VOID);
  710. typedef struct _VideoConfigParams
  711. {
  712. UINT32 uiInputVideoWidth; /*当前通道输入Hactive*/
  713. UINT32 uiInputVideoHight; /*当前通道输入Vactive*/
  714. UINT32 uiInputVideoHtotal; /*当前通道输入H total*/
  715. UINT32 uiInputVideoVtotal; /*当前通道输入V total*/
  716. UINT32 uiInputFrameRate; /*当前通道输入帧率*/
  717. USHORT16 usInputCutHsize; /*cap in cut h size*/
  718. USHORT16 usInputCutVsize; /*cap in cut v size*/
  719. //SpecResType enSpecResType; /*特殊处理timing类型*/
  720. UINT32 uiDdrOrWtrVideoWidth; /*当前通道Hactive size in frame buffer or waterbuffer*/
  721. UINT32 uiDdrOrWtrVideoHight; /*当前通道Vactive size in frame buffer or waterbuffer*/
  722. UINT32 uiOutputVideoWidth; /*当前通道输出Hactive*/
  723. UINT32 uiOutputVideoHight; /*当前通道输出Vactive*/
  724. UINT32 uiOutputVideoHtotal; /*当前通道输出H total*/
  725. UINT32 uiOutputVideoVtotal; /*当前通道输出V total*/
  726. UINT32 uiOutputFrameRate; /*当前通道输出帧率*/
  727. UINT32 uiDtcTxHtotal; /*framesync模式下设定的DTC TX htotal*/
  728. USHORT16 usVideoPanelHactive; /*panel 参数*/
  729. USHORT16 usVideoPanelVactive; /*panel 参数*/
  730. USHORT16 usVideoPanelHtotalType; /*panel 参数*/
  731. USHORT16 usVideoPanelVtotalType; /*panel 参数*/
  732. USHORT16 usPanelInchWidth; /*panel尺寸大小(mm)*/
  733. USHORT16 usPanelInchHeight; /*panel尺寸大小(mm)*/
  734. UINT32 uiRxDpllFreq; /*当前配置的RXD时钟频率,kHZ*/
  735. UINT32 uiDisplayPllFreq; /*当前配置的Display时钟频率,kHZ*/
  736. UINT32 uiDestDisplayPllFreq; /*Display目标时钟频率,kHZ*/
  737. UINT32 uiPtcdPreDiv; /*当前配置的PTCD PLL pre divider*/
  738. UINT32 uiPtcdPostDiv; /*当前配置的PTCD PLL post divider*/
  739. UINT32 uiPtcdFBDivInt; /*当前配置的PTCD PLL fb int divider*/
  740. UINT32 uiPtcdFBDivFrac; /*当前配置的PTCD PLL fb frac divider*/
  741. PxpMode enPxpMode; /* 0-close 1-PIP 2-PBP*/
  742. UINT32 uiSubChannelUsedMemory; /*主通道计算 内存和带宽时,预估的辅通道最大使用的内存*/
  743. BOOL bOsdVrrEnable; /*OSD当前是否配置了VRR模式*/
  744. FrameBufferConfig stFrameBufferCfg; /*frame buffer config*/
  745. DisplayTimingMode enTimingMode; /*当前通路选择的DTC tming类型*/
  746. DisplayDataPathMode enDataPathMode; /*当前通路配置模式*/
  747. BOOL bHorizontalNeedScaler; /*cap vgsf模块水平方向需要进行scaler down*/
  748. BOOL bVerticalNeedScaler; /*cap vgsf模块垂直方向是否需要进行scaler down*/
  749. ChannelType enChannelType; /*通道类型*/
  750. BOOL bHflipEnable; /*水平方向翻转功能开关 0-disable 1-enable*/
  751. BOOL bVflipEnable; /*垂直方向翻转功能开关 0-disable 1-enable*/
  752. VideoColorParam stColor; /*从RX获取到的color配置*/
  753. HDRParam stHdrParam; /*HDR meta data got from HDMI/DP*/
  754. BOOL bHdrSwitch; /*Driver HDR On/Off*/
  755. VRRInfoParam stVRRInfoParam; /*VRR info got from HDMI/DP*/
  756. BOOL bInterlacedMode; /*RX timing是否是interlaced模式*/
  757. VideoRatio enAspectRatio; /*画面比例*/
  758. BOOL bConfigValid; /*表示当前此结构体变量数据是否有效;除开机及老化时,其它时间均有效*/
  759. BOOL bMainFakeSwitch; /*Dcw功能开关*/
  760. FLOAT32 fMainFakeRatio; /*Dcw功能放大倍数*/
  761. USHORT16 usMainFakeHsize; /*Dcw功能放大resolution Hactive*/
  762. USHORT16 usMainFakeVsize; /*Dcw功能放大resolution Vactive*/
  763. USHORT16 usMainFakePosH; /*Dcw H position*/
  764. USHORT16 usMainFakePosV; /*Dcw V position*/
  765. UINT32 uiEdpTuDataSize; /*edp软件计算的tu*/
  766. UINT32 uiMvid; /*edp软件计算的mvid*/
  767. BOOL bForceFrc; /*强制FRC模式,用于比例缩放*/
  768. HV_MW_VSYNC_CALLBACK pfCallBack;
  769. UCHAR8 (*pfPQCallback)(PQCALLBACKMODE enMode, const VOID *pvVideoConfigParams);
  770. }VideoConfigParams;
  771. typedef struct _DpuDpcCapSrpParam
  772. {
  773. UCHAR8 ucCaDataMode; /*0:444 1:422 2:420*/
  774. UCHAR8 ucCaDataBitwidth; /*rx input data width,6、8、10、12*/
  775. UCHAR8 ucCaEncPackWork; /*0:enc,pack work;1:enc work only;2:pack work only*/
  776. UCHAR8 ucDecUnpackSel; /*0:dec; 1: unpack*/
  777. UCHAR8 ucDataMode; /*0:444; 1:422; 2:420*/
  778. UCHAR8 ucDataWidth; /*0:6bit; 1:8bit; 2:10bit; 3:12bit*/
  779. }DpuDpcCapSrpParam;
  780. typedef struct _DpucScalerParam
  781. {
  782. USHORT16 usHsfInize;
  783. USHORT16 usVsfInize;
  784. USHORT16 usHsfOutsize;
  785. USHORT16 usVsfOutsize;
  786. UINT32 uiHfilbase;
  787. UINT32 uiVfilbase;
  788. }DpucScalerParam;
  789. typedef struct _DpuWindowParam
  790. {
  791. USHORT16 usDtcChHsta;
  792. USHORT16 usDtcChHend;
  793. USHORT16 usDtcChVsta;
  794. USHORT16 usDtcChVend;
  795. USHORT16 usBorderHstart;
  796. USHORT16 usBorderVstart;
  797. USHORT16 usBorderLength;
  798. USHORT16 usBorderHeight;
  799. BOOL bBorderEn;
  800. UCHAR8 ucBorderWidth;
  801. UINT32 ucBborderColor;
  802. }DpuWindowParam;
  803. typedef struct DpuVdmConfigSettings
  804. {
  805. UINT32 uiDmColStep;
  806. USHORT16 usDmTotalColNum;
  807. UCHAR8 ucDmBurstLen;
  808. UINT32 uiDmBurstNum;
  809. UCHAR8 ucDmBurstRmd;
  810. UINT32 uiDmLineStep;
  811. USHORT16 usDmTotalLineNum;
  812. UCHAR8 ucDmOutstanding;
  813. UINT32 uiDmWrStartAdr;
  814. UINT32 uiDmWrStartAdr0;
  815. UINT32 uiDmWrStartAdr1;
  816. UINT32 uiDmWrStartAdr2;
  817. UCHAR8 ucDmRdColStepDir;
  818. USHORT16 usDmRdColDatNum;
  819. UCHAR8 ucDmRdLineStepDir;
  820. UINT32 uiDmRdStartAdr;
  821. UINT32 uiDmRdStartAdr0;
  822. UINT32 uiDmRdStartAdr1;
  823. UINT32 uiDmRdStartAdr2;
  824. }DpuVdmConfigSettings;
  825. typedef struct _DpuDtcTopTimingParam
  826. {
  827. CHAR8 ucDtcRbufClkSel;
  828. UINT32 uiCycleRefclkDelay;
  829. UINT32 uiCycleRefclkFramesyncRangeMin;
  830. UINT32 uiCycleRefclkFramesyncRangeMax;
  831. UINT32 uiCycleRefclkFramesyncRestartTh;
  832. USHORT16 usRxVact;
  833. UCHAR8 ucFrcMainBufNum;
  834. USHORT16 usFrcMainRdDoneTh;
  835. USHORT16 usFrcMainWrDoneTh;
  836. }DpuDtcTopTimingParam;
  837. typedef struct _DpuCapCutParam
  838. {
  839. USHORT16 usCutHstart;
  840. USHORT16 usCutHend;
  841. USHORT16 usCutVstart;
  842. USHORT16 usCutVend;
  843. }DpuCapCutParam;
  844. typedef struct _MainRxFakeVideoParam
  845. {
  846. FLOAT32 fMainFakeRatio;
  847. USHORT16 usMainFakeHsize;
  848. USHORT16 usMainFakeVsize;
  849. USHORT16 usMainFakePosH;
  850. USHORT16 usMainFakePosV;
  851. }MainRxFakeVideoParam;
  852. typedef struct _HvFactoryEdidInfo
  853. {
  854. USHORT16 usHActive;
  855. USHORT16 usVActive;
  856. USHORT16 usProductCode;
  857. UINT32 uiSerialNum;
  858. USHORT16 usYear;
  859. UCHAR8 ucWeek;
  860. UCHAR8 ucFactNameLen;
  861. CHAR8 acFactName[3];
  862. UCHAR8 ucDescSnCount;
  863. CHAR8 acDescSn[13];
  864. CHAR8 acMonitorName[13];
  865. UCHAR8 ucVersion;
  866. UCHAR8 ucRevision;
  867. UCHAR8 ucExtFlag;
  868. UCHAR8 ucStorageType; /* 0, None 1, EEPROM 2, FlashROM */
  869. UCHAR8 ucCheckSumCount;
  870. UCHAR8 aucCheckSumValue[4];
  871. BOOL bCheckSumStatus;
  872. FLOAT32 fSreenSize;
  873. }HvFactoryEdidInfo;
  874. typedef struct _HvEdidInfoToOsd
  875. {
  876. USHORT16 usProductCode;
  877. UINT32 uiSerialNum;
  878. USHORT16 usYear;
  879. UCHAR8 ucWeek;
  880. CHAR8 acFactName[4];
  881. CHAR8 acDescSn[14];
  882. CHAR8 acMonitorName[14];
  883. UCHAR8 ucVersion;
  884. UCHAR8 ucRevision;
  885. UCHAR8 ucExtFlag;
  886. UCHAR8 ucCheckSumCount;
  887. UCHAR8 aucCheckSumValue[4];
  888. BOOL bCheckSumStatus;
  889. }HvEdidInfoToOsd;
  890. /* HDCP Define */
  891. /************ HDCP Begin *************/
  892. typedef enum _HdcpPortType
  893. {
  894. HdcpPortType_Hdmi =0,
  895. HdcpPortType_DisplayPort,
  896. HdcpPortType_Invalid
  897. } HdcpPortType;
  898. typedef enum _HdmiVersion
  899. {
  900. HdmiVesion_HD14, //TMDS 1.4
  901. HdmiVesion_HD20, //TMDS 2.1 & TMDS 2.0
  902. HdmiVesion_HD21, //FRL 2.1
  903. HdmiVesion_End //
  904. }HdmiVersion;
  905. typedef enum _HdcpVersion
  906. {
  907. HdcpVesion_None = 0x0, //HDCP Not Used
  908. HdcpVesion_Hdcp1X = 0x1, //HDCP 1.X
  909. HdcpVesion_Hdcp2X = 0x2, //HDCP 2.X
  910. HdcpVesion_Invliad
  911. }HdcpVersion;
  912. /************HDCP Rx Role************ */
  913. typedef enum _HdcpRole
  914. {
  915. HV_HDCP_TRANSMITTER = 0x0,
  916. HV_HDCP_RECEIVER = 0x2,
  917. HV_HDCP_REPEATER = 0x3
  918. } HdcpRole;
  919. /************HDCP Rx Role************ */
  920. typedef enum _HdcpKeyCheckResult
  921. {
  922. HV_HDCP_KEY_VALID = 0x0,
  923. HV_HDCP_KEY_INVALID = 0x1,
  924. HV_HDCP_KEY_DEFAULT = 0x3,
  925. HV_HDCP_KEY_EMPTY = 0x4
  926. } HdcpKeyCheckResult;
  927. /* HDCP Key */
  928. typedef struct _Hdcp2xRxKey
  929. {
  930. /*
  931. * lc128 : 128 bit 私密全局常量
  932. * 所有HDCP设备共享相同的全局常量
  933. */
  934. UCHAR8 aucHdcp2xRxLc128[HV_HDCP_2X_RX_LC128_SIZE]; /* 16 Bytes */
  935. /* 公钥证书:
  936. * 0 - 3072 : 3072bit,加密签名,签名方案。
  937. * 3072 - 3083 :12bit,保留,全0
  938. * 3084 - 3087 :4bit,保留,0x0 或者 0x1
  939. * 3088 - 4135 :1048bit,kpub RSA公钥 rx(cert),
  940. 前1024位是模n的大端表示,后24位是公开指数e的大端表示
  941. * 4136 - 4175 :40bit,接收机标识符,它的格式与HDCP1.X相同,包含20个1和20个0
  942. */
  943. UCHAR8 aucHdcp2xRxCert[HV_HDCP_2X_RX_CERT_SIZE]; /* 522 Bytes */
  944. /*
  945. * RSA私钥:
  946. *
  947. */
  948. UCHAR8 aucHdcp2xRxPrivKey[HV_HDCP_2X_RX_PRIVATEKEY_SIZE]; /* 320 Bytes */
  949. }Hdcp2xRxKey;
  950. /*******HDCP 2.X***********************/
  951. typedef struct _Hdcp1xRxKey
  952. {
  953. /* KSV(BKsv) 一共40bit, 有20个1跟20个0组成 */
  954. UCHAR8 aucBksv[HV_HDCP_1X_SIZE_BKSV]; /* 5 Bytes */
  955. /*
  956. * 40个56bit的 secret device keys 组成的Device Private Key
  957. * 和相匹配的设备标识KSV, KSV是40bit的二进制数。
  958. */
  959. UCHAR8 aucDks[HV_HDCP_1X_SIZE_DKS_BYTE]; /* 280 Bytes */
  960. }Hdcp1xRxKey;
  961. /************ HDCP End *************/
  962. typedef enum
  963. {
  964. QUEUE_OK,
  965. QUEUE_FULL,
  966. QUEUE_EMPTY
  967. }QueueStatus;
  968. typedef enum _SscgType
  969. {
  970. SSCG_VBO,
  971. SSCG_EDP,
  972. SSCG_DDR,
  973. SSCG_MAX,
  974. }SscgType;
  975. typedef enum _SscgMode
  976. {
  977. SPREAD_CENTER,
  978. SPREAD_DOWN,
  979. SPREAD_UP,
  980. }SscgMode;
  981. typedef enum _FlashModel
  982. {
  983. FLASH_N25Q = 0,
  984. FLASH_MT25,
  985. FLASH_P25Q,
  986. FLASH_W25Q,
  987. FLASH_GD25,
  988. FLASH_MX25,
  989. }FlashModel;
  990. typedef enum _FlashModelID
  991. {
  992. FLASH_MT25_ID = 0x20,
  993. FLASH_MX25_ID = 0xC2,
  994. }FlashModelID;
  995. typedef struct _FlashAttribute
  996. {
  997. UCHAR8 FlashReadIdStandardCmd;
  998. UCHAR8 FlashReadIdMultiIoCmd;
  999. UCHAR8 FlashReadIdQuadCmd;
  1000. UCHAR8 FlashSectionEraseCmd;
  1001. UCHAR8 FlashSectionEraseCmd_4ByteAddr;
  1002. UCHAR8 FlashMultiSectionEraseCmd;
  1003. UCHAR8 FlashMultiSectionEraseCmd_4ByteAddr;
  1004. UCHAR8 FlashChipEraseCmd;
  1005. UCHAR8 FlashProgStandardCmd;
  1006. UCHAR8 FlashProgStandardCmd_4ByteAddr;
  1007. UCHAR8 FlashProgDualCmd;
  1008. UCHAR8 FlashProgQuadCmd;
  1009. UCHAR8 FlashProgQuadCmd_4ByteAddr;
  1010. UCHAR8 FlashProgQpiCmd;
  1011. UCHAR8 FlashProgQpiCmd_4ByteAddr;
  1012. UCHAR8 FlashProg4xIoCmd;
  1013. UCHAR8 FlashProg4xIoCmd_4ByteAddr;
  1014. UCHAR8 FlashReadStandardCmd;
  1015. UCHAR8 FlashReadStandardCmd_4ByteAddr;
  1016. UCHAR8 FlashReadDualCmd;
  1017. UCHAR8 FlashReadDualCmd_4ByteAddr;
  1018. UCHAR8 FlashReadQuadCmd;
  1019. UCHAR8 FlashReadQuadCmd_4ByteAddr;
  1020. UCHAR8 FlashReadQpiCmd;
  1021. UCHAR8 FlashReadQpiCmd_4ByteAddr;
  1022. UCHAR8 FlashRead4xIoCmd;
  1023. UCHAR8 FlashRead4xIoCmd_4ByteAddr;
  1024. UCHAR8 FlashReadStatusCmd;
  1025. UCHAR8 FlashWriteEnCmd;
  1026. UCHAR8 FlashInstruWidth;
  1027. UCHAR8 FlashCycleDual;
  1028. UCHAR8 FlashCycle4xIo;
  1029. UCHAR8 FlashCycleQpi;
  1030. UCHAR8 FlashCycleFastDual;
  1031. UCHAR8 FlashCycleFastQuad;
  1032. UCHAR8 FlashQuadEnable;
  1033. UCHAR8 FlashQuadDisable;
  1034. UCHAR8 FlashQpiEnable;
  1035. UCHAR8 FlashQpiDisable;
  1036. UINT32 FlashEraseCompltWait;
  1037. }FlashAttribute;
  1038. typedef enum _I2cBusID
  1039. {
  1040. I2CM0,
  1041. I2CS0,
  1042. MI2C,
  1043. SIMI2C0,
  1044. SIMI2C1,
  1045. SIMI2C2,
  1046. SIMI2CMAX,
  1047. }I2cBusID;
  1048. typedef enum _LedMode
  1049. {
  1050. LED_POWERON,
  1051. LED_POWERSTANDBY,
  1052. LED_POWEROFF,
  1053. LED_BURN_IN,
  1054. LED_BURN_OUT,
  1055. #if (HV_PROJECT_CONFIG_POWERON_AUTO_OTA == HV_CONFIG_ON)
  1056. LED_OTA_PROGRESSING,
  1057. LED_OTA_OK,
  1058. #endif
  1059. LED_MODEMAX
  1060. }LedMode;
  1061. typedef struct _PanelParam
  1062. {
  1063. UCHAR8 ucPanelName[HV_PANEL_NAME_BYTE_MAX]; /*最大40byte*/
  1064. USHORT16 usPanelHtotalType;
  1065. USHORT16 usPanelHtotalMax;
  1066. USHORT16 usPanelHtotalMin;
  1067. USHORT16 usPanelVtotalType;
  1068. USHORT16 usPanelVtotalMax;
  1069. USHORT16 usPanelVtotalMin;
  1070. USHORT16 usPanelHactive;
  1071. USHORT16 usPanelVactive;
  1072. USHORT16 usPanelFrameRateType;
  1073. USHORT16 usPanelFrameRateMax;
  1074. USHORT16 usPanelFrameRateMin;
  1075. UCHAR8 ucPanelHsyncWidth;
  1076. UCHAR8 ucPanelVsyncWidth;
  1077. UCHAR8 ucPanelHsyncBackPorch;
  1078. UCHAR8 ucPanelVsyncBackPorch;
  1079. UCHAR8 ucPanelColorDepth;
  1080. UCHAR8 ucPanelLaneNum;
  1081. UCHAR8 ucPanelPortNum;
  1082. UCHAR8 ucPanelLaneRate;
  1083. UINT32 uiPanelPixelClockType;
  1084. UINT32 uiPanelPixelClockMax;
  1085. UINT32 uiPanelPixelClockMin;
  1086. USHORT16 usPanelPowerOnTime;
  1087. USHORT16 usPanelDataOnTime;
  1088. USHORT16 usPanelBlkOnTime;
  1089. USHORT16 usPanelBlkOffTime;
  1090. USHORT16 usPanelDataOfTime;
  1091. USHORT16 usPanelPowerOffTime;
  1092. USHORT16 usPanelPllLockTime;
  1093. USHORT16 usPanelIdlePatternTime;
  1094. BOOL bPanelSscgEn;
  1095. USHORT16 usPanelSscgFreq; // 0-100(k)
  1096. UCHAR8 ucPanelSscgFrac; // 0-30(0%-3%)
  1097. UCHAR8 ucPanelEdpHpd0SoftMode;
  1098. UCHAR8 ucPanelEdpHpd1SoftMode;
  1099. BOOL bPanelEdpAux0PnSwapEn;
  1100. BOOL bPanelEdpAux1PnSwapEn;
  1101. BOOL bPanelPhy0MuxEn;
  1102. UCHAR8 ucPanelPhy0Lane0MuxSel;
  1103. UCHAR8 ucPanelPhy0Lane1MuxSel;
  1104. UCHAR8 ucPanelPhy0Lane2MuxSel;
  1105. UCHAR8 ucPanelPhy0Lane3MuxSel;
  1106. BOOL bPanelPhy0Lane0PnSwap;
  1107. BOOL bPanelPhy0Lane1PnSwap;
  1108. BOOL bPanelPhy0Lane2PnSwap;
  1109. BOOL bPanelPhy0Lane3PnSwap;
  1110. BOOL bPanelPhy1MuxEn;
  1111. UCHAR8 ucPanelPhy1Lane0MuxSel;
  1112. UCHAR8 ucPanelPhy1Lane1MuxSel;
  1113. UCHAR8 ucPanelPhy1Lane2MuxSel;
  1114. UCHAR8 ucPanelPhy1Lane3MuxSel;
  1115. BOOL bPanelPhy1Lane0PnSwap;
  1116. BOOL bPanelPhy1Lane1PnSwap;
  1117. BOOL bPanelPhy1Lane2PnSwap;
  1118. BOOL bPanelPhy1Lane3PnSwap;
  1119. BOOL bPanelPhy2MuxEn;
  1120. UCHAR8 ucPanelPhy2Lane0MuxSel;
  1121. UCHAR8 ucPanelPhy2Lane1MuxSel;
  1122. UCHAR8 ucPanelPhy2Lane2MuxSel;
  1123. UCHAR8 ucPanelPhy2Lane3MuxSel;
  1124. BOOL bPanelPhy2Lane0PnSwap;
  1125. BOOL bPanelPhy2Lane1PnSwap;
  1126. BOOL bPanelPhy2Lane2PnSwap;
  1127. BOOL bPanelPhy2Lane3PnSwap;
  1128. USHORT16 usPanelInchWidth;
  1129. USHORT16 usPanelInchHeight;
  1130. /* ldc 点屏参数 */
  1131. USHORT16 usPanelLdcVccOnTime;
  1132. USHORT16 usPanelLdcVinOnTime;
  1133. USHORT16 usPanelLdcPwmOnTime;
  1134. USHORT16 usPanelLdcLdEnTime;
  1135. USHORT16 usPanelLdcSpiOnTime;
  1136. USHORT16 usPanelLdcBlOnTime;
  1137. /* ldc 关屏参数 */
  1138. USHORT16 usPanelLdcBlOffTime;
  1139. USHORT16 usPanelLdcSpiOffTime;
  1140. USHORT16 usPanelLdcLdEnOffTime;
  1141. USHORT16 usPanelLdcPwmOffTime;
  1142. USHORT16 usPanelLdcVinOffTime;
  1143. USHORT16 usPanelLdcVccOffTime;
  1144. }PanelParam;
  1145. typedef struct _PanelControl
  1146. {
  1147. VOID (*pfPanelInit)(const PanelParam* pstPanelParam);
  1148. VOID (*pfPanelEnable)(BOOL bEn);
  1149. Status (*pfGetPanelStatus)(VOID);
  1150. VOID (*pfSetMNTuSize)(UINT32 uiEdpTuDataSize, UINT32 uiMvid);
  1151. VOID (*pfCalMNTuSize)(VideoConfigParams* pstVideoConfigParams, const PanelParam *pstPanelParam, UINT32 uiClock);
  1152. BOOL (*pfCheckPanelExist)(VOID);
  1153. VOID (*pfPanelIrqEnable)(EdpHpdPortIndex enHpdPort);
  1154. VOID (*pfPanelIrqDisable)(EdpHpdPortIndex enHpdPort);
  1155. }__attribute__((aligned(4)))PanelControl;
  1156. typedef struct _GamutSet
  1157. {
  1158. USHORT16 usCoef_R_r;
  1159. USHORT16 usCoef_G_r;
  1160. USHORT16 usCoef_B_r;
  1161. USHORT16 usCoef_R_g;
  1162. USHORT16 usCoef_G_g;
  1163. USHORT16 usCoef_B_g;
  1164. USHORT16 usCoef_R_b;
  1165. USHORT16 usCoef_G_b;
  1166. USHORT16 usCoef_B_b;
  1167. USHORT16 usOsdCoef_R_r;
  1168. USHORT16 usOsdCoef_G_r;
  1169. USHORT16 usOsdCoef_B_r;
  1170. USHORT16 usOsdCoef_R_g;
  1171. USHORT16 usOsdCoef_G_g;
  1172. USHORT16 usOsdCoef_B_g;
  1173. USHORT16 usOsdCoef_R_b;
  1174. USHORT16 usOsdCoef_G_b;
  1175. USHORT16 usOsdCoef_B_b;
  1176. }GamutSet;
  1177. typedef struct _GamutOffset
  1178. {
  1179. UINT32 uiOfsOutR;
  1180. UINT32 uiOfsOutG;
  1181. UINT32 uiOfsOutB;
  1182. }GamutOffset;
  1183. typedef struct _BrightnessOsdSet
  1184. {
  1185. UINT32 BrightOsdStart;
  1186. UINT32 BrightOsdMidl;
  1187. UINT32 BrightOsdEnd;
  1188. UINT32 BrightDrvforOsdStart;
  1189. UINT32 BrightDrvforOsdMidl;
  1190. UINT32 BrightDrvforOsdEnd;
  1191. USHORT16 BrightforHdrMax;
  1192. USHORT16 BrightforPart1;
  1193. USHORT16 BrightforPart2;
  1194. USHORT16 BrightforPart3;
  1195. }BrightnessOsdSet;
  1196. typedef enum _OsdRotationType
  1197. {
  1198. OSD_ROTATION_NONE,
  1199. OSD_ROTATION_90,
  1200. OSD_ROTATION_180,
  1201. OSD_ROTATION_270,
  1202. } OsdRotationType;
  1203. #endif