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