Need help for TX2 mipi issue

Do you observe the issue in running v4l2-ctl? Or you have any modification in 12_camera_v4l2_cuda. If you can capture good frames in v4l2-ctl, it should also work in running 12_camera_v4l2_cuda.

You may also try gstreamer. Please refer to
Jetson Nano FAQ
Q: I have a USB camera. How can I launch it on Jetson Nano?