|
@@ -264,7 +264,6 @@ struct cam_req_mgr_req_tbl {
|
|
|
* @recover : if user enabled recovery for this request.
|
|
|
* @req_id : mask tracking which all devices have request ready
|
|
|
* @sync_mode : Modified sync mode in which req id in this slot has to applied
|
|
|
- * @real_sync_mode : Actual sync mode in which req id in this slot has to applied
|
|
|
* @additional_timeout : Adjusted watchdog timeout value associated with
|
|
|
* this request
|
|
|
*/
|
|
@@ -275,7 +274,6 @@ struct cam_req_mgr_slot {
|
|
|
int32_t recover;
|
|
|
int64_t req_id;
|
|
|
int32_t sync_mode;
|
|
|
- int32_t real_sync_mode;
|
|
|
int32_t additional_timeout;
|
|
|
};
|
|
|
|
|
@@ -334,6 +332,48 @@ struct cam_req_mgr_connected_device {
|
|
|
void *parent;
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * struct cam_req_mgr_sof_time
|
|
|
+ * - Frame sof time in ns
|
|
|
+ * @csid_timestamp_ns : CSID SOF timestamp value
|
|
|
+ * @prev_csid_timestamp_ns : Previous CSID SOF timestamp value
|
|
|
+ * @boottime_ns : SOF Boottime value
|
|
|
+ * @last_sof_trigger_jiffies : Record the jiffies of last sof trigger jiffies
|
|
|
+ */
|
|
|
+struct cam_req_mgr_sof_time {
|
|
|
+ uint64_t boottime_ns;
|
|
|
+ uint64_t csid_timestamp_ns;
|
|
|
+ uint64_t prev_csid_timestamp_ns;
|
|
|
+ uint64_t last_sof_trigger_jiffies;
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * struct cam_req_mgr_sync_data
|
|
|
+ * - Sync link data and properties
|
|
|
+ * @num_sync_link : total number of sync links
|
|
|
+ * @sync_link : array of pointer to the sync link for synchronization
|
|
|
+ * @initial_sync_req : The initial req which is required to sync with the
|
|
|
+ * other link
|
|
|
+ * @modified_init_sync_req : Modified initial req which is required to sync
|
|
|
+ * with the other link
|
|
|
+ * @sync_link_sof_skip : flag determines if a pkt is not available for a given
|
|
|
+ * frame in a particular link skip corresponding
|
|
|
+ * frame in sync link as well.
|
|
|
+ * @sync_frame_id : current frame id of sync link
|
|
|
+ * @sof_time : sof timing value in different format
|
|
|
+ * @is_sync_req : flag used for deciding sync and non-sync
|
|
|
+ */
|
|
|
+struct cam_req_mgr_sync_data {
|
|
|
+ int32_t num_sync_link;
|
|
|
+ struct cam_req_mgr_core_link *sync_link[MAXIMUM_LINKS_PER_SESSION];
|
|
|
+ int64_t initial_sync_req;
|
|
|
+ int64_t modified_init_sync_req;
|
|
|
+ bool sync_link_sof_skip;
|
|
|
+ uint64_t sync_frame_id;
|
|
|
+ struct cam_req_mgr_sof_time sof_time;
|
|
|
+ bool is_sync_req;
|
|
|
+};
|
|
|
+
|
|
|
/**
|
|
|
* struct cam_req_mgr_core_link
|
|
|
* - Link Properties
|
|
@@ -357,11 +397,7 @@ struct cam_req_mgr_connected_device {
|
|
|
* @parent : pvt data - link's parent is session
|
|
|
* @lock : mutex lock to guard link data operations
|
|
|
* @link_state_spin_lock : spin lock to protect link state variable
|
|
|
- * @sync_link : array of pointer to the sync link for synchronization
|
|
|
- * @num_sync_link : total number of sync links
|
|
|
- * @sync_link_sof_skip : flag determines if a pkt is not available for a given
|
|
|
- * frame in a particular link skip corresponding
|
|
|
- * frame in sync link as well.
|
|
|
+ * @sync_data : sync data datails needed in sync mode
|
|
|
* @open_req_cnt : Counter to keep track of open requests that are yet
|
|
|
* to be serviced in the kernel.
|
|
|
* @last_flush_id : Last request to flush
|
|
@@ -370,29 +406,20 @@ struct cam_req_mgr_connected_device {
|
|
|
* is assigned as master
|
|
|
* @initial_skip : Flag to determine if initial req need to skip for
|
|
|
* diff pd
|
|
|
- * @is_sync_req : flag used for deciding sync and non-sync
|
|
|
* @in_msync_mode : Flag to determine if a link is in master-slave mode
|
|
|
- * @initial_sync_req : The initial req which is required to sync with the
|
|
|
- * other link
|
|
|
- * @modified_init_sync_req : Modified initial req which is required to sync
|
|
|
- * with the other link
|
|
|
* @retry_cnt : Counter that tracks number of attempts to apply
|
|
|
* the same req
|
|
|
* @is_shutdown : Flag to indicate if link needs to be disconnected
|
|
|
* as part of shutdown.
|
|
|
- * @sof_timestamp_value : SOF timestamp value
|
|
|
- * @prev_sof_timestamp : Previous SOF timestamp value
|
|
|
* @dual_trigger : Links needs to wait for two triggers prior to
|
|
|
* applying the settings
|
|
|
* @trigger_cnt : trigger count value per device initiating the trigger
|
|
|
* @eof_event_cnt : Atomic variable to track the number of EOF requests
|
|
|
* @skip_init_frame : skip initial frames crm_wd_timer validation in the
|
|
|
* case of long exposure use case
|
|
|
- * @last_sof_trigger_jiffies : Record the jiffies of last sof trigger jiffies
|
|
|
* @wq_congestion : Indicates if WQ congestion is detected or not
|
|
|
* @activate_seq : sequence in which link is activated
|
|
|
* @frame_id : current frame id
|
|
|
- * @sync_frame_id : current frame id of sync link
|
|
|
* @bubble_skip : req to skip on bubble
|
|
|
* @num_isp_dev : number of isp dev in a link
|
|
|
* @retry_threshold : number of times to retry apply on increased threshold
|
|
@@ -413,38 +440,27 @@ struct cam_req_mgr_core_link {
|
|
|
void *parent;
|
|
|
struct mutex lock;
|
|
|
spinlock_t link_state_spin_lock;
|
|
|
- struct cam_req_mgr_core_link *sync_link[
|
|
|
- MAXIMUM_LINKS_PER_SESSION];
|
|
|
- int32_t num_sync_link;
|
|
|
- bool sync_link_sof_skip;
|
|
|
+ struct cam_req_mgr_sync_data sync_data;
|
|
|
uint32_t open_req_cnt;
|
|
|
uint32_t last_flush_id;
|
|
|
atomic_t is_used;
|
|
|
bool is_master;
|
|
|
uint32_t initial_skip;
|
|
|
- bool is_sync_req;
|
|
|
bool in_msync_mode;
|
|
|
- int64_t initial_sync_req;
|
|
|
- int64_t modified_init_sync_req;
|
|
|
uint32_t retry_cnt;
|
|
|
bool is_shutdown;
|
|
|
- uint64_t sof_boottime;
|
|
|
- uint64_t sof_timestamp;
|
|
|
- uint64_t prev_sof_timestamp;
|
|
|
bool dual_trigger;
|
|
|
uint32_t trigger_cnt[CAM_REQ_MGR_MAX_TRIGGERS][CAM_TRIGGER_MAX_POINTS];
|
|
|
atomic_t eof_event_cnt;
|
|
|
bool skip_init_frame;
|
|
|
- uint64_t last_sof_trigger_jiffies;
|
|
|
bool wq_congestion;
|
|
|
int32_t activate_seq;
|
|
|
uint64_t frame_id;
|
|
|
- uint64_t sync_frame_id;
|
|
|
int32_t bubble_skip;
|
|
|
bool skip_sync_apply;
|
|
|
uint32_t num_isp_dev;
|
|
|
uint32_t retry_threshold;
|
|
|
- uint32_t fps;
|
|
|
+ int32_t fps;
|
|
|
};
|
|
|
|
|
|
/**
|