Orin can not capture first sensor image

Hi everyone,
I use Oirn module the BSP version is 3.5.1, I cannot capture the first frame of the sensor output image. How to fix this issue? Thanks.

How do you know can’t capture the first frame?

I added log code in tegra_i2c_xfer() funciton(kernel/kernel-5.10/drivers/i2c/busses/i2c-tegra.c). When i2c transfed one message in output current time, and I added log code in vi5_capture_dequeue() funciton(kernel/nvidia/drivers/media/platform/tegra/camera/vi/vi5_fops.c). When captured one frame output start of frame time and end of frame time and current time, the code is as follows:

// tegra_i2c_xfer() funciton
if (!pm_runtime_enabled(i2c_dev->dev))
		tegra_i2c_runtime_suspend(i2c_dev->dev);
	else
		pm_runtime_put(i2c_dev->dev);

	dev_info(i2c_dev->dev, "i2c send msg, t = %llu\n", ktime_get_real());
	return ret ?: i;

//  vi5_capture_dequeue() funciton
dev_info(&chan->video->dev, "sof = %llu, eof = %llu, time= %lld\n",
			descr->status.sof_timestamp, descr->status.eof_timestamp, 	ktime_get_real());

/* Read EOF from capture descriptor */
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
	ts = ns_to_timespec((s64)descr->status.eof_timestamp);
#else
	ts = ns_to_timespec64((s64)descr->status.eof_timestamp);
#endif
#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE
	trace_tegra_channel_capture_frame("eof", ts);
#else
	trace_tegra_channel_capture_frame("eof", &ts);
#endif

When I started capturing images, I used logical analysis to capture I2C and MIPI signals.

T1 is timetick of Oin write register of stream on to sensor via I2C.
T2 is the end timetick of the 1st image output from sensor via MIPI.
T3 is the end timetick of the 2nd image output from sensor via MIPI.
T2-T1=52.7ms, T3-T1=88.4ms.

And kernel output log is as below:

[ 80.073881] tegra-i2c 3180000.i2c: send msg, t = 1714004503554843136
[ 80.162537] video4linux video0: sof = 103265755264, eof = 103282957376, time= 1714004503643490240
[ 80.198100] video4linux video0: sof = 103301451808, eof = 103318653920, time= 1714004503679057344

The timetick is 80.073881s when Orin wrote register of stream on to sensor via I2C.
The timetick is 80.162537s when Orin captured the 1st image.
The start timetick of image is 103265755264ns, the end timetick of image is 103282957376ns.
The time difference between capturing the first frame and writing the register is:
80.162537s-80.073881s=88.656ms, it longger than 52.7ms(T2-T1).
So Orin can not capture the 1st frame by sensor.

Is this still an issue to support? Any result can be shared?

Yes, I need to support.

Could you check the frame ID from the trace log.

Thanks