Hi forever3000,
Please try following patch to your vi driver and give out the log.
Also, please remember to turn off console log. It would influence the result.
sudo dmesg --console-off
---
drivers/media/platform/tegra/camera/vi/channel.c | 2 ++
drivers/media/platform/tegra/camera/vi/vi4_fops.c | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/drivers/media/platform/tegra/camera/vi/channel.c b/drivers/media/platform/tegra/camera/vi/channel.c
index 170a4dd..6e27c9c 100644
--- a/drivers/media/platform/tegra/camera/vi/channel.c
+++ b/drivers/media/platform/tegra/camera/vi/channel.c
@@ -328,6 +328,8 @@ void free_ring_buffers(struct tegra_channel *chan, int frames)
chan->buffer_state[chan->free_index] =
VB2_BUF_STATE_ERROR;
#endif
+ pr_err("Jerry %s dev[%p] vb2_buf[%p] sequence[%d] timestamp= %ld.%ld Line(%d)\n", __func__, chan->vi->ndev, chan->buffers[chan->free_index], vbuf->sequence, vbuf->timestamp.tv_sec, vbuf->timestamp.tv_usec, __LINE__);
+
vb2_buffer_done(&vbuf->vb2_buf,
chan->buffer_state[chan->free_index++]);
diff --git a/drivers/media/platform/tegra/camera/vi/vi4_fops.c b/drivers/media/platform/tegra/camera/vi/vi4_fops.c
index f5e0620..9c1134d 100644
--- a/drivers/media/platform/tegra/camera/vi/vi4_fops.c
+++ b/drivers/media/platform/tegra/camera/vi/vi4_fops.c
@@ -182,9 +182,12 @@ static bool vi_notify_wait(struct tegra_channel *chan,
* Use the syncpt max value we just set as threshold
*/
for (i = 0; i < chan->valid_ports; i++) {
+ pr_err("Jerry %s dev[%p] vb2_buf[%p] SOF_SYNCPT_IDX++ Line(%d)\n", __func__, chan->vi->ndev, chan->buffers[chan->free_index], __LINE__);
err = nvhost_syncpt_wait_timeout_ext(chan->vi->ndev,
chan->syncpt[i][SOF_SYNCPT_IDX], thresh[i],
250, NULL, NULL);
+ pr_err("Jerry %s dev[%p] vb2_buf[%p] SOF_SYNCPT_IDX-- Line(%d)\n", __func__, chan->vi->ndev, chan->buffers[chan->free_index], __LINE__);
+
if (unlikely(err))
dev_err(chan->vi->dev,
"PXL_SOF syncpt timeout! err = %d\n", err);
@@ -513,7 +516,9 @@ static int tegra_channel_capture_frame(struct tegra_channel *chan,
}
/* wait for vi notifier events */
+ pr_err("Jerry %s dev[%p] vb2_buf[%p]++ Line(%d)\n", __func__, chan->vi->ndev, chan->buffers[chan->free_index], __LINE__);
vi_notify_wait(chan, &ts);
+ pr_err("Jerry %s dev[%p] vb2_buf[%p]-- Line(%d)\n", __func__, chan->vi->ndev, chan->buffers[chan->free_index], __LINE__);
vi4_check_status(chan);
--
2.1.4