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