v4l2 timestamp issure

hello xuhui1.wang,

please refer to below to demonstrate how to check the timestamp.
offset_ns is used to calculate the capture timestamp from system time.
you might also check below example for offset_ns to compensate the capture timestamp.

root@tegra-ubuntu:~# cat /sys/devices/system/clocksource/clocksource0/offset_ns
9045955168

to add debug prints to gather kernel time.

diff --git a/drivers/media/platform/tegra/camera/vi/vi5_fops.c b/drivers/media/platform/tegra/camera/vi/vi5_fops.c
index f8c0df5..6a7c370 100644
--- a/drivers/media/platform/tegra/camera/vi/vi5_fops.c
+++ b/drivers/media/platform/tegra/camera/vi/vi5_fops.c
@@ -427,6 +427,9 @@ static void vi5_capture_dequeue(struct tegra_channel *chan,
    /* Read SOF from capture descriptor */
    ts = ns_to_timespec((s64)descr->status.sof_timestamp);
... 
+   pr_err("Jerry %s timestamp= %ld.%ld Line(%d)\n", __func__, ts.tv_sec, ts.tv_nsec, __LINE__);

you’ll see kernel log as following

[  128.924693] Jerry vi5_capture_dequeue timestamp= 137.483546848

which means, you’ll need to compensate the timestamp as below, it should be pretty close.
128.924693 + 9045955168(ns) ~= 137.483546848