Imx327 cannot display on TX2

Hi,
I am using IMX327 on TX2 and cannot get video data. Please help me analyze, what is the problem.
$v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=500

[ 1522.754604] nvcsi 150c0000.nvcsi: csi4_stop_streaming port_idx=0, lanes=2
[ 1522.754620] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 1522.754640] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000002
[ 1522.754659] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 1522.754674] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x0000000e
[ 1522.763491] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) INTR_STATUS 0x00000006
[ 1522.771384] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERR_INTR_STATUS 0x00000006
[ 1522.779671] nvcsi 150c0000.nvcsi: csi4_
trace.txt (2.2 MB)
Uploading: dmesg.txt…
cil_check_status 397
[ 1522.779691] nvcsi 150c0000.nvcsi: csi4_start_streaming port_idx=0, lanes=2
[ 1522.779705] nvcsi 150c0000.nvcsi: csi4_stream_init
[ 1522.779727] nvcsi 150c0000.nvcsi: csi4_stream_config
[ 1522.779749] nvcsi 150c0000.nvcsi: csi4_stream_config (0) read VC0_DPCM_CTRL = 00000000
[ 1522.779763] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 1522.779780] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000000
[ 1522.779801] nvcsi 150c0000.nvcsi: cil core clock: 204, csi clock: 89
[ 1522.779814] nvcsi 150c0000.nvcsi: cil_settingtime was autocalculated
[ 1522.779829] nvcsi 150c0000.nvcsi: csi settle time: 33, cil settle time: 27
[ 1522.780449] tegra-vi4 15700000.vi: Create Surface with imgW=1920, imgH=1080, memFmt=32
[ 1522.984855] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 1522.991516] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel

cat /sys/kernel/debug/trancing/trace
v4l2-ctl-9384 [004] … 1296.311069: tegra_channel_open: vi-output, imx327 2-001a
v4l2-ctl-9384 [000] … 1296.312453: tegra_channel_set_power: imx327 2-001a : 0x1
v4l2-ctl-9384 [000] … 1296.312466: camera_common_s_power: status : 0x1
v4l2-ctl-9384 [000] … 1296.313111: tegra_channel_set_power: 150c0000.nvcsi–1 : 0x1
v4l2-ctl-9384 [000] … 1296.313115: csi_s_power: enable : 0x1
v4l2-ctl-9384 [000] … 1296.328351: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, imx3-9385 [004] … 1296.329002: tegra_channel_set_stream: enable : 0x1
vi-output, imx3-9385 [000] … 1296.341737: tegra_channel_set_stream: 150c0000.nvcsi–1 : 0x1
vi-output, imx3-9385 [000] … 1296.341745: csi_s_stream: enable : 0x1
vi-output, imx3-9385 [000] … 1296.341776: tegra_channel_set_stream: imx327 2-001a : 0x1
kworker/0:1-739 [000] … 1296.379538: rtos_queue_peek_from_isr_failed: tstamp:40773024345 queue:0x0b4b4940
kworker/0:1-739 [000] … 1296.379545: rtos_queue_send_from_isr_failed: tstamp:40773093149 queue:0x0b4a7698
kworker/0:1-739 [000] … 1296.379547: rtos_queue_send_from_isr_failed: tstamp:40773093272 queue:0x0b4ab1a8
kworker/0:1-739 [000] … 1296.379548: rtos_queue_send_from_isr_failed: tstamp:40773093393 queue:0x0b4acdd8
kworker/0:1-739 [000] … 1296.379549: rtos_queue_send_from_isr_failed: tstamp:40773093527 queue:0x0b4ae958
kworker/0:1-739 [000] … 1296.379550: rtos_queue_send_from_isr_failed: tstamp:40773093643 queue:0x0b4af718
kworker/0:1-739 [000] … 1296.379551: rtos_queue_send_from_isr_failed: tstamp:40773093760 queue:0x0b4b04d8
kworker/0:1-739 [000] … 1296.379552: rtos_queue_send_from_isr_failed: tstamp:40773093877 queue:0x0b4b1298
kworker/0:1-739 [000] … 1296.379553: rtos_queue_send_from_isr_failed: tstamp:40773093993 queue:0x0b4b2058
kworker/0:1-739 [000] … 1296.379556: rtos_queue_send_failed: tstamp:40773094498 queue:0x0b4a7698
kworker/0:1-739 [000] … 1296.379557: rtos_queue_send_from_isr_failed: tstamp:40773098248 queue:0x0b4a7698
kworker/0:1-739 [000] … 1296.379558: rtos_queue_send_from_isr_failed: tstamp:40773098377 queue:0x0b4ab1a8
kworker/0:1-739 [000] … 1296.379559: rtos_queue_send_from_isr_failed: tstamp:40773098495 queue:0x0b4acdd8
kworker/0:1-739 [000] … 1296.379559: rtos_queue_send_from_isr_failed: tstamp:40773098612 queue:0x0b4ae958
kworker/0:1-739 [000] … 1296.379560: rtos_queue_send_from_isr_failed: tstamp:40773098729 queue:0x0b4af718
kworker/0:1-739 [000] … 1296.379561: rtos_queue_send_from_isr_failed: tstamp:40773098848 queue:0x0b4b04d8
kworker/0:1-739 [000] … 1296.379562: rtos_queue_send_from_isr_failed: tstamp:40773098965 queue:0x0b4b1298
kworker/0:1-739 [000] … 1296.379563: rtos_queue_send_from_isr_failed: tstamp:40773099082 queue:0x0b4b2058
kworker/0:1-739 [000] … 1296.379564: rtos_queue_send_failed: tstamp:40773100189 queue:0x0b4a7698

$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘RG10’
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)

$ v4l2-compliance -d /dev/video0
v4l2-compliance SHA : not available

Driver Info:
Driver name : tegra-video
Card type : vi-output, imx327 2-001a
Bus info : platform:15700000.vi:0
Driver version: 4.9.253
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
test for unlimited opens: 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: 15

Format ioctls:
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
	test VIDIOC_G/S_PARM: FAIL
	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: 43, Succeeded: 42, Failed: 1, Warnings: 0

Looks like NVCSI/VI didn’t receive any validate data from the sensor.
Please probe the MIPI output signal to confirm it.

Thanks

Hi,
When I execute “v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=500” ,there is no output, and the program cannot exit automatically.
Most likely a driving problem or hardware problem?

It’s could be sensor driver configure or HW problem.

Hi,
If it is a driver problem, do I only check the power-on timing in the power-ON function?

If able communicate to sensor via i2c that could tell the power/rest could be fine.
Suppose you need to probe the MIPI to confirm if sensor output data and match the MIPI spec.

Hi,
Thank you for your suggestions.
“could tell the power/rest could be fine” What do you mean, I don’t understand.

The Power Down/Rest PINs need to check the HW schematic to know it.

Hi,
I measured the MIPI signal with an ordinary oscilloscope, Does the oscilloscope waveform conform to MIPI specification?

Ok, looks like did have output MIPI data.

Below is the “ERROR_STATUS2VI_VC0 = 0x0000000e”

err_status2vi_vc0:
[0] : PP fsm timeout error
[1] : PH ECC single bit error
[2] : Packet Payload CRC error
[3] : Packet Payload is less than WC in PH
[4] : PH one CRC erro

Hi,
When I change port-index =1,the ERROR_STATUS2VI_VC error doesn’t show.
But there is CILA_INTR_STATUS error,I found that the error refers to TRM manual NVCSI_PHY_0_CILA_ERR_INTR_STATUS_CILA_0. Does this mean that I specified port-index =0 incorrectly earlier, and port-index =1 is correct?
One more question, " [ 174.525554] tegra-vi4 15700000.vi: Create Surface with imgW=1920, imgH=1080, memFmt=32 " and “v4l2-ctl-9316 [005] … 170.950431: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20” memfmt=32 and fmt 20 What does that mean?

$dmesg
[ 174.508732] nvcsi 150c0000.nvcsi: csi4_cil_check_status (1) CILA_INTR_STATUS 0x00000154
[ 174.516895] nvcsi 150c0000.nvcsi: csi4_cil_check_status (1) CILA_ERR_INTR_STATUS 0x00000154
[ 174.516902] nvcsi 150c0000.nvcsi: csi4_start_streaming port_idx=0, lanes=2
[ 174.516906] nvcsi 150c0000.nvcsi: csi4_stream_init
[ 174.516917] nvcsi 150c0000.nvcsi: csi4_stream_config
[ 174.516926] nvcsi 150c0000.nvcsi: csi4_stream_config (1) read VC0_DPCM_CTRL = 00000000
[ 174.516928] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 174.516933] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000000
[ 174.516940] nvcsi 150c0000.nvcsi: cil core clock: 204, csi clock: 74
[ 174.516943] nvcsi 150c0000.nvcsi: cil_settingtime was autocalculated
[ 174.516947] nvcsi 150c0000.nvcsi: csi settle time: 33, cil settle time: 28
[ 174.525554] tegra-vi4 15700000.vi: Create Surface with imgW=1920, imgH=1080, memFmt=32
[ 174.726543] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 174.733108] tegra-vi4 15700000.vi: tegra_channel_error_recovery: attempting to reset the capture channel
[ 174.744534] nvcsi 150c0000.nvcsi: csi4_stop_streaming port_idx=0, lanes=2
[ 174.744542] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 174.744549] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000200
[ 174.744558] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 174.744572] nvcsi 150c0000.nvcsi: csi4_cil_check_status 397

$cat /sys/kernel/debug/tracing/trace
v4l2-ctl-9316 [004] … 170.932795: tegra_channel_open: vi-output, imx327 2-001a
v4l2-ctl-9316 [000] … 170.934146: tegra_channel_set_power: imx327 2-001a : 0x1
v4l2-ctl-9316 [000] … 170.934158: camera_common_s_power: status : 0x1
v4l2-ctl-9316 [000] … 170.934607: tegra_channel_set_power: 150c0000.nvcsi–1 : 0x1
v4l2-ctl-9316 [000] … 170.934611: csi_s_power: enable : 0x1
v4l2-ctl-9316 [005] … 170.950431: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, imx3-9317 [003] … 170.952171: tegra_channel_set_stream: enable : 0x1
vi-output, imx3-9317 [003] … 170.959465: tegra_channel_set_stream: 150c0000.nvcsi–1 : 0x1
vi-output, imx3-9317 [003] … 170.959471: csi_s_stream: enable : 0x1
vi-output, imx3-9317 [003] … 170.959551: tegra_channel_set_stream: imx327 2-001a : 0x1
kworker/5:3-1631 [005] … 170.974549: rtos_queue_peek_from_isr_failed: tstamp:5605355759 queue:0x0b4b4940
kworker/5:3-1631 [005] … 170.974555: rtos_queue_send_from_isr_failed: tstamp:5605427845 queue:0x0b4a7698
kworker/5:3-1631 [005] … 170.974556: rtos_queue_send_from_isr_failed: tstamp:5605427967 queue:0x0b4ab1a8
kworker/5:3-1631 [005] … 170.974557: rtos_queue_send_from_isr_failed: tstamp:5605428086 queue:0x0b4acdd8
kworker/5:3-1631 [005] … 170.974558: rtos_queue_send_from_isr_failed: tstamp:5605428205 queue:0x0b4ae958
kworker/5:3-1631 [005] … 170.974559: rtos_queue_send_from_isr_failed: tstamp:5605428321 queue:0x0b4af718
kworker/5:3-1631 [005] … 170.974560: rtos_queue_send_from_isr_failed: tstamp:5605428438 queue:0x0b4b04d8
kworker/5:3-1631 [005] … 170.974560: rtos_queue_send_from_isr_failed: tstamp:5605428554 queue:0x0b4b1298
kworker/5:3-1631 [005] … 170.974561: rtos_queue_send_from_isr_failed: tstamp:5605428671 queue:0x0b4b2058
kworker/5:3-1631 [005] … 170.974563: rtos_queue_send_failed: tstamp:5605429192 queue:0x0b4a7698
kworker/5:3-1631 [005] … 170.974564: rtos_queue_send_from_isr_failed: tstamp:5605431556 queue:0x0b4a7698
kworker/5:3-1631 [005] … 170.974565: rtos_queue_send_from_isr_failed: tstamp:5605431673 queue:0x0b4ab1a8
kworker/5:3-1631 [005] … 170.974565: rtos_queue_send_from_isr_failed: tstamp:5605431791 queue:0x0b4acdd8
kworker/5:3-1631 [005] … 170.974566: rtos_queue_send_from_isr_failed: tstamp:5605431909 queue:0x0b4ae958
kworker/5:3-1631 [005] … 170.974567: rtos_queue_send_from_isr_failed: tstamp:5605432025 queue:0x0b4af718
kworker/5:3-1631 [005] … 170.974567: rtos_queue_send_from_isr_failed: tstamp:5605432141 queue:0x0b4b04d8
kworker/5:3-1631 [005] … 170.974568: rtos_queue_send_from_isr_failed: tstamp:5605432258 queue:0x0b4b1298
kworker/5:3-1631 [005] … 170.974569: rtos_queue_send_from_isr_failed: tstamp:5605432377 queue:0x0b4b2058
kworker/5:3-1631 [005] … 170.974570: rtos_queue_send_failed: tstamp:5605433462 queue:0x0b4a7698
kworker/5:3-1631 [005] … 171.142586: rtos_queue_peek_from_isr_failed: tstamp:5610356134 queue:0x0b4b4940
kworker/5:3-1631 [005] … 171.310582: rtos_queue_peek_from_isr_failed: tstamp:5615356116 queue:0x0b4b4940
vi-output, imx3-9317 [000] … 171.444267: tegra_channel_capture_setup: vnc_id 0 W 1920 H 1080 fmt 20
vi-output, imx3-9317 [000] … 171.444331: tegra_channel_capture_frame: sof:-549620698988.-268177980224
kworker/5:3-1631 [005] … 171.478580: rtos_queue_send_from_isr_failed: tstamp:5620323971 queue:0x0b4a7698
kworker/5:3-1631 [005] … 171.478587: rtos_queue_send_from_isr_failed: tstamp:5620324095 queue:0x0b4ab1a8
kworker/5:3-1631 [005] … 171.478590: rtos_queue_send_from_isr_failed: tstamp:5620324214 queue:0x0b4acdd8
kworker/5:3-1631 [005] … 171.478593: rtos_queue_send_from_isr_failed: tstamp:5620324332 queue:0x0b4ae958
kworker/5:3-1631 [005] … 171.478595: rtos_queue_send_from_isr_failed: tstamp:5620324449 queue:0x0b4af718
kworker/5:3-1631 [005] … 171.478597: rtos_queue_send_from_isr_failed: tstamp:5620324564 queue:0x0b4b04d8

$v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘RG12’
Name : 12-bit Bayer RGRG/GBGB
Size: Discrete 1920x1080

Hi,
Can oscilloscope be used to measure the MIPI DATE signal on the TX2 camera adapter board ?

Sure if scope has enough bandwidth, it is same as what you did before.