msmb_isp.h 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  1. #ifndef __UAPI_MSMB_ISP__
  2. #define __UAPI_MSMB_ISP__
  3. #include <linux/videodev2.h>
  4. #include <media/msmb_camera.h>
  5. #define MAX_PLANES_PER_STREAM 3
  6. #define MAX_NUM_STREAM 7
  7. #define ISP_VERSION_48 48
  8. #define ISP_VERSION_47 47
  9. #define ISP_VERSION_46 46
  10. #define ISP_VERSION_44 44
  11. #define ISP_VERSION_40 40
  12. #define ISP_VERSION_32 32
  13. #define ISP_NATIVE_BUF_BIT (0x10000 << 0)
  14. #define ISP0_BIT (0x10000 << 1)
  15. #define ISP1_BIT (0x10000 << 2)
  16. #define ISP_META_CHANNEL_BIT (0x10000 << 3)
  17. #define ISP_SCRATCH_BUF_BIT (0x10000 << 4)
  18. #define ISP_OFFLINE_STATS_BIT (0x10000 << 5)
  19. #define ISP_SVHDR_IN_BIT (0x10000 << 6) /* RDI hw stream for SVHDR */
  20. #define ISP_SVHDR_OUT_BIT (0x10000 << 7) /* SVHDR output bufq stream*/
  21. #define ISP_STATS_STREAM_BIT 0x80000000
  22. #define VFE_HW_LIMIT 1
  23. struct msm_vfe_cfg_cmd_list;
  24. enum ISP_START_PIXEL_PATTERN {
  25. ISP_BAYER_RGRGRG,
  26. ISP_BAYER_GRGRGR,
  27. ISP_BAYER_BGBGBG,
  28. ISP_BAYER_GBGBGB,
  29. ISP_YUV_YCbYCr,
  30. ISP_YUV_YCrYCb,
  31. ISP_YUV_CbYCrY,
  32. ISP_YUV_CrYCbY,
  33. ISP_PIX_PATTERN_MAX
  34. };
  35. enum msm_vfe_plane_fmt {
  36. Y_PLANE,
  37. CB_PLANE,
  38. CR_PLANE,
  39. CRCB_PLANE,
  40. CBCR_PLANE,
  41. VFE_PLANE_FMT_MAX
  42. };
  43. enum msm_vfe_input_src {
  44. VFE_PIX_0,
  45. VFE_RAW_0,
  46. VFE_RAW_1,
  47. VFE_RAW_2,
  48. VFE_SRC_MAX,
  49. };
  50. enum msm_vfe_axi_stream_src {
  51. PIX_ENCODER,
  52. PIX_VIEWFINDER,
  53. PIX_VIDEO,
  54. CAMIF_RAW,
  55. IDEAL_RAW,
  56. RDI_INTF_0,
  57. RDI_INTF_1,
  58. RDI_INTF_2,
  59. VFE_AXI_SRC_MAX
  60. };
  61. enum msm_vfe_frame_skip_pattern {
  62. NO_SKIP,
  63. EVERY_2FRAME,
  64. EVERY_3FRAME,
  65. EVERY_4FRAME,
  66. EVERY_5FRAME,
  67. EVERY_6FRAME,
  68. EVERY_7FRAME,
  69. EVERY_8FRAME,
  70. EVERY_16FRAME,
  71. EVERY_32FRAME,
  72. SKIP_ALL,
  73. SKIP_RANGE,
  74. MAX_SKIP,
  75. };
  76. /*
  77. * Define an unused period. When this period is set it means that the stream is
  78. * stopped(i.e the pattern is 0). We don't track the current pattern, just the
  79. * period defines what the pattern is, if period is this then pattern is 0 else
  80. * pattern is 1
  81. */
  82. #define MSM_VFE_STREAM_STOP_PERIOD 15
  83. enum msm_isp_stats_type {
  84. MSM_ISP_STATS_AEC, /* legacy based AEC */
  85. MSM_ISP_STATS_AF, /* legacy based AF */
  86. MSM_ISP_STATS_AWB, /* legacy based AWB */
  87. MSM_ISP_STATS_RS, /* legacy based RS */
  88. MSM_ISP_STATS_CS, /* legacy based CS */
  89. MSM_ISP_STATS_IHIST, /* legacy based HIST */
  90. MSM_ISP_STATS_SKIN, /* legacy based SKIN */
  91. MSM_ISP_STATS_BG, /* Bayer Grids */
  92. MSM_ISP_STATS_BF, /* Bayer Focus */
  93. MSM_ISP_STATS_BE, /* Bayer Exposure*/
  94. MSM_ISP_STATS_BHIST, /* Bayer Hist */
  95. MSM_ISP_STATS_BF_SCALE, /* Bayer Focus scale */
  96. MSM_ISP_STATS_HDR_BE, /* HDR Bayer Exposure */
  97. MSM_ISP_STATS_HDR_BHIST, /* HDR Bayer Hist */
  98. MSM_ISP_STATS_AEC_BG, /* AEC BG */
  99. MSM_ISP_STATS_MAX /* MAX */
  100. };
  101. /*
  102. * @stats_type_mask: Stats type mask (enum msm_isp_stats_type).
  103. * @stream_src_mask: Stream src mask (enum msm_vfe_axi_stream_src)
  104. * @skip_mode: skip pattern, if skip mode is range only then min/max is used
  105. * @min_frame_id: minimum frame id (valid only if skip_mode = RANGE)
  106. * @max_frame_id: maximum frame id (valid only if skip_mode = RANGE)
  107. */
  108. struct msm_isp_sw_framskip {
  109. uint32_t stats_type_mask;
  110. uint32_t stream_src_mask;
  111. enum msm_vfe_frame_skip_pattern skip_mode;
  112. uint32_t min_frame_id;
  113. uint32_t max_frame_id;
  114. };
  115. enum msm_vfe_testgen_color_pattern {
  116. COLOR_BAR_8_COLOR,
  117. UNICOLOR_WHITE,
  118. UNICOLOR_YELLOW,
  119. UNICOLOR_CYAN,
  120. UNICOLOR_GREEN,
  121. UNICOLOR_MAGENTA,
  122. UNICOLOR_RED,
  123. UNICOLOR_BLUE,
  124. UNICOLOR_BLACK,
  125. MAX_COLOR,
  126. };
  127. enum msm_vfe_camif_input {
  128. CAMIF_DISABLED,
  129. CAMIF_PAD_REG_INPUT,
  130. CAMIF_MIDDI_INPUT,
  131. CAMIF_MIPI_INPUT,
  132. };
  133. struct msm_vfe_fetch_engine_cfg {
  134. uint32_t input_format;
  135. uint32_t buf_width;
  136. uint32_t buf_height;
  137. uint32_t fetch_width;
  138. uint32_t fetch_height;
  139. uint32_t x_offset;
  140. uint32_t y_offset;
  141. uint32_t buf_stride;
  142. };
  143. enum msm_vfe_camif_output_format {
  144. CAMIF_QCOM_RAW,
  145. CAMIF_MIPI_RAW,
  146. CAMIF_PLAIN_8,
  147. CAMIF_PLAIN_16,
  148. CAMIF_MAX_FORMAT,
  149. };
  150. /*
  151. * Camif output general configuration
  152. */
  153. struct msm_vfe_camif_subsample_cfg {
  154. uint32_t irq_subsample_period;
  155. uint32_t irq_subsample_pattern;
  156. uint32_t sof_counter_step;
  157. uint32_t pixel_skip;
  158. uint32_t line_skip;
  159. uint32_t first_line;
  160. uint32_t last_line;
  161. uint32_t first_pixel;
  162. uint32_t last_pixel;
  163. enum msm_vfe_camif_output_format output_format;
  164. };
  165. /*
  166. * Camif frame and window configuration
  167. */
  168. struct msm_vfe_camif_cfg {
  169. uint32_t lines_per_frame;
  170. uint32_t pixels_per_line;
  171. uint32_t first_pixel;
  172. uint32_t last_pixel;
  173. uint32_t first_line;
  174. uint32_t last_line;
  175. uint32_t epoch_line0;
  176. uint32_t epoch_line1;
  177. uint32_t is_split;
  178. enum msm_vfe_camif_input camif_input;
  179. struct msm_vfe_camif_subsample_cfg subsample_cfg;
  180. };
  181. struct msm_vfe_testgen_cfg {
  182. uint32_t lines_per_frame;
  183. uint32_t pixels_per_line;
  184. uint32_t v_blank;
  185. uint32_t h_blank;
  186. enum ISP_START_PIXEL_PATTERN pixel_bayer_pattern;
  187. uint32_t rotate_period;
  188. enum msm_vfe_testgen_color_pattern color_bar_pattern;
  189. uint32_t burst_num_frame;
  190. };
  191. enum msm_vfe_inputmux {
  192. CAMIF,
  193. TESTGEN,
  194. EXTERNAL_READ,
  195. };
  196. enum msm_vfe_stats_composite_group {
  197. STATS_COMPOSITE_GRP_NONE,
  198. STATS_COMPOSITE_GRP_1,
  199. STATS_COMPOSITE_GRP_2,
  200. STATS_COMPOSITE_GRP_MAX,
  201. };
  202. enum msm_vfe_hvx_streaming_cmd {
  203. HVX_DISABLE,
  204. HVX_ONE_WAY,
  205. HVX_ROUND_TRIP
  206. };
  207. struct msm_vfe_pix_cfg {
  208. struct msm_vfe_camif_cfg camif_cfg;
  209. struct msm_vfe_testgen_cfg testgen_cfg;
  210. struct msm_vfe_fetch_engine_cfg fetch_engine_cfg;
  211. enum msm_vfe_inputmux input_mux;
  212. enum ISP_START_PIXEL_PATTERN pixel_pattern;
  213. uint32_t input_format;
  214. enum msm_vfe_hvx_streaming_cmd hvx_cmd;
  215. uint32_t is_split;
  216. };
  217. struct msm_vfe_rdi_cfg {
  218. uint8_t cid;
  219. uint8_t frame_based;
  220. };
  221. struct msm_vfe_input_cfg {
  222. union {
  223. struct msm_vfe_pix_cfg pix_cfg;
  224. struct msm_vfe_rdi_cfg rdi_cfg;
  225. } d;
  226. enum msm_vfe_input_src input_src;
  227. uint32_t input_pix_clk;
  228. };
  229. struct msm_vfe_fetch_eng_start {
  230. uint32_t session_id;
  231. uint32_t stream_id;
  232. uint32_t buf_idx;
  233. uint8_t offline_mode;
  234. uint32_t fd;
  235. uint32_t buf_addr;
  236. uint32_t frame_id;
  237. };
  238. enum msm_vfe_fetch_eng_pass {
  239. OFFLINE_FIRST_PASS,
  240. OFFLINE_SECOND_PASS,
  241. OFFLINE_MAX_PASS,
  242. };
  243. struct msm_vfe_fetch_eng_multi_pass_start {
  244. uint32_t session_id;
  245. uint32_t stream_id;
  246. uint32_t buf_idx;
  247. uint8_t offline_mode;
  248. uint32_t fd;
  249. uint32_t buf_addr;
  250. uint32_t frame_id;
  251. uint32_t output_buf_idx;
  252. uint32_t input_buf_offset;
  253. enum msm_vfe_fetch_eng_pass offline_pass;
  254. uint32_t output_stream_id;
  255. };
  256. struct msm_vfe_axi_plane_cfg {
  257. uint32_t output_width; /*Include padding*/
  258. uint32_t output_height;
  259. uint32_t output_stride;
  260. uint32_t output_scan_lines;
  261. uint32_t output_plane_format; /*Y/Cb/Cr/CbCr*/
  262. uint32_t plane_addr_offset;
  263. uint8_t csid_src; /*RDI 0-2*/
  264. uint8_t rdi_cid;/*CID 1-16*/
  265. };
  266. enum msm_stream_rdi_input_type {
  267. MSM_CAMERA_RDI_MIN,
  268. MSM_CAMERA_RDI_PDAF,
  269. MSM_CAMERA_RDI_MAX,
  270. };
  271. struct msm_vfe_axi_stream_request_cmd {
  272. uint32_t session_id;
  273. uint32_t stream_id;
  274. uint32_t vt_enable;
  275. uint32_t output_format;/*Planar/RAW/Misc*/
  276. enum msm_vfe_axi_stream_src stream_src; /*CAMIF/IDEAL/RDIs*/
  277. struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM];
  278. uint32_t burst_count;
  279. uint32_t hfr_mode;
  280. uint8_t frame_base;
  281. uint32_t init_frame_drop; /*MAX 31 Frames*/
  282. enum msm_vfe_frame_skip_pattern frame_skip_pattern;
  283. uint8_t buf_divert; /* if TRUE no vb2 buf done. */
  284. /*Return values*/
  285. uint32_t axi_stream_handle;
  286. uint32_t controllable_output;
  287. uint32_t burst_len;
  288. /* Flag indicating memory input stream */
  289. enum msm_stream_rdi_input_type rdi_input_type;
  290. };
  291. struct msm_vfe_axi_stream_release_cmd {
  292. uint32_t stream_handle;
  293. };
  294. enum msm_vfe_axi_stream_cmd {
  295. STOP_STREAM,
  296. START_STREAM,
  297. STOP_IMMEDIATELY,
  298. };
  299. struct msm_vfe_axi_stream_cfg_cmd {
  300. uint8_t num_streams;
  301. uint32_t stream_handle[VFE_AXI_SRC_MAX];
  302. enum msm_vfe_axi_stream_cmd cmd;
  303. uint8_t sync_frame_id_src;
  304. };
  305. enum msm_vfe_axi_stream_update_type {
  306. ENABLE_STREAM_BUF_DIVERT,
  307. DISABLE_STREAM_BUF_DIVERT,
  308. UPDATE_STREAM_FRAMEDROP_PATTERN,
  309. UPDATE_STREAM_STATS_FRAMEDROP_PATTERN,
  310. UPDATE_STREAM_AXI_CONFIG,
  311. UPDATE_STREAM_REQUEST_FRAMES,
  312. UPDATE_STREAM_ADD_BUFQ,
  313. UPDATE_STREAM_REMOVE_BUFQ,
  314. UPDATE_STREAM_SW_FRAME_DROP,
  315. UPDATE_STREAM_REQUEST_FRAMES_VER2,
  316. UPDATE_STREAM_OFFLINE_AXI_CONFIG,
  317. };
  318. #define UPDATE_STREAM_REQUEST_FRAMES_VER2 UPDATE_STREAM_REQUEST_FRAMES_VER2
  319. enum msm_vfe_iommu_type {
  320. IOMMU_ATTACH,
  321. IOMMU_DETACH,
  322. };
  323. enum msm_vfe_buff_queue_id {
  324. VFE_BUF_QUEUE_DEFAULT,
  325. VFE_BUF_QUEUE_SHARED,
  326. VFE_BUF_QUEUE_MAX,
  327. };
  328. struct msm_vfe_axi_stream_cfg_update_info {
  329. uint32_t stream_handle;
  330. uint32_t output_format;
  331. uint32_t user_stream_id;
  332. uint32_t frame_id;
  333. enum msm_vfe_frame_skip_pattern skip_pattern;
  334. struct msm_vfe_axi_plane_cfg plane_cfg[MAX_PLANES_PER_STREAM];
  335. struct msm_isp_sw_framskip sw_skip_info;
  336. };
  337. struct msm_vfe_axi_stream_cfg_update_info_req_frm {
  338. uint32_t stream_handle;
  339. uint32_t user_stream_id;
  340. uint32_t frame_id;
  341. uint32_t buf_index;
  342. };
  343. struct msm_vfe_axi_halt_cmd {
  344. uint32_t stop_camif;
  345. uint32_t overflow_detected;
  346. uint32_t blocking_halt;
  347. };
  348. struct msm_vfe_axi_reset_cmd {
  349. uint32_t blocking;
  350. uint32_t frame_id;
  351. };
  352. struct msm_vfe_axi_restart_cmd {
  353. uint32_t enable_camif;
  354. };
  355. struct msm_vfe_axi_stream_update_cmd {
  356. uint32_t num_streams;
  357. enum msm_vfe_axi_stream_update_type update_type;
  358. /*
  359. * For backward compatibility, ensure 1st member of any struct
  360. * in union below is uint32_t stream_handle.
  361. */
  362. union {
  363. struct msm_vfe_axi_stream_cfg_update_info
  364. update_info[MSM_ISP_STATS_MAX];
  365. struct msm_vfe_axi_stream_cfg_update_info_req_frm req_frm_ver2;
  366. };
  367. };
  368. struct msm_vfe_smmu_attach_cmd {
  369. uint32_t security_mode;
  370. uint32_t iommu_attach_mode;
  371. };
  372. struct msm_vfe_stats_stream_request_cmd {
  373. uint32_t session_id;
  374. uint32_t stream_id;
  375. enum msm_isp_stats_type stats_type;
  376. uint32_t composite_flag;
  377. uint32_t framedrop_pattern;
  378. uint32_t init_frame_drop; /*MAX 31 Frames*/
  379. uint32_t irq_subsample_pattern;
  380. uint32_t buffer_offset;
  381. uint32_t stream_handle;
  382. };
  383. struct msm_vfe_stats_stream_release_cmd {
  384. uint32_t stream_handle;
  385. };
  386. struct msm_vfe_stats_stream_cfg_cmd {
  387. uint8_t num_streams;
  388. uint32_t stream_handle[MSM_ISP_STATS_MAX];
  389. uint8_t enable;
  390. uint32_t stats_burst_len;
  391. };
  392. enum msm_vfe_reg_cfg_type {
  393. VFE_WRITE,
  394. VFE_WRITE_MB,
  395. VFE_READ,
  396. VFE_CFG_MASK,
  397. VFE_WRITE_DMI_16BIT,
  398. VFE_WRITE_DMI_32BIT,
  399. VFE_WRITE_DMI_64BIT,
  400. VFE_READ_DMI_16BIT,
  401. VFE_READ_DMI_32BIT,
  402. VFE_READ_DMI_64BIT,
  403. GET_MAX_CLK_RATE,
  404. GET_CLK_RATES,
  405. GET_ISP_ID,
  406. VFE_HW_UPDATE_LOCK,
  407. VFE_HW_UPDATE_UNLOCK,
  408. SET_WM_UB_SIZE,
  409. SET_UB_POLICY,
  410. GET_VFE_HW_LIMIT,
  411. };
  412. struct msm_vfe_cfg_cmd2 {
  413. uint16_t num_cfg;
  414. uint16_t cmd_len;
  415. void __user *cfg_data;
  416. void __user *cfg_cmd;
  417. };
  418. struct msm_vfe_cfg_cmd_list {
  419. struct msm_vfe_cfg_cmd2 cfg_cmd;
  420. struct msm_vfe_cfg_cmd_list *next;
  421. uint32_t next_size;
  422. };
  423. struct msm_vfe_reg_rw_info {
  424. uint32_t reg_offset;
  425. uint32_t cmd_data_offset;
  426. uint32_t len;
  427. };
  428. struct msm_vfe_reg_mask_info {
  429. uint32_t reg_offset;
  430. uint32_t mask;
  431. uint32_t val;
  432. };
  433. struct msm_vfe_reg_dmi_info {
  434. uint32_t hi_tbl_offset; /*Optional*/
  435. uint32_t lo_tbl_offset; /*Required*/
  436. uint32_t len;
  437. };
  438. struct msm_vfe_reg_cfg_cmd {
  439. union {
  440. struct msm_vfe_reg_rw_info rw_info;
  441. struct msm_vfe_reg_mask_info mask_info;
  442. struct msm_vfe_reg_dmi_info dmi_info;
  443. } u;
  444. enum msm_vfe_reg_cfg_type cmd_type;
  445. };
  446. enum vfe_sd_type {
  447. VFE_SD_0 = 0,
  448. VFE_SD_1,
  449. VFE_SD_COMMON,
  450. VFE_SD_MAX,
  451. };
  452. /* When you change the value below, check for the sof event_data size.
  453. * V4l2 limits payload to 64 bytes
  454. */
  455. #define MS_NUM_SLAVE_MAX 1
  456. /* Usecases when 2 HW need to be related or synced */
  457. enum msm_vfe_dual_hw_type {
  458. DUAL_NONE = 0,
  459. DUAL_HW_VFE_SPLIT = 1,
  460. DUAL_HW_MASTER_SLAVE = 2,
  461. };
  462. /* Type for 2 INTF when used in Master-Slave mode */
  463. enum msm_vfe_dual_hw_ms_type {
  464. MS_TYPE_NONE,
  465. MS_TYPE_MASTER,
  466. MS_TYPE_SLAVE,
  467. };
  468. struct msm_isp_set_dual_hw_ms_cmd {
  469. uint8_t num_src;
  470. /* Each session can be only one type but multiple intf if YUV cam */
  471. enum msm_vfe_dual_hw_ms_type dual_hw_ms_type;
  472. /* Primary intf is mostly associated with preview.
  473. * This primary intf SOF frame_id and timestamp is tracked
  474. * and used to calculate delta
  475. */
  476. enum msm_vfe_input_src primary_intf;
  477. /* input_src array indicates other input INTF that may be Master/Slave.
  478. * For these additional intf, frame_id and timestamp are not saved.
  479. * However, if these are slaves then they will still get their
  480. * frame_id from Master
  481. */
  482. enum msm_vfe_input_src input_src[VFE_SRC_MAX];
  483. uint32_t sof_delta_threshold; /* In milliseconds. Sent for Master */
  484. };
  485. enum msm_isp_buf_type {
  486. ISP_PRIVATE_BUF,
  487. ISP_SHARE_BUF,
  488. MAX_ISP_BUF_TYPE,
  489. };
  490. struct msm_isp_unmap_buf_req {
  491. uint32_t fd;
  492. };
  493. struct msm_isp_buf_request {
  494. uint32_t session_id;
  495. uint32_t stream_id;
  496. uint8_t num_buf;
  497. uint32_t handle;
  498. enum msm_isp_buf_type buf_type;
  499. };
  500. struct msm_isp_buf_request_ver2 {
  501. uint32_t session_id;
  502. uint32_t stream_id;
  503. uint8_t num_buf;
  504. uint32_t handle;
  505. enum msm_isp_buf_type buf_type;
  506. enum smmu_attach_mode security_mode;
  507. uint32_t reserved[4];
  508. };
  509. struct msm_isp_qbuf_plane {
  510. uint32_t addr;
  511. uint32_t offset;
  512. uint32_t length;
  513. };
  514. struct msm_isp_qbuf_buffer {
  515. struct msm_isp_qbuf_plane planes[MAX_PLANES_PER_STREAM];
  516. uint32_t num_planes;
  517. };
  518. struct msm_isp_qbuf_info {
  519. uint32_t handle;
  520. int32_t buf_idx;
  521. /*Only used for prepare buffer*/
  522. struct msm_isp_qbuf_buffer buffer;
  523. /*Only used for diverted buffer*/
  524. uint32_t dirty_buf;
  525. };
  526. struct msm_isp_clk_rates {
  527. uint32_t svs_rate;
  528. uint32_t nominal_rate;
  529. uint32_t high_rate;
  530. };
  531. struct msm_vfe_axi_src_state {
  532. enum msm_vfe_input_src input_src;
  533. uint32_t src_active;
  534. uint32_t src_frame_id;
  535. };
  536. enum msm_isp_event_mask_index {
  537. ISP_EVENT_MASK_INDEX_STATS_NOTIFY = 0,
  538. ISP_EVENT_MASK_INDEX_ERROR = 1,
  539. ISP_EVENT_MASK_INDEX_IOMMU_P_FAULT = 2,
  540. ISP_EVENT_MASK_INDEX_STREAM_UPDATE_DONE = 3,
  541. ISP_EVENT_MASK_INDEX_REG_UPDATE = 4,
  542. ISP_EVENT_MASK_INDEX_SOF = 5,
  543. ISP_EVENT_MASK_INDEX_BUF_DIVERT = 6,
  544. ISP_EVENT_MASK_INDEX_COMP_STATS_NOTIFY = 7,
  545. ISP_EVENT_MASK_INDEX_MASK_FE_READ_DONE = 8,
  546. ISP_EVENT_MASK_INDEX_BUF_DONE = 9,
  547. ISP_EVENT_MASK_INDEX_REG_UPDATE_MISSING = 10,
  548. ISP_EVENT_MASK_INDEX_PING_PONG_MISMATCH = 11,
  549. ISP_EVENT_MASK_INDEX_BUF_FATAL_ERROR = 12,
  550. };
  551. #define ISP_EVENT_SUBS_MASK_NONE 0
  552. #define ISP_EVENT_SUBS_MASK_STATS_NOTIFY \
  553. (1 << ISP_EVENT_MASK_INDEX_STATS_NOTIFY)
  554. #define ISP_EVENT_SUBS_MASK_ERROR \
  555. (1 << ISP_EVENT_MASK_INDEX_ERROR)
  556. #define ISP_EVENT_SUBS_MASK_IOMMU_P_FAULT \
  557. (1 << ISP_EVENT_MASK_INDEX_IOMMU_P_FAULT)
  558. #define ISP_EVENT_SUBS_MASK_STREAM_UPDATE_DONE \
  559. (1 << ISP_EVENT_MASK_INDEX_STREAM_UPDATE_DONE)
  560. #define ISP_EVENT_SUBS_MASK_REG_UPDATE \
  561. (1 << ISP_EVENT_MASK_INDEX_REG_UPDATE)
  562. #define ISP_EVENT_SUBS_MASK_SOF \
  563. (1 << ISP_EVENT_MASK_INDEX_SOF)
  564. #define ISP_EVENT_SUBS_MASK_BUF_DIVERT \
  565. (1 << ISP_EVENT_MASK_INDEX_BUF_DIVERT)
  566. #define ISP_EVENT_SUBS_MASK_COMP_STATS_NOTIFY \
  567. (1 << ISP_EVENT_MASK_INDEX_COMP_STATS_NOTIFY)
  568. #define ISP_EVENT_SUBS_MASK_FE_READ_DONE \
  569. (1 << ISP_EVENT_MASK_INDEX_MASK_FE_READ_DONE)
  570. #define ISP_EVENT_SUBS_MASK_BUF_DONE \
  571. (1 << ISP_EVENT_MASK_INDEX_BUF_DONE)
  572. #define ISP_EVENT_SUBS_MASK_REG_UPDATE_MISSING \
  573. (1 << ISP_EVENT_MASK_INDEX_REG_UPDATE_MISSING)
  574. #define ISP_EVENT_SUBS_MASK_PING_PONG_MISMATCH \
  575. (1 << ISP_EVENT_MASK_INDEX_PING_PONG_MISMATCH)
  576. #define ISP_EVENT_SUBS_MASK_BUF_FATAL_ERROR \
  577. (1 << ISP_EVENT_MASK_INDEX_BUF_FATAL_ERROR)
  578. enum msm_isp_event_idx {
  579. ISP_REG_UPDATE = 0,
  580. ISP_EPOCH_0 = 1,
  581. ISP_EPOCH_1 = 2,
  582. ISP_START_ACK = 3,
  583. ISP_STOP_ACK = 4,
  584. ISP_IRQ_VIOLATION = 5,
  585. ISP_STATS_OVERFLOW = 6,
  586. ISP_BUF_DONE = 7,
  587. ISP_FE_RD_DONE = 8,
  588. ISP_IOMMU_P_FAULT = 9,
  589. ISP_ERROR = 10,
  590. ISP_HW_FATAL_ERROR = 11,
  591. ISP_PING_PONG_MISMATCH = 12,
  592. ISP_REG_UPDATE_MISSING = 13,
  593. ISP_BUF_FATAL_ERROR = 14,
  594. ISP_EVENT_MAX = 15
  595. };
  596. #define ISP_EVENT_OFFSET 8
  597. #define ISP_EVENT_BASE (V4L2_EVENT_PRIVATE_START)
  598. #define ISP_BUF_EVENT_BASE (ISP_EVENT_BASE + (1 << ISP_EVENT_OFFSET))
  599. #define ISP_STATS_EVENT_BASE (ISP_EVENT_BASE + (2 << ISP_EVENT_OFFSET))
  600. #define ISP_CAMIF_EVENT_BASE (ISP_EVENT_BASE + (3 << ISP_EVENT_OFFSET))
  601. #define ISP_STREAM_EVENT_BASE (ISP_EVENT_BASE + (4 << ISP_EVENT_OFFSET))
  602. #define ISP_EVENT_REG_UPDATE (ISP_EVENT_BASE + ISP_REG_UPDATE)
  603. #define ISP_EVENT_EPOCH_0 (ISP_EVENT_BASE + ISP_EPOCH_0)
  604. #define ISP_EVENT_EPOCH_1 (ISP_EVENT_BASE + ISP_EPOCH_1)
  605. #define ISP_EVENT_START_ACK (ISP_EVENT_BASE + ISP_START_ACK)
  606. #define ISP_EVENT_STOP_ACK (ISP_EVENT_BASE + ISP_STOP_ACK)
  607. #define ISP_EVENT_IRQ_VIOLATION (ISP_EVENT_BASE + ISP_IRQ_VIOLATION)
  608. #define ISP_EVENT_STATS_OVERFLOW (ISP_EVENT_BASE + ISP_STATS_OVERFLOW)
  609. #define ISP_EVENT_ERROR (ISP_EVENT_BASE + ISP_ERROR)
  610. #define ISP_EVENT_SOF (ISP_CAMIF_EVENT_BASE)
  611. #define ISP_EVENT_EOF (ISP_CAMIF_EVENT_BASE + 1)
  612. #define ISP_EVENT_BUF_DONE (ISP_EVENT_BASE + ISP_BUF_DONE)
  613. #define ISP_EVENT_BUF_DIVERT (ISP_BUF_EVENT_BASE)
  614. #define ISP_EVENT_STATS_NOTIFY (ISP_STATS_EVENT_BASE)
  615. #define ISP_EVENT_COMP_STATS_NOTIFY (ISP_EVENT_STATS_NOTIFY + MSM_ISP_STATS_MAX)
  616. #define ISP_EVENT_FE_READ_DONE (ISP_EVENT_BASE + ISP_FE_RD_DONE)
  617. #define ISP_EVENT_IOMMU_P_FAULT (ISP_EVENT_BASE + ISP_IOMMU_P_FAULT)
  618. #define ISP_EVENT_HW_FATAL_ERROR (ISP_EVENT_BASE + ISP_HW_FATAL_ERROR)
  619. #define ISP_EVENT_PING_PONG_MISMATCH (ISP_EVENT_BASE + ISP_PING_PONG_MISMATCH)
  620. #define ISP_EVENT_REG_UPDATE_MISSING (ISP_EVENT_BASE + ISP_REG_UPDATE_MISSING)
  621. #define ISP_EVENT_BUF_FATAL_ERROR (ISP_EVENT_BASE + ISP_BUF_FATAL_ERROR)
  622. #define ISP_EVENT_STREAM_UPDATE_DONE (ISP_STREAM_EVENT_BASE)
  623. /* The msm_v4l2_event_data structure should match the
  624. * v4l2_event.u.data field.
  625. * should not exceed 64 bytes
  626. */
  627. struct msm_isp_buf_event {
  628. uint32_t session_id;
  629. uint32_t stream_id;
  630. uint32_t handle;
  631. uint32_t output_format;
  632. int8_t buf_idx;
  633. };
  634. struct msm_isp_fetch_eng_event {
  635. uint32_t session_id;
  636. uint32_t stream_id;
  637. uint32_t handle;
  638. uint32_t fd;
  639. int8_t buf_idx;
  640. int8_t offline_mode;
  641. };
  642. struct msm_isp_stats_event {
  643. uint32_t stats_mask; /* 4 bytes */
  644. uint8_t stats_buf_idxs[MSM_ISP_STATS_MAX]; /* 11 bytes */
  645. uint8_t pd_stats_idx;
  646. };
  647. struct msm_isp_stream_ack {
  648. uint32_t session_id;
  649. uint32_t stream_id;
  650. uint32_t handle;
  651. };
  652. enum msm_vfe_error_type {
  653. ISP_ERROR_NONE,
  654. ISP_ERROR_CAMIF,
  655. ISP_ERROR_BUS_OVERFLOW,
  656. ISP_ERROR_RETURN_EMPTY_BUFFER,
  657. ISP_ERROR_FRAME_ID_MISMATCH,
  658. ISP_ERROR_MAX,
  659. };
  660. struct msm_isp_error_info {
  661. enum msm_vfe_error_type err_type;
  662. uint32_t session_id;
  663. uint32_t stream_id;
  664. uint32_t stream_id_mask;
  665. };
  666. /* This structure reports delta between master and slave */
  667. struct msm_isp_ms_delta_info {
  668. uint8_t num_delta_info;
  669. uint32_t delta[MS_NUM_SLAVE_MAX];
  670. };
  671. /* This is sent in EPOCH irq */
  672. struct msm_isp_output_info {
  673. uint8_t regs_not_updated;
  674. /* mask with bufq_handle for regs not updated or return empty */
  675. uint16_t output_err_mask;
  676. /* mask with stream_idx for get_buf failed */
  677. uint8_t stream_framedrop_mask;
  678. /* mask with stats stream_idx for get_buf failed */
  679. uint16_t stats_framedrop_mask;
  680. /* delta between master and slave */
  681. };
  682. /* This structure is piggybacked with SOF event */
  683. struct msm_isp_sof_info {
  684. uint8_t regs_not_updated;
  685. /* mask with bufq_handle for regs not updated */
  686. uint16_t reg_update_fail_mask;
  687. /* mask with bufq_handle for get_buf failed */
  688. uint32_t stream_get_buf_fail_mask;
  689. /* mask with stats stream_idx for get_buf failed */
  690. uint16_t stats_get_buf_fail_mask;
  691. /* delta between master and slave */
  692. struct msm_isp_ms_delta_info ms_delta_info;
  693. /*
  694. * mask with AXI_SRC in paused state. In PAUSED
  695. * state there is no Buffer output. So this mask is used
  696. * to report drop.
  697. */
  698. uint16_t axi_updating_mask;
  699. /* extended mask with bufq_handle for regs not updated */
  700. uint32_t reg_update_fail_mask_ext;
  701. };
  702. #define AXI_UPDATING_MASK 1
  703. #define REG_UPDATE_FAIL_MASK_EXT 1
  704. struct msm_isp_event_data {
  705. /*Wall clock except for buffer divert events
  706. *which use monotonic clock
  707. */
  708. struct timeval timestamp;
  709. /* Monotonic timestamp since bootup */
  710. struct timeval mono_timestamp;
  711. uint32_t frame_id;
  712. union {
  713. /* Sent for Stats_Done event */
  714. struct msm_isp_stats_event stats;
  715. /* Sent for Buf_Divert event */
  716. struct msm_isp_buf_event buf_done;
  717. /* Sent for offline fetch done event */
  718. struct msm_isp_fetch_eng_event fetch_done;
  719. /* Sent for Error_Event */
  720. struct msm_isp_error_info error_info;
  721. /*
  722. * This struct needs to be removed once
  723. * userspace switches to sof_info
  724. */
  725. struct msm_isp_output_info output_info;
  726. /* Sent for SOF event */
  727. struct msm_isp_sof_info sof_info;
  728. } u; /* union can have max 52 bytes */
  729. };
  730. enum msm_vfe_ahb_clk_vote {
  731. MSM_ISP_CAMERA_AHB_SVS_VOTE = 1,
  732. MSM_ISP_CAMERA_AHB_TURBO_VOTE = 2,
  733. MSM_ISP_CAMERA_AHB_NOMINAL_VOTE = 3,
  734. MSM_ISP_CAMERA_AHB_SUSPEND_VOTE = 4,
  735. };
  736. struct msm_isp_ahb_clk_cfg {
  737. uint32_t vote;
  738. uint32_t reserved[2];
  739. };
  740. enum msm_vfe_dual_cam_sync_mode {
  741. MSM_ISP_DUAL_CAM_ASYNC,
  742. MSM_ISP_DUAL_CAM_SYNC,
  743. };
  744. struct msm_isp_dual_hw_master_slave_sync {
  745. uint32_t sync_mode;
  746. uint32_t reserved[2];
  747. };
  748. struct msm_vfe_dual_lpm_mode {
  749. enum msm_vfe_axi_stream_src stream_src[VFE_AXI_SRC_MAX];
  750. uint32_t num_src;
  751. uint32_t lpm_mode;
  752. };
  753. #define V4L2_PIX_FMT_QBGGR8 v4l2_fourcc('Q', 'B', 'G', '8')
  754. #define V4L2_PIX_FMT_QGBRG8 v4l2_fourcc('Q', 'G', 'B', '8')
  755. #define V4L2_PIX_FMT_QGRBG8 v4l2_fourcc('Q', 'G', 'R', '8')
  756. #define V4L2_PIX_FMT_QRGGB8 v4l2_fourcc('Q', 'R', 'G', '8')
  757. #define V4L2_PIX_FMT_QBGGR10 v4l2_fourcc('Q', 'B', 'G', '0')
  758. #define V4L2_PIX_FMT_QGBRG10 v4l2_fourcc('Q', 'G', 'B', '0')
  759. #define V4L2_PIX_FMT_QGRBG10 v4l2_fourcc('Q', 'G', 'R', '0')
  760. #define V4L2_PIX_FMT_QRGGB10 v4l2_fourcc('Q', 'R', 'G', '0')
  761. #define V4L2_PIX_FMT_QBGGR12 v4l2_fourcc('Q', 'B', 'G', '2')
  762. #define V4L2_PIX_FMT_QGBRG12 v4l2_fourcc('Q', 'G', 'B', '2')
  763. #define V4L2_PIX_FMT_QGRBG12 v4l2_fourcc('Q', 'G', 'R', '2')
  764. #define V4L2_PIX_FMT_QRGGB12 v4l2_fourcc('Q', 'R', 'G', '2')
  765. #define V4L2_PIX_FMT_QBGGR14 v4l2_fourcc('Q', 'B', 'G', '4')
  766. #define V4L2_PIX_FMT_QGBRG14 v4l2_fourcc('Q', 'G', 'B', '4')
  767. #define V4L2_PIX_FMT_QGRBG14 v4l2_fourcc('Q', 'G', 'R', '4')
  768. #define V4L2_PIX_FMT_QRGGB14 v4l2_fourcc('Q', 'R', 'G', '4')
  769. #define V4L2_PIX_FMT_P16BGGR10 v4l2_fourcc('P', 'B', 'G', '0')
  770. #define V4L2_PIX_FMT_P16GBRG10 v4l2_fourcc('P', 'G', 'B', '0')
  771. #define V4L2_PIX_FMT_P16GRBG10 v4l2_fourcc('P', 'G', 'R', '0')
  772. #define V4L2_PIX_FMT_P16RGGB10 v4l2_fourcc('P', 'R', 'G', '0')
  773. #define V4L2_PIX_FMT_P16BGGR12 v4l2_fourcc('P', 'B', 'G', '2')
  774. #define V4L2_PIX_FMT_P16GBRG12 v4l2_fourcc('P', 'G', 'B', '2')
  775. #define V4L2_PIX_FMT_P16GRBG12 v4l2_fourcc('P', 'G', 'R', '2')
  776. #define V4L2_PIX_FMT_P16RGGB12 v4l2_fourcc('P', 'R', 'G', '2')
  777. #define V4L2_PIX_FMT_NV14 v4l2_fourcc('N', 'V', '1', '4')
  778. #define V4L2_PIX_FMT_NV41 v4l2_fourcc('N', 'V', '4', '1')
  779. #define V4L2_PIX_FMT_META v4l2_fourcc('Q', 'M', 'E', 'T')
  780. #define V4L2_PIX_FMT_META10 v4l2_fourcc('Q', 'M', '1', '0')
  781. #define V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.GRGR.*/
  782. #define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.RGRG.*/
  783. #define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('B', 'A', '1', '4') /* 14 GRGR.BGBG.*/
  784. #define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.GBGB.*/
  785. enum msm_isp_ioctl_cmd_code {
  786. MSM_VFE_REG_CFG = BASE_VIDIOC_PRIVATE,
  787. MSM_ISP_REQUEST_BUF,
  788. MSM_ISP_ENQUEUE_BUF,
  789. MSM_ISP_RELEASE_BUF,
  790. MSM_ISP_REQUEST_STREAM,
  791. MSM_ISP_CFG_STREAM,
  792. MSM_ISP_RELEASE_STREAM,
  793. MSM_ISP_INPUT_CFG,
  794. MSM_ISP_SET_SRC_STATE,
  795. MSM_ISP_REQUEST_STATS_STREAM,
  796. MSM_ISP_CFG_STATS_STREAM,
  797. MSM_ISP_RELEASE_STATS_STREAM,
  798. MSM_ISP_REG_UPDATE_CMD,
  799. MSM_ISP_UPDATE_STREAM,
  800. MSM_VFE_REG_LIST_CFG,
  801. MSM_ISP_SMMU_ATTACH,
  802. MSM_ISP_UPDATE_STATS_STREAM,
  803. MSM_ISP_AXI_HALT,
  804. MSM_ISP_AXI_RESET,
  805. MSM_ISP_AXI_RESTART,
  806. MSM_ISP_FETCH_ENG_START,
  807. MSM_ISP_DEQUEUE_BUF,
  808. MSM_ISP_SET_DUAL_HW_MASTER_SLAVE,
  809. MSM_ISP_MAP_BUF_START_FE,
  810. MSM_ISP_UNMAP_BUF,
  811. MSM_ISP_AHB_CLK_CFG,
  812. MSM_ISP_DUAL_HW_MASTER_SLAVE_SYNC,
  813. MSM_ISP_FETCH_ENG_MULTI_PASS_START,
  814. MSM_ISP_MAP_BUF_START_MULTI_PASS_FE,
  815. MSM_ISP_REQUEST_BUF_VER2,
  816. MSM_ISP_DUAL_HW_LPM_MODE,
  817. };
  818. #define VIDIOC_MSM_VFE_REG_CFG \
  819. _IOWR('V', MSM_VFE_REG_CFG, \
  820. struct msm_vfe_cfg_cmd2)
  821. #define VIDIOC_MSM_ISP_REQUEST_BUF \
  822. _IOWR('V', MSM_ISP_REQUEST_BUF, \
  823. struct msm_isp_buf_request)
  824. #define VIDIOC_MSM_ISP_ENQUEUE_BUF \
  825. _IOWR('V', MSM_ISP_ENQUEUE_BUF, \
  826. struct msm_isp_qbuf_info)
  827. #define VIDIOC_MSM_ISP_RELEASE_BUF \
  828. _IOWR('V', MSM_ISP_RELEASE_BUF, \
  829. struct msm_isp_buf_request)
  830. #define VIDIOC_MSM_ISP_REQUEST_STREAM \
  831. _IOWR('V', MSM_ISP_REQUEST_STREAM, \
  832. struct msm_vfe_axi_stream_request_cmd)
  833. #define VIDIOC_MSM_ISP_CFG_STREAM \
  834. _IOWR('V', MSM_ISP_CFG_STREAM, \
  835. struct msm_vfe_axi_stream_cfg_cmd)
  836. #define VIDIOC_MSM_ISP_RELEASE_STREAM \
  837. _IOWR('V', MSM_ISP_RELEASE_STREAM, \
  838. struct msm_vfe_axi_stream_release_cmd)
  839. #define VIDIOC_MSM_ISP_INPUT_CFG \
  840. _IOWR('V', MSM_ISP_INPUT_CFG, \
  841. struct msm_vfe_input_cfg)
  842. #define VIDIOC_MSM_ISP_SET_SRC_STATE \
  843. _IOWR('V', MSM_ISP_SET_SRC_STATE, \
  844. struct msm_vfe_axi_src_state)
  845. #define VIDIOC_MSM_ISP_REQUEST_STATS_STREAM \
  846. _IOWR('V', MSM_ISP_REQUEST_STATS_STREAM, \
  847. struct msm_vfe_stats_stream_request_cmd)
  848. #define VIDIOC_MSM_ISP_CFG_STATS_STREAM \
  849. _IOWR('V', MSM_ISP_CFG_STATS_STREAM, \
  850. struct msm_vfe_stats_stream_cfg_cmd)
  851. #define VIDIOC_MSM_ISP_RELEASE_STATS_STREAM \
  852. _IOWR('V', MSM_ISP_RELEASE_STATS_STREAM, \
  853. struct msm_vfe_stats_stream_release_cmd)
  854. #define VIDIOC_MSM_ISP_REG_UPDATE_CMD \
  855. _IOWR('V', MSM_ISP_REG_UPDATE_CMD, \
  856. enum msm_vfe_input_src)
  857. #define VIDIOC_MSM_ISP_UPDATE_STREAM \
  858. _IOWR('V', MSM_ISP_UPDATE_STREAM, \
  859. struct msm_vfe_axi_stream_update_cmd)
  860. #define VIDIOC_MSM_VFE_REG_LIST_CFG \
  861. _IOWR('V', MSM_VFE_REG_LIST_CFG, \
  862. struct msm_vfe_cfg_cmd_list)
  863. #define VIDIOC_MSM_ISP_SMMU_ATTACH \
  864. _IOWR('V', MSM_ISP_SMMU_ATTACH, \
  865. struct msm_vfe_smmu_attach_cmd)
  866. #define VIDIOC_MSM_ISP_UPDATE_STATS_STREAM \
  867. _IOWR('V', MSM_ISP_UPDATE_STATS_STREAM, \
  868. struct msm_vfe_axi_stream_update_cmd)
  869. #define VIDIOC_MSM_ISP_AXI_HALT \
  870. _IOWR('V', MSM_ISP_AXI_HALT, \
  871. struct msm_vfe_axi_halt_cmd)
  872. #define VIDIOC_MSM_ISP_AXI_RESET \
  873. _IOWR('V', MSM_ISP_AXI_RESET, \
  874. struct msm_vfe_axi_reset_cmd)
  875. #define VIDIOC_MSM_ISP_AXI_RESTART \
  876. _IOWR('V', MSM_ISP_AXI_RESTART, \
  877. struct msm_vfe_axi_restart_cmd)
  878. #define VIDIOC_MSM_ISP_FETCH_ENG_START \
  879. _IOWR('V', MSM_ISP_FETCH_ENG_START, \
  880. struct msm_vfe_fetch_eng_start)
  881. #define VIDIOC_MSM_ISP_DEQUEUE_BUF \
  882. _IOWR('V', MSM_ISP_DEQUEUE_BUF, \
  883. struct msm_isp_qbuf_info)
  884. #define VIDIOC_MSM_ISP_SET_DUAL_HW_MASTER_SLAVE \
  885. _IOWR('V', MSM_ISP_SET_DUAL_HW_MASTER_SLAVE, \
  886. struct msm_isp_set_dual_hw_ms_cmd)
  887. #define VIDIOC_MSM_ISP_MAP_BUF_START_FE \
  888. _IOWR('V', MSM_ISP_MAP_BUF_START_FE, \
  889. struct msm_vfe_fetch_eng_start)
  890. #define VIDIOC_MSM_ISP_UNMAP_BUF \
  891. _IOWR('V', MSM_ISP_UNMAP_BUF, \
  892. struct msm_isp_unmap_buf_req)
  893. #define VIDIOC_MSM_ISP_AHB_CLK_CFG \
  894. _IOWR('V', MSM_ISP_AHB_CLK_CFG, struct msm_isp_ahb_clk_cfg)
  895. #define VIDIOC_MSM_ISP_DUAL_HW_MASTER_SLAVE_SYNC \
  896. _IOWR('V', MSM_ISP_DUAL_HW_MASTER_SLAVE_SYNC, \
  897. struct msm_isp_dual_hw_master_slave_sync)
  898. #define VIDIOC_MSM_ISP_FETCH_ENG_MULTI_PASS_START \
  899. _IOWR('V', MSM_ISP_FETCH_ENG_MULTI_PASS_START, \
  900. struct msm_vfe_fetch_eng_multi_pass_start)
  901. #define VIDIOC_MSM_ISP_MAP_BUF_START_MULTI_PASS_FE \
  902. _IOWR('V', MSM_ISP_MAP_BUF_START_MULTI_PASS_FE, \
  903. struct msm_vfe_fetch_eng_multi_pass_start)
  904. #define VIDIOC_MSM_ISP_REQUEST_BUF_VER2 \
  905. _IOWR('V', MSM_ISP_REQUEST_BUF_VER2, struct msm_isp_buf_request_ver2)
  906. #define VIDIOC_MSM_ISP_DUAL_HW_LPM_MODE \
  907. _IOWR('V', MSM_ISP_DUAL_HW_LPM_MODE, \
  908. struct msm_vfe_dual_lpm_mode)
  909. #endif /* __MSMB_ISP__ */