TX2+R32.5: no video capture from custom camera

hi everyone,

I force our camera to work on TX2+R32.5 and get the following.

$ dmesg

[ 2455.744329] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 2455.758013] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[ 2455.768641] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC1 = 0x00000004
[ 2455.778487] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC2 = 0x00000008
[ 2455.788379] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000004
[ 2455.797119] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000004
[ 2456.008957] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 2456.018841] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 2456.033787] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[ 2456.044749] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC1 = 0x00000004
[ 2456.054727] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC2 = 0x00000008
[ 2456.064676] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000004
[ 2456.073803] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000004
[ 2456.284996] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 2456.296326] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 2456.308782] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC1 = 0x00000004
[ 2456.319115] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC2 = 0x00000008
[ 2456.331454] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000004
[ 2456.340785] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000004
[ 2456.552976] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11

dts:

// #include "tegra210-camera-vt_tpg-a00.dtsi"
#include <quill-modules/tegra186-camera-vt_tpg.dtsi>
#include "dt-bindings/clock/tegra186-clock.h"

#define CAM0_RST_L	TEGRA_MAIN_GPIO(R, 5)
#define CAM0_PWDN	  TEGRA_MAIN_GPIO(R, 0)

/* camera control gpio definitions */

/ {
	host1x {
	};

	i2c@3160000 {
		nc6_tpg0: vt_tpg_a@49 {
			/* Define any required hw resources needed by driver */
			/* ie. clocks, io pins, power sources */
			/* mclk-index indicates the index of the */
			/* mclk-name with in the clock-names array */

			clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH2>,
					 <&tegra_car TEGRA186_CLK_PLLP_OUT0>;
			clock-names = "extperiph1", "pllp_grtba";
			clock-frequency = <24000000>;

			mclk = "extperiph1";
			reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
			pwdn-gpios = <&tegra_main_gpio  CAM0_PWDN  GPIO_ACTIVE_HIGH>;
			vana-supply = <&en_vdd_cam_hv_2v8>;
			vif-supply = <&en_vdd_cam>;
		};
	};

	gpio@2200000 {
		camera-control-output-low {
			gpio-hog;
			output-low;
			gpios = <
				CAM0_RST_L 0
				CAM0_PWDN 0
				>;
			label = "cam0-rst", "cam0-pwdn";
		};
	};
};



/ {
	i2c@3160000 {	/* TX1 @/dev/i2c-1= i2c2. TX2 i2c1 */
		vt_tpg_a@49 {
			compatible = "nvidia,vt_tpg";
			reg = <0x49>;

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

      devnode = "video0";

			sensor_model ="vt_tpg";
			avdd-reg = "vana";
			iovdd-reg = "vif";
			post_crop_frame_drop = "0";
			use_decibel_gain = "true";
			delayed_gain = "true";
			use_sensor_mode_id = "true";

	         	mode0 {			
				num_lanes	  = "4";
				tegra_sinterface  = "serial_a";
				dpcm_enable       = "false";
				cil_settletime    = "0";
                            phy_mode = "DPHY";
				dynamic_pixel_bit_depth = "12";
				/* Old Style */
				csi_pixel_bit_depth = "12";
				mode_type = "bayer";
     				pixel_phase = "rggb";
				/* New Style */
				line_length = "2680";		/*     13'400 ns */
				active_w    = "2048";		/*     10'300 ns */
				active_h    = "1520";		
				readout_orientation = "0";
				inherent_gain = "1";

				/* Sync Params */
				discontinuous_clk = "no";
				mclk_khz        = "50000";	/* CSI_MCLK out frequency */
				mclk_multiplier = "5";		/* multiplayer for ISP clock */
				pix_clk_hz      = "200000000";	/* 200MHz Sensor Pixel clock */

                           framerate_factor = "1000";
                           step_framerate = "1";
                           default_framerate = "12500";
                     	min_framerate = "1000";

				max_framerate = "35604";	/* 2097 lines 28'099'800 ns */


				exposure_factor = "1000000";
				min_exp_time  = "30";
				max_exp_time  = "200000";
				step_exp_time = "1";
				default_exp_time = "300";/* us */

				gain_factor = "1";
				step_gain_val = "1";
				default_gain = "0";
				min_gain_val  = "0";
				max_gain_val  = "48";
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";

				embedded_metadata_height = "1";
			};
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					livt_tpg_vt_tpg_out0: endpoint {
						csi-port = <0>;
						port-index = <0>;
						bus-width = <4>;
						remote-endpoint = <&livt_tpg_csi_in0>;
					};
				};
			};
		};
	};

	host1x {
		vi@15700000 {
			num-channels = <1>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					livt_tpg_vi_in0: endpoint {
						csi-port = <0>;
						port-index = <2>;
						bus-width = <4>;
						remote-endpoint = <&livt_tpg_csi_out0>;
					};
				};
			};
		};

		nvcsi@150c0000 {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						livt_tpg_csi_in0: endpoint@0 {
							csi-port = <0>;
  						port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&livt_tpg_vt_tpg_out0>;
						};
					};
					port@1 {
						reg = <1>;
						livt_tpg_csi_out0: endpoint@1 {
							remote-endpoint = <&livt_tpg_vi_in0>;
						};
					};
				};
			};
		};

	};
};


/ {

	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";
	
		num_csi_lanes = <4>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		isp_peak_byte_per_pixel = <5>;
		isp_bw_margin_pct = <25>;

	
		modules {
			/* these settings typicaly overridden while cboot */
			module0 {
				badge = "vt_tpg_bottom_badge";
				position = "bottom";
				orientation = "0";

				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "vt_tpg 1-0049";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@7000c400/vt_tpg_a@49";
				};
			};
		};
	};
};

sudo cat /sys/kernel/debug/tracing/trace

 vi-output, vt_t-6982  [005] ....  2950.940401: tegra_channel_capture_setup: vnc_id 0 W 2048 H 1520 fmt 20
 vi-output, vt_t-6982  [005] ....  2950.942599: tegra_channel_capture_frame: sof:-549620699028.-267368668992
     kworker/4:0-7484  [004] ....  2950.959991: rtos_queue_send_from_isr_failed: tstamp:92480907114 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2950.959997: rtos_queue_send_from_isr_failed: tstamp:92480907233 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2950.960000: rtos_queue_send_from_isr_failed: tstamp:92480907336 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2950.960002: rtos_queue_send_from_isr_failed: tstamp:92480907438 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2950.960004: rtos_queue_send_from_isr_failed: tstamp:92480907539 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2950.960006: rtos_queue_send_from_isr_failed: tstamp:92480907639 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2950.960008: rtos_queue_send_from_isr_failed: tstamp:92480907740 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2950.960010: rtos_queue_send_from_isr_failed: tstamp:92480907840 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2950.960013: rtos_queue_send_failed: tstamp:92480908288 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2950.960015: rtos_queue_send_failed: tstamp:92480909027 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.015965: rtos_queue_peek_from_isr_failed: tstamp:92483052234 queue:0x0b4b4500
     kworker/4:0-7484  [004] ....  2951.187898: rtos_queue_peek_from_isr_failed: tstamp:92488052231 queue:0x0b4b4500
     kworker/4:0-7484  [004] ....  2951.187906: rtos_queue_send_from_isr_failed: tstamp:92488083678 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.187908: rtos_queue_send_from_isr_failed: tstamp:92488083784 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2951.187910: rtos_queue_send_from_isr_failed: tstamp:92488083889 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2951.187913: rtos_queue_send_from_isr_failed: tstamp:92488083993 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2951.187915: rtos_queue_send_from_isr_failed: tstamp:92488084094 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2951.187917: rtos_queue_send_from_isr_failed: tstamp:92488084196 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2951.187919: rtos_queue_send_from_isr_failed: tstamp:92488084298 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2951.187921: rtos_queue_send_from_isr_failed: tstamp:92488084404 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2951.187924: rtos_queue_send_failed: tstamp:92488085010 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.187926: rtos_queue_send_failed: tstamp:92488085286 queue:0x0b4a7258
 vi-output, vt_t-6982  [005] ....  2951.225936: tegra_channel_capture_setup: vnc_id 0 W 2048 H 1520 fmt 20
 vi-output, vt_t-6982  [005] ....  2951.227835: tegra_channel_capture_frame: sof:-549620699028.-267368668992
     kworker/4:0-7484  [004] ....  2951.239955: rtos_queue_send_from_isr_failed: tstamp:92489830136 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.239960: rtos_queue_send_from_isr_failed: tstamp:92489830251 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2951.239962: rtos_queue_send_from_isr_failed: tstamp:92489830360 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2951.239965: rtos_queue_send_from_isr_failed: tstamp:92489830465 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2951.239967: rtos_queue_send_from_isr_failed: tstamp:92489830566 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2951.239969: rtos_queue_send_from_isr_failed: tstamp:92489830667 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2951.239971: rtos_queue_send_from_isr_failed: tstamp:92489830768 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2951.239973: rtos_queue_send_from_isr_failed: tstamp:92489830870 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2951.239976: rtos_queue_send_failed: tstamp:92489831317 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.239978: rtos_queue_send_failed: tstamp:92489832053 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.351949: rtos_queue_peek_from_isr_failed: tstamp:92493052247 queue:0x0b4b4500
     kworker/4:0-7484  [004] ....  2951.463904: rtos_queue_send_from_isr_failed: tstamp:92497009945 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.463911: rtos_queue_send_from_isr_failed: tstamp:92497010051 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2951.463913: rtos_queue_send_from_isr_failed: tstamp:92497010155 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2951.463916: rtos_queue_send_from_isr_failed: tstamp:92497010259 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2951.463918: rtos_queue_send_from_isr_failed: tstamp:92497010360 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2951.463920: rtos_queue_send_from_isr_failed: tstamp:92497010461 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2951.463922: rtos_queue_send_from_isr_failed: tstamp:92497010562 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2951.463924: rtos_queue_send_from_isr_failed: tstamp:92497010664 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2951.463927: rtos_queue_send_failed: tstamp:92497011257 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.463929: rtos_queue_send_failed: tstamp:92497011524 queue:0x0b4a7258
 vi-output, vt_t-6982  [005] ....  2951.510674: tegra_channel_capture_setup: vnc_id 0 W 2048 H 1520 fmt 20
 vi-output, vt_t-6982  [005] ....  2951.512157: tegra_channel_capture_frame: sof:-549620699028.-267368668992
     kworker/4:0-7484  [004] ....  2951.519908: rtos_queue_peek_from_isr_failed: tstamp:92498052244 queue:0x0b4b4500
     kworker/4:0-7484  [004] ....  2951.519915: rtos_queue_send_from_isr_failed: tstamp:92498728354 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.519918: rtos_queue_send_from_isr_failed: tstamp:92498728460 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2951.519920: rtos_queue_send_from_isr_failed: tstamp:92498728564 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2951.519922: rtos_queue_send_from_isr_failed: tstamp:92498728669 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2951.519925: rtos_queue_send_from_isr_failed: tstamp:92498728770 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2951.519927: rtos_queue_send_from_isr_failed: tstamp:92498728872 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2951.519929: rtos_queue_send_from_isr_failed: tstamp:92498728974 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2951.519931: rtos_queue_send_from_isr_failed: tstamp:92498729077 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2951.519934: rtos_queue_send_failed: tstamp:92498729534 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.519936: rtos_queue_send_failed: tstamp:92498730259 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.687953: rtos_queue_peek_from_isr_failed: tstamp:92503052258 queue:0x0b4b4500
     kworker/4:0-7484  [004] ....  2951.747902: rtos_queue_send_from_isr_failed: tstamp:92505957097 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.747909: rtos_queue_send_from_isr_failed: tstamp:92505957205 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2951.747911: rtos_queue_send_from_isr_failed: tstamp:92505957319 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2951.747913: rtos_queue_send_from_isr_failed: tstamp:92505957423 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2951.747915: rtos_queue_send_from_isr_failed: tstamp:92505957523 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2951.747917: rtos_queue_send_from_isr_failed: tstamp:92505957624 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2951.747919: rtos_queue_send_from_isr_failed: tstamp:92505957725 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2951.747921: rtos_queue_send_from_isr_failed: tstamp:92505957826 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2951.747924: rtos_queue_send_failed: tstamp:92505958474 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.747926: rtos_queue_send_failed: tstamp:92505958741 queue:0x0b4a7258
 vi-output, vt_t-6982  [005] ....  2951.786236: tegra_channel_capture_setup: vnc_id 0 W 2048 H 1520 fmt 20
 vi-output, vt_t-6982  [005] ....  2951.788440: tegra_channel_capture_frame: sof:-549620699028.-267368668992
     kworker/4:0-7484  [004] ....  2951.799949: rtos_queue_send_from_isr_failed: tstamp:92507339462 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.799955: rtos_queue_send_from_isr_failed: tstamp:92507339567 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2951.799958: rtos_queue_send_from_isr_failed: tstamp:92507339670 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2951.799960: rtos_queue_send_from_isr_failed: tstamp:92507339773 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2951.799962: rtos_queue_send_from_isr_failed: tstamp:92507339874 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2951.799964: rtos_queue_send_from_isr_failed: tstamp:92507339974 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2951.799966: rtos_queue_send_from_isr_failed: tstamp:92507340075 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2951.799969: rtos_queue_send_from_isr_failed: tstamp:92507340178 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2951.799971: rtos_queue_send_failed: tstamp:92507340625 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.799973: rtos_queue_send_failed: tstamp:92507341349 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2951.855972: rtos_queue_peek_from_isr_failed: tstamp:92508052261 queue:0x0b4b4500
     kworker/4:0-7484  [004] ....  2952.023937: rtos_queue_peek_from_isr_failed: tstamp:92513052266 queue:0x0b4b4500
     kworker/4:0-7484  [004] ....  2952.023945: rtos_queue_send_from_isr_failed: tstamp:92514583042 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2952.023948: rtos_queue_send_from_isr_failed: tstamp:92514583148 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2952.023950: rtos_queue_send_from_isr_failed: tstamp:92514583257 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2952.023952: rtos_queue_send_from_isr_failed: tstamp:92514583365 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2952.023955: rtos_queue_send_from_isr_failed: tstamp:92514583466 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2952.023957: rtos_queue_send_from_isr_failed: tstamp:92514583567 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2952.023959: rtos_queue_send_from_isr_failed: tstamp:92514583668 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2952.023961: rtos_queue_send_from_isr_failed: tstamp:92514583769 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2952.023964: rtos_queue_send_failed: tstamp:92514584370 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2952.023966: rtos_queue_send_failed: tstamp:92514584637 queue:0x0b4a7258
 vi-output, vt_t-6982  [005] ....  2952.062215: tegra_channel_capture_setup: vnc_id 0 W 2048 H 1520 fmt 20
 vi-output, vt_t-6982  [005] ....  2952.064120: tegra_channel_capture_frame: sof:-549620699028.-267368668992
     kworker/4:0-7484  [004] ....  2952.079889: rtos_queue_send_from_isr_failed: tstamp:92515963856 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2952.079892: rtos_queue_send_from_isr_failed: tstamp:92515963971 queue:0x0b4aad68
     kworker/4:0-7484  [004] ....  2952.079893: rtos_queue_send_from_isr_failed: tstamp:92515964076 queue:0x0b4ac998
     kworker/4:0-7484  [004] ....  2952.079893: rtos_queue_send_from_isr_failed: tstamp:92515964180 queue:0x0b4ae518
     kworker/4:0-7484  [004] ....  2952.079894: rtos_queue_send_from_isr_failed: tstamp:92515964282 queue:0x0b4af2d8
     kworker/4:0-7484  [004] ....  2952.079895: rtos_queue_send_from_isr_failed: tstamp:92515964384 queue:0x0b4b0098
     kworker/4:0-7484  [004] ....  2952.079896: rtos_queue_send_from_isr_failed: tstamp:92515964485 queue:0x0b4b0e58
     kworker/4:0-7484  [004] ....  2952.079896: rtos_queue_send_from_isr_failed: tstamp:92515964586 queue:0x0b4b1c18
     kworker/4:0-7484  [004] ....  2952.079898: rtos_queue_send_failed: tstamp:92515965045 queue:0x0b4a7258
     kworker/4:0-7484  [004] ....  2952.079898: rtos_queue_send_failed: tstamp:92515965771 queue:0x0b4a7258

At the same time, on TX1+R28 and TX2+R32.5 everything works fine.
The data from the sensor is correct. Frame and line rate similar to the working version.
What could be the problem?

Have apply below patch and verify by v4l2-ctl

Thanks for the answer. I tried this option yesterday. The diagnostics have not changed.

Is it possible to somehow get raw data from the csi-port to make sure that all the data from the camera comes correct?

From the trace log NVCSI/VI didn’t receive any validate data from the MIPI bus.
But the kernel log show the CRC error that why suggest to apply the patch.
What’s the command to capture? Does the trace log was the same after apply the patch?

I installed the patch

in dmesg:

[  195.009277] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  195.025173] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  195.243374] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  195.257333] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  195.271235] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  195.487396] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  195.501350] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  195.515338] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  195.528246] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000008
[  195.538880] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000008
[  195.751400] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  195.765288] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  195.983459] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  195.997722] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  196.215364] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  196.229155] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  196.447346] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  196.461203] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  196.476126] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  196.691465] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  196.705209] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  196.923381] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  196.937230] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  196.950305] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  197.163489] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  197.177355] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  197.191322] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  197.403362] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  197.417249] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  197.431875] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  197.444942] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000008
[  197.458168] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000008
[  197.675406] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  197.689316] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  197.705301] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  197.719377] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000008
[  197.729923] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000008
[  197.943405] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  197.957073] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  198.175372] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  198.189031] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  198.407412] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  198.420950] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  198.435625] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  198.651407] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  198.665158] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[  198.679786] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[  198.692561] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000008
[  198.704359] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000008
[  198.723971] vt_tpg 0-0049: vt_tpg_stop_streaming:
[  198.723983] vt_tpg 0-0049: [VT_TPG]: vt_tpg_stop_streaming: vt_tpg_update_ctrl_range.
[  198.724000] vt_tpg 0-0049: vt_tpg_write_table, addr = 0x0100, val = 0x00
[  198.742112] vt_tpg 0-0049: vt_tpg_power_off: power off

sudo cat /sys/kernel/debug/tracing/trace:

   kworker/3:2-1156  [003] ....   198.704333: rtos_queue_send_from_isr_failed: tstamp:6474060913 queue:0x0b4b1c18
     kworker/3:2-1156  [003] ....   198.704334: rtos_queue_send_failed: tstamp:6474061369 queue:0x0b4a7258
 vi-output, vt_t-7058  [004] ....   198.716672: tegra_channel_capture_setup: vnc_id 0 W 2048 H 1520 fmt 20
 vi-output, vt_t-7058  [004] ....   198.718810: tegra_channel_capture_frame: sof:-549620699028.-267608798144
 tegra-io-captur-7055  [004] ....   198.723940: tegra_channel_set_stream: enable : 0x0
 tegra-io-captur-7055  [004] ....   198.723943: tegra_channel_set_stream: vt_tpg 0-0049 : 0x0
 tegra-io-captur-7055  [004] ....   198.735852: tegra_channel_set_stream: 150c0000.nvcsi--1 : 0x0
 tegra-io-captur-7055  [004] ....   198.735857: csi_s_stream: enable : 0x0
 tegra-io-captur-7055  [003] ....   198.742086: tegra_channel_set_power: vt_tpg 0-0049 : 0x0
 tegra-io-captur-7055  [003] ....   198.742100: camera_common_s_power: status : 0x0
 tegra-io-captur-7055  [000] ....   198.754137: tegra_channel_set_power: 150c0000.nvcsi--1 : 0x0
 tegra-io-captur-7055  [000] ....   198.754141: csi_s_power: enable : 0x0
     kworker/3:2-1156  [003] ....   198.759409: rtos_queue_send_from_isr_failed: tstamp:6475211855 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.759414: rtos_queue_send_from_isr_failed: tstamp:6475211959 queue:0x0b4aad68
     kworker/3:2-1156  [003] ....   198.759415: rtos_queue_send_from_isr_failed: tstamp:6475212063 queue:0x0b4ac998
     kworker/3:2-1156  [003] ....   198.759417: rtos_queue_send_from_isr_failed: tstamp:6475212167 queue:0x0b4ae518
     kworker/3:2-1156  [003] ....   198.759418: rtos_queue_send_from_isr_failed: tstamp:6475212266 queue:0x0b4af2d8
     kworker/3:2-1156  [003] ....   198.759419: rtos_queue_send_from_isr_failed: tstamp:6475212368 queue:0x0b4b0098
     kworker/3:2-1156  [003] ....   198.759420: rtos_queue_send_from_isr_failed: tstamp:6475212469 queue:0x0b4b0e58
     kworker/3:2-1156  [003] ....   198.759422: rtos_queue_send_from_isr_failed: tstamp:6475212574 queue:0x0b4b1c18
     kworker/3:2-1156  [003] ....   198.759424: rtos_queue_send_failed: tstamp:6475213011 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.759425: rtos_queue_send_from_isr_failed: tstamp:6475215887 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.759427: rtos_queue_send_from_isr_failed: tstamp:6475215989 queue:0x0b4aad68
     kworker/3:2-1156  [003] ....   198.759428: rtos_queue_send_from_isr_failed: tstamp:6475216093 queue:0x0b4ac998
     kworker/3:2-1156  [003] ....   198.759429: rtos_queue_send_from_isr_failed: tstamp:6475216203 queue:0x0b4ae518
     kworker/3:2-1156  [003] ....   198.759431: rtos_queue_send_from_isr_failed: tstamp:6475216307 queue:0x0b4af2d8
     kworker/3:2-1156  [003] ....   198.759432: rtos_queue_send_from_isr_failed: tstamp:6475216408 queue:0x0b4b0098
     kworker/3:2-1156  [003] ....   198.759433: rtos_queue_send_from_isr_failed: tstamp:6475216509 queue:0x0b4b0e58
     kworker/3:2-1156  [003] ....   198.759435: rtos_queue_send_from_isr_failed: tstamp:6475216610 queue:0x0b4b1c18
     kworker/3:2-1156  [003] ....   198.759436: rtos_queue_send_failed: tstamp:6475217523 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.759437: rtos_queue_send_from_isr_failed: tstamp:6475288057 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.759438: rtos_queue_send_from_isr_failed: tstamp:6475288162 queue:0x0b4aad68
     kworker/3:2-1156  [003] ....   198.759440: rtos_queue_send_from_isr_failed: tstamp:6475288266 queue:0x0b4ac998
     kworker/3:2-1156  [003] ....   198.759441: rtos_queue_send_from_isr_failed: tstamp:6475288368 queue:0x0b4ae518
     kworker/3:2-1156  [003] ....   198.759442: rtos_queue_send_from_isr_failed: tstamp:6475288470 queue:0x0b4af2d8
     kworker/3:2-1156  [003] ....   198.759443: rtos_queue_send_from_isr_failed: tstamp:6475288571 queue:0x0b4b0098
     kworker/3:2-1156  [003] ....   198.759445: rtos_queue_send_from_isr_failed: tstamp:6475288677 queue:0x0b4b0e58
     kworker/3:2-1156  [003] ....   198.759446: rtos_queue_send_from_isr_failed: tstamp:6475288778 queue:0x0b4b1c18
     kworker/3:2-1156  [003] ....   198.759447: rtos_queue_send_failed: tstamp:6475289333 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.759449: rtos_queue_send_from_isr_failed: tstamp:6475291510 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.759450: rtos_queue_send_from_isr_failed: tstamp:6475291613 queue:0x0b4aad68
     kworker/3:2-1156  [003] ....   198.759451: rtos_queue_send_from_isr_failed: tstamp:6475291716 queue:0x0b4ac998
     kworker/3:2-1156  [003] ....   198.759453: rtos_queue_send_from_isr_failed: tstamp:6475291824 queue:0x0b4ae518
     kworker/3:2-1156  [003] ....   198.759454: rtos_queue_send_from_isr_failed: tstamp:6475291928 queue:0x0b4af2d8
     kworker/3:2-1156  [003] ....   198.759455: rtos_queue_send_from_isr_failed: tstamp:6475292030 queue:0x0b4b0098
     kworker/3:2-1156  [003] ....   198.759457: rtos_queue_send_from_isr_failed: tstamp:6475292131 queue:0x0b4b0e58
     kworker/3:2-1156  [003] ....   198.759458: rtos_queue_send_from_isr_failed: tstamp:6475292242 queue:0x0b4b1c18
     kworker/3:2-1156  [003] ....   198.759459: rtos_queue_send_failed: tstamp:6475292653 queue:0x0b4a7258
     kworker/3:2-1156  [003] ....   198.815372: rtos_queue_peek_from_isr_failed: tstamp:6478106229 queue:0x0b4b4500
     kworker/3:2-1156  [003] ....   198.983394: rtos_queue_peek_from_isr_failed: tstamp:6483106237 queue:0x0b4b4500
     kworker/3:2-1156  [003] ....   199.151391: rtos_queue_peek_from_isr_failed: tstamp:6488106241 queue:0x0b4b4500
     kworker/3:2-1156  [003] ....   199.319392: rtos_queue_peek_from_isr_failed: tstamp:6493106247 queue:0x0b4b4500
     kworker/3:2-1156  [003] ....   199.487378: rtos_queue_peek_from_isr_failed: tstamp:6498106254 queue:0x0b4b4500
     kworker/3:2-1156  [003] ....   199.655368: rtos_queue_peek_from_isr_failed: tstamp:6503106263 queue:0x0b4b4500
     kworker/3:2-1156  [003] ....   199.823372: rtos_queue_peek_from_isr_failed: tstamp:6508106270 queue:0x0b4b4500
     kworker/3:2-1156  [003] ....   199.935376: rtos_queue_peek_from_isr_failed: tstamp:6513106276 queue:0x0b4b4500

What’s your v4l2-ctl command.

v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=3 --verbose

1 Like

Check the ERR_INTR_STATUS from REG NVCSI_STREAM_0_ERR_INTR_STATUS_0
INTR_STATUS from REG NVCSI_STREAM_0_INTR_STATUS_0 from the TRM still show the intr_stat_pd_wc_short_err_vc0 could be the size incorrect.