cam_isp_context.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  5. */
  6. #ifndef _CAM_ISP_CONTEXT_H_
  7. #define _CAM_ISP_CONTEXT_H_
  8. #include <linux/spinlock_types.h>
  9. #include <media/cam_isp.h>
  10. #include <media/cam_defs.h>
  11. #include <media/cam_tfe.h>
  12. #include "cam_context.h"
  13. #include "cam_isp_hw_mgr_intf.h"
  14. #include "cam_req_mgr_workq.h"
  15. #define CAM_IFE_QTIMER_MUL_FACTOR 10000
  16. #define CAM_IFE_QTIMER_DIV_FACTOR 192
  17. /*
  18. * Maximum hw resource - This number is based on the maximum
  19. * output port resource. The current maximum resource number
  20. * is 24.
  21. */
  22. #define CAM_ISP_CTX_RES_MAX 24
  23. /* max requests per ctx for isp */
  24. #define CAM_ISP_CTX_REQ_MAX 8
  25. /*
  26. * Maximum entries in state monitoring array for error logging
  27. */
  28. #define CAM_ISP_CTX_STATE_MONITOR_MAX_ENTRIES 40
  29. /*
  30. * Threshold response time in us beyond which a request is not expected
  31. * to be with IFE hw
  32. */
  33. #define CAM_ISP_CTX_RESPONSE_TIME_THRESHOLD 100000
  34. /* Number of words for dumping isp context */
  35. #define CAM_ISP_CTX_DUMP_NUM_WORDS 5
  36. /* Number of words for dumping isp context events*/
  37. #define CAM_ISP_CTX_DUMP_EVENT_NUM_WORDS 3
  38. /* Number of words for dumping request info*/
  39. #define CAM_ISP_CTX_DUMP_REQUEST_NUM_WORDS 2
  40. /* Maximum entries in event record */
  41. #define CAM_ISP_CTX_EVENT_RECORD_MAX_ENTRIES 8
  42. /* Maximum length of tag while dumping */
  43. #define CAM_ISP_CONTEXT_DUMP_TAG_MAX_LEN 64
  44. /* AEB error count threshold */
  45. #define CAM_ISP_CONTEXT_AEB_ERROR_CNT_MAX 3
  46. /* Debug Buffer length*/
  47. #define CAM_ISP_CONTEXT_DBG_BUF_LEN 300
  48. /* forward declaration */
  49. struct cam_isp_context;
  50. /* cam isp context irq handling function type */
  51. typedef int (*cam_isp_hw_event_cb_func)(struct cam_isp_context *ctx_isp,
  52. void *evt_data);
  53. /**
  54. * enum cam_isp_ctx_activated_substate - sub states for activated
  55. *
  56. */
  57. enum cam_isp_ctx_activated_substate {
  58. CAM_ISP_CTX_ACTIVATED_SOF,
  59. CAM_ISP_CTX_ACTIVATED_APPLIED,
  60. CAM_ISP_CTX_ACTIVATED_EPOCH,
  61. CAM_ISP_CTX_ACTIVATED_BUBBLE,
  62. CAM_ISP_CTX_ACTIVATED_BUBBLE_APPLIED,
  63. CAM_ISP_CTX_ACTIVATED_HW_ERROR,
  64. CAM_ISP_CTX_ACTIVATED_HALT,
  65. CAM_ISP_CTX_ACTIVATED_MAX,
  66. };
  67. /**
  68. * enum cam_isp_ctx_event_type - events for a request
  69. *
  70. */
  71. enum cam_isp_ctx_event {
  72. CAM_ISP_CTX_EVENT_SUBMIT,
  73. CAM_ISP_CTX_EVENT_APPLY,
  74. CAM_ISP_CTX_EVENT_EPOCH,
  75. CAM_ISP_CTX_EVENT_RUP,
  76. CAM_ISP_CTX_EVENT_BUFDONE,
  77. CAM_ISP_CTX_EVENT_MAX
  78. };
  79. /**
  80. * enum cam_isp_state_change_trigger - Different types of ISP events
  81. *
  82. */
  83. enum cam_isp_state_change_trigger {
  84. CAM_ISP_STATE_CHANGE_TRIGGER_ERROR,
  85. CAM_ISP_STATE_CHANGE_TRIGGER_APPLIED,
  86. CAM_ISP_STATE_CHANGE_TRIGGER_REG_UPDATE,
  87. CAM_ISP_STATE_CHANGE_TRIGGER_SOF,
  88. CAM_ISP_STATE_CHANGE_TRIGGER_EPOCH,
  89. CAM_ISP_STATE_CHANGE_TRIGGER_DONE,
  90. CAM_ISP_STATE_CHANGE_TRIGGER_EOF,
  91. CAM_ISP_STATE_CHANGE_TRIGGER_FLUSH,
  92. CAM_ISP_STATE_CHANGE_TRIGGER_SEC_EVT_SOF,
  93. CAM_ISP_STATE_CHANGE_TRIGGER_SEC_EVT_EPOCH,
  94. CAM_ISP_STATE_CHANGE_TRIGGER_FRAME_DROP,
  95. CAM_ISP_STATE_CHANGE_TRIGGER_MAX
  96. };
  97. #define CAM_ISP_CTX_DISABLE_RECOVERY_AEB BIT(0)
  98. #define CAM_ISP_CTX_DISABLE_RECOVERY_BUS_OVERFLOW BIT(1)
  99. #define CAM_ISP_CTX_DISABLE_RECOVERY_BUBBLE BIT(2)
  100. /**
  101. * struct cam_isp_ctx_debug - Contains debug parameters
  102. *
  103. * @dentry: Debugfs entry
  104. * @enable_state_monitor_dump: Enable isp state monitor dump
  105. * @enable_cdm_cmd_buff_dump: Enable CDM Command buffer dump
  106. * @disable_internal_recovery: Disable internal kernel recovery mask
  107. *
  108. */
  109. struct cam_isp_ctx_debug {
  110. struct dentry *dentry;
  111. uint32_t enable_state_monitor_dump;
  112. uint8_t enable_cdm_cmd_buff_dump;
  113. uint32_t disable_internal_recovery_mask;
  114. };
  115. /**
  116. * struct cam_isp_ctx_irq_ops - Function table for handling IRQ callbacks
  117. *
  118. * @irq_ops: Array of handle function pointers.
  119. *
  120. */
  121. struct cam_isp_ctx_irq_ops {
  122. cam_isp_hw_event_cb_func irq_ops[CAM_ISP_HW_EVENT_MAX];
  123. };
  124. /**
  125. * struct cam_isp_ctx_req - ISP context request object
  126. *
  127. * @base: Common request object ponter
  128. * @cfg: ISP hardware configuration array
  129. * @num_cfg: Number of ISP hardware configuration entries
  130. * @fence_map_out: Output fence mapping array
  131. * @num_fence_map_out: Number of the output fence map
  132. * @fence_map_in: Input fence mapping array
  133. * @num_fence_map_in: Number of input fence map
  134. * @num_acked: Count to track acked entried for output.
  135. * If count equals the number of fence out, it means
  136. * the request has been completed.
  137. * @num_deferred_acks: Number of buf_dones/acks that are deferred to
  138. * handle or signalled in special scenarios.
  139. * Increment this count instead of num_acked and
  140. * handle the events later where eventually
  141. * increment num_acked.
  142. * @deferred_fence_map_index Saves the indices of fence_map_out for which
  143. * handling of buf_done is deferred.
  144. * @bubble_report: Flag to track if bubble report is active on
  145. * current request
  146. * @hw_update_data: HW update data for this request
  147. * @reapply_type: Determines type of settings to be re-applied
  148. * @event_timestamp: Timestamp for different stage of request
  149. * @cdm_reset_before_apply: For bubble re-apply when buf done not coming set
  150. * to True
  151. *
  152. */
  153. struct cam_isp_ctx_req {
  154. struct cam_ctx_request *base;
  155. struct cam_hw_update_entry *cfg;
  156. uint32_t num_cfg;
  157. struct cam_hw_fence_map_entry *fence_map_out;
  158. uint32_t num_fence_map_out;
  159. struct cam_hw_fence_map_entry *fence_map_in;
  160. uint32_t num_fence_map_in;
  161. uint32_t num_acked;
  162. uint32_t num_deferred_acks;
  163. uint32_t deferred_fence_map_index[CAM_ISP_CTX_RES_MAX];
  164. int32_t bubble_report;
  165. struct cam_isp_prepare_hw_update_data hw_update_data;
  166. enum cam_hw_config_reapply_type reapply_type;
  167. ktime_t event_timestamp
  168. [CAM_ISP_CTX_EVENT_MAX];
  169. bool bubble_detected;
  170. bool cdm_reset_before_apply;
  171. };
  172. /**
  173. * struct cam_isp_context_state_monitor - ISP context state
  174. * monitoring for
  175. * debug purposes
  176. *
  177. * @curr_state: Current sub state that received req
  178. * @trigger: Event type of incoming req
  179. * @req_id: Request id
  180. * @frame_id: Frame id based on SOFs
  181. * @evt_time_stamp Current time stamp
  182. *
  183. */
  184. struct cam_isp_context_state_monitor {
  185. enum cam_isp_ctx_activated_substate curr_state;
  186. enum cam_isp_state_change_trigger trigger;
  187. uint64_t req_id;
  188. int64_t frame_id;
  189. struct timespec64 evt_time_stamp;
  190. };
  191. /**
  192. * struct cam_isp_context_req_id_info - ISP context request id
  193. * information for bufdone.
  194. *
  195. *@last_bufdone_req_id: Last bufdone request id
  196. *
  197. */
  198. struct cam_isp_context_req_id_info {
  199. int64_t last_bufdone_req_id;
  200. };
  201. /**
  202. *
  203. *
  204. * struct cam_isp_context_event_record - Information for last 20 Events
  205. * for a request; Submit, Apply, EPOCH, RUP, Buf done.
  206. *
  207. * @req_id: Last applied request id
  208. * @timestamp: Timestamp for the event
  209. *
  210. */
  211. struct cam_isp_context_event_record {
  212. uint64_t req_id;
  213. ktime_t timestamp;
  214. };
  215. /**
  216. * struct cam_isp_context - ISP context object
  217. *
  218. * @base: Common context object pointer
  219. * @frame_id: Frame id tracking for the isp context
  220. * @frame_id_meta: Frame id read every epoch for the ctx
  221. * meta from the sensor
  222. * @substate_actiavted: Current substate for the activated state.
  223. * @process_bubble: Atomic variable to check if ctx is still
  224. * processing bubble.
  225. * @substate_machine: ISP substate machine for external interface
  226. * @substate_machine_irq: ISP substate machine for irq handling
  227. * @req_base: Common request object storage
  228. * @req_isp: ISP private request object storage
  229. * @hw_ctx: HW object returned by the acquire device command
  230. * @sof_timestamp_val: Captured time stamp value at sof hw event
  231. * @boot_timestamp: Boot time stamp for a given req_id
  232. * @active_req_cnt: Counter for the active request
  233. * @reported_req_id: Last reported request id
  234. * @subscribe_event: The irq event mask that CRM subscribes to, IFE
  235. * will invoke CRM cb at those event.
  236. * @last_applied_req_id: Last applied request id
  237. * @recovery_req_id: Req ID flagged for internal recovery
  238. * @last_sof_timestamp: SOF timestamp of the last frame
  239. * @bubble_frame_cnt: Count of the frame after bubble
  240. * @aeb_error_cnt: Count number of times a specific AEB error scenario is
  241. * enountered
  242. * @out_of_sync_cnt: Out of sync error count for AEB
  243. * @state_monitor_head: Write index to the state monitoring array
  244. * @req_info Request id information about last buf done
  245. * @cam_isp_ctx_state_monitor: State monitoring array
  246. * @event_record_head: Write index to the state monitoring array
  247. * @event_record: Event record array
  248. * @rdi_only_context: Get context type information.
  249. * true, if context is rdi only context
  250. * @offline_context: Indicate whether context is for offline IFE
  251. * @vfps_aux_context: Indicate whether context is for VFPS aux link
  252. * @resume_hw_in_flushed: Indicate whether resume hw in flushed state in vfps case
  253. * @hw_acquired: Indicate whether HW resources are acquired
  254. * @init_received: Indicate whether init config packet is received
  255. * @split_acquire: Indicate whether a separate acquire is expected
  256. * @custom_enabled: Custom HW enabled for this ctx
  257. * @use_frame_header_ts: Use frame header for qtimer ts
  258. * @support_consumed_addr: Indicate whether HW has last consumed addr reg
  259. * @sof_dbg_irq_en: Indicates whether ISP context has enabled debug irqs
  260. * @apply_in_progress Whether request apply is in progress
  261. * @use_default_apply: Use default settings in case of frame skip
  262. * @init_timestamp: Timestamp at which this context is initialized
  263. * @isp_device_type: ISP device type
  264. * @rxd_epoch: Indicate whether epoch has been received. Used to
  265. * decide whether to apply request in offline ctx
  266. * @workq: Worker thread for offline ife
  267. * @trigger_id: ID provided by CRM for each ctx on the link
  268. * @last_bufdone_err_apply_req_id: last bufdone error apply request id
  269. * @v4l2_event_sub_ids contains individual bits representing subscribed v4l2 ids
  270. * @evt_inject_params: event injection parameters
  271. * @aeb_enabled: Indicate if stream is for AEB
  272. * @last_sof_jiffies: Record the jiffies of last sof
  273. * @last_applied_jiffies: Record the jiffiest of last applied req
  274. * @vfe_bus_comp_grp: Vfe bus comp group record
  275. * @sfe_bus_comp_grp: Sfe bus comp group record
  276. * @mswitch_default_apply_delay_max_cnt: Max mode switch delay among all devices connected
  277. * on the same link as this ISP context
  278. * @mswitch_default_apply_delay_ref_cnt: Ref cnt for this context to decide when to apply
  279. * mode switch settings
  280. * @handle_mswitch: Indicates if IFE needs to explicitly handle mode switch
  281. * on frame skip callback from request manager.
  282. * This is decided based on the max mode switch delay published
  283. * by other devices on the link as part of link setup
  284. * @mode_switch_en: Indicates if mode switch is enabled
  285. *
  286. */
  287. struct cam_isp_context {
  288. struct cam_context *base;
  289. uint64_t frame_id;
  290. uint32_t frame_id_meta;
  291. uint32_t substate_activated;
  292. atomic_t process_bubble;
  293. struct cam_ctx_ops *substate_machine;
  294. struct cam_isp_ctx_irq_ops *substate_machine_irq;
  295. struct cam_ctx_request req_base[CAM_ISP_CTX_REQ_MAX];
  296. struct cam_isp_ctx_req req_isp[CAM_ISP_CTX_REQ_MAX];
  297. void *hw_ctx;
  298. uint64_t sof_timestamp_val;
  299. uint64_t boot_timestamp;
  300. int32_t active_req_cnt;
  301. int64_t reported_req_id;
  302. uint64_t reported_frame_id;
  303. uint32_t subscribe_event;
  304. int64_t last_applied_req_id;
  305. uint64_t recovery_req_id;
  306. uint64_t last_sof_timestamp;
  307. uint32_t bubble_frame_cnt;
  308. uint32_t aeb_error_cnt;
  309. uint32_t out_of_sync_cnt;
  310. atomic64_t state_monitor_head;
  311. struct cam_isp_context_state_monitor cam_isp_ctx_state_monitor[
  312. CAM_ISP_CTX_STATE_MONITOR_MAX_ENTRIES];
  313. struct cam_isp_context_req_id_info req_info;
  314. atomic64_t event_record_head[
  315. CAM_ISP_CTX_EVENT_MAX];
  316. struct cam_isp_context_event_record event_record[
  317. CAM_ISP_CTX_EVENT_MAX][CAM_ISP_CTX_EVENT_RECORD_MAX_ENTRIES];
  318. bool rdi_only_context;
  319. bool offline_context;
  320. bool vfps_aux_context;
  321. bool resume_hw_in_flushed;
  322. bool hw_acquired;
  323. bool init_received;
  324. bool split_acquire;
  325. bool custom_enabled;
  326. bool use_frame_header_ts;
  327. bool support_consumed_addr;
  328. bool sof_dbg_irq_en;
  329. atomic_t apply_in_progress;
  330. atomic_t internal_recovery_set;
  331. bool use_default_apply;
  332. unsigned int init_timestamp;
  333. uint32_t isp_device_type;
  334. atomic_t rxd_epoch;
  335. struct cam_req_mgr_core_workq *workq;
  336. int32_t trigger_id;
  337. int64_t last_bufdone_err_apply_req_id;
  338. uint32_t v4l2_event_sub_ids;
  339. struct cam_hw_inject_evt_param evt_inject_params;
  340. bool aeb_enabled;
  341. uint64_t last_sof_jiffies;
  342. uint64_t last_applied_jiffies;
  343. struct cam_isp_context_comp_record *vfe_bus_comp_grp;
  344. struct cam_isp_context_comp_record *sfe_bus_comp_grp;
  345. int32_t mswitch_default_apply_delay_max_cnt;
  346. atomic_t mswitch_default_apply_delay_ref_cnt;
  347. bool handle_mswitch;
  348. bool mode_switch_en;
  349. };
  350. /**
  351. * struct cam_isp_context_dump_header - ISP context dump header
  352. * @tag: Tag name for the header
  353. * @word_size: Size of word
  354. * @size: Size of data
  355. *
  356. */
  357. struct cam_isp_context_dump_header {
  358. uint8_t tag[CAM_ISP_CONTEXT_DUMP_TAG_MAX_LEN];
  359. uint64_t size;
  360. uint32_t word_size;
  361. };
  362. /** * struct cam_isp_ctx_req_mini_dump - ISP mini dumprequest
  363. *
  364. * @map_out: Output fence mapping
  365. * @map_in: Input fence mapping
  366. * @io_cfg: IO buffer configuration
  367. * @reapply_type: Determines type of settings to be re-applied
  368. * @request_id: Request ID
  369. * @num_fence_map_out: Number of the output fence map
  370. * @num_fence_map_in: Number of input fence map
  371. * @num_io_cfg: Number of ISP hardware configuration entries
  372. * @num_acked: Count to track acked entried for output.
  373. * @num_deferred_acks: Number of buf_dones/acks that are deferred to
  374. * handle or signalled in special scenarios.
  375. * Increment this count instead of num_acked and
  376. * handle the events later where eventually
  377. * increment num_acked.
  378. * @bubble_report: Flag to track if bubble report is active on
  379. * current request
  380. * @bubble_detected: Flag to track if bubble is detected
  381. * @cdm_reset_before_apply: For bubble re-apply when buf done not coming set
  382. * to True
  383. *
  384. */
  385. struct cam_isp_ctx_req_mini_dump {
  386. struct cam_hw_fence_map_entry *map_out;
  387. struct cam_hw_fence_map_entry *map_in;
  388. struct cam_buf_io_cfg *io_cfg;
  389. enum cam_hw_config_reapply_type reapply_type;
  390. uint64_t request_id;
  391. uint8_t num_fence_map_in;
  392. uint8_t num_fence_map_out;
  393. uint8_t num_io_cfg;
  394. uint8_t num_acked;
  395. uint8_t num_deferred_acks;
  396. bool bubble_report;
  397. bool bubble_detected;
  398. bool cdm_reset_before_apply;
  399. };
  400. /**
  401. * struct cam_isp_ctx_mini_dump_info - Isp context mini dump data
  402. *
  403. * @active_list: Active Req list
  404. * @pending_list: Pending req list
  405. * @wait_list: Wait Req List
  406. * @event_record: Event record
  407. * @sof_timestamp_val: Captured time stamp value at sof hw event
  408. * @boot_timestamp: Boot time stamp for a given req_id
  409. * @last_sof_timestamp: SOF timestamp of the last frame
  410. * @init_timestamp: Timestamp at which this context is initialized
  411. * @frame_id: Frame id read every epoch for the ctx
  412. * @reported_req_id: Last reported request id
  413. * @last_applied_req_id: Last applied request id
  414. * @frame_id_meta: Frame id for meta
  415. * @ctx_id: Context id
  416. * @subscribe_event: The irq event mask that CRM subscribes to, IFE
  417. * will invoke CRM cb at those event.
  418. * @bubble_frame_cnt: Count of the frame after bubble
  419. * @isp_device_type: ISP device type
  420. * @active_req_cnt: Counter for the active request
  421. * @trigger_id: ID provided by CRM for each ctx on the link
  422. * @substate_actiavted: Current substate for the activated state.
  423. * @rxd_epoch: Indicate whether epoch has been received. Used to
  424. * decide whether to apply request in offline ctx
  425. * @process_bubble: Atomic variable to check if ctx is still
  426. * processing bubble.
  427. * @apply_in_progress Whether request apply is in progress
  428. * @rdi_only_context: Get context type information.
  429. * true, if context is rdi only context
  430. * @offline_context: Indicate whether context is for offline IFE
  431. * @hw_acquired: Indicate whether HW resources are acquired
  432. * @init_received: Indicate whether init config packet is received
  433. * meta from the sensor
  434. * @split_acquire: Indicate whether a separate acquire is expected
  435. * @custom_enabled: Custom HW enabled for this ctx
  436. * @use_frame_header_ts: Use frame header for qtimer ts
  437. * @support_consumed_addr: Indicate whether HW has last consumed addr reg
  438. * @use_default_apply: Use default settings in case of frame skip
  439. *
  440. */
  441. struct cam_isp_ctx_mini_dump_info {
  442. struct cam_isp_ctx_req_mini_dump *active_list;
  443. struct cam_isp_ctx_req_mini_dump *pending_list;
  444. struct cam_isp_ctx_req_mini_dump *wait_list;
  445. struct cam_isp_context_event_record event_record[
  446. CAM_ISP_CTX_EVENT_MAX][CAM_ISP_CTX_EVENT_RECORD_MAX_ENTRIES];
  447. uint64_t sof_timestamp_val;
  448. uint64_t boot_timestamp;
  449. uint64_t last_sof_timestamp;
  450. uint64_t init_timestamp;
  451. int64_t frame_id;
  452. int64_t reported_req_id;
  453. int64_t last_applied_req_id;
  454. int64_t last_bufdone_err_apply_req_id;
  455. uint32_t frame_id_meta;
  456. uint8_t ctx_id;
  457. uint8_t subscribe_event;
  458. uint8_t bubble_frame_cnt;
  459. uint8_t isp_device_type;
  460. uint8_t active_req_cnt;
  461. uint8_t trigger_id;
  462. uint8_t substate_activated;
  463. uint8_t rxd_epoch;
  464. uint8_t process_bubble;
  465. uint8_t active_cnt;
  466. uint8_t pending_cnt;
  467. uint8_t wait_cnt;
  468. bool apply_in_progress;
  469. bool rdi_only_context;
  470. bool offline_context;
  471. bool hw_acquired;
  472. bool init_received;
  473. bool split_acquire;
  474. bool custom_enabled;
  475. bool use_frame_header_ts;
  476. bool support_consumed_addr;
  477. bool use_default_apply;
  478. };
  479. /**
  480. * cam_isp_context_init()
  481. *
  482. * @brief: Initialization function for the ISP context
  483. *
  484. * @ctx: ISP context obj to be initialized
  485. * @bridge_ops: Bridge call back funciton
  486. * @hw_intf: ISP hw manager interface
  487. * @ctx_id: ID for this context
  488. * @isp_device_type Isp device type
  489. * @img_iommu_hdl IOMMU HDL for image buffers
  490. *
  491. */
  492. int cam_isp_context_init(struct cam_isp_context *ctx,
  493. struct cam_context *ctx_base,
  494. struct cam_req_mgr_kmd_ops *bridge_ops,
  495. struct cam_hw_mgr_intf *hw_intf,
  496. uint32_t ctx_id,
  497. uint32_t isp_device_type,
  498. int img_iommu_hdl);
  499. /**
  500. * cam_isp_context_deinit()
  501. *
  502. * @brief: Deinitialize function for the ISP context
  503. *
  504. * @ctx: ISP context obj to be deinitialized
  505. *
  506. */
  507. int cam_isp_context_deinit(struct cam_isp_context *ctx);
  508. #endif /* __CAM_ISP_CONTEXT_H__ */