msmb_ispif.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #ifndef MSM_CAM_ISPIF_H
  2. #define MSM_CAM_ISPIF_H
  3. #define CSID_VERSION_V2 0x02000011
  4. #define CSID_VERSION_V3 0x30000000
  5. enum msm_ispif_vfe_intf {
  6. VFE0,
  7. VFE1,
  8. VFE_MAX
  9. };
  10. #define VFE0_MASK (1 << VFE0)
  11. #define VFE1_MASK (1 << VFE1)
  12. enum msm_ispif_intftype {
  13. PIX0,
  14. RDI0,
  15. PIX1,
  16. RDI1,
  17. RDI2,
  18. INTF_MAX
  19. };
  20. #define MAX_PARAM_ENTRIES (INTF_MAX * 2)
  21. #define PIX0_MASK (1 << PIX0)
  22. #define PIX1_MASK (1 << PIX1)
  23. #define RDI0_MASK (1 << RDI0)
  24. #define RDI1_MASK (1 << RDI1)
  25. #define RDI2_MASK (1 << RDI2)
  26. enum msm_ispif_vc {
  27. VC0,
  28. VC1,
  29. VC2,
  30. VC3,
  31. VC_MAX
  32. };
  33. enum msm_ispif_cid {
  34. CID0,
  35. CID1,
  36. CID2,
  37. CID3,
  38. CID4,
  39. CID5,
  40. CID6,
  41. CID7,
  42. CID8,
  43. CID9,
  44. CID10,
  45. CID11,
  46. CID12,
  47. CID13,
  48. CID14,
  49. CID15,
  50. CID_MAX
  51. };
  52. enum msm_ispif_csid {
  53. CSID0,
  54. CSID1,
  55. CSID2,
  56. CSID3,
  57. CSID_MAX
  58. };
  59. struct msm_ispif_params_entry {
  60. enum msm_ispif_vfe_intf vfe_intf;
  61. enum msm_ispif_intftype intftype;
  62. int num_cids;
  63. enum msm_ispif_cid cids[3];
  64. enum msm_ispif_csid csid;
  65. int crop_enable;
  66. uint16_t crop_start_pixel;
  67. uint16_t crop_end_pixel;
  68. };
  69. struct msm_ispif_param_data {
  70. uint32_t num;
  71. struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES];
  72. };
  73. struct msm_isp_info {
  74. uint32_t max_resolution;
  75. uint32_t id;
  76. uint32_t ver;
  77. };
  78. struct msm_ispif_vfe_info {
  79. int num_vfe;
  80. struct msm_isp_info info[VFE_MAX];
  81. };
  82. enum ispif_cfg_type_t {
  83. ISPIF_CLK_ENABLE,
  84. ISPIF_CLK_DISABLE,
  85. ISPIF_INIT,
  86. ISPIF_CFG,
  87. ISPIF_START_FRAME_BOUNDARY,
  88. #ifdef CONFIG_MSMB_CAMERA_MM
  89. ISPIF_RESTART_FRAME_BOUNDARY,
  90. #endif
  91. ISPIF_STOP_FRAME_BOUNDARY,
  92. ISPIF_STOP_IMMEDIATELY,
  93. ISPIF_RELEASE,
  94. ISPIF_ENABLE_REG_DUMP,
  95. ISPIF_SET_VFE_INFO,
  96. };
  97. struct ispif_cfg_data {
  98. enum ispif_cfg_type_t cfg_type;
  99. union {
  100. int reg_dump; /* ISPIF_ENABLE_REG_DUMP */
  101. uint32_t csid_version; /* ISPIF_INIT */
  102. struct msm_ispif_vfe_info vfe_info; /* ISPIF_SET_VFE_INFO */
  103. struct msm_ispif_param_data params; /* CFG, START, STOP */
  104. };
  105. };
  106. #define VIDIOC_MSM_ISPIF_CFG \
  107. _IOWR('V', BASE_VIDIOC_PRIVATE, struct ispif_cfg_data)
  108. #endif /* MSM_CAM_ISPIF_H */