Loading drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +32 −31 Original line number Diff line number Diff line Loading @@ -5888,7 +5888,9 @@ static int cam_ife_mgr_cmd_get_sof_timestamp( struct cam_hw_intf *hw_intf; struct cam_csid_get_time_stamp_args csid_get_time; list_for_each_entry(hw_mgr_res, &ife_ctx->res_list_ife_csid, list) { hw_mgr_res = list_first_entry(&ife_ctx->res_list_ife_csid, struct cam_ife_hw_mgr_res, list); for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) { if (!hw_mgr_res->hw_res[i]) continue; Loading Loading @@ -5925,7 +5927,6 @@ static int cam_ife_mgr_cmd_get_sof_timestamp( } } } } if (rc) CAM_ERR_RATE_LIMIT(CAM_ISP, "Getting sof time stamp failed"); Loading drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +19 −3 Original line number Diff line number Diff line Loading @@ -534,6 +534,7 @@ static int cam_ife_csid_global_reset(struct cam_ife_csid_hw *csid_hw) CAM_ERR(CAM_ISP, "CSID:%d IRQ value after reset rc = %d", csid_hw->hw_intf->hw_idx, val); csid_hw->error_irq_count = 0; csid_hw->prev_boot_timestamp = 0; return rc; } Loading Loading @@ -1329,6 +1330,7 @@ static int cam_ife_csid_disable_hw(struct cam_ife_csid_hw *csid_hw) spin_unlock_irqrestore(&csid_hw->lock_state, flags); csid_hw->hw_info->hw_state = CAM_HW_STATE_POWER_DOWN; csid_hw->error_irq_count = 0; csid_hw->prev_boot_timestamp = 0; return rc; } Loading Loading @@ -2928,6 +2930,7 @@ static int cam_ife_csid_get_time_stamp( const struct cam_ife_csid_udi_reg_offset *udi_reg; struct timespec64 ts; uint32_t time_32, id; uint64_t time_delta; time_stamp = (struct cam_csid_get_time_stamp_args *)cmd_args; res = time_stamp->node_res; Loading Loading @@ -2999,9 +3002,22 @@ static int cam_ife_csid_get_time_stamp( CAM_IFE_CSID_QTIMER_MUL_FACTOR, CAM_IFE_CSID_QTIMER_DIV_FACTOR); if (!csid_hw->prev_boot_timestamp) { get_monotonic_boottime64(&ts); time_stamp->boot_timestamp = (uint64_t)((ts.tv_sec * 1000000000) + time_stamp->boot_timestamp = (uint64_t)((ts.tv_sec * 1000000000) + ts.tv_nsec); csid_hw->prev_qtimer_ts = 0; CAM_DBG(CAM_ISP, "timestamp:%lld", time_stamp->boot_timestamp); } else { time_delta = time_stamp->time_stamp_val - csid_hw->prev_qtimer_ts; time_stamp->boot_timestamp = csid_hw->prev_boot_timestamp + time_delta; } csid_hw->prev_qtimer_ts = time_stamp->time_stamp_val; csid_hw->prev_boot_timestamp = time_stamp->boot_timestamp; return 0; } Loading drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.h +4 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,8 @@ struct cam_ife_csid_path_cfg { * @binning_enable Flag is set if hardware supports QCFA binning * @binning_supported Flag is set if sensor supports QCFA binning * * @first_sof_ts first bootime stamp at the start * @prev_qtimer_ts stores csid timestamp */ struct cam_ife_csid_hw { struct cam_hw_intf *hw_intf; Loading Loading @@ -581,6 +583,8 @@ struct cam_ife_csid_hw { spinlock_t lock_state; uint32_t binning_enable; uint32_t binning_supported; uint64_t prev_boot_timestamp; uint64_t prev_qtimer_ts; }; int cam_ife_csid_hw_probe_init(struct cam_hw_intf *csid_hw_intf, Loading Loading
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +32 −31 Original line number Diff line number Diff line Loading @@ -5888,7 +5888,9 @@ static int cam_ife_mgr_cmd_get_sof_timestamp( struct cam_hw_intf *hw_intf; struct cam_csid_get_time_stamp_args csid_get_time; list_for_each_entry(hw_mgr_res, &ife_ctx->res_list_ife_csid, list) { hw_mgr_res = list_first_entry(&ife_ctx->res_list_ife_csid, struct cam_ife_hw_mgr_res, list); for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) { if (!hw_mgr_res->hw_res[i]) continue; Loading Loading @@ -5925,7 +5927,6 @@ static int cam_ife_mgr_cmd_get_sof_timestamp( } } } } if (rc) CAM_ERR_RATE_LIMIT(CAM_ISP, "Getting sof time stamp failed"); Loading
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +19 −3 Original line number Diff line number Diff line Loading @@ -534,6 +534,7 @@ static int cam_ife_csid_global_reset(struct cam_ife_csid_hw *csid_hw) CAM_ERR(CAM_ISP, "CSID:%d IRQ value after reset rc = %d", csid_hw->hw_intf->hw_idx, val); csid_hw->error_irq_count = 0; csid_hw->prev_boot_timestamp = 0; return rc; } Loading Loading @@ -1329,6 +1330,7 @@ static int cam_ife_csid_disable_hw(struct cam_ife_csid_hw *csid_hw) spin_unlock_irqrestore(&csid_hw->lock_state, flags); csid_hw->hw_info->hw_state = CAM_HW_STATE_POWER_DOWN; csid_hw->error_irq_count = 0; csid_hw->prev_boot_timestamp = 0; return rc; } Loading Loading @@ -2928,6 +2930,7 @@ static int cam_ife_csid_get_time_stamp( const struct cam_ife_csid_udi_reg_offset *udi_reg; struct timespec64 ts; uint32_t time_32, id; uint64_t time_delta; time_stamp = (struct cam_csid_get_time_stamp_args *)cmd_args; res = time_stamp->node_res; Loading Loading @@ -2999,9 +3002,22 @@ static int cam_ife_csid_get_time_stamp( CAM_IFE_CSID_QTIMER_MUL_FACTOR, CAM_IFE_CSID_QTIMER_DIV_FACTOR); if (!csid_hw->prev_boot_timestamp) { get_monotonic_boottime64(&ts); time_stamp->boot_timestamp = (uint64_t)((ts.tv_sec * 1000000000) + time_stamp->boot_timestamp = (uint64_t)((ts.tv_sec * 1000000000) + ts.tv_nsec); csid_hw->prev_qtimer_ts = 0; CAM_DBG(CAM_ISP, "timestamp:%lld", time_stamp->boot_timestamp); } else { time_delta = time_stamp->time_stamp_val - csid_hw->prev_qtimer_ts; time_stamp->boot_timestamp = csid_hw->prev_boot_timestamp + time_delta; } csid_hw->prev_qtimer_ts = time_stamp->time_stamp_val; csid_hw->prev_boot_timestamp = time_stamp->boot_timestamp; return 0; } Loading
drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.h +4 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,8 @@ struct cam_ife_csid_path_cfg { * @binning_enable Flag is set if hardware supports QCFA binning * @binning_supported Flag is set if sensor supports QCFA binning * * @first_sof_ts first bootime stamp at the start * @prev_qtimer_ts stores csid timestamp */ struct cam_ife_csid_hw { struct cam_hw_intf *hw_intf; Loading Loading @@ -581,6 +583,8 @@ struct cam_ife_csid_hw { spinlock_t lock_state; uint32_t binning_enable; uint32_t binning_supported; uint64_t prev_boot_timestamp; uint64_t prev_qtimer_ts; }; int cam_ife_csid_hw_probe_init(struct cam_hw_intf *csid_hw_intf, Loading