mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: rockchip: vicap: fixes rv1126/rk3568 bt1120/bt656 buffer timestamp
due to rv1126/rk3566 dvp only support one channel of frame start interrupt, unable to obtain accurate timestamp for each channel, change it to use frame end time Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: I564a9235e684f5558d7cc8a1e2665952b750a9c0
This commit is contained in:
@@ -8586,7 +8586,11 @@ static void rkcif_buf_done_prepare(struct rkcif_stream *stream,
|
||||
|
||||
if (active_buf) {
|
||||
vb_done = &active_buf->vb;
|
||||
vb_done->vb2_buf.timestamp = stream->readout.fs_timestamp;
|
||||
if (cif_dev->chip_id < CHIP_RK3588_CIF &&
|
||||
cif_dev->active_sensor->mbus.type == V4L2_MBUS_BT656)
|
||||
vb_done->vb2_buf.timestamp = stream->readout.fe_timestamp;
|
||||
else
|
||||
vb_done->vb2_buf.timestamp = stream->readout.fs_timestamp;
|
||||
vb_done->sequence = stream->frame_idx - 1;
|
||||
active_buf->fe_timestamp = ktime_get_ns();
|
||||
if (stream->is_line_wake_up) {
|
||||
@@ -8907,6 +8911,10 @@ static void rkcif_update_stream(struct rkcif_device *cif_dev,
|
||||
if (ret && cif_dev->chip_id < CHIP_RK3588_CIF)
|
||||
return;
|
||||
}
|
||||
if (cif_dev->chip_id < CHIP_RK3588_CIF &&
|
||||
cif_dev->active_sensor->mbus.type == V4L2_MBUS_BT656 &&
|
||||
stream->id != 0)
|
||||
stream->frame_idx++;
|
||||
if (!stream->is_line_wake_up && stream->dma_en & RKCIF_DMAEN_BY_VICAP)
|
||||
rkcif_buf_done_prepare(stream, active_buf, mipi_id, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user