AGX capture video steam error

Hi,

upload the trace log below
trace.txt (22.1 KB)

kernel log

root@agx-dev-1:/home/nvidia# dmesg
[82421.039263] [RCE] Configuring VI GoS.
[82421.039277] [RCE] VM GOS[#0] addr=0xc2100000
[82421.039285] [RCE] VM GOS[#1] addr=0xc2101000
[82421.039331] [RCE] VM GOS[#2] addr=0xc2102000
[82421.039339] [RCE] VM GOS[#3] addr=0xc2103000
[82421.039347] [RCE] VM GOS[#4] addr=0xc2104000
[82421.039355] [RCE] VM GOS[#5] addr=0xc2105000
[82421.039365] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[82421.039379] [RCE] VI GOS[#0] set to VM GOS[4] base 0xc2104000
[82423.555137] tegra194-vi5 15c10000.vi: no reply from camera processor
[82423.555327] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[82423.555470] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[82423.558947] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[82423.563268] [RCE] Configuring VI GoS.
[82423.563281] [RCE] VM GOS[#0] addr=0xc2100000
[82423.563289] [RCE] VM GOS[#1] addr=0xc2101000
[82423.563298] [RCE] VM GOS[#2] addr=0xc2102000
[82423.563306] [RCE] VM GOS[#3] addr=0xc2103000
[82423.563313] [RCE] VM GOS[#4] addr=0xc2104000
[82423.563322] [RCE] VM GOS[#5] addr=0xc2105000
[82426.115063] tegra194-vi5 15c10000.vi: no reply from camera processor
[82426.115219] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[82426.115385] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[82426.118958] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[82426.139165] [RCE] Configuring VI GoS.
[82426.139182] [RCE] VM GOS[#0] addr=0xc2100000
[82426.139190] [RCE] VM GOS[#1] addr=0xc2101000
[82426.139199] [RCE] VM GOS[#2] addr=0xc2102000
[82426.139207] [RCE] VM GOS[#3] addr=0xc2103000
[82426.139215] [RCE] VM GOS[#4] addr=0xc2104000
[82426.139225] [RCE] VM GOS[#5] addr=0xc2105000

update trace log
trace-8003-02.txt (19.6 MB)

Looks like FIFO error and CRC error, try boost the nvcsi/vi/isp clocks to try.

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
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

update trace log
trace-cil_settletime-0.log (12.8 MB)

Looks like signal/timing problem have a check the REG from TRM.

STREAM_VC: NVCSI_STREAM_0_INTR_STATUS_VC0_0
PHY_INTR: NVCSI_PHY_0_CILA_INTR_0_STATUS_CILA_0

kworker/0:2-1665 [000] … 208.647354: rtcpu_nvcsi_intr: tstamp:7031227820 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000006
kworker/0:2-1665 [000] … 208.647354: rtcpu_nvcsi_intr: tstamp:7031227820 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x000001e0

@ShaneCCC Hi,
this 4lane 1080P yuv422 signal is working good with both tx2 and nx,but agx not.
why agx tx2 and nx performance is so different?

AGX is the same with NX, that could be HW or dts configure doesn’t match HW connection.

@ShaneCCC Hi,
4lane 1080p yuv422 signal connected to AGX CSI0_D0 CSI0_D1 CSI1_D0 CSI1_D1 CSI0_CLK.
my dts code as below

host1x {
		vi@15c10000 {
			num-channels = <1>;
			status = "okay";
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					e3326_vi_in0: endpoint {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&e3326_csi_out0>;
					};
				};
			};
		};

		nvcsi@15a00000 {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						e3326_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&e3326_ov5693_out0>;
						};
					};
					port@1 {
						reg = <1>;
						e3326_csi_out0: endpoint@1 {
							remote-endpoint = <&e3326_vi_in0>;
						};
					};
				};
			};
		};
	};
i2c@3180000 {
		ov5693_c@36 {
			status = "okay";
			compatible = "nvidia,ov5693";
			/* I2C device address */
			reg = <0x36>;

			/* V4L2 device node location */
			devnode = "video0";

			/* Physical dimensions of sensor */
			physical_w = "3.674";
			physical_h = "2.738";

			/* Define any required hw resources needed by driver */
			/* ie. clocks, io pins, power sources */
			avdd-reg = "vana";
			iovdd-reg = "vif";

			/* Sensor output flip settings */
			vertical-flip = "true";

			/* Enable EEPROM support */
			has-eeprom = "0";
			post_crop_frame_drop = "1";

			mode0 { // OV5693_MODE_1920X1080
				mclk_khz = "24000";
				num_lanes = "4";
				tegra_sinterface = "serial_a";
				vc_id = "0";
				phy_mode = "DPHY";
				discontinuous_clk = "no";
				dpcm_enable = "false";
				
				set_mode_delay_ms="0";
				active_w = "1920";
				active_h = "1080";
				line_length = "2200";
				mode_type = "yuv";
				pixel_phase = "uyvy";  //uyvy
				dynamic_pixel_bit_depth="16";
				csi_pixel_bit_depth = "16";
				//pixel_t = "yuv_uyvy16"; //yuv_yuyv16 yuv_yvyu16 yuv_uyvy16 yuv_vyuy16
				readout_orientation = "0";
				
				inherent_gain = "1";
				mclk_multiplier = "6.67"; //6.67

				cil_settletime = "0";

				pix_clk_hz = "74250000";
				serdes_pix_clk_hz = "833333333";

				gain_factor = "10";
				min_gain_val = "10";/* 1DB*/
				max_gain_val = "160";/* 16DB*/
				step_gain_val = "1";
				default_gain = "10";
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				framerate_factor = "1000000";
				min_framerate = "1816577";/*1.816577 */
				max_framerate = "30000000";/*30*/
				step_framerate = "1";
				default_framerate = "30000000";
				exposure_factor = "1000000";
				min_exp_time = "34";/* us */
				max_exp_time = "550385";/* us */
				step_exp_time = "1";
				default_exp_time = "33334";/* us */
				embedded_metadata_height = "0";

			};

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;
					e3326_ov5693_out0: endpoint {
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&e3326_csi_in0>;
					};
				};
			};
		};
	};

and below picture is the best I can get with gsteamer test.

I would suggest to review it from HW side for this issue.

1 Like