Skip to content

Commit

Permalink
msm: camera: Always report real time timestamp
Browse files Browse the repository at this point in the history
Kernel will always report timestamp value in real time, also adding
in AV timer value if necessary.
HAL will do any necessary conversion to monotonic time.

CRs-fixed: 2054122
Change-Id: I40ff893a02090f73874da54cddf46801768231a3
Signed-off-by: Jason Lee <leejason@codeaurora.org>
  • Loading branch information
Jason Lee authored and jb-essential committed Aug 9, 2019
1 parent af6408f commit e4ced52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4021,7 +4021,7 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev,
msm_isp_get_avtimer_ts(ts);
time_stamp = &ts->vt_time;
} else {
time_stamp = &ts->buf_time;
time_stamp = &ts->event_time;
}

frame_id = vfe_dev->axi_data.
Expand Down
9 changes: 4 additions & 5 deletions drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,14 @@ void msm_isp_get_timestamp(struct msm_isp_timestamp *time_stamp,
{
struct timespec ts;

do_gettimeofday(&(time_stamp->event_time));
get_monotonic_boottime(&ts);
time_stamp->event_time.tv_sec = ts.tv_sec;
time_stamp->event_time.tv_usec = ts.tv_nsec / 1000;
time_stamp->buf_time = time_stamp->event_time;
if (vfe_dev->vt_enable) {
msm_isp_get_avtimer_ts(time_stamp);
time_stamp->buf_time.tv_sec = time_stamp->vt_time.tv_sec;
time_stamp->buf_time.tv_usec = time_stamp->vt_time.tv_usec;
} else {
get_monotonic_boottime(&ts);
time_stamp->buf_time.tv_sec = ts.tv_sec;
time_stamp->buf_time.tv_usec = ts.tv_nsec/1000;
}
}

Expand Down

0 comments on commit e4ced52

Please sign in to comment.