mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
media: rockchip: cif: fix report wrong log when checking hdr time
fix report wrong log when short time < middle time or middle time < long time Signed-off-by: Hu Kejun <william.hu@rock-chips.com> Change-Id: I7a9a17d82412d1a5b56488da3b6bcdf9f4f58dbf
This commit is contained in:
@@ -3497,6 +3497,14 @@ static void rkcif_rdbk_frame_end(struct rkcif_stream *stream)
|
||||
l_ts = dev->rdbk_buf[RDBK_L]->vb.vb2_buf.timestamp;
|
||||
m_ts = dev->rdbk_buf[RDBK_M]->vb.vb2_buf.timestamp;
|
||||
s_ts = dev->rdbk_buf[RDBK_S]->vb.vb2_buf.timestamp;
|
||||
|
||||
if (m_ts < l_ts || s_ts < m_ts) {
|
||||
v4l2_err(&dev->v4l2_dev,
|
||||
"s/m/l frame err, timestamp s:%lld m:%lld l:%lld\n",
|
||||
s_ts, m_ts, l_ts);
|
||||
goto RDBK_FRM_UNMATCH;
|
||||
}
|
||||
|
||||
if ((m_ts - l_ts) > time || (s_ts - m_ts) > time) {
|
||||
ret = v4l2_subdev_call(sensor->sd,
|
||||
video,
|
||||
@@ -3519,13 +3527,6 @@ static void rkcif_rdbk_frame_end(struct rkcif_stream *stream)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_ts < l_ts || s_ts < m_ts) {
|
||||
v4l2_err(&dev->v4l2_dev,
|
||||
"s/m/l frame err, timestamp s:%lld m:%lld l:%lld\n",
|
||||
s_ts, m_ts, l_ts);
|
||||
goto RDBK_FRM_UNMATCH;
|
||||
}
|
||||
|
||||
dev->rdbk_buf[RDBK_M]->vb.sequence = dev->rdbk_buf[RDBK_L]->vb.sequence;
|
||||
dev->rdbk_buf[RDBK_S]->vb.sequence = dev->rdbk_buf[RDBK_L]->vb.sequence;
|
||||
rkcif_vb_done_oneframe(stream, &dev->rdbk_buf[RDBK_L]->vb);
|
||||
@@ -3545,6 +3546,13 @@ static void rkcif_rdbk_frame_end(struct rkcif_stream *stream)
|
||||
l_ts = dev->rdbk_buf[RDBK_L]->vb.vb2_buf.timestamp;
|
||||
s_ts = dev->rdbk_buf[RDBK_M]->vb.vb2_buf.timestamp;
|
||||
|
||||
if (s_ts < l_ts) {
|
||||
v4l2_err(&dev->v4l2_dev,
|
||||
"s/l frame err, timestamp s:%lld l:%lld\n",
|
||||
s_ts, l_ts);
|
||||
goto RDBK_FRM_UNMATCH;
|
||||
}
|
||||
|
||||
if ((s_ts - l_ts) > time) {
|
||||
ret = v4l2_subdev_call(sensor->sd,
|
||||
video,
|
||||
@@ -3566,13 +3574,6 @@ static void rkcif_rdbk_frame_end(struct rkcif_stream *stream)
|
||||
}
|
||||
}
|
||||
|
||||
if (s_ts < l_ts) {
|
||||
v4l2_err(&dev->v4l2_dev,
|
||||
"s/l frame err, timestamp s:%lld l:%lld\n",
|
||||
s_ts, l_ts);
|
||||
goto RDBK_FRM_UNMATCH;
|
||||
}
|
||||
|
||||
dev->rdbk_buf[RDBK_M]->vb.sequence =
|
||||
dev->rdbk_buf[RDBK_L]->vb.sequence;
|
||||
rkcif_vb_done_oneframe(stream, &dev->rdbk_buf[RDBK_L]->vb);
|
||||
|
||||
Reference in New Issue
Block a user