Loading drivers/cam_req_mgr/cam_req_mgr_core.c +16 −3 Original line number Diff line number Diff line Loading @@ -2078,7 +2078,9 @@ static int __cam_req_mgr_process_sof_freeze(void *priv, void *data) spin_lock_bh(&link->link_state_spin_lock); if ((link->watchdog) && (link->watchdog->pause_timer)) { CAM_INFO(CAM_CRM, "Watchdog Paused"); CAM_INFO(CAM_CRM, "link:%x watchdog paused, maybe stream on/off is delayed", link->link_hdl); spin_unlock_bh(&link->link_state_spin_lock); return rc; } Loading Loading @@ -3190,8 +3192,16 @@ static int cam_req_mgr_cb_notify_timer( rc = -EPERM; goto end; } if ((link->watchdog) && (!timer_data->state)) if (link->watchdog) { if (!timer_data->state) link->watchdog->pause_timer = true; else link->watchdog->pause_timer = false; crm_timer_reset(link->watchdog); CAM_DBG(CAM_CRM, "link %x pause_timer %d", link->link_hdl, link->watchdog->pause_timer); } spin_unlock_bh(&link->link_state_spin_lock); end: Loading Loading @@ -3238,6 +3248,7 @@ static int cam_req_mgr_cb_notify_stop( goto end; } crm_timer_reset(link->watchdog); link->watchdog->pause_timer = true; spin_unlock_bh(&link->link_state_spin_lock); task = cam_req_mgr_workq_get_task(link->workq); Loading Loading @@ -4286,6 +4297,8 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) link->link_hdl); rc = -EFAULT; } /* Pause the timer before sensor stream on */ link->watchdog->pause_timer = true; /* notify nodes */ for (j = 0; j < link->num_devs; j++) { dev = &link->l_dev[j]; Loading drivers/cam_sensor_module/cam_sensor/cam_sensor_core.c +16 −0 Original line number Diff line number Diff line Loading @@ -932,6 +932,7 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, break; } case CAM_START_DEV: { struct cam_req_mgr_timer_notify timer; if ((s_ctrl->sensor_state == CAM_SENSOR_INIT) || (s_ctrl->sensor_state == CAM_SENSOR_START)) { rc = -EINVAL; Loading @@ -952,6 +953,21 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, } } s_ctrl->sensor_state = CAM_SENSOR_START; if (s_ctrl->bridge_intf.crm_cb && s_ctrl->bridge_intf.crm_cb->notify_timer) { timer.link_hdl = s_ctrl->bridge_intf.link_hdl; timer.dev_hdl = s_ctrl->bridge_intf.device_hdl; timer.state = true; rc = s_ctrl->bridge_intf.crm_cb->notify_timer(&timer); if (rc) { CAM_ERR(CAM_SENSOR, "Enable CRM SOF freeze timer failed rc: %d", rc); return rc; } } CAM_INFO(CAM_SENSOR, "CAM_START_DEV Success, sensor_id:0x%x,sensor_slave_addr:0x%x", s_ctrl->sensordata->slave_info.sensor_id, Loading Loading
drivers/cam_req_mgr/cam_req_mgr_core.c +16 −3 Original line number Diff line number Diff line Loading @@ -2078,7 +2078,9 @@ static int __cam_req_mgr_process_sof_freeze(void *priv, void *data) spin_lock_bh(&link->link_state_spin_lock); if ((link->watchdog) && (link->watchdog->pause_timer)) { CAM_INFO(CAM_CRM, "Watchdog Paused"); CAM_INFO(CAM_CRM, "link:%x watchdog paused, maybe stream on/off is delayed", link->link_hdl); spin_unlock_bh(&link->link_state_spin_lock); return rc; } Loading Loading @@ -3190,8 +3192,16 @@ static int cam_req_mgr_cb_notify_timer( rc = -EPERM; goto end; } if ((link->watchdog) && (!timer_data->state)) if (link->watchdog) { if (!timer_data->state) link->watchdog->pause_timer = true; else link->watchdog->pause_timer = false; crm_timer_reset(link->watchdog); CAM_DBG(CAM_CRM, "link %x pause_timer %d", link->link_hdl, link->watchdog->pause_timer); } spin_unlock_bh(&link->link_state_spin_lock); end: Loading Loading @@ -3238,6 +3248,7 @@ static int cam_req_mgr_cb_notify_stop( goto end; } crm_timer_reset(link->watchdog); link->watchdog->pause_timer = true; spin_unlock_bh(&link->link_state_spin_lock); task = cam_req_mgr_workq_get_task(link->workq); Loading Loading @@ -4286,6 +4297,8 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control) link->link_hdl); rc = -EFAULT; } /* Pause the timer before sensor stream on */ link->watchdog->pause_timer = true; /* notify nodes */ for (j = 0; j < link->num_devs; j++) { dev = &link->l_dev[j]; Loading
drivers/cam_sensor_module/cam_sensor/cam_sensor_core.c +16 −0 Original line number Diff line number Diff line Loading @@ -932,6 +932,7 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, break; } case CAM_START_DEV: { struct cam_req_mgr_timer_notify timer; if ((s_ctrl->sensor_state == CAM_SENSOR_INIT) || (s_ctrl->sensor_state == CAM_SENSOR_START)) { rc = -EINVAL; Loading @@ -952,6 +953,21 @@ int32_t cam_sensor_driver_cmd(struct cam_sensor_ctrl_t *s_ctrl, } } s_ctrl->sensor_state = CAM_SENSOR_START; if (s_ctrl->bridge_intf.crm_cb && s_ctrl->bridge_intf.crm_cb->notify_timer) { timer.link_hdl = s_ctrl->bridge_intf.link_hdl; timer.dev_hdl = s_ctrl->bridge_intf.device_hdl; timer.state = true; rc = s_ctrl->bridge_intf.crm_cb->notify_timer(&timer); if (rc) { CAM_ERR(CAM_SENSOR, "Enable CRM SOF freeze timer failed rc: %d", rc); return rc; } } CAM_INFO(CAM_SENSOR, "CAM_START_DEV Success, sensor_id:0x%x,sensor_slave_addr:0x%x", s_ctrl->sensordata->slave_info.sensor_id, Loading