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 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #include <linux/videodev2.h>
25 #define CSID_VERSION_V20 0x02000011
26 #define CSID_VERSION_V22 0x02001000
27 #define CSID_VERSION_V30 0x30000000
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define CSID_VERSION_V3 0x30000000
30 enum msm_ispif_vfe_intf {
31   VFE0,
32   VFE1,
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34   VFE_MAX
35 };
36 #define VFE0_MASK (1 << VFE0)
37 #define VFE1_MASK (1 << VFE1)
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 enum msm_ispif_intftype {
40   PIX0,
41   RDI0,
42   PIX1,
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44   RDI1,
45   RDI2,
46   INTF_MAX
47 };
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define MAX_PARAM_ENTRIES (INTF_MAX * 2)
50 #define MAX_CID_CH 8
51 #define PIX0_MASK (1 << PIX0)
52 #define PIX1_MASK (1 << PIX1)
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define RDI0_MASK (1 << RDI0)
55 #define RDI1_MASK (1 << RDI1)
56 #define RDI2_MASK (1 << RDI2)
57 enum msm_ispif_vc {
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   VC0,
60   VC1,
61   VC2,
62   VC3,
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   VC_MAX
65 };
66 enum msm_ispif_cid {
67   CID0,
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   CID1,
70   CID2,
71   CID3,
72   CID4,
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   CID5,
75   CID6,
76   CID7,
77   CID8,
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79   CID9,
80   CID10,
81   CID11,
82   CID12,
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84   CID13,
85   CID14,
86   CID15,
87   CID_MAX
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 };
90 enum msm_ispif_csid {
91   CSID0,
92   CSID1,
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94   CSID2,
95   CSID3,
96   CSID_MAX
97 };
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
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 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104   enum msm_ispif_cid cids[3];
105   enum msm_ispif_csid csid;
106   int crop_enable;
107   uint16_t crop_start_pixel;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109   uint16_t crop_end_pixel;
110 };
111 struct msm_ispif_param_data {
112   uint32_t num;
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114   struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES];
115 };
116 struct msm_isp_info {
117   uint32_t max_resolution;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119   uint32_t id;
120   uint32_t ver;
121 };
122 struct msm_ispif_vfe_info {
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124   int num_vfe;
125   struct msm_isp_info info[VFE_MAX];
126 };
127 enum ispif_cfg_type_t {
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129   ISPIF_CLK_ENABLE,
130   ISPIF_CLK_DISABLE,
131   ISPIF_INIT,
132   ISPIF_CFG,
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134   ISPIF_START_FRAME_BOUNDARY,
135   ISPIF_RECONFIG,
136   ISPIF_STOP_FRAME_BOUNDARY,
137   ISPIF_STOP_IMMEDIATELY,
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139   ISPIF_RELEASE,
140   ISPIF_ENABLE_REG_DUMP,
141   ISPIF_SET_VFE_INFO,
142 };
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 struct ispif_cfg_data {
145   enum ispif_cfg_type_t cfg_type;
146   union {
147     int reg_dump;
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149     uint32_t csid_version;
150     struct msm_ispif_vfe_info vfe_info;
151     struct msm_ispif_param_data params;
152   };
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 };
155 #define VIDIOC_MSM_ISPIF_CFG _IOWR('V', BASE_VIDIOC_PRIVATE, struct ispif_cfg_data)
156 #endif
157 
158