Merge "msm: camera: isp: Fix boot ts when custom is enabled" into camera-kernel.lnx.4.0
Esse commit está contido em:

commit de
Gerrit - the friendly Code Review server

commit
858f2b2249
@@ -7518,6 +7518,7 @@ static int cam_ife_hw_mgr_handle_hw_sof(
|
||||
struct cam_ife_hw_mgr_ctx *ife_hw_mgr_ctx = ctx;
|
||||
cam_hw_event_cb_func ife_hw_irq_sof_cb;
|
||||
struct cam_isp_hw_sof_event_data sof_done_event_data;
|
||||
struct timespec64 ts;
|
||||
|
||||
memset(&sof_done_event_data, 0, sizeof(sof_done_event_data));
|
||||
|
||||
@@ -7527,20 +7528,27 @@ static int cam_ife_hw_mgr_handle_hw_sof(
|
||||
switch (event_info->res_id) {
|
||||
case CAM_ISP_HW_VFE_IN_CAMIF:
|
||||
case CAM_ISP_HW_VFE_IN_RD:
|
||||
if (ife_hw_mgr_ctx->is_offline)
|
||||
cam_ife_hw_mgr_get_offline_sof_timestamp(
|
||||
/* if frame header is enabled reset qtimer ts */
|
||||
if (ife_hw_mgr_ctx->custom_config &
|
||||
CAM_IFE_CUSTOM_CFG_FRAME_HEADER_TS) {
|
||||
sof_done_event_data.timestamp = 0x0;
|
||||
ktime_get_boottime_ts64(&ts);
|
||||
sof_done_event_data.boot_time =
|
||||
(uint64_t)((ts.tv_sec * 1000000000) +
|
||||
ts.tv_nsec);
|
||||
CAM_DBG(CAM_ISP, "boot_time 0x%llx",
|
||||
sof_done_event_data.boot_time);
|
||||
} else {
|
||||
if (ife_hw_mgr_ctx->is_offline)
|
||||
cam_ife_hw_mgr_get_offline_sof_timestamp(
|
||||
&sof_done_event_data.timestamp,
|
||||
&sof_done_event_data.boot_time);
|
||||
else
|
||||
cam_ife_mgr_cmd_get_sof_timestamp(
|
||||
else
|
||||
cam_ife_mgr_cmd_get_sof_timestamp(
|
||||
ife_hw_mgr_ctx,
|
||||
&sof_done_event_data.timestamp,
|
||||
&sof_done_event_data.boot_time);
|
||||
|
||||
/* if frame header is enabled reset qtimer ts */
|
||||
if (ife_hw_mgr_ctx->custom_config &
|
||||
CAM_IFE_CUSTOM_CFG_FRAME_HEADER_TS)
|
||||
sof_done_event_data.timestamp = 0x0;
|
||||
}
|
||||
|
||||
if (atomic_read(&ife_hw_mgr_ctx->overflow_pending))
|
||||
break;
|
||||
|
@@ -3111,7 +3111,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;
|
||||
uint64_t time_delta = 0;
|
||||
|
||||
time_stamp = (struct cam_csid_get_time_stamp_args *)cmd_args;
|
||||
res = time_stamp->node_res;
|
||||
@@ -3196,6 +3196,8 @@ static int cam_ife_csid_get_time_stamp(
|
||||
csid_hw->prev_qtimer_ts;
|
||||
time_stamp->boot_timestamp =
|
||||
csid_hw->prev_boot_timestamp + time_delta;
|
||||
if (time_delta == 0)
|
||||
CAM_WARN(CAM_ISP, "No qtimer update");
|
||||
}
|
||||
csid_hw->prev_qtimer_ts = time_stamp->time_stamp_val;
|
||||
csid_hw->prev_boot_timestamp = time_stamp->boot_timestamp;
|
||||
|
Referência em uma nova issue
Block a user