Intermittent Image Alignment Problem

I have an intermittent issue with what seems to be the MIPI timing. Half the time I have a perfect picture using the Nvidia ISP that I can stream and responds well to changes in light, etc.

However the other half of the time it is like something gets “off” when the TX1 starts talking to the sensor. Everything gets skewed. It’s almost as if the TX1 started reading too late, or too early.

I’ll attach some pictures of what I mean.

The camera daemon and dmesg report nothing out of the ordinary when an event occurs.

NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
queryPixelFormats: type: 1, pixelformat 0x32314752 "RG12"
queryPixelFormats: type: 1, pixelformat 0x32314752 "RG12"
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
setActivePixelFormat: 0x32314752

Has anyone run into this before? It’s odd to me that it isn’t a random starting point, I have three distinct outputs. Either perfectly aligned, half way, or almost entirely off the screen. I should note that when taking video or streaming during an event the issue does not resolve itself. It jumps around quite a bit and the colors screw up. However on the 50% chance the image is aligned properly everything is perfect and there are zero issues.



Hi Atrer

  1. Does any kernel message to show syncpt timeout?
  2. Could you try block the frame length, gain, coarse time from the kernel sensor driver to check. (don’t update those setting after initial.)

Hi Shane!

  1. No references to syncpt or timeout in dmesg.

  2. Making those three controls into dummy controls and setting the default values myself did not have an effect. I still got one of the three results, either all the way off the screen, halfway off the screen, or perfect.

Attaching videos of the two screwy events so you can see how it looks. When it’s perfect, it’s perfect, it doesn’t have any of those errors.
videos.tar (6.34 MB)

Hi
That’s interesting to get this problem without any error message.

  1. Have you try the v4l2-ctrl to get the RAW data to check?
  2. Try the mipi discontinuous mode.

Getting data direct from gstreamer/v4lsrc or yavta never has the issue. Everything turns out great. Just seems to be a problem when I use the ISP.

Setting discontinuous_clk = “yes”; in the dtsi causes the camera daemon to crash when I try to stream.

NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
queryPixelFormats: type: 1, pixelformat 0x32314752 "RG12"
queryPixelFormats: type: 1, pixelformat 0x32314752 "RG12"
Sensor_LoadModeModeType: mode 0: Failed to load pixeltype
Sensor_LoadModePixelPhase: mode 0: Failed to load pixeltype
setActivePixelFormat: 0x32314752
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc
launchCC abort cc 104

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
launchCC abort cc 105

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
launchCC abort cc 106

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
launchCC abort cc 107

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
launchCC abort cc 108

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
launchCC abort cc 109

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
launchCC abort cc 110

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
Error: waitCsiFrameStart timeout guid 1
Error: waitCsiFrameStart Something went wrong with waiting on frame start
Error: waitCsiFrameStart Something went wrong with waiting on frame start
launchCC abort cc 111

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
launchCC abort cc 112

SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 731)
./debug_daemon.sh: line 6:  2350 Segmentation fault      sudo /usr/sbin/nvcamera-daemon

I don’t see anything in my sensor’s developer guide about supporting a discontinuous mode.

Daemon crash cause by not get the frame data. The key point is the sensor output to discontinuous mode.
And please check the sensor mode setting in the DT is correct eight.

mode0 { // OV5693_MODE_2592X1944
				mclk_khz = "24000";
				num_lanes = "2";
				tegra_sinterface = "serial_c";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				cil_settletime = "0";

				active_w = "2592";
				active_h = "1944";
				pixel_t = "bayer_bggr";
				readout_orientation = "90";
				line_length = "2688";
				inherent_gain = "1";
				mclk_multiplier = "6.67";
				pix_clk_hz = "160000000";

				min_gain_val = "1.0";
				max_gain_val = "16";
				min_hdr_ratio = "1";
				max_hdr_ratio = "64";
				min_framerate = "1.816577";
				max_framerate = "30";
				min_exp_time = "34";
				max_exp_time = "550385";
			};

The sensor developer guide may not use the “continuous mode”. something like clock gate.

External Media

Found the settings, that seems to have fixed it, I’ve restarted at least ten times and no issues whatsoever!

Thanks so much for all your help, this is working great!

Going to clean this up and open source it.