cam_req_mgr.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
  2. /*
  3. * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef __UAPI_LINUX_CAM_REQ_MGR_H
  6. #define __UAPI_LINUX_CAM_REQ_MGR_H
  7. #include <linux/videodev2.h>
  8. #include <linux/types.h>
  9. #include <linux/ioctl.h>
  10. #include <linux/media.h>
  11. #include <camera/media/cam_defs.h>
  12. #define CAM_REQ_MGR_VNODE_NAME "cam-req-mgr-devnode"
  13. #define CAM_DEVICE_TYPE_BASE (MEDIA_ENT_F_OLD_BASE)
  14. #define CAM_VNODE_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE)
  15. #define CAM_SENSOR_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 1)
  16. #define CAM_IFE_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 2)
  17. #define CAM_ICP_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 3)
  18. #define CAM_LRME_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 4)
  19. #define CAM_JPEG_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 5)
  20. #define CAM_FD_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 6)
  21. #define CAM_CPAS_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 7)
  22. #define CAM_CSIPHY_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 8)
  23. #define CAM_ACTUATOR_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 9)
  24. #define CAM_CCI_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 10)
  25. #define CAM_FLASH_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 11)
  26. #define CAM_EEPROM_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 12)
  27. #define CAM_OIS_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 13)
  28. #define CAM_CUSTOM_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 14)
  29. #define CAM_OPE_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 15)
  30. #define CAM_TFE_DEVICE_TYPE (CAM_DEVICE_TYPE_BASE + 16)
  31. /* cam_req_mgr hdl info */
  32. #define CAM_REQ_MGR_HDL_IDX_POS 8
  33. #define CAM_REQ_MGR_HDL_IDX_MASK ((1 << CAM_REQ_MGR_HDL_IDX_POS) - 1)
  34. #define CAM_REQ_MGR_GET_HDL_IDX(hdl) (hdl & CAM_REQ_MGR_HDL_IDX_MASK)
  35. /**
  36. * Max handles supported by cam_req_mgr
  37. * It includes both session and device handles
  38. */
  39. #define CAM_REQ_MGR_MAX_HANDLES 64
  40. #define CAM_REQ_MGR_MAX_HANDLES_V2 128
  41. #define MAX_LINKS_PER_SESSION 2
  42. /* V4L event type which user space will subscribe to */
  43. #define V4L_EVENT_CAM_REQ_MGR_EVENT (V4L2_EVENT_PRIVATE_START + 0)
  44. /* Specific event ids to get notified in user space */
  45. #define V4L_EVENT_CAM_REQ_MGR_SOF 0
  46. #define V4L_EVENT_CAM_REQ_MGR_ERROR 1
  47. #define V4L_EVENT_CAM_REQ_MGR_SOF_BOOT_TS 2
  48. #define V4L_EVENT_CAM_REQ_MGR_CUSTOM_EVT 3
  49. /* SOF Event status */
  50. #define CAM_REQ_MGR_SOF_EVENT_SUCCESS 0
  51. #define CAM_REQ_MGR_SOF_EVENT_ERROR 1
  52. /* Link control operations */
  53. #define CAM_REQ_MGR_LINK_ACTIVATE 0
  54. #define CAM_REQ_MGR_LINK_DEACTIVATE 1
  55. /**
  56. * Request Manager : flush_type
  57. * @CAM_REQ_MGR_FLUSH_TYPE_ALL: Req mgr will remove all the pending
  58. * requests from input/processing queue.
  59. * @CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ: Req mgr will remove only particular
  60. * request id from input/processing queue.
  61. * @CAM_REQ_MGR_FLUSH_TYPE_MAX: Max number of the flush type
  62. * @opcode: CAM_REQ_MGR_FLUSH_REQ
  63. */
  64. #define CAM_REQ_MGR_FLUSH_TYPE_ALL 0
  65. #define CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ 1
  66. #define CAM_REQ_MGR_FLUSH_TYPE_MAX 2
  67. /**
  68. * Request Manager : Sync Mode type
  69. * @CAM_REQ_MGR_SYNC_MODE_NO_SYNC: Req mgr will apply non-sync mode for this
  70. * request.
  71. * @CAM_REQ_MGR_SYNC_MODE_SYNC: Req mgr will apply sync mode for this request.
  72. */
  73. #define CAM_REQ_MGR_SYNC_MODE_NO_SYNC 0
  74. #define CAM_REQ_MGR_SYNC_MODE_SYNC 1
  75. /**
  76. * struct cam_req_mgr_event_data
  77. * @session_hdl: session handle
  78. * @link_hdl: link handle
  79. * @frame_id: frame id
  80. * @reserved: reserved for 64 bit aligngment
  81. * @req_id: request id
  82. * @tv_sec: timestamp in seconds
  83. * @tv_usec: timestamp in micro seconds
  84. */
  85. struct cam_req_mgr_event_data {
  86. __s32 session_hdl;
  87. __s32 link_hdl;
  88. __s32 frame_id;
  89. __s32 reserved;
  90. __s64 req_id;
  91. __u64 tv_sec;
  92. __u64 tv_usec;
  93. };
  94. /**
  95. * struct cam_req_mgr_session_info
  96. * @session_hdl: In/Output param - session_handle
  97. * @opcode1: CAM_REQ_MGR_CREATE_SESSION
  98. * @opcode2: CAM_REQ_MGR_DESTROY_SESSION
  99. */
  100. struct cam_req_mgr_session_info {
  101. __s32 session_hdl;
  102. __s32 reserved;
  103. };
  104. /**
  105. * struct cam_req_mgr_link_info
  106. * @session_hdl: Input param - Identifier for CSL session
  107. * @num_devices: Input Param - Num of devices to be linked
  108. * @dev_hdls: Input param - List of device handles to be linked
  109. * @link_hdl: Output Param -Identifier for link
  110. * @opcode: CAM_REQ_MGR_LINK
  111. */
  112. struct cam_req_mgr_link_info {
  113. __s32 session_hdl;
  114. __u32 num_devices;
  115. __s32 dev_hdls[CAM_REQ_MGR_MAX_HANDLES];
  116. __s32 link_hdl;
  117. };
  118. struct cam_req_mgr_link_info_v2 {
  119. __s32 session_hdl;
  120. __u32 num_devices;
  121. __s32 dev_hdls[CAM_REQ_MGR_MAX_HANDLES_V2];
  122. __s32 link_hdl;
  123. };
  124. struct cam_req_mgr_ver_info {
  125. __u32 version;
  126. union {
  127. struct cam_req_mgr_link_info link_info_v1;
  128. struct cam_req_mgr_link_info_v2 link_info_v2;
  129. } u;
  130. };
  131. /**
  132. * struct cam_req_mgr_unlink_info
  133. * @session_hdl: input param - session handle
  134. * @link_hdl: input param - link handle
  135. * @opcode: CAM_REQ_MGR_UNLINK
  136. */
  137. struct cam_req_mgr_unlink_info {
  138. __s32 session_hdl;
  139. __s32 link_hdl;
  140. };
  141. /**
  142. * struct cam_req_mgr_flush_info
  143. * @brief: User can tell drivers to flush a particular request id or
  144. * flush all requests from its pending processing queue. Flush is a
  145. * blocking call and driver shall ensure all requests are flushed
  146. * before returning.
  147. * @session_hdl: Input param - Identifier for CSL session
  148. * @link_hdl: Input Param -Identifier for link
  149. * @flush_type: User can cancel a particular req id or can flush
  150. * all requests in queue
  151. * @reserved: reserved for 64 bit aligngment
  152. * @req_id: field is valid only if flush type is cancel request
  153. * for flush all this field value is not considered.
  154. * @opcode: CAM_REQ_MGR_FLUSH_REQ
  155. */
  156. struct cam_req_mgr_flush_info {
  157. __s32 session_hdl;
  158. __s32 link_hdl;
  159. __u32 flush_type;
  160. __u32 reserved;
  161. __s64 req_id;
  162. };
  163. /** struct cam_req_mgr_sched_info
  164. * @session_hdl: Input param - Identifier for CSL session
  165. * @link_hdl: Input Param -Identifier for link
  166. * inluding itself.
  167. * @bubble_enable: Input Param - Cam req mgr will do bubble recovery if this
  168. * flag is set.
  169. * @sync_mode: Type of Sync mode for this request
  170. * @additional_timeout: Additional timeout value (in ms) associated with
  171. * this request. This value needs to be 0 in cases where long exposure is
  172. * not configured for the sensor.The max timeout that will be supported
  173. * is 50000 ms
  174. * @reserved: Reserved
  175. * @req_id: Input Param - Request Id from which all requests will be flushed
  176. */
  177. struct cam_req_mgr_sched_request {
  178. __s32 session_hdl;
  179. __s32 link_hdl;
  180. __s32 bubble_enable;
  181. __s32 sync_mode;
  182. __s32 additional_timeout;
  183. __s32 reserved;
  184. __s64 req_id;
  185. };
  186. /**
  187. * struct cam_req_mgr_sync_mode
  188. * @session_hdl: Input param - Identifier for CSL session
  189. * @sync_mode: Input Param - Type of sync mode
  190. * @num_links: Input Param - Num of links in sync mode (Valid only
  191. * when sync_mode is one of SYNC enabled modes)
  192. * @link_hdls: Input Param - Array of link handles to be in sync mode
  193. * (Valid only when sync_mode is one of SYNC
  194. * enabled modes)
  195. * @master_link_hdl: Input Param - To dictate which link's SOF drives system
  196. * (Valid only when sync_mode is one of SYNC
  197. * enabled modes)
  198. *
  199. * @opcode: CAM_REQ_MGR_SYNC_MODE
  200. */
  201. struct cam_req_mgr_sync_mode {
  202. __s32 session_hdl;
  203. __s32 sync_mode;
  204. __s32 num_links;
  205. __s32 link_hdls[MAX_LINKS_PER_SESSION];
  206. __s32 master_link_hdl;
  207. __s32 reserved;
  208. };
  209. /**
  210. * struct cam_req_mgr_link_control
  211. * @ops: Link operations: activate/deactive
  212. * @session_hdl: Input param - Identifier for CSL session
  213. * @num_links: Input Param - Num of links
  214. * @reserved: reserved field
  215. * @init_timeout: To account for INIT exposure settings (ms)
  216. * If there is no change in exp settings
  217. * field needs to assigned to 0ms.
  218. * @link_hdls: Input Param - Links to be activated/deactivated
  219. *
  220. * @opcode: CAM_REQ_MGR_LINK_CONTROL
  221. */
  222. struct cam_req_mgr_link_control {
  223. __s32 ops;
  224. __s32 session_hdl;
  225. __s32 num_links;
  226. __s32 reserved;
  227. __s32 init_timeout[MAX_LINKS_PER_SESSION];
  228. __s32 link_hdls[MAX_LINKS_PER_SESSION];
  229. };
  230. /**
  231. * cam_req_mgr specific opcode ids
  232. */
  233. #define CAM_REQ_MGR_CREATE_DEV_NODES (CAM_COMMON_OPCODE_MAX + 1)
  234. #define CAM_REQ_MGR_CREATE_SESSION (CAM_COMMON_OPCODE_MAX + 2)
  235. #define CAM_REQ_MGR_DESTROY_SESSION (CAM_COMMON_OPCODE_MAX + 3)
  236. #define CAM_REQ_MGR_LINK (CAM_COMMON_OPCODE_MAX + 4)
  237. #define CAM_REQ_MGR_UNLINK (CAM_COMMON_OPCODE_MAX + 5)
  238. #define CAM_REQ_MGR_SCHED_REQ (CAM_COMMON_OPCODE_MAX + 6)
  239. #define CAM_REQ_MGR_FLUSH_REQ (CAM_COMMON_OPCODE_MAX + 7)
  240. #define CAM_REQ_MGR_SYNC_MODE (CAM_COMMON_OPCODE_MAX + 8)
  241. #define CAM_REQ_MGR_ALLOC_BUF (CAM_COMMON_OPCODE_MAX + 9)
  242. #define CAM_REQ_MGR_MAP_BUF (CAM_COMMON_OPCODE_MAX + 10)
  243. #define CAM_REQ_MGR_RELEASE_BUF (CAM_COMMON_OPCODE_MAX + 11)
  244. #define CAM_REQ_MGR_CACHE_OPS (CAM_COMMON_OPCODE_MAX + 12)
  245. #define CAM_REQ_MGR_LINK_CONTROL (CAM_COMMON_OPCODE_MAX + 13)
  246. #define CAM_REQ_MGR_LINK_V2 (CAM_COMMON_OPCODE_MAX + 14)
  247. #define CAM_REQ_MGR_REQUEST_DUMP (CAM_COMMON_OPCODE_MAX + 15)
  248. /* end of cam_req_mgr opcodes */
  249. #define CAM_MEM_FLAG_HW_READ_WRITE (1<<0)
  250. #define CAM_MEM_FLAG_HW_READ_ONLY (1<<1)
  251. #define CAM_MEM_FLAG_HW_WRITE_ONLY (1<<2)
  252. #define CAM_MEM_FLAG_KMD_ACCESS (1<<3)
  253. #define CAM_MEM_FLAG_UMD_ACCESS (1<<4)
  254. #define CAM_MEM_FLAG_PROTECTED_MODE (1<<5)
  255. #define CAM_MEM_FLAG_CMD_BUF_TYPE (1<<6)
  256. #define CAM_MEM_FLAG_PIXEL_BUF_TYPE (1<<7)
  257. #define CAM_MEM_FLAG_STATS_BUF_TYPE (1<<8)
  258. #define CAM_MEM_FLAG_PACKET_BUF_TYPE (1<<9)
  259. #define CAM_MEM_FLAG_CACHE (1<<10)
  260. #define CAM_MEM_FLAG_HW_SHARED_ACCESS (1<<11)
  261. #define CAM_MEM_FLAG_CDSP_OUTPUT (1<<12)
  262. #define CAM_MEM_FLAG_DISABLE_DELAYED_UNMAP (1<<13)
  263. #define CAM_MEM_FLAG_KMD_DEBUG_FLAG (1<<14)
  264. #define CAM_MEM_MMU_MAX_HANDLE 16
  265. /* Maximum allowed buffers in existence */
  266. #define CAM_MEM_BUFQ_MAX 2048
  267. #define CAM_MEM_MGR_SECURE_BIT_POS 15
  268. #define CAM_MEM_MGR_HDL_IDX_SIZE 15
  269. #define CAM_MEM_MGR_HDL_FD_SIZE 16
  270. #define CAM_MEM_MGR_HDL_IDX_END_POS 16
  271. #define CAM_MEM_MGR_HDL_FD_END_POS 32
  272. #define CAM_MEM_MGR_HDL_IDX_MASK ((1 << CAM_MEM_MGR_HDL_IDX_SIZE) - 1)
  273. #define GET_MEM_HANDLE(idx, fd) \
  274. ((idx & CAM_MEM_MGR_HDL_IDX_MASK) | \
  275. (fd << (CAM_MEM_MGR_HDL_FD_END_POS - CAM_MEM_MGR_HDL_FD_SIZE))) \
  276. #define GET_FD_FROM_HANDLE(hdl) \
  277. (hdl >> (CAM_MEM_MGR_HDL_FD_END_POS - CAM_MEM_MGR_HDL_FD_SIZE)) \
  278. #define CAM_MEM_MGR_GET_HDL_IDX(hdl) (hdl & CAM_MEM_MGR_HDL_IDX_MASK)
  279. #define CAM_MEM_MGR_SET_SECURE_HDL(hdl, flag) \
  280. ((flag) ? (hdl |= (1 << CAM_MEM_MGR_SECURE_BIT_POS)) : \
  281. ((hdl) &= ~(1 << CAM_MEM_MGR_SECURE_BIT_POS)))
  282. #define CAM_MEM_MGR_IS_SECURE_HDL(hdl) \
  283. (((hdl) & \
  284. (1<<CAM_MEM_MGR_SECURE_BIT_POS)) >> CAM_MEM_MGR_SECURE_BIT_POS)
  285. /**
  286. * memory allocation type
  287. */
  288. #define CAM_MEM_DMA_NONE 0
  289. #define CAM_MEM_DMA_BIDIRECTIONAL 1
  290. #define CAM_MEM_DMA_TO_DEVICE 2
  291. #define CAM_MEM_DMA_FROM_DEVICE 3
  292. /**
  293. * memory cache operation
  294. */
  295. #define CAM_MEM_CLEAN_CACHE 1
  296. #define CAM_MEM_INV_CACHE 2
  297. #define CAM_MEM_CLEAN_INV_CACHE 3
  298. /**
  299. * struct cam_mem_alloc_out_params
  300. * @buf_handle: buffer handle
  301. * @fd: output buffer file descriptor
  302. * @vaddr: virtual address pointer
  303. */
  304. struct cam_mem_alloc_out_params {
  305. __u32 buf_handle;
  306. __s32 fd;
  307. __u64 vaddr;
  308. };
  309. /**
  310. * struct cam_mem_map_out_params
  311. * @buf_handle: buffer handle
  312. * @size: size of the buffer being mapped
  313. * @vaddr: virtual address pointer
  314. */
  315. struct cam_mem_map_out_params {
  316. __u32 buf_handle;
  317. __u32 size;
  318. __u64 vaddr;
  319. };
  320. /**
  321. * struct cam_mem_mgr_alloc_cmd
  322. * @len: size of buffer to allocate
  323. * @align: alignment of the buffer
  324. * @mmu_hdls: array of mmu handles
  325. * @num_hdl: number of handles
  326. * @flags: flags of the buffer
  327. * @out: out params
  328. */
  329. /* CAM_REQ_MGR_ALLOC_BUF */
  330. struct cam_mem_mgr_alloc_cmd {
  331. __u64 len;
  332. __u64 align;
  333. __s32 mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
  334. __u32 num_hdl;
  335. __u32 flags;
  336. struct cam_mem_alloc_out_params out;
  337. };
  338. /**
  339. * struct cam_mem_mgr_map_cmd
  340. * @mmu_hdls: array of mmu handles
  341. * @num_hdl: number of handles
  342. * @flags: flags of the buffer
  343. * @fd: output buffer file descriptor
  344. * @reserved: reserved field
  345. * @out: out params
  346. */
  347. /* CAM_REQ_MGR_MAP_BUF */
  348. struct cam_mem_mgr_map_cmd {
  349. __s32 mmu_hdls[CAM_MEM_MMU_MAX_HANDLE];
  350. __u32 num_hdl;
  351. __u32 flags;
  352. __s32 fd;
  353. __u32 reserved;
  354. struct cam_mem_map_out_params out;
  355. };
  356. /**
  357. * struct cam_mem_mgr_map_cmd
  358. * @buf_handle: buffer handle
  359. * @reserved: reserved field
  360. */
  361. /* CAM_REQ_MGR_RELEASE_BUF */
  362. struct cam_mem_mgr_release_cmd {
  363. __s32 buf_handle;
  364. __u32 reserved;
  365. };
  366. /**
  367. * struct cam_mem_mgr_map_cmd
  368. * @buf_handle: buffer handle
  369. * @ops: cache operations
  370. */
  371. /* CAM_REQ_MGR_CACHE_OPS */
  372. struct cam_mem_cache_ops_cmd {
  373. __s32 buf_handle;
  374. __u32 mem_cache_ops;
  375. };
  376. /**
  377. * Request Manager : error message type
  378. * @CAM_REQ_MGR_ERROR_TYPE_DEVICE: Device error message, fatal to session
  379. * @CAM_REQ_MGR_ERROR_TYPE_REQUEST: Error on a single request, not fatal
  380. * @CAM_REQ_MGR_ERROR_TYPE_BUFFER: Buffer was not filled, not fatal
  381. * @CAM_REQ_MGR_ERROR_TYPE_RECOVERY: Fatal error, can be recovered
  382. * @CAM_REQ_MGR_ERROR_TYPE_SOF_FREEZE: SOF freeze, can be recovered
  383. * @CAM_REQ_MGR_ERROR_TYPE_FULL_RECOVERY: Full recovery, can be recovered
  384. * @CAM_REQ_MGR_ERROR_TYPE_PAGE_FAULT: page fault, can be recovered
  385. */
  386. #define CAM_REQ_MGR_ERROR_TYPE_DEVICE 0
  387. #define CAM_REQ_MGR_ERROR_TYPE_REQUEST 1
  388. #define CAM_REQ_MGR_ERROR_TYPE_BUFFER 2
  389. #define CAM_REQ_MGR_ERROR_TYPE_RECOVERY 3
  390. #define CAM_REQ_MGR_ERROR_TYPE_SOF_FREEZE 4
  391. #define CAM_REQ_MGR_ERROR_TYPE_FULL_RECOVERY 5
  392. #define CAM_REQ_MGR_ERROR_TYPE_PAGE_FAULT 6
  393. /**
  394. * struct cam_req_mgr_error_msg
  395. * @error_type: type of error
  396. * @request_id: request id of frame
  397. * @device_hdl: device handle
  398. * @linke_hdl: link_hdl
  399. * @resource_size: size of the resource
  400. */
  401. struct cam_req_mgr_error_msg {
  402. __u32 error_type;
  403. __u32 request_id;
  404. __s32 device_hdl;
  405. __s32 link_hdl;
  406. __u64 resource_size;
  407. };
  408. /**
  409. * struct cam_req_mgr_frame_msg
  410. * @request_id: request id of the frame
  411. * @frame_id: frame id of the frame
  412. * @timestamp: timestamp of the frame
  413. * @link_hdl: link handle associated with this message
  414. * @sof_status: sof status success or fail
  415. * @frame_id_meta: refers to the meta for
  416. * that frame in specific usecases
  417. * @reserved: reserved
  418. */
  419. struct cam_req_mgr_frame_msg {
  420. __u64 request_id;
  421. __u64 frame_id;
  422. __u64 timestamp;
  423. __s32 link_hdl;
  424. __u32 sof_status;
  425. __u32 frame_id_meta;
  426. __u32 reserved;
  427. };
  428. /**
  429. * struct cam_req_mgr_custom_msg
  430. * @custom_type: custom type
  431. * @request_id: request id of the frame
  432. * @frame_id: frame id of the frame
  433. * @timestamp: timestamp of the frame
  434. * @link_hdl: link handle associated with this message
  435. * @custom_data: custom data
  436. */
  437. struct cam_req_mgr_custom_msg {
  438. __u32 custom_type;
  439. __u64 request_id;
  440. __u64 frame_id;
  441. __u64 timestamp;
  442. __s32 link_hdl;
  443. __u64 custom_data;
  444. };
  445. /**
  446. * struct cam_req_mgr_message
  447. * @session_hdl: session to which the frame belongs to
  448. * @reserved: reserved field
  449. * @u: union which can either be error/frame/custom message
  450. */
  451. struct cam_req_mgr_message {
  452. __s32 session_hdl;
  453. __s32 reserved;
  454. union {
  455. struct cam_req_mgr_error_msg err_msg;
  456. struct cam_req_mgr_frame_msg frame_msg;
  457. struct cam_req_mgr_custom_msg custom_msg;
  458. } u;
  459. };
  460. #endif /* __UAPI_LINUX_CAM_REQ_MGR_H */