R35.3.1 AGX orin bring up sensor,open one sensor ok,and open both sensors at the same time,display is abnormal

hi:
the bug issue see title,
the log upload。
NV.7z (1.8 MB)

How many cameras?
Boost the clocks help on it?

sudo nvpmodel -m 0
sudo jetson_clocks
sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

hi:
two sensor,
Boost the clocks help on it?----》no

hi:
In addition, help analyze this case, which is urgent,thanks!
R35.3.1 AGX orin bring up ar0820 raw sensor,and capture frame will get stuck - Jetson & Embedded Systems / Jetson AGX Orin - NVIDIA Developer Forums

Looks like the same CHANSEL_NOMATCH error with the ar0820 topic.

hi:
How can this problem be solved?

Check the trace log for single camera if have below message.
Then reference to below link to check below message. Jetson/l4t/Camera BringUp - eLinux.org

CHANSEL_NOMATCH channel:0x41 frame:0 vi_tstamp:348962381408 data:0x0000000000000589

hi:
data:0x0000000000000589–》
bit 0 no_match
bit 1-4 CTYPE
bit 5-10 DTYPE
CTYPE:
FS = 0x8, FE = 0x1
LS = 0x4, LE = 0x2
LS_LE = 0x6, DATA = 0x9
NvCsiDataType_RAW12 = 44,

bit 0 now is1, bit 1-4 now is 0x4, bit 5-10 now is 44, then I don’t understand what caused this error and how to fix it。

The “channel:0x41” indicate the LS package include vc-id=1 header.
Did you enable virtual channel?

hi:
now enable virtual channel,
cam_0@1b {
compatible = “onsemi,ar0820-0”;
reg = <0x1b>;
def-addr = <0x10>;
devnode = “video0”;

				/* Physical dimensions of sensor */
				physical_w = "15.0";
				physical_h = "12.5";

				sensor_model ="ar0820";

				/* Defines number of frames to be dropped by driver internally after applying */
				/* sensor crop settings. Some sensors send corrupt frames after applying */
				/* crop co-ordinates */
				post_crop_frame_drop = "0";

				/* Convert Gain to unit of dB (decibel) befor passing to kernel driver */
				use_decibel_gain = "false";

				/* enable CID_SENSOR_MODE_ID for sensor modes selection */
				use_sensor_mode_id = "true";

				mode0 {/*mode SENSOR_MODE_1920X1080_CROP_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					vc_id = "0";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";
					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "3848";
					active_h = "2168";
					readout_orientation = "0";
					line_length = "4450";
					inherent_gain = "1";
					pix_clk_hz = "74250000";
					serdes_pix_clk_hz = "300000000";

				};
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						sensor_out0: endpoint {
							vc-id = <0>;
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&jetson_csi_in0>;
						};
					};
				};
				gmsl-link {
					src-csi-port = "b";
					dst-csi-port = "a";
					serdes-csi-link = "a";
					csi-mode = "1x4";
					st-vc = <0>;
					vc-id = <0>;
					num-lanes = <4>;
					streams = "ued-u1", "raw12";
				};
			};
			cam_1@1c {
				compatible = "onsemi,ar0820-1";
				reg = <0x1c>;
				def-addr = <0x10>;
				devnode = "video1";

				/* Physical dimensions of sensor */
				physical_w = "15.0";
				physical_h = "12.5";

				sensor_model ="ar0820";

				/* Defines number of frames to be dropped by driver internally after applying */
				/* sensor crop settings. Some sensors send corrupt frames after applying */
				/* crop co-ordinates */
				post_crop_frame_drop = "0";

				/* Convert Gain to unit of dB (decibel) befor passing to kernel driver */
				use_decibel_gain = "true";

				/* enable CID_SENSOR_MODE_ID for sensor modes selection */
				use_sensor_mode_id = "true";

				mode0 {/*mode SENSOR_MODE_1920X1080_CROP_30FPS*/
					mclk_khz = "24000";
					num_lanes = "4";
					tegra_sinterface = "serial_a";
					vc_id = "1";
					discontinuous_clk = "no";
					dpcm_enable = "false";
					cil_settletime = "0";
					dynamic_pixel_bit_depth = "12";
					csi_pixel_bit_depth = "12";
					mode_type = "bayer";
					pixel_phase = "grbg";

					active_w = "3848";
					active_h = "2168";
					readout_orientation = "0";
					line_length = "3800";
					inherent_gain = "1";
					pix_clk_hz = "74250000";
					serdes_pix_clk_hz = "500000000";

					
				};
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						sensor_out1: endpoint {
							vc-id = <1>;
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&jetson_csi_in1>;
						};
					};
				};
				gmsl-link {
					src-csi-port = "b";
					dst-csi-port = "a";
					serdes-csi-link = "b";
					csi-mode = "1x4";
					st-vc = <0>;
					vc-id = <1>;
					num-lanes = <4>;
					streams = "ued-u1", "raw12";
				};
			};
		};

hi:
Are there any suggestions to fix this problem

Does your HW support virtual channel?
If yes that could be the gmsl or serdes driver output incorrect virtual channel id cause the problem.

hi:
The problem may be due to hardware.
I want to ask one about this max_exp_time:
Minimum exposure time limit for the mode, in microseconds. The value is rounded up to an integer.

This value is calculated from:

minimum exposure time in float = (minimum coarse integration time) × line_length / pix_clk_hz × 1000000

The value specified must be multiplied by exposure_factor.

min_exp_time = (minimum exposure time in float) × exposure_factor

minimum coarse integration time this value how to calculate,

Please check the programing guide.

https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html#camera-modules-and-the-device-tree

hi:
This instruction has been read,


The maximum coarse integration time is the maximum exposure intervals, in lines.
Can you specify how it is calculated,
and in source code this interface sensor_set_exposure how to map registers.

Please consult with sensor vendor.

Thanks

hi:
I would like to ask you another question. Now we have an fpga that collects signals and sends them through the serializer and then unstring them to orin instead of the sensor. We found that one channel was ok, but two channels would block the screen,
We measured the input signal and found that there was a difference between the sensor and the fpga signal,See the attached waveform.


block the screen:

Is there a way to fix the compatibility issue?

Does the trace log show CHANSEL_NOMATCH as your previous comment?

hi:
Does the trace log show CHANSEL_NOMATCH as your previous comment?----->yes

What’s your sensor board design?
Any gmsl or serdes chip to support virtual channel?
If yes you need to confirm with chip vendor for the config.
Otherwise you can connect sensor to Orin without gmsl/serdes chip to confirm.