drv_dpy.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /******************************************************************************/
  2. /**
  3. *
  4. * @file drv_dpy.h
  5. *
  6. * @brief This file specifies the APIs provided to control DPY(Display)
  7. *
  8. * @note Copyright (c) 2013 S2 Technology Co., Ltd. \n
  9. * All rights reserved.
  10. *
  11. * @author
  12. *
  13. ******************************************************************************/
  14. #ifndef __DRV_DPY_H__
  15. #define __DRV_DPY_H__
  16. /*******************************************************************************
  17. * Header include
  18. ******************************************************************************/
  19. #include "drv_types.h"
  20. typedef enum _DRV_DPY_RESET_TYPE
  21. {
  22. eDPY_RESET_TYPE_FIFO = 0,
  23. eDPY_RESET_TYPE_STATUS,
  24. eDPY_RESET_TYPE_PANEL_TIMING,
  25. } DRV_DPY_RESET_TYPE;
  26. typedef enum _DRV_DPY_WINDOW_DIRECTION
  27. {
  28. eDPY_WINDOW_DIRECTION_HORIZONTAL = 0,
  29. eDPY_WINDOW_DIRECTION_VERTICAL,
  30. } DRV_DPY_WINDOW_DIRECTION;
  31. typedef enum _DRV_DPY_DITHER
  32. {
  33. eDPY_DITHER_12_BITS_TO_12_BITS = 0,
  34. eDPY_DITHER_12_BITS_TO_10_BITS = 1,
  35. eDPY_DITHER_12_BITS_TO_9_BITS = 2,
  36. eDPY_DITHER_12_BITS_TO_8_BITS = 3,
  37. } DRV_DPY_DITHER;
  38. typedef enum _DRV_DPY_FRAME_LOCK_WITH_NEXT_FRAME_METHOD
  39. {
  40. eDPY_FRAME_LOCK_WITH_NEXT_FRAME_METHOD_ANY_TIME = 0,
  41. eDPY_FRAME_LOCK_WITH_NEXT_FRAME_METHOD_END_OF_LINE = 1,
  42. } DRV_DPY_FRAME_LOCK_WITH_NEXT_FRAME_METHOD;
  43. typedef enum _DRV_DPY_FRAME_LOCK_MODE
  44. {
  45. eDPY_FRAME_LOCK_MODE_OFF = 0,
  46. eDPY_FRAME_LOCK_MODE_60HZ,
  47. eDPY_FRAME_LOCK_MODE_50HZ,
  48. eDPY_FRAME_LOCK_MODE_48HZ,
  49. } DRV_DPY_FRAME_LOCK_MODE;
  50. typedef enum _DRV_DPY_LVDS_CHANNEL_MODE
  51. {
  52. eDPY_LVDS_CHANNEL_MODE_SINGLE = 0,
  53. eDPY_LVDS_CHANNEL_MODE_DUAL = 1,
  54. } DRV_DPY_LVDS_CHANNEL_MODE;
  55. typedef enum _DRV_DPY_COLOR_LOOK_UP_TABLE_POSITION
  56. {
  57. eDPY_COLOR_LOOK_UP_TABLE_POSITION_BEFORE_CONTRAST = 0,
  58. eDPY_COLOR_LOOK_UP_TABLE_POSITION_AFTER_CONTRAST = 1,
  59. } DRV_DPY_COLOR_LOOK_UP_TABLE_POSITION;
  60. typedef enum _DRV_DPY_PATTERN_COLOR_SPACE
  61. {
  62. eDPY_PATTERN_COLOR_SPACE_RGB = 0,
  63. eDPY_PATTERN_COLOR_SPACE_YCC_R609 = 1,
  64. eDPY_PATTERN_COLOR_SPACE_YPP_R701 = 2,
  65. } DRV_DPY_PATTERN_COLOR_SPACE;
  66. typedef struct _DRV_DPY_OUTPUT_PANEL_WINDOW
  67. {
  68. UINT32 HTotal;
  69. UINT32 VTotal;
  70. UINT32 HStart;
  71. UINT32 HEnd;
  72. UINT32 VStart;
  73. UINT32 VEnd;
  74. UINT8 HSyncStart;
  75. UINT8 HSyncEnd;
  76. UINT8 VSyncStart;
  77. UINT8 VSyncEnd;
  78. } DRV_DPY_OUTPUT_PANEL_WINDOW;
  79. typedef enum{
  80. DISPLAY_WINDOW, //only transfer color format from RGB to YUV for display window
  81. DISPLAY_AND_PANEL, //transfer color format from RGB to YUV for display and panel window
  82. }DRV_DPY_MATRIX_TYPE;
  83. void DRV_DPY_Reset(DRV_DPY_RESET_TYPE eType, BOOL fEnable);
  84. void DRV_DPY_EnableOutput(BOOL fEnable);
  85. void DRV_DPY_Enable(BOOL fEnable);
  86. #if (CONFIG_CHIPID == 0x330)
  87. void DRV_DPY_SetDisplayWindow(DRV_DPY_WINDOW_DIRECTION eDirection, UINT16 Start, UINT16 End);
  88. void DRV_DPY_GetDisplayWindow(DRV_DPY_WINDOW_DIRECTION eDirection, UINT16 *pStart, UINT16 *pEnd);
  89. #else
  90. void DRV_DPY_SetDisplayWindow(UINT16 HStart, UINT16 HEnd, UINT16 VStart, UINT16 VEnd);
  91. #endif
  92. void DRV_DPY_SetDither(DRV_DPY_DITHER eSelect);
  93. void DRV_DPY_EnableHistory(BOOL fEnable);
  94. void DRV_DPY_SetHistoryWindow(DRV_DPY_WINDOW_DIRECTION eDirection, UINT16 Start, UINT16 End);
  95. void DRV_DPY_GetHistoryWindow(DRV_DPY_WINDOW_DIRECTION eDirection, UINT16 *pStart, UINT16 *pEnd);
  96. void DRV_DPY_EnableFrameLockMode(BOOL fEnable);
  97. BOOL DRV_DPY_IsFrameLockModeEnabled(void);
  98. void DRV_DPY_SetFrameLockWithNextFrameMethod(DRV_DPY_FRAME_LOCK_WITH_NEXT_FRAME_METHOD eMethod);
  99. void DRV_DPY_SetFrameLockMode(DRV_DPY_FRAME_LOCK_MODE eFrameLockMode, UINT16 InputFrameRate, BOOL fDoubleOutputFrameRate);
  100. void DRV_DPY_SetFrameLockRate(UINT8 Value);
  101. UINT8 DRV_DPY_GetFrameLockRate(void);
  102. void DRV_DPY_SetPanelWindow(DRV_DPY_OUTPUT_PANEL_WINDOW *pWindow);
  103. void DRV_DPY_GetPanelWindow(DRV_DPY_OUTPUT_PANEL_WINDOW *pWindow);
  104. void DRV_DPY_SetOutputPanelHVTotal(DRV_DPY_WINDOW_DIRECTION eDirection, UINT32 Value);
  105. void DRV_DPY_SetLVDSChannelMode(DRV_DPY_LVDS_CHANNEL_MODE eMode);
  106. DRV_DPY_LVDS_CHANNEL_MODE DRV_DPY_GetLVDSChannelMode(void);
  107. void DRV_DPY_SetColorLookUpTablePosition(DRV_DPY_COLOR_LOOK_UP_TABLE_POSITION ePosition);
  108. void DRV_DPY_SetDataPipeDelay(UINT8 PixelClockCycleTime);
  109. UINT8 DRV_DPY_GetDataPipeDelay(void);
  110. void DRV_DPY_SetInterruptLineCount(UINT16 Value);
  111. void DRV_DPY_EnablePipPattern(BOOL fEnable);
  112. void DRV_DPY_SetPipPatternColorSpace(DRV_DPY_PATTERN_COLOR_SPACE eColorSpace);
  113. void DRV_DPY_SetPanelWindowColor(UINT8 Red, UINT8 Green, UINT8 Blue);
  114. void DRV_DPY_SetPanelWindowColor_Bypass(UINT8 Red, UINT8 Green, UINT8 Blue);
  115. void DRV_DPY_GetPanelWindowColor(UINT8 *Red, UINT8 *Green, UINT8 *Blue);
  116. void DRV_DPY_SetPipYppPattern(UINT8 Y, UINT8 Pb, UINT8 Pr);
  117. void DRV_DPY_EnableMatrixPattern(UINT8 wG, UINT8 wB, UINT8 wR);
  118. void DRV_DPY_DisableMatrixPattern(BOOL fBypassYUV2RGB);
  119. void DRV_DPY_SetPatternColorYCbCr(UINT8 Y, UINT8 Cb, UINT8 Cr);
  120. void DRV_DPY_EnableBorder(UINT8 InWidth, UINT8 Red, UINT8 Green, UINT8 Blue);
  121. void DRV_DPY_DisableBorder(void);
  122. void DRV_DPY_EnableDigestBorder(BOOL fEn);
  123. BOOL DRV_DPY_IsDigestBorderEnabled(void);
  124. #ifdef CONFIG_ENABLE_MIR
  125. void DRV_DPY_SelectDPYMatrixWindow(DRV_DPY_MATRIX_TYPE eMatrixType);
  126. void DRV_DPY_SetPanelWindowColorIsYUV(UINT8 Red, UINT8 Green, UINT8 Blue, BOOL fConvertToYUV);
  127. #endif
  128. #ifdef CONFIG_SUPPORT_3D_EN
  129. void DRV_DPY_Set2Dto3DWindow(UINT16 HStart, UINT16 VStart);
  130. #endif
  131. #endif