Loading drivers/cam_req_mgr/cam_req_mgr_core.c +18 −4 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ void cam_req_mgr_core_link_reset(struct cam_req_mgr_core_link *link) link->initial_skip = true; link->sof_timestamp = 0; link->prev_sof_timestamp = 0; link->skip_wd_validation = false; } void cam_req_mgr_handle_core_shutdown(void) Loading Loading @@ -521,6 +522,13 @@ static void __cam_req_mgr_validate_crm_wd_timer( int next_frame_timeout = 0, current_frame_timeout = 0; struct cam_req_mgr_req_queue *in_q = link->req.in_q; if (link->skip_wd_validation) { CAM_DBG(CAM_CRM, "skipping modifying wd timer for first frame after streamon"); link->skip_wd_validation = false; return; } idx = in_q->rd_idx; __cam_req_mgr_dec_idx( &idx, (link->max_delay - 1), Loading @@ -538,6 +546,7 @@ static void __cam_req_mgr_validate_crm_wd_timer( CAM_DBG(CAM_CRM, "rd_idx: %d idx: %d current_frame_timeout: %d ms", in_q->rd_idx, idx, current_frame_timeout); spin_lock_bh(&link->link_state_spin_lock); if (link->watchdog) { if ((next_frame_timeout + CAM_REQ_MGR_WATCHDOG_TIMEOUT) > Loading @@ -559,8 +568,8 @@ static void __cam_req_mgr_validate_crm_wd_timer( crm_timer_modify(link->watchdog, current_frame_timeout + CAM_REQ_MGR_WATCHDOG_TIMEOUT); } else if (link->watchdog->expires > CAM_REQ_MGR_WATCHDOG_TIMEOUT) { } else if (!next_frame_timeout && (link->watchdog->expires > CAM_REQ_MGR_WATCHDOG_TIMEOUT)) { CAM_DBG(CAM_CRM, "Reset wd timer to default from %d ms to %d ms", link->watchdog->expires, Loading Loading @@ -3895,6 +3904,7 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) struct cam_req_mgr_connected_device *dev = NULL; struct cam_req_mgr_link_evt_data evt_data; int init_timeout = 0; if (!control) { CAM_ERR(CAM_CRM, "Control command is NULL"); Loading Loading @@ -3926,10 +3936,13 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) spin_lock_bh(&link->link_state_spin_lock); link->state = CAM_CRM_LINK_STATE_READY; spin_unlock_bh(&link->link_state_spin_lock); if (control->init_timeout[i]) link->skip_wd_validation = true; init_timeout = (2 * control->init_timeout[i]); /* Start SOF watchdog timer */ rc = crm_timer_init(&link->watchdog, CAM_REQ_MGR_WATCHDOG_TIMEOUT, link, &__cam_req_mgr_sof_freeze); (init_timeout + CAM_REQ_MGR_WATCHDOG_TIMEOUT), link, &__cam_req_mgr_sof_freeze); if (rc < 0) { CAM_ERR(CAM_CRM, "SOF timer start fails: link=0x%x", Loading Loading @@ -3960,6 +3973,7 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) /* Destroy SOF watchdog timer */ spin_lock_bh(&link->link_state_spin_lock); link->state = CAM_CRM_LINK_STATE_IDLE; link->skip_wd_validation = false; crm_timer_exit(&link->watchdog); spin_unlock_bh(&link->link_state_spin_lock); } else { Loading drivers/cam_req_mgr/cam_req_mgr_core.h +3 −0 Original line number Diff line number Diff line Loading @@ -349,6 +349,8 @@ struct cam_req_mgr_connected_device { * @dual_trigger : Links needs to wait for two triggers prior to * applying the settings * @trigger_cnt : trigger count value per device initiating the trigger * @skip_wd_validation : skip initial frames crm_wd_timer validation in the * case of long exposure use case */ struct cam_req_mgr_core_link { int32_t link_hdl; Loading Loading @@ -381,6 +383,7 @@ struct cam_req_mgr_core_link { uint64_t prev_sof_timestamp; bool dual_trigger; uint32_t trigger_cnt[CAM_REQ_MGR_MAX_TRIGGERS]; bool skip_wd_validation; }; Loading Loading
drivers/cam_req_mgr/cam_req_mgr_core.c +18 −4 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ void cam_req_mgr_core_link_reset(struct cam_req_mgr_core_link *link) link->initial_skip = true; link->sof_timestamp = 0; link->prev_sof_timestamp = 0; link->skip_wd_validation = false; } void cam_req_mgr_handle_core_shutdown(void) Loading Loading @@ -521,6 +522,13 @@ static void __cam_req_mgr_validate_crm_wd_timer( int next_frame_timeout = 0, current_frame_timeout = 0; struct cam_req_mgr_req_queue *in_q = link->req.in_q; if (link->skip_wd_validation) { CAM_DBG(CAM_CRM, "skipping modifying wd timer for first frame after streamon"); link->skip_wd_validation = false; return; } idx = in_q->rd_idx; __cam_req_mgr_dec_idx( &idx, (link->max_delay - 1), Loading @@ -538,6 +546,7 @@ static void __cam_req_mgr_validate_crm_wd_timer( CAM_DBG(CAM_CRM, "rd_idx: %d idx: %d current_frame_timeout: %d ms", in_q->rd_idx, idx, current_frame_timeout); spin_lock_bh(&link->link_state_spin_lock); if (link->watchdog) { if ((next_frame_timeout + CAM_REQ_MGR_WATCHDOG_TIMEOUT) > Loading @@ -559,8 +568,8 @@ static void __cam_req_mgr_validate_crm_wd_timer( crm_timer_modify(link->watchdog, current_frame_timeout + CAM_REQ_MGR_WATCHDOG_TIMEOUT); } else if (link->watchdog->expires > CAM_REQ_MGR_WATCHDOG_TIMEOUT) { } else if (!next_frame_timeout && (link->watchdog->expires > CAM_REQ_MGR_WATCHDOG_TIMEOUT)) { CAM_DBG(CAM_CRM, "Reset wd timer to default from %d ms to %d ms", link->watchdog->expires, Loading Loading @@ -3895,6 +3904,7 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) struct cam_req_mgr_connected_device *dev = NULL; struct cam_req_mgr_link_evt_data evt_data; int init_timeout = 0; if (!control) { CAM_ERR(CAM_CRM, "Control command is NULL"); Loading Loading @@ -3926,10 +3936,13 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) spin_lock_bh(&link->link_state_spin_lock); link->state = CAM_CRM_LINK_STATE_READY; spin_unlock_bh(&link->link_state_spin_lock); if (control->init_timeout[i]) link->skip_wd_validation = true; init_timeout = (2 * control->init_timeout[i]); /* Start SOF watchdog timer */ rc = crm_timer_init(&link->watchdog, CAM_REQ_MGR_WATCHDOG_TIMEOUT, link, &__cam_req_mgr_sof_freeze); (init_timeout + CAM_REQ_MGR_WATCHDOG_TIMEOUT), link, &__cam_req_mgr_sof_freeze); if (rc < 0) { CAM_ERR(CAM_CRM, "SOF timer start fails: link=0x%x", Loading Loading @@ -3960,6 +3973,7 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) /* Destroy SOF watchdog timer */ spin_lock_bh(&link->link_state_spin_lock); link->state = CAM_CRM_LINK_STATE_IDLE; link->skip_wd_validation = false; crm_timer_exit(&link->watchdog); spin_unlock_bh(&link->link_state_spin_lock); } else { Loading
drivers/cam_req_mgr/cam_req_mgr_core.h +3 −0 Original line number Diff line number Diff line Loading @@ -349,6 +349,8 @@ struct cam_req_mgr_connected_device { * @dual_trigger : Links needs to wait for two triggers prior to * applying the settings * @trigger_cnt : trigger count value per device initiating the trigger * @skip_wd_validation : skip initial frames crm_wd_timer validation in the * case of long exposure use case */ struct cam_req_mgr_core_link { int32_t link_hdl; Loading Loading @@ -381,6 +383,7 @@ struct cam_req_mgr_core_link { uint64_t prev_sof_timestamp; bool dual_trigger; uint32_t trigger_cnt[CAM_REQ_MGR_MAX_TRIGGERS]; bool skip_wd_validation; }; Loading