From d5df78a0e3522b3fefc836a7338db94ef8f8284f Mon Sep 17 00:00:00 2001 From: Gary Bisson Date: Fri, 16 Aug 2019 08:42:00 +0200 Subject: [PATCH] Revert "msm: camera: Always report real time timestamp" This reverts commit e4ced521129f56249ae000bfc138e60dffe5a9b8. Change-Id: Iae3427d52222130ebc2100bbc9521bc21a3f7db5 --- .../media/platform/msm/camera_v2/isp/msm_isp_axi_util.c | 2 +- drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c index f724daea0805..86cdfec7ed8b 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c @@ -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->event_time; + time_stamp = &ts->buf_time; } frame_id = vfe_dev->axi_data. diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c index 6900c1d16cb0..e87f2414a879 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c @@ -208,14 +208,15 @@ void msm_isp_get_timestamp(struct msm_isp_timestamp *time_stamp, { struct timespec ts; - 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; + do_gettimeofday(&(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; } }