In the R32.4.3 BSP kernel sources , I see that vi4 has a low-latency mode, which should improve the real-time performance of the system. Does vi5 have a corresponding mode? It is measured that there is a delay of about 100ms when using vi5 to transport images.
here is the low-latency mode code in vi4_fops.c:
chan->sequence = 0;
chan->timeout = msecs_to_jiffies(200);
if (!chan->low_latency)///////*CONFIG LOW LATENCY*
tegra_channel_init_ring_buffer(chan);
INIT_WORK(&chan->error_work, tegra_channel_error_worker);
INIT_WORK(&chan->status_work, tegra_channel_status_worker);
if (chan->low_latency) {///////*CONFIG LOW LATENCY*
/* Start thread to release buffers */
chan->kthread_release = kthread_run(
tegra_channel_kthread_release,
chan, chan->video->name);
if (IS_ERR(chan->kthread_release)) {
dev_err(&chan->video->dev,
"failed to run kthread for release\n");
ret = PTR_ERR(chan->kthread_release);
goto error_capture_setup;
}
}
and here:
static int tegra_channel_capture_frame(struct tegra_channel *chan,
struct tegra_channel_buffer *buf)
{
int ret = 0;
if (chan->low_latency)///////*CONFIG LOW LATENCY*
ret = tegra_channel_capture_frame_multi_thread(chan, buf);
else
ret = tegra_channel_capture_frame_single_thread(chan, buf);
return ret;
}