xavier nx平台调试多路imx274视频通路

free-jdx 2021-06-03 17:33:36 5937
1. 前言

试图使用三个IMX274相机模块与Xavier NX,
但得到以下错误

[ 55.932842] tegra194-vi5 15c10000.vi: [vi capture status] csi_port 0, stream_id 0, channel_id 1, virtual_channel_id 65535
[ 55.933086] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 55.933208] tegra194-vi5 15c10000.vi: vi capture get status failed

目前使用的是JetPack 4.4。
看起来I2C通信是正常的,
但试图从CSI端口读取时会超时

v4l2-compliance -d /dev/video0

v4l2-compliance SHA   : not available

Driver Info:
        Driver name   : tegra-video
        Card type     : vi-output, imx274 30-001a
        Bus info      : platform:15c10000.vi:0
        Driver version: 4.9.140
        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: 22

        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

采集命令

v4l2-ctl -d /dev/video0 --set-fmt-video=width=2592,height=1944,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100
[   36.944293] tegra194-vi5 15c10000.vi: [vi capture status] csi_port -1, stream_id 65535, channel_id 0, virtual_channel_id 65535
[   36.944534] tegra194-vi5 15c10000.vi: no reply from camera processor4
[   36.944656] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[   36.944815] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[   36.952339] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x39
[   36.952514] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x41
[   36.952683] tegra-capture-ivc ivc-bc00000.rtcpu:ivccontrol@3: No callback found for msg id: 0x37
[   36.952879] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[   39.504294] tegra194-vi5 15c10000.vi: [vi capture status] csi_port -1, stream_id 65535, channel_id 0, virtual_channel_id 65535
[   39.504538] tegra194-vi5 15c10000.vi: no reply from camera processor4
[   39.504665] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[   39.504816] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[   39.511988] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[   42.064330] tegra194-vi5 15c10000.vi: [vi capture status] csi_port -1, stream_id 65535, channel_id 0, virtual_channel_id 65535
[   42.064575] tegra194-vi5 15c10000.vi: no reply from camera processor4
[   42.064699] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[   42.064844] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[   42.075638] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel

没有改变imx274驱动程序

2. 查询trace信息
cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 462/462   #P:2
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
 gst-plugin-scan-6819  [001] ....   155.726605: tegra_channel_open: vi-output, imx274 30-001a
 gst-plugin-scan-6819  [000] ....   155.739603: tegra_channel_set_power: imx274 30-001a : 0x1
 gst-plugin-scan-6819  [000] ....   155.739618: camera_common_s_power: status : 0x1
 gst-plugin-scan-6819  [000] ....   155.750042: tegra_channel_set_power: 15a00000.nvcsi--3 : 0x1
 gst-plugin-scan-6819  [000] ....   155.750047: csi_s_power: enable : 0x1
 gst-plugin-scan-6819  [000] ....   155.756179: tegra_channel_close: vi-output, imx274 30-001a
 gst-plugin-scan-6819  [000] ....   155.756200: tegra_channel_set_power: imx274 30-001a : 0x0
 gst-plugin-scan-6819  [000] ....   155.756214: camera_common_s_power: status : 0x0
 gst-plugin-scan-6819  [000] ....   155.756609: tegra_channel_set_power: 15a00000.nvcsi--3 : 0x0
 gst-plugin-scan-6819  [000] ....   155.756613: csi_s_power: enable : 0x0
 gst-plugin-scan-6819  [000] ....   155.759137: tegra_channel_open: vi-output, imx274 31-001a
 gst-plugin-scan-6819  [000] ....   155.759158: tegra_channel_set_power: imx274 31-001a : 0x1
 gst-plugin-scan-6819  [000] ....   155.759179: camera_common_s_power: status : 0x1
 gst-plugin-scan-6819  [000] ....   155.770021: tegra_channel_set_power: 15a00000.nvcsi--2 : 0x1
 gst-plugin-scan-6819  [000] ....   155.770024: csi_s_power: enable : 0x1
 gst-plugin-scan-6819  [000] ....   155.770711: tegra_channel_close: vi-output, imx274 31-001a
 gst-plugin-scan-6819  [000] ....   155.770721: tegra_channel_set_power: imx274 31-001a : 0x0
 gst-plugin-scan-6819  [000] ....   155.770731: camera_common_s_power: status : 0x0
 gst-plugin-scan-6819  [000] ....   155.771158: tegra_channel_set_power: 15a00000.nvcsi--2 : 0x0
 gst-plugin-scan-6819  [000] ....   155.771161: csi_s_power: enable : 0x0
 gst-plugin-scan-6819  [000] ....   155.774443: tegra_channel_open: vi-output, imx274 32-001a
 gst-plugin-scan-6819  [000] ....   155.774455: tegra_channel_set_power: imx274 32-001a : 0x1
 gst-plugin-scan-6819  [000] ....   155.774473: camera_common_s_power: status : 0x1
 gst-plugin-scan-6819  [000] ....   155.785271: tegra_channel_set_power: 15a00000.nvcsi--1 : 0x1
 gst-plugin-scan-6819  [000] ....   155.785276: csi_s_power: enable : 0x1
 gst-plugin-scan-6819  [000] ....   155.785351: tegra_channel_close: vi-output, imx274 32-001a
 gst-plugin-scan-6819  [000] ....   155.785356: tegra_channel_set_power: imx274 32-001a : 0x0
 gst-plugin-scan-6819  [000] ....   155.785364: camera_common_s_power: status : 0x0
 gst-plugin-scan-6819  [000] ....   155.785652: tegra_channel_set_power: 15a00000.nvcsi--1 : 0x0
 gst-plugin-scan-6819  [000] ....   155.785655: csi_s_power: enable : 0x0
     kworker/0:0-4     [000] ....   158.174433: rtos_queue_peek_from_isr_failed: tstamp:5309811548 queue:0x0bcbcf78
     kworker/0:0-4     [000] ....   158.174440: rtcpu_start: tstamp:5309813083
     kworker/0:0-4     [000] ....   158.174443: rtos_queue_send_from_isr_failed: tstamp:5309824280 queue:0x0bcb41f8
     kworker/0:0-4     [000] ....   158.174444: rtos_queue_send_from_isr_failed: tstamp:5309824431 queue:0x0bcb8a60
     kworker/0:0-4     [000] ....   158.174445: rtos_queue_send_from_isr_failed: tstamp:5309824582 queue:0x0bcba5e0
     kworker/0:0-4     [000] ....   158.174446: rtos_queue_send_from_isr_failed: tstamp:5309824727 queue:0x0bcbb3a0
     kworker/0:0-4     [000] ....   158.174447: rtos_queue_send_from_isr_failed: tstamp:5309824874 queue:0x0bcbc160
     kworker/0:0-4     [000] ....   158.174449: rtcpu_string: tstamp:5309825325 id:0x04010000 str:"Configuring ISP GoS.
"
     kworker/0:0-4     [000] ....   158.174484: rtcpu_string: tstamp:5309825507 id:0x04010000 str:"  VM GOS[#0] addr=0xc2100000
"
     kworker/0:0-4     [000] ....   158.174499: rtcpu_string: tstamp:5309825764 id:0x04010000 str:"  VM GOS[#1] addr=0xc2101000
"
     kworker/0:0-4     [000] ....   158.174512: rtcpu_string: tstamp:5309826035 id:0x04010000 str:"  VM GOS[#2] addr=0xc2102000
"
     kworker/0:0-4     [000] ....   158.174524: rtcpu_string: tstamp:5309826269 id:0x04010000 str:"  VM GOS[#3] addr=0xc2103000
"
     kworker/0:0-4     [000] ....   158.174537: rtcpu_string: tstamp:5309826504 id:0x04010000 str:"  VM GOS[#4] addr=0xc2104000
"
     kworker/0:0-4     [000] ....   158.174549: rtcpu_string: tstamp:5309826737 id:0x04010000 str:"  VM GOS[#5] addr=0xc2105000
"
     kworker/0:0-4     [000] ....   158.174561: rtcpu_string: tstamp:5309839670 id:0x04010000 str:"WARNING: t194/isp5.c:901 [config_channel] ""
     kworker/0:0-4     [000] ....   158.174563: rtcpu_string: tstamp:5309840088 id:0x04010000 str:"All error notifications not enabled: correctable"
     kworker/0:0-4     [000] ....   158.174565: rtcpu_string: tstamp:5309840206 id:0x04010000 str:"=0x00 uncorrectable=0x00"
     kworker/0:0-4     [000] ....   158.174566: rtcpu_string: tstamp:5309840399 id:0x04010000 str:""
"
     kworker/0:0-4     [000] ....   158.346385: rtos_queue_peek_from_isr_failed: tstamp:5314811912 queue:0x0bcbcf78
  nvargus-daemon-6847  [001] ....   158.452746: tegra_channel_open: vi-output, imx274 30-001a
  nvargus-daemon-6847  [001] ....   158.452761: tegra_channel_set_power: imx274 30-001a : 0x1
  nvargus-daemon-6847  [001] ....   158.452772: camera_common_s_power: status : 0x1
  nvargus-daemon-6847  [001] ....   158.463310: tegra_channel_set_power: 15a00000.nvcsi--3 : 0x1
  nvargus-daemon-6847  [001] ....   158.463317: csi_s_power: enable : 0x1
  nvargus-daemon-6847  [001] ....   158.463508: tegra_channel_close: vi-output, imx274 30-001a
  nvargus-daemon-6847  [001] ....   158.463514: tegra_channel_set_power: imx274 30-001a : 0x0
  nvargus-daemon-6847  [001] ....   158.463524: camera_common_s_power: status : 0x0
  nvargus-daemon-6847  [001] ....   158.463735: tegra_channel_set_power: 15a00000.nvcsi--3 : 0x0
  nvargus-daemon-6847  [001] ....   158.463739: csi_s_power: enable : 0x0
  nvargus-daemon-6847  [001] ....   158.465769: tegra_channel_open: vi-output, imx274 31-001a
  nvargus-daemon-6847  [001] ....   158.465779: tegra_channel_set_power: imx274 31-001a : 0x1

      kworker/0:2-1146  [000] ....   159.358407: rtos_queue_send_from_isr_failed: tstamp:5345996191 queue:0x0bcba5e0
     kworker/0:2-1146  [000] ....   159.358408: rtos_queue_send_from_isr_failed: tstamp:5345996338 queue:0x0bcbb3a0
     kworker/0:2-1146  [000] ....   159.358409: rtos_queue_send_from_isr_failed: tstamp:5345996487 queue:0x0bcbc160
     kworker/0:2-1146  [000] ....   159.358412: rtcpu_vinotify_event: tstamp:5346297261 tag:RESERVED_18 channel:0x0b frame:0 vi_tstamp:3565096416 data:0x10000000
     kworker/0:2-1146  [000] ....   159.358413: rtcpu_vinotify_event: tstamp:5346297430 tag:RESERVED_18 channel:0x0b frame:0 vi_tstamp:3565126112 data:0x31000002
     kworker/0:2-1146  [000] ....   159.470666: rtos_queue_peek_from_isr_failed: tstamp:5349811911 queue:0x0bcbcf78
     kworker/0:2-1146  [000] ....   159.638386: rtos_queue_peek_from_isr_failed: tstamp:5354811910 queue:0x0bcbcf78
     kworker/0:2-1146  [000] ....   159.806423: rtos_queue_peek_from_isr_failed: tstamp:5359811911 queue:0x0bcbcf78
     kworker/0:2-1146  [000] ....   159.974385: rtos_queue_peek_from_isr_failed: tstamp:5364811911 queue:0x0bcbcf78
     kworker/0:2-1146  [000] ....   160.086401: rtos_queue_peek_from_isr_failed: tstamp:5369811910 queue:0x0bcbcf78
     kworker/0:2-1146  [000] ....   160.254439: rtos_queue_peek_from_isr_failed: tstamp:5374811908 queue:0x0bcbcf78
     kworker/0:2-1146  [000] ....   160.422450: rtos_queue_peek_from_isr_failed: tstamp:5379811910 queue:0x0bcbcf78
     kworker/0:2-1146  [000] ....   160.590520: rtos_queue_peek_from_isr_failed: tstamp:5384811907 queue:0x0bcbcf78

没有从MIPI总线接收任何验证数据。
可能需要探测MIPI信号和检查CSI通道配置匹配HW连接

检查跟踪发现下面的错误,表示rx FIFO溢出。

kworker/0:2-1146 [000] … 159.358389: rtcpu_nvcsi_intr: tstamp:5345623391 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000110
3. 调整Pix_clk_hz & 时钟

根据之前的经验
可以尝试调整Pix_clk_hz
以及nvcsi和vi时钟

(1)修改Pix_clk_hz & mcLk_multiplier

设备树中修改了以下值:
Pix_clk_hz从576000000到756000000
McLk_multiplier从24到25

(2)调高了nvcsi和vi时钟

echo 998400000 > /sys/kernel/debug/bpmp/debug/clk/vi/rate
echo 1190400000 > /sys/kernel/debug/bpmp/debug/clk/isp/rate
echo 400000000 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

但看起来这些值被限制在以下几个方面:

cat /sys/kernel/debug/bpmp/debug/clk/vi/rate
460800000
cat /sys/kernel/debug/bpmp/debug/clk/isp/rate
576000000
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
314000000

按照上述修改后
仍然无法采集
查看trace也是一样

另一个潜在的信息来源:
运行如下命令

v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=3
[  221.009649] tegra194-vi5 15c10000.vi: [vi capture status] csi_port -1, stream_id 65535, channel_id 0, virtual_channel_id 65535
[  221.009880] tegra194-vi5 15c10000.vi: no reply from camera processor
[  221.009995] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[  221.010134] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[  221.012389] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel

奇怪的是,csi_port一直报错是-1
可能原因是设备树的port匹配错误了

4. 查看media0

media-ctl -p -d /dev/media0

Media controller API version 0.1.0

Media device information
------------------------
driver          tegra194-vi5
model           NVIDIA Tegra Video Input Device
serial          
bus info        
hw revision     0x3
driver version  0.0.0

Device topology
- entity 1: imx274 30-001a (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:SRGGB10_1X10/3840x2160 field:none colorspace:srgb]
                -> "15a00000.nvcsi--3":0 [ENABLED]

- entity 3: 15a00000.nvcsi--3 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                <- "imx274 30-001a":0 [ENABLED]
        pad1: Source
                -> "vi-output, imx274 30-001a":0 [ENABLED]

- entity 6: vi-output, imx274 30-001a (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "15a00000.nvcsi--3":1 [ENABLED]

- entity 18: imx274 31-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
        pad0: Source
                [fmt:SRGGB10_1X10/3840x2160 field:none colorspace:srgb]
                -> "15a00000.nvcsi--2":0 [ENABLED]

- entity 20: 15a00000.nvcsi--2 (2 pads, 2 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev3
        pad0: Sink
                <- "imx274 31-001a":0 [ENABLED]
        pad1: Source
                -> "vi-output, imx274 31-001a":0 [ENABLED]

- entity 23: vi-output, imx274 31-001a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video1
        pad0: Sink
                <- "15a00000.nvcsi--2":1 [ENABLED]

- entity 35: imx274 32-001a (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev4
        pad0: Source
                [fmt:SRGGB10_1X10/3840x2160 field:none colorspace:srgb]
                -> "15a00000.nvcsi--1":0 [ENABLED]

- entity 37: 15a00000.nvcsi--1 (2 pads, 2 links)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev5
        pad0: Sink
                <- "imx274 32-001a":0 [ENABLED]
        pad1: Source
                -> "vi-output, imx274 32-001a":0 [ENABLED]

- entity 40: vi-output, imx274 32-001a (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video2
        pad0: Sink
                <- "15a00000.nvcsi--1":1 [ENABLED]

模式0的分辨率设置为3840X2160,
但我已经尝试了很多不同的分辨率
(模式1= 1920x1080,模式2= 1280x720,模式3= 1280x540)

5. 启用dev_dbg()来确认端口映射

使用以下命令启用了dev_dbg()消息:

echo 'file channel.c +p' > /sys/kernel/debug/dynamic_debug/control
echo 'file csi4_fops.c +p' > /sys/kernel/debug/dynamic_debug/control
echo 'file csi2_fops.c +p' > /sys/kernel/debug/dynamic_debug/control

trace信息如下

gst-plugin-scan-6821  [000] ....    79.146174: tegra_channel_open: vi-output, imx274 30-001a
 gst-plugin-scan-6821  [001] ....    79.147665: tegra_channel_set_power: imx274 30-001a : 0x1
 gst-plugin-scan-6821  [001] ....    79.147680: camera_common_s_power: status : 0x1
 gst-plugin-scan-6821  [001] ....    79.158725: tegra_channel_set_power: 15a00000.nvcsi--3 : 0x1
 gst-plugin-scan-6821  [001] ....    79.158731: csi_s_power: enable : 0x1
 gst-plugin-scan-6821  [001] ....    79.160926: tegra_channel_close: vi-output, imx274 30-001a
 gst-plugin-scan-6821  [001] ....    79.160933: tegra_channel_set_power: imx274 30-001a : 0x0
 gst-plugin-scan-6821  [001] ....    79.160943: camera_common_s_power: status : 0x0
 gst-plugin-scan-6821  [001] ....    79.161172: tegra_channel_set_power: 15a00000.nvcsi--3 : 0x0
 gst-plugin-scan-6821  [001] ....    79.161176: csi_s_power: enable : 0x0
6. 检测设备树port匹配

用示波器检查了信号,看起来没问题。

此外,实际上能够使3个IMX274摄像机工作,
但必须在模式配置中将num_lanes改为2而不是4。

如果我把它们设置为4,就不会像在之前的帖子中显示的那样工作。
现在的设备输入port匹配如下:

host1x {
        vi@15c10000 { // Video Input: this is the port binding
            /* CSI Channels */
                num-channels = <3>; // Number of video inputs
            ports {
                #address-cells = <1>;
                #size-cells = <0>;
                port@0 { // media pad port
                    reg = <0>;
                    liimx274_vi_in0: endpoint {
                        port-index = <0>; // sensor port connection
                        bus-width = <4>; // number of CSI lanes. Each CSI port has 2 CSI lanes, so there are 12 lanes total.
                        remote-endpoint = <&liimx274_csi_out0>; // This binds the two ports. One is for sink and one for source
                    };
                };
                port@1 {
                    reg = <1>;
                    liimx274_vi_in1: endpoint {
                        port-index = <2>; // sensor port connection
                        bus-width = <4>; // number of CSI lanes. Each CSI port has 2 CSI lanes, so there are 12 lanes total.
                        remote-endpoint = <&liimx274_csi_out1>; // This binds the two ports. One is for sink and one for source
                    };
                };
                port@2 {
                    reg = <2>;
                    liimx274_vi_in2: endpoint {
                        port-index = <4>; // sensor port connection
                        bus-width = <4>; // number of CSI lanes. Each CSI port has 2 CSI lanes, so there are 12 lanes total.
                        remote-endpoint = <&liimx274_csi_out2>; // This binds the two ports. One is for sink and one for source
                    };
                };

            };
        };
        // sensor -> (port0)NVCSI(port1) -> (port#)VI
        nvcsi@15a00000 {
            num-channels = <3>;
            #address-cells = <1>;
            #size-cells = <0>;
            channel@0 {
                reg = <0>;
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
                    port@0 {
                        reg = <0>;
                        liimx274_csi_in0: endpoint@0 {
                            port-index = <0>; // sensor port connection
                            bus-width = <4>; // number of CSI lanes. Each CSI port has 2 CSI lanes, so there are 12 lanes total.
                            remote-endpoint = <&liimx274_imx274_out0>; // This binds the two ports. One is for sink and one for source
                        };
                    };
                    port@1 {
                        reg = <1>;
                        liimx274_csi_out0: endpoint@1 {
                            remote-endpoint = <&liimx274_vi_in0>;
                        };
                    };
                };
            };
            channel@1 {
                reg = <1>;
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
                    port@0 {
                        reg = <0>;
                        liimx274_csi_in1: endpoint@2 {
                            port-index = <2>; // sensor port connection
                            bus-width = <4>; // number of CSI lanes. Each CSI port has 2 CSI lanes, so there are 12 lanes total.
                            remote-endpoint = <&liimx274_imx274_out1>; // This binds the two ports. One is for sink and one for source
                        };
                    };
                    port@1 {
                        reg = <1>;
                        liimx274_csi_out1: endpoint@3 {
                            remote-endpoint = <&liimx274_vi_in1>;
                        };
                    };
                };
            };
            channel@2 {
                reg = <2>;
                ports {
                    #address-cells = <1>;
                    #size-cells = <0>;
                    port@0 {
                        reg = <0>;
                        liimx274_csi_in2: endpoint@4 {
                            port-index = <4>; // sensor port connection
                            bus-width = <4>; // number of CSI lanes. Each CSI port has 2 CSI lanes, so there are 12 lanes total.
                            remote-endpoint = <&liimx274_imx274_out2>; // This binds the two ports. One is for sink and one for source
                        };
                    };
                    port@1 {
                        reg = <1>;
                        liimx274_csi_out2: endpoint@5 {
                            remote-endpoint = <&liimx274_vi_in2>;
                        };
                    };
                };
            };          
        };
    };

我使用的是来自Leopard Imaging的imx274驱动程序和传感器初始化表。
我以为他们使用的是四车道传感器配置
tegra194-camera-imx274-dual.dtsi
dsi在那里都使用总线宽度4

我想找到了问题的根源。
imx274_mode_tbls.h实际上是为2 lane配置的,
而设备树是配置的是4lane的配置
所以需要更新4lane的sensor配置文件即可

解决办法:
更新imx274.h, imx274.c,和imx274_mode_tbls.h)为4道配置,
现在我的相机工作。

问题:
图像看起来很模糊,
尝试调试过饱和度,tnr模式,e-mode和wbmode,但仍然很模糊

镜头是干净的,它实际上没有雾在房间里。
有三个摄像头,它们都是这样出现的。
这是命令:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 wbmode=8 saturation=2 tnr-mode=2 ee-mode=2 ! nvvidconv ! queue ! xvimagesink sync=false 

解决办法:

更新isp文件
/var/nvidia/nvcam/settings/

现在三路imx274的图像出图正常了

声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
free-jdx
红包 92 5 评论 打赏
评论
0个
内容存在敏感词
手气红包
    易百纳技术社区暂无数据
相关专栏
置顶时间设置
结束时间
删除原因
  • 广告/SPAM
  • 恶意灌水
  • 违规内容
  • 文不对题
  • 重复发帖
打赏作者
易百纳技术社区
free-jdx
您的支持将鼓励我继续创作!
打赏金额:
¥1易百纳技术社区
¥5易百纳技术社区
¥10易百纳技术社区
¥50易百纳技术社区
¥100易百纳技术社区
支付方式:
微信支付
支付宝支付
易百纳技术社区微信支付
易百纳技术社区
打赏成功!

感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

审核成功

发布时间设置
发布时间:
是否关联周任务-专栏模块

审核失败

失败原因
备注
拼手气红包 红包规则
祝福语
恭喜发财,大吉大利!
红包金额
红包最小金额不能低于5元
红包数量
红包数量范围10~50个
余额支付
当前余额:
可前往问答、专栏板块获取收益 去获取
取 消 确 定

小包子的红包

恭喜发财,大吉大利

已领取20/40,共1.6元 红包规则

    易百纳技术社区