Why use "v4l2-ctl" command get RAW data is alway ZERO at jetson TX1 R28.2?

Why use "v4l2-ctl"command get RAW data is alway ZERO at jetson TX1 R28.2?

I use the command is below:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=bb001.raw

but I get the RAW data all is ZERO.

I use the “v4l2-ctl --all”,disp is below

nvidia@tegra-ubuntu:~$ v4l2-ctl --all
Driver Info (not using libv4l2):
	Driver name   : tegra-video
	Card type     : vi-output, imx219 1-0010
	Bus info      : platform:54080000.vi:0
	Driver version: 4.4.38
	Capabilities  : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: no power)
Format Video Capture:
	Width/Height      : 3280/2464
	Pixel Format      : 'RG10'
	Field             : None
	Bytes per Line    : 6656
	Size Image        : 16400384
	Colorspace        : sRGB
	Transfer Function : Default
	YCbCr Encoding    : Default
	Quantization      : Default
	Flags             : 

Camera Controls

                   frame_length (int)    : min=2499 max=65535 step=1 default=2499 value=2499 flags=slider
                    coarse_time (int)    : min=1 max=65531 step=1 default=2495 value=2495 flags=slider
                     group_hold (intmenu): min=0 max=1 default=0 value=0
                     hdr_enable (intmenu): min=0 max=1 default=0 value=0
                        fuse_id (str)    : min=0 max=12 step=2 value='' flags=read-only, has-payload
                           gain (int)    : min=256 max=4096 step=1 default=256 value=256 flags=slider
                    bypass_mode (intmenu): min=0 max=1 default=0 value=0
                override_enable (intmenu): min=0 max=1 default=0 value=0
                   height_align (int)    : min=1 max=16 step=1 default=1 value=1
                     size_align (intmenu): min=0 max=2 default=0 value=0
               write_isp_format (bool)   : default=0 value=0
       sensor_signal_properties (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
        sensor_image_properties (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
      sensor_control_properties (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
              sensor_dv_timings (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
                   sensor_modes (int)    : min=0 max=30 step=1 default=30 value=1 flags=read-only
nvidia@tegra-ubuntu:~$

I use "v4l2-compliance -d /dev/video0 " disp as below:

nvidia@tegra-ubuntu:~$ v4l2-compliance -d /dev/video0 
Driver Info:
	Driver name   : tegra-video
	Card type     : vi-output, imx219 1-0010
	Bus info      : platform:54080000.vi:0
	Driver version: 4.4.38
	Capabilities  : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second video open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

	Control ioctls:
		test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
		test VIDIOC_QUERYCTRL: OK
		test VIDIOC_G/S_CTRL: OK
		test VIDIOC_G/S/TRY_EXT_CTRLS: OK
		test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
		test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
		Standard Controls: 1 Private Controls: 12

	Format ioctls:
		warn: v4l2-test-formats.cpp(72): found framesize 1280x720, but no frame intervals
		test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		test VIDIOC_G/S_PARM: OK (Not Supported)
		test VIDIOC_G_FBUF: OK (Not Supported)
		test VIDIOC_G_FMT: OK
		test VIDIOC_TRY_FMT: OK
		test VIDIOC_S_FMT: OK
		test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
		test Cropping: OK (Not Supported)
		test Composing: OK (Not Supported)
		test Scaling: OK (Not Supported)

	Codec ioctls:
		test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
		test VIDIOC_G_ENC_INDEX: OK (Not Supported)
		test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

	Buffer ioctls:
		test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
		test VIDIOC_EXPBUF: OK

Test input 0:


Total: 42, Succeeded: 42, Failed: 0, Warnings: 1

now I NEED capture the image,WHO can help me fix this question?

hello sensor_test,

before dump the raw files for checking, please try to access the sensor drivers by increasing the “–stream-count” options.
for example,

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1000

also, please observe the kernel logs, and share the messages to us if you saw the failure.
thanks

run this command ,disp as below:

nvidia@tegra-ubuntu:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1000
<<<<< 3.03 fps
< 1.72 fps
< 1.82 fps
< 1.40 fps
< 1.13 fps
<<< 1.26 fps
< 1.32 fps
<<< 1.39 fps
< 1.37 fps
< 1.40 fps
<<< 1.53 fps
<< 1.48 fps

the kernel logs disp:

Apr 18 03:40:12 tegra-ubuntu NetworkManager[574]: <info>  [1524022812.8197] device (wlan0): supplicant interface state: ready -> inactive
Apr 18 03:40:14 tegra-ubuntu kernel: [   11.887318] IPVS: Creating netns size=1424 id=2
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.088799] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.138127] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.168367] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.206689] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.215096] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.223612] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.254412] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.267947] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.292837] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.342527] Setting pll_a = 45158400 Hz clk_out = 11289600 Hz
Apr 18 03:40:14 tegra-ubuntu kernel: [   12.514199] IPVS: Creating netns size=1424 id=3
Apr 18 03:40:14 tegra-ubuntu gnome-session-binary[1468]: Entering running state
Apr 18 03:40:20 tegra-ubuntu NetworkManager[574]: <info>  [1524022820.1864] WiFi hardware radio set enabled
Apr 18 03:40:20 tegra-ubuntu NetworkManager[574]: <info>  [1524022820.1865] WWAN hardware radio set enabled
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.293787] irq 263: nobody cared (try booting with the "irqpoll" option)
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.300598] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.38+ #1
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.306601] Hardware name: jetson_tx1 (DT)
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.310697] Call trace:
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.313161] [<ffffffc000089238>] dump_backtrace+0x0/0xe8
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.318476] [<ffffffc000089334>] show_stack+0x14/0x20
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.323534] [<ffffffc00038a1a4>] dump_stack+0xb4/0xe8
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.328589] [<ffffffc0000f86e4>] __report_bad_irq+0x34/0xe8
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.334162] [<ffffffc0000f8a94>] note_interrupt+0x21c/0x2f0
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.339735] [<ffffffc0000f5f84>] handle_irq_event_percpu+0x204/0x298
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.346086] [<ffffffc0000f6060>] handle_irq_event+0x48/0x78
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.351658] [<ffffffc0000f9238>] handle_level_irq+0xd8/0x130
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.357316] [<ffffffc0000f5474>] generic_handle_irq+0x24/0x40
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.363068] [<ffffffc0003da8d8>] tegra_gpio_irq_handler+0x170/0x1e0
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.369333] [<ffffffc0000f5474>] generic_handle_irq+0x24/0x40
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.375097] [<ffffffc0000f57b4>] __handle_domain_irq+0x84/0xb0
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.380997] [<ffffffc000080ef4>] gic_handle_irq+0x6c/0xc8
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.386480] [<ffffffc000083f44>] el1_irq+0x84/0x100
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.391461] [<ffffffc0008302e0>] cpuidle_enter+0x18/0x20
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.396860] [<ffffffc0000e513c>] call_cpuidle+0x4c/0x58
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.402161] [<ffffffc0000e5410>] cpu_startup_entry+0x2c8/0x388
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.408105] [<ffffffc000b67a20>] rest_init+0x88/0x98
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.413182] [<ffffffc0011ba98c>] start_kernel+0x3a4/0x3b8
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.418657] [<0000000080b6e000>] 0x80b6e000
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.422901] handlers:
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.425256] [<ffffffc0000f6100>] irq_default_primary_handler threaded [<ffffffc0003d9938>] pca953x_irq_handler
Apr 18 03:42:25 tegra-ubuntu kernel: [  142.435427] Disabling IRQ #263
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.495310] vi 54080000.vi: tegra_channel_error_status:error 24022 frame 0
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.502258] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 1
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.509247] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 2
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.516336] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 3
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.523356] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 4
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.530351] vi 54080000.vi: tegra_channel_error_status:error 20002 frame 5
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.537353] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 6
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.544308] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 7
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.551255] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 8
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.558213] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 9
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.565146] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 10
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.572166] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 11
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.579218] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 12
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.586262] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 13
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.593281] vi 54080000.vi: tegra_channel_error_status:error 20002 frame 14
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.600304] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 15
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.607323] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 16
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.614341] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 17
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.621362] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 18
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.628382] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 19
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.635400] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 20
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.642430] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 21
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.649445] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 22
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.656471] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 23
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.663491] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 24
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.670507] vi 54080000.vi: tegra_channel_error_status:error 22 frame 25
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.677264] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 26
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.684310] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 27
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.691345] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 28
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.698376] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 29
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.705394] vi 54080000.vi: tegra_channel_error_status:error 22 frame 30
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.712152] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 31
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.719170] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 32
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.726189] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 33
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.733205] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 34
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.740222] vi 54080000.vi: tegra_channel_error_status:error 20002 frame 35
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.747242] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 36
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.754258] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 37
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.761276] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 38
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.768294] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 39
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.775311] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 40
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.782337] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 41
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.789379] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 42
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.796414] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 43
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.803439] vi 54080000.vi: tegra_channel_error_status:error 20002 frame 44
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.810458] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 45
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.817476] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 46
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.824493] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 47
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.831515] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 48
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.838531] vi 54080000.vi: tegra_channel_error_status:error 20002 frame 49
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.845548] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 50
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.852569] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 51
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.859586] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 52
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.866601] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 53
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.873619] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 54
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.880637] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 55
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.887678] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 56
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.894713] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 57
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.901730] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 58
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.908747] vi 54080000.vi: tegra_channel_error_status:error 20002 frame 59
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.915770] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 60
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.922787] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 61
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.929803] vi 54080000.vi: tegra_channel_error_status:error 20002 frame 62
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.936824] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 63
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.943840] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 64
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.950855] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 65
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.957879] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 66
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.964897] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 67
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.971914] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 68
Apr 18 03:42:26 tegra-ubuntu kernel: [  143.978933] vi 54080000.vi: tegra_channel_error_status:error 20022 frame 69

How can fix this question?

hello sensor_test,

the failure message tegra_channel_error_status:error 20022 for each frame means the transmission errors.
this is the failure from the CSI side, please check the csi driver as below for more details.

sources/kernel/kernel-4.4/drivers/media/platform/tegra/camera/csi/

please review your device tree for configurations,
some reference for your debugging: https://elinux.org/Jetson_TX2/28.1_Camera_BringUp
thanks

I use the IMX219 for jetson TX1 and R28.2.
I need change the imx219 dtsi file,
Please see my imx219 dtsi file :

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

		nvcsi {
			num-channels = <1>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						liimx219_csi_in0: endpoint@0 {
							csi-port = <0>;
							bus-width = <2>;
							remote-endpoint = <&liimx219_imx219_out0>;
						};
					};
					port@1 {
						reg = <1>;
						liimx219_csi_out0: endpoint@1 {
							remote-endpoint = <&liimx219_vi_in0>;
						};
					};
				};
			};
		};


	};



/* camera control gpio definitions */

	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";
		/**
		* Physical settings to calculate max ISO BW
		*
		* num_csi_lanes = <>;
		* Total number of CSI lanes when all cameras are active
		*
		* max_lane_speed = <>;
		* Max lane speed in Kbit/s
		*
		* min_bits_per_pixel = <>;
		* Min bits per pixel
		*
		* vi_peak_byte_per_pixel = <>;
		* Max byte per pixel for the VI ISO case
		*
		* vi_bw_margin_pct = <>;
		* Vi bandwidth margin in percentage
		*
		* max_pixel_rate = <>;
		* Max pixel rate in Kpixel/s for the ISP ISO case
		*
		* isp_peak_byte_per_pixel = <>;
		* Max byte per pixel for the ISP ISO case
		*
		* isp_bw_margin_pct = <>;
		* Isp bandwidth margin in percentage
		*/
		num_csi_lanes = <2>;
		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>;

		/**
		 * The general guideline for naming badge_info contains 3 parts, and is as follows,
		 * The first part is the camera_board_id for the module; if the module is in a FFD
		 * platform, then use the platform name for this part.
		 * The second part contains the position of the module, ex. "rear" or "front".
		 * The third part contains the last 6 characters of a part number which is found
		 * in the module's specsheet from the vender.
		 */
		modules {
			module0 {
				badge = "imx219_bottom_A6V26";
				position = "bottom";
				orientation = "1";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver v4l2 device name */
					devname = "imx219 30-0036";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@7000c400/imx219_a@10";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
				};
			};
		};
	};



	i2c@7000c400 {
					imx219_a@10 {
					    devnode = "video0";
						compatible = "nvidia,imx219";
						/* I2C device address */
						reg = <0x10>;

						/* Physical dimensions of sensor reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>; */
					physical_w = "5.095";
					physical_h = "4.930";

					sensor_model ="imx219";
					/* Define any required hw resources needed by driver */
					/* ie. clocks, io pins, power sources */
					clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
					clock-names = "clk_out_3";
					clock-frequency = <24000000>;
					mclk = "clk_out_3";
					/*reset-gpios = <&gpio CAM0_RST_L GPIO_ACTIVE_HIGH>; */
                    reset-gpios = <&gpio CAM219_RST_L GPIO_ACTIVE_HIGH>;
					
					/*vana-supply = <&en_vdd_cam_hv_2v8>;*/
					/*vdig-supply = <&avdd-sys>;*/
					/*dovdd-supply = <&en_vdd_cam>;*/
					
					avdd-reg = "vana";
					iovdd-reg = "vif";
					dvdd-reg = "vdig";
					

					mode0 { // IMX219_MODE_3280X2464
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_a";
						discontinuous_clk = "yes";
						cil_settletime = "0";
						
						active_w = "3280";
						active_h = "2464";
						pixel_t = "bayer_rggb";
						readout_orientation = "90";
						line_length = "3448";
						inherent_gain = "1";
						mclk_multiplier = "25";
						pix_clk_hz = "224000000";

						min_gain_val = "1.0";
						max_gain_val = "16.0";
						min_hdr_ratio = "1";
						max_hdr_ratio = "64";
						min_framerate = "1.462526";
						max_framerate = "21";
						min_exp_time = "13";
						max_exp_time = "683709";
						embedded_metadata_height = "2";
					        };
							
						ports {
							#address-cells = <1>;
							#size-cells = <0>;
							port@0 {
								reg = <0>;
								liimx219_imx219_out0: endpoint {
									csi-port = <0>;
									bus-width = <2>;
									remote-endpoint = <&liimx219_csi_in0>;
								  };
							    };
						    };
			};
		};
		
   
};

then WHAT other file I NEED change or create?

hello sensor_test,

  1. may i know did your sensor driver works with TX1/R28.1 before?
  2. please review ALL the configuration, they should following sensor specification.

1.I is use for TX1 R28.2, I have not test it use for TX1 R28.1
2.now I did a lot of tests, and I didn’t find any problems.but the errors is still exist.

Please help me fix this question.
Thanks.

hello sensor_test,

thanks for keeping update the same discussion thread.

please read my comment #4.
since your failure coming from CSI side, i would suggest you to check the clock source and the regulator settings.
in addition, are you able to measure the mipi signaling, please co-work with your hardware engineer to check the signal is following the mipi spec.
thanks

hello JerryChang,
1.Our hardware engineer check the cam_mclk is 12.0MHz, is not 24.0MHz.
2.The otehr mipi line,mipi clkn,mipi clkp,mipi dn0,mipi dp0,mipi dn1,mipi dp1, all is low level,have not any signal.

Please help us to fix this question.

Thanks.

hello sensor_test,

if your mclk is 12Mhz, you should configure the clock-frequency and mclk_khz to 12Mhz too.
moreover, please also refer to our imx219’s sensor device tree in the kernel release package.

sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-e3322-a00.dtsi

Our imx219 dtsi file is set imx219 mclk is 24.0MHz,But We test it is 12.0MHz.

this is our dtsi mclk define:

clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
					clock-names = "clk_out_3";
					clock-frequency = <24000000>;
					mclk = "clk_out_3";
					/*reset-gpios = <&gpio CAM0_RST_L GPIO_ACTIVE_HIGH>; */
                    reset-gpios = <&gpio CAM219_RST_L GPIO_ACTIVE_HIGH>;
					
					/*vana-supply = <&en_vdd_cam_hv_2v8>;*/
					/*vdig-supply = <&avdd-sys>;*/
					/*dovdd-supply = <&en_vdd_cam>;*/
					
					avdd-reg = "vana";
					iovdd-reg = "vif";
					dvdd-reg = "vdig";
					

					mode0 { // IMX219_MODE_3280X2464
						mclk_khz = "24000";
						num_lanes = "2";
						tegra_sinterface = "serial_a";
						discontinuous_clk = "yes";
						cil_settletime = "0";

Please help us to fix this question.

hello sensor_test,

device tree configuration is the description about the actual signaling, this should configure as same as your input.
please have a measurement and enter the correct clock settings, thanks

If dtsi file set CAM_MCLK frequency is 24MHz,
How can I find the info at log file?

hello sensor_test,

this is able to read from sys debug node.
for example,
we’re using mclk as ‘extperiph1’, there’s sysnode naming extperiph1, and you should be able to read the clock rate.

# cat /sys/kernel/debug/clk/extperiph1/clk_rate 
24000000

I read the clk_out_3 is 12.0MHz,
Why is not 24.0MHz?

nvidia@tegra-ubuntu:~$ sudo cat /sys/kernel/debug/clk/clk_out_3/clk_rate 
12000000
nvidia@tegra-ubuntu:~$

hello sensor_test,

suppose that’s correct according to your comment #9,

Our hardware engineer check the cam_mclk is 12.0MHz

please co-work with your hardware engineer to double confirm this,
thanks

YES. it is realy 12.0MHz,

hello sensor_test,

may I know what’s your exception of the mclk.

generally, there’s a range of acceptable input clock frequency.
you should also contact your sensor vendor for confirmation.
in addition, please configure the correct settings in the sensor device tree.
thanks

Hello JerryChang,

  1. I need the sensor mclk frequency is 24.0MHz.

2.Can you help me check my dtsi file? is it set mclk frequency is 24.0MHz?
Because I can not find any errors.

hello sensor_test,

suppose you’re working this on your customize board, you should review the board schematics to confirm which clock you’re using.
sensor device tree cannot ‘set’ the mclk frequency, it’s the configuration about the clock rate.
thanks