stf_isp_oecf_rdma.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /**
  2. ******************************************************************************
  3. * @file stf_isp_oecf_rdma.h
  4. * @author StarFive Isp Team
  5. * @version V1.0
  6. * @date 12/14/2019
  7. * @brief
  8. ******************************************************************************
  9. * @copy
  10. *
  11. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  12. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  13. * TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
  14. * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  15. * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  16. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  17. *
  18. * Copyright (C) 2019 - 2022 StarFive Technology Co., Ltd.
  19. */
  20. #ifndef __STF_ISP_OECF_RDMA_H__
  21. #define __STF_ISP_OECF_RDMA_H__
  22. #include "registers/stf_isp_rdma.h"
  23. /* add oecf registers structure */
  24. typedef struct _ST_OECF_INPUT_REG {
  25. REG_OECF_X0_CFG_0 X0_1; // 0x0100, OECF X 0 and 1 parameter[0.PW-2.0] register.
  26. REG_OECF_X0_CFG_1 X2_3; // 0x0104, OECF X 2 and 3 parameter[0.PW-2.0] register.
  27. REG_OECF_X0_CFG_2 X4_5; // 0x0108, OECF X 4 and 5 parameter[0.PW-2.0] register.
  28. REG_OECF_X0_CFG_3 X6_7; // 0x010C, OECF X 6 and 7 parameter[0.PW-2.0] register.
  29. REG_OECF_X0_CFG_4 X8_9; // 0x0110, OECF X 8 and 9 parameter[0.PW-2.0] register.
  30. REG_OECF_X0_CFG_5 X10_11; // 0x0114, OECF X 10 and 11 parameter[0.PW-2.0] register.
  31. REG_OECF_X0_CFG_6 X12_13; // 0x0118, OECF X 12 and 13 parameter[0.PW-2.0] register.
  32. REG_OECF_X0_CFG_7 X14_15; // 0x011C, OECF X 14 and 15 parameter[0.PW-2.0] register.
  33. } ST_OECF_INPUT_REG, *PST_OECF_INPUT_REG;
  34. #define ST_OECF_INPUT_REG_SIZE (sizeof(ST_OECF_INPUT_REG))
  35. #define ST_OECF_INPUT_REG_LEN (ST_OECF_INPUT_REG_SIZE / sizeof(STF_U32))
  36. typedef struct _ST_OECF_OUTPUT_REG {
  37. REG_OECF_Y0_CFG_0 Y0_1; // 0x0180, OECF Y 0 and 1 parameter[0.PW-2.0] register
  38. REG_OECF_Y0_CFG_1 Y2_3; // 0x0184, OECF Y 2 and 3 parameter[0.PW-2.0] register
  39. REG_OECF_Y0_CFG_2 Y4_5; // 0x0188, OECF Y 4 and 5 parameter[0.PW-2.0] register
  40. REG_OECF_Y0_CFG_3 Y6_7; // 0x018C, OECF Y 6 and 7 parameter[0.PW-2.0] register
  41. REG_OECF_Y0_CFG_4 Y8_9; // 0x0190, OECF Y 8 and 9 parameter[0.PW-2.0] register
  42. REG_OECF_Y0_CFG_5 Y10_11; // 0x0194, OECF Y 10 and 11 parameter[0.PW-2.0] register
  43. REG_OECF_Y0_CFG_6 Y12_13; // 0x0198, OECF Y 12 and 13 parameter[0.PW-2.0] register
  44. REG_OECF_Y0_CFG_7 Y14_15; // 0x019C, OECF Y 14 and 15 parameter[0.PW-2.0] register
  45. } ST_OECF_OUTPUT_REG, *PST_OECF_OUTPUT_REG;
  46. #define ST_OECF_OUTPUT_REG_SIZE (sizeof(ST_OECF_OUTPUT_REG))
  47. #define ST_OECF_OUTPUT_REG_LEN (ST_OECF_OUTPUT_REG_SIZE / sizeof(STF_U32))
  48. typedef struct _ST_OECF_SLOPE_REG {
  49. REG_OECF_S0_CFG_0 S0_1; // 0x0200, OECF [0.3.7] S 0 and 1 parameter register
  50. REG_OECF_S0_CFG_1 S2_3; // 0x0204, OECF [0.3.7] S 2 and 3 parameter register
  51. REG_OECF_S0_CFG_2 S4_5; // 0x0208, OECF [0.3.7] S 4 and 5 parameter register
  52. REG_OECF_S0_CFG_3 S6_7; // 0x020C, OECF [0.3.7] S 6 and 7 parameter register
  53. REG_OECF_S0_CFG_4 S8_9; // 0x0210, OECF [0.3.7] S 8 and 9 parameter register
  54. REG_OECF_S0_CFG_5 S10_11; // 0x0214, OECF [0.3.7] S 10 and 11 parameter register
  55. REG_OECF_S0_CFG_6 S12_13; // 0x0218, OECF [0.3.7] S 12 and 13 parameter register
  56. REG_OECF_S0_CFG_7 S14_15; // 0x021C, OECF [0.3.7] S 14 and 15 parameter register
  57. } ST_OECF_SLOPE_REG, *PST_OECF_SLOPE_REG;
  58. #define ST_OECF_SLOPE_REG_SIZE (sizeof(ST_OECF_SLOPE_REG))
  59. #define ST_OECF_SLOPE_REG_LEN (ST_OECF_SLOPE_REG_SIZE / sizeof(STF_U32))
  60. typedef struct _ST_OECF_REG {
  61. ST_OECF_INPUT_REG stRInput; // 0x0100 - 0x011F, OECF X parameter[0.PW-2.0] register for symbol 0.
  62. ST_OECF_INPUT_REG stGrInput; // 0x0120 - 0x013F, OECF X parameter[0.PW-2.0] register for symbol 1.
  63. ST_OECF_INPUT_REG stGbInput; // 0x0140 - 0x015F, OECF X parameter[0.PW-2.0] register for symbol 2.
  64. ST_OECF_INPUT_REG stBInput; // 0x0160 - 0x017F, OECF X parameter[0.PW-2.0] register for symbol 3.
  65. ST_OECF_OUTPUT_REG stROutput; // 0x0180 - 0x019F, OECF Y parameter[0.PW-2.0] register for symbol 0.
  66. ST_OECF_OUTPUT_REG stGrOutput; // 0x01A0 - 0x01BF, OECF Y parameter[0.PW-2.0] register for symbol 1.
  67. ST_OECF_OUTPUT_REG stGbOutput; // 0x01C0 - 0x01DF, OECF Y parameter[0.PW-2.0] register for symbol 2.
  68. ST_OECF_OUTPUT_REG stBOutput; // 0x01E0 - 0x01FF, OECF Y parameter[0.PW-2.0] register for symbol 3.
  69. ST_OECF_SLOPE_REG stRSlope; // 0x0200 - 0x021F, OECF [0.3.7] S parameter register for symbol 0.
  70. ST_OECF_SLOPE_REG stGrSlope; // 0x0220 - 0x023F, OECF [0.3.7] S parameter register for symbol 1.
  71. ST_OECF_SLOPE_REG stGbSlope; // 0x0240 - 0x025F, OECF [0.3.7] S parameter register for symbol 2.
  72. ST_OECF_SLOPE_REG stBSlope; // 0x0260 - 0x027F, OECF [0.3.7] S parameter register for symbol 3.
  73. } ST_OECF_REG, *PST_OECF_REG;
  74. #define ST_OECF_REG_SIZE (sizeof(ST_OECF_REG))
  75. #define ST_OECF_REG_LEN (ST_OECF_REG_SIZE / sizeof(STF_U32))
  76. #pragma pack(push, 8)
  77. typedef struct _ST_OECF_RDMA {
  78. #if defined(SUPPORT_RDMA_FEATURE)
  79. ST_RDMA_CMD stRdmaStartCmd __attribute__ ((aligned (8)));
  80. #endif //SUPPORT_RDMA_FEATURE
  81. ST_OECF_REG stOecfReg __attribute__ ((aligned (8)));
  82. #if defined(SUPPORT_RDMA_FEATURE)
  83. ST_RDMA_CMD stRdmaEndCmd __attribute__ ((aligned (8)));
  84. #endif //SUPPORT_RDMA_FEATURE
  85. } ST_OECF_RDMA, *PST_OECF_RDMA;
  86. #define ST_OECF_RDMA_SIZE (sizeof(ST_OECF_RDMA))
  87. #define ST_OECF_RDMA_LEN (ST_OECF_RDMA_SIZE / (sizeof(STF_U32) * 2))
  88. typedef struct _ST_ISP_OECF_RDMA {
  89. STF_U8 u8IspIdx;
  90. ST_OECF_RDMA stOecfRdma __attribute__ ((aligned (8)));
  91. } ST_ISP_OECF_RDMA, *PST_ISP_OECF_RDMA;
  92. #pragma pack(pop)
  93. ///* oecf registers interface */
  94. ////-----------------------------------------------------------------------------
  95. //extern
  96. //STF_VOID STFHAL_ISP_OECF_SetReg(
  97. // STF_U8 u8IspIdx,
  98. // ST_OECF_RDMA *pstOecfRdma
  99. // );
  100. ////-----------------------------------------------------------------------------
  101. //extern
  102. //STF_VOID STFHAL_ISP_OECF_SetInput(
  103. // STF_U8 u8IspIdx,
  104. // ST_OECF_RDMA *pstOecfRdma
  105. // );
  106. //extern
  107. //STF_VOID STFHAL_ISP_OECF_SetOutput(
  108. // STF_U8 u8IspIdx,
  109. // ST_OECF_RDMA *pstOecfRdma
  110. // );
  111. //extern
  112. //STF_VOID STFHAL_ISP_OECF_SetSlope(
  113. // STF_U8 u8IspIdx,
  114. // ST_OECF_RDMA *pstOecfRdma
  115. // );
  116. ////-----------------------------------------------------------------------------
  117. //
  118. //
  119. #endif //__STF_ISP_OECF_RDMA_H__