Image sequence numbers incrementing even if no image captured

Hello JerryChang,

A possible solution, better than my original idea, might be to expand the condition check in the call wait_event_interruptible in the function tegra_channel_kthread_capture_start to include a check on the depth of the syncpt FIFO fill-level. Then you could presumably eliminate the 1ms wait in the function tegra_channel_capture_frame_multi_thread. The two threads for capture and release would synchronise with each other instead of running around the while-loop in the function tegra_channel_kthread_capture_start 30 times between frames.

I have attached a patch for review. This seems to work well with the RaspberryPi camera and also with our camera, although it does not solve the issue mentioned in my other post (Image timestamp: differences between JetPack 4.6 and JetPack 4.6.1?) with our camera (and I am not able to reproduce that problem with a RasPi camera yet).

Kind regards,

Goad
001_Sequence_Number.patch (1.4 KB)