cam_isp_context.h 23 KB

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