hv_drv_Gamma.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * @file hv_drv_Gamma.h
  3. * @brief Header file of od module.
  4. *
  5. * @verbatim
  6. * ==============================================================================
  7. * ##### How to use #####
  8. * ==============================================================================
  9. *
  10. * @endverbatim
  11. *
  12. * @author HiView SoC Software Team
  13. * @version 0.0.0
  14. * @date 2022-04-17
  15. */
  16. #ifndef _HV_DRV_GAMMA_H_
  17. #define _HV_DRV_GAMMA_H_
  18. #include "hv_comm_DataType.h"
  19. /**
  20. * @brief GAMMA LUT表的访问模式
  21. */
  22. typedef enum _GammaMode
  23. {
  24. GAMMA_RGB = 0,
  25. GAMMA_SYNC = 1,
  26. GAMMA_MODE_MAX
  27. } GammaMode;
  28. /**
  29. * @brief GAMMA base Configuration Structure definition
  30. */
  31. typedef struct _HvDrvGammaParams
  32. {
  33. GammaMode enGammaMod;
  34. GammaMode enGammaVrrMod;
  35. BOOL bGammaVrrEn;
  36. UINT32 *puiGammaLutAddr;
  37. const UINT32 *puiGammaVrrLutAddr;
  38. }HvDrvGammaInitParams;
  39. /**
  40. * @brief 写Gamma LUT.
  41. * @param[in] puiData lut数据
  42. * @param[in] u8Mode 访问lut的模式,0-单独的RGB访问,1-SYNC模式
  43. * @return None
  44. */
  45. VOID Hv_Drv_Gamma_WriteLut(const UINT32 *puiData, GammaMode enMode);
  46. /**
  47. * @brief 写Gamma VRR LUT.
  48. * @param[in] puiData lut数据
  49. * @param[in] enMode 访问lut的模式,0-单独的RGB访问,1-SYNC模式
  50. * @return None
  51. */
  52. VOID Hv_Drv_GammaVrr_WriteLut(const UINT32 *puiData, GammaMode enMode);
  53. /**
  54. * @brief Gamma使能控制.
  55. * @param[in] bGammaEn 控制标志,HV_TRUE-enable gamma,HV_FALSE-disable gamma
  56. * @return None
  57. */
  58. VOID Hv_Drv_Gamma_Enable(BOOL bGammaEn);
  59. /**
  60. * @brief Gamma VRR使能控制.
  61. * @param[in] bGammaEn 控制标志,HV_TRUE-enable gamma vrr,HV_FALSE-disable gamma vrr
  62. * @return None
  63. */
  64. VOID Hv_Drv_GammaVrr_Enable(BOOL bGammaVrrEn);
  65. /**
  66. * @brief Gamma 初始化,包括寄存器设定和lut表载入.
  67. * @param[in] pstGammaPara point to gamma init params structure
  68. * @return None
  69. */
  70. VOID Hv_Drv_Gamma_Init(HvDrvGammaInitParams *pstGammaPara);
  71. VOID Hv_Drv_Gamma_SetLevel(UCHAR8 level);
  72. VOID Hv_Drv_GammaDeCompress(UCHAR8 *aucInput, UINT32 *auiGammaOut);
  73. VOID Hv_Drv_Gamma_WriteUnit(UINT32 uiRow, UINT32 uiCol, UINT32 uiCellData);
  74. #endif