msm: camera: Copy the frame_id from the diverted frame.
When a frame diverted to daemon for postprocessing is being sent to user, copy the frame_id from the diverted frame along with the timestamp information. Otherwise user will not be able to match this frame with other frames based on its frame_id. Change-Id: I1d2ed83361ca90e89d27925830cae08226d05483 Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org> Signed-off-by: Ninad Patgaonkar <ninadp@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
eb62561c59
commit
ddf4eef1c2
@@ -210,11 +210,13 @@ struct msm_cam_return_frame_info {
|
||||
int dirty;
|
||||
int node_type;
|
||||
struct timeval timestamp;
|
||||
uint32_t frame_id;
|
||||
};
|
||||
|
||||
struct msm_cam_timestamp {
|
||||
uint8_t present;
|
||||
struct timeval timestamp;
|
||||
uint32_t frame_id;
|
||||
};
|
||||
|
||||
struct msm_cam_buf_map_info {
|
||||
|
||||
@@ -434,10 +434,11 @@ int msm_mctl_buf_done_proc(
|
||||
D("%s Copying timestamp as %ld.%ld", __func__,
|
||||
cam_ts->timestamp.tv_sec, cam_ts->timestamp.tv_usec);
|
||||
buf->vidbuf.v4l2_buf.timestamp = cam_ts->timestamp;
|
||||
buf->vidbuf.v4l2_buf.sequence = cam_ts->frame_id;
|
||||
}
|
||||
CDBG("In Buf_done:Notify user frame id %d img mode %d\n",
|
||||
buf->vidbuf.v4l2_buf.sequence,
|
||||
pcam_inst->image_mode);
|
||||
D("%s Notify user about buffer %d image_mode %d frame_id %d", __func__,
|
||||
buf->vidbuf.v4l2_buf.index, pcam_inst->image_mode,
|
||||
buf->vidbuf.v4l2_buf.sequence);
|
||||
vb2_buffer_done(&buf->vidbuf, VB2_BUF_STATE_DONE);
|
||||
return 0;
|
||||
}
|
||||
@@ -812,6 +813,7 @@ int msm_mctl_buf_done_pp(struct msm_cam_media_controller *pmctl,
|
||||
__func__, pcam_inst, frame->ch_paddr[0], ret_frame->dirty);
|
||||
cam_ts.present = 1;
|
||||
cam_ts.timestamp = ret_frame->timestamp;
|
||||
cam_ts.frame_id = ret_frame->frame_id;
|
||||
if (ret_frame->dirty)
|
||||
/* the frame is dirty, not going to disptach to app */
|
||||
rc = msm_mctl_release_free_buf(pmctl, pcam_inst, frame);
|
||||
|
||||
@@ -636,6 +636,9 @@ int msm_mctl_pp_done(
|
||||
ret_frame.dirty = dirty;
|
||||
ret_frame.node_type = 0;
|
||||
ret_frame.timestamp = frame.timestamp;
|
||||
ret_frame.frame_id = frame.frame_id;
|
||||
D("%s frame_id: %d buffer idx %d\n", __func__,
|
||||
frame.frame_id, frame.buf_idx);
|
||||
rc = msm_mctl_buf_done_pp(p_mctl, &buf_handle, &buf, &ret_frame);
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user