stf_isp_dc_rdma.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /**
  2. ******************************************************************************
  3. * @file stf_isp_dc_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_DC_RDMA_H__
  21. #define __STF_ISP_DC_RDMA_H__
  22. #include "registers/stf_isp_rdma.h"
  23. /* add defective pixel correction registers structure */
  24. typedef union _ST_DC_DATA {
  25. STF_U32 value;
  26. struct
  27. {
  28. STF_U32 hpos : 14 ; // [13:0] Horizontal position
  29. STF_U32 mode : 2 ; // [15:14] Fixed mode (1: Left seek, 2: Right seek, 3: Average (Left+Right seek)
  30. STF_U32 vpos : 14 ; // [:16] Vertical keep(zero base)
  31. } field;
  32. } ST_DC_DATA, *PST_DC_DATA;
  33. typedef struct _ST_DC_BUF_PARAM {
  34. STF_U8 u8IspIdx;
  35. STF_U32 u32DataBufferAddress;
  36. } ST_DC_BUF_PARAM, *PST_DC_BUF_PARAM;
  37. typedef struct _ST_DC_AXI_PARAM {
  38. STF_U8 u8IspIdx;
  39. STF_U8 u8AxiId;
  40. } ST_DC_AXI_PARAM, *PST_DC_AXI_PARAM;
  41. typedef struct _ST_DC_REG {
  42. REG_DC_CFG_0 BufAddr; // 0x0040, DC axi base address register.
  43. REG_DC_CFG_1 AxiId; // 0x0044, DC axi id.
  44. //REG_DC_RBADR ReturnBufAddr; // Read only.
  45. } ST_DC_REG, *PST_DC_REG;
  46. #define ST_DC_REG_SIZE (sizeof(ST_DC_REG))
  47. #define ST_DC_REG_LEN (ST_DC_REG_SIZE / sizeof(STF_U32))
  48. #pragma pack(push, 8)
  49. typedef struct _ST_DC_RDMA {
  50. #if defined(SUPPORT_RDMA_FEATURE)
  51. ST_RDMA_CMD stRdmaStartCmd __attribute__ ((aligned (8)));
  52. #endif //SUPPORT_RDMA_FEATURE
  53. ST_DC_REG stDcReg __attribute__ ((aligned (8)));
  54. #if defined(SUPPORT_RDMA_FEATURE)
  55. ST_RDMA_CMD stRdmaEndCmd __attribute__ ((aligned (8)));
  56. #endif //SUPPORT_RDMA_FEATURE
  57. } ST_DC_RDMA, *PST_DC_RDMA;
  58. #define ST_DC_RDMA_SIZE (sizeof(ST_DC_RDMA))
  59. #define ST_DC_RDMA_LEN (ST_DC_RDMA_SIZE / (sizeof(STF_U32) * 2))
  60. typedef struct _ST_ISP_DC_RDMA {
  61. STF_U8 u8IspIdx;
  62. ST_DC_RDMA stDcRdma __attribute__ ((aligned (8)));
  63. } ST_ISP_DC_RDMA, *PST_ISP_DC_RDMA;
  64. #pragma pack(pop)
  65. ///* defective pixel correction registers interface */
  66. ////-----------------------------------------------------------------------------
  67. //extern
  68. //STF_VOID STFHAL_ISP_DC_SetReg(
  69. // STF_U8 u8IspIdx,
  70. // ST_DC_RDMA *pstDcRdma
  71. // );
  72. ////-----------------------------------------------------------------------------
  73. //extern
  74. //STF_U32 STFHAL_ISP_DC_GetDataBufferAddress(
  75. // STF_U8 u8IspIdx
  76. // );
  77. //extern
  78. //STF_VOID STFHAL_ISP_DC_SetDataBufferAddress(
  79. // STF_U8 u8IspIdx,
  80. // STF_U32 u32DataBufferAddress
  81. // );
  82. //extern
  83. //STF_VOID STFHAL_ISP_DC_SetAxiId(
  84. // STF_U8 u8IspIdx,
  85. // STF_U8 u8AxiId
  86. // );
  87. ////-----------------------------------------------------------------------------
  88. //
  89. //
  90. #endif //__STF_ISP_DC_RDMA_H__