1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef UAPI_MSMB_ISPIF_H 20 #define UAPI_MSMB_ISPIF_H 21 #include <linux/types.h> 22 #include <linux/ioctl.h> 23 #include <linux/videodev2.h> 24 #define CSID_VERSION_V20 0x02000011 25 #define CSID_VERSION_V22 0x02001000 26 #define CSID_VERSION_V30 0x30000000 27 #define CSID_VERSION_V3 0x30000000 28 enum msm_ispif_vfe_intf { 29 VFE0, 30 VFE1, 31 VFE_MAX 32 }; 33 #define VFE0_MASK (1 << VFE0) 34 #define VFE1_MASK (1 << VFE1) 35 enum msm_ispif_intftype { 36 PIX0, 37 RDI0, 38 PIX1, 39 RDI1, 40 RDI2, 41 INTF_MAX 42 }; 43 #define MAX_PARAM_ENTRIES (INTF_MAX * 2) 44 #define MAX_CID_CH 8 45 #define MAX_CID_CH_PARAM_ENTRY 3 46 #define PIX0_MASK (1 << PIX0) 47 #define PIX1_MASK (1 << PIX1) 48 #define RDI0_MASK (1 << RDI0) 49 #define RDI1_MASK (1 << RDI1) 50 #define RDI2_MASK (1 << RDI2) 51 enum msm_ispif_vc { 52 VC0, 53 VC1, 54 VC2, 55 VC3, 56 VC_MAX 57 }; 58 enum msm_ispif_cid { 59 CID0, 60 CID1, 61 CID2, 62 CID3, 63 CID4, 64 CID5, 65 CID6, 66 CID7, 67 CID8, 68 CID9, 69 CID10, 70 CID11, 71 CID12, 72 CID13, 73 CID14, 74 CID15, 75 CID_MAX 76 }; 77 enum msm_ispif_csid { 78 CSID0, 79 CSID1, 80 CSID2, 81 CSID3, 82 CSID_MAX 83 }; 84 enum msm_ispif_pixel_odd_even { 85 PIX_EVEN, 86 PIX_ODD 87 }; 88 enum msm_ispif_pixel_pack_mode { 89 PACK_BYTE, 90 PACK_PLAIN_PACK, 91 PACK_NV_P8, 92 PACK_NV_P16 93 }; 94 struct msm_ispif_pack_cfg { 95 int pixel_swap_en; 96 enum msm_ispif_pixel_odd_even even_odd_sel; 97 enum msm_ispif_pixel_pack_mode pack_mode; 98 }; 99 struct msm_ispif_params_entry { 100 enum msm_ispif_vfe_intf vfe_intf; 101 enum msm_ispif_intftype intftype; 102 int num_cids; 103 enum msm_ispif_cid cids[MAX_CID_CH_PARAM_ENTRY]; 104 enum msm_ispif_csid csid; 105 int crop_enable; 106 uint16_t crop_start_pixel; 107 uint16_t crop_end_pixel; 108 }; 109 struct msm_ispif_right_param_entry { 110 enum msm_ispif_cid cids[MAX_CID_CH_PARAM_ENTRY]; 111 enum msm_ispif_csid csid; 112 }; 113 struct msm_ispif_param_data_ext { 114 uint32_t num; 115 struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES]; 116 struct msm_ispif_pack_cfg pack_cfg[CID_MAX]; 117 struct msm_ispif_right_param_entry right_entries[MAX_PARAM_ENTRIES]; 118 uint32_t stereo_enable; 119 uint16_t line_width[VFE_MAX]; 120 }; 121 struct msm_ispif_param_data { 122 uint32_t num; 123 struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES]; 124 }; 125 struct msm_isp_info { 126 uint32_t max_resolution; 127 uint32_t id; 128 uint32_t ver; 129 }; 130 struct msm_ispif_vfe_info { 131 int num_vfe; 132 struct msm_isp_info info[VFE_MAX]; 133 }; 134 enum ispif_cfg_type_t { 135 ISPIF_CLK_ENABLE, 136 ISPIF_CLK_DISABLE, 137 ISPIF_INIT, 138 ISPIF_CFG, 139 ISPIF_START_FRAME_BOUNDARY, 140 ISPIF_RESTART_FRAME_BOUNDARY, 141 ISPIF_STOP_FRAME_BOUNDARY, 142 ISPIF_STOP_IMMEDIATELY, 143 ISPIF_RELEASE, 144 ISPIF_ENABLE_REG_DUMP, 145 ISPIF_SET_VFE_INFO, 146 ISPIF_CFG2, 147 ISPIF_CFG_STEREO, 148 }; 149 struct ispif_cfg_data { 150 enum ispif_cfg_type_t cfg_type; 151 union { 152 int reg_dump; 153 uint32_t csid_version; 154 struct msm_ispif_vfe_info vfe_info; 155 struct msm_ispif_param_data params; 156 }; 157 }; 158 struct ispif_cfg_data_ext { 159 enum ispif_cfg_type_t cfg_type; 160 void * data; 161 uint32_t size; 162 }; 163 #define ISPIF_RDI_PACK_MODE_SUPPORT 1 164 #define ISPIF_3D_SUPPORT 1 165 #define ISPIF_LINE_WIDTH_SUPPORT 1 166 #define VIDIOC_MSM_ISPIF_CFG _IOWR('V', BASE_VIDIOC_PRIVATE, struct ispif_cfg_data) 167 #define VIDIOC_MSM_ISPIF_CFG_EXT _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct ispif_cfg_data_ext) 168 #endif 169 170