Orin nx 16g上调试l4t-r35.6.0 版本的x8b摄像头模组

Continuing the discussion from Request debug RTCPU image for JP5.1.1:

嗨,你们好!
我在适配完x8b + 美信串行解串器的驱动后,使用trace , 发现了 VIFALC_TDSTATE 的,没有流的问题;我需要上面链接中提供给35.6.0的固件,来调试我的驱动。我有查个很多个相关的用例,port-index 和bus-width我设置为2; 我的max9296接到了orin nx 的cam1接口;我需要您们的帮助

hello 1129538701,

you may refer to SerDes Pixel Clock to examine your clock settings, which must be set correctly to avoid potential issues.

is it 2-lane configuration, and it used CSI-C?
you may double check you’re using CAM1 slot, (J21) CSI-C/D.

besides,
please share your camera port bindings for reference.
you may also share the VI tracing logs for quick check.

let me move this topic to Orin NX category, btw.

嗨,我的摄像头输出格式为:3840 * 2160 * 30,raw12 ,bggr ,wdr pwl 的格式。但是SDK只支持bayer的,我并没有去修改,使用了bayer。我设置了SerDes Pixel Clock 为300000000。修改到CSI-C后,dmesg 没有出现VI delay 没有出流的问题,但是出现了err_data 131072的问题。 trace 出现CSIMUX_STREAM — data:0x100 的错误。 并且v4l2-ctrl没有输出帧率打印。

please see-also Topic 318537 for some info of discarding frame messages, and please debugging into it.

hello 1129538701,

there’s kernel source package to include all reference drivers,
you may visit Jetson Linux | NVIDIA Developer to download [Driver Package (BSP) Sources].

我发现我的输出数据有 嵌入行,2 top + 2 bottom,还有2行 statistics 行在 bottom,请问我需要怎么设置embedded_metadata_height

hello 1129538701,

I’m not sure this part per your description.
could you please share me the diagram for reference.

嗨,我将我的DTS配置和x8b输出图像的结构图发给您了,我这边的sensor配置有2 front + 2 bot rows和2 statistics rows。请问我的DTS配置正常吗。目前还是打印131072的问题,trace 出现CSIMUX_STREAM — data:0x100 的错误。 并且v4l2-ctrl没有输出帧率打印。

hello 1129538701,

pixel parser able to read action region and embedded metadata, both TOP and BOTTOM [i.e. Header and Footer] embedded data are supported, given their data types are 0x12.
please see-also embeddedData type specified by CSI-2.
according to above, you should configure embedded_metadata_height = "4"; and leave others as ignore.

如果我的embedded data types 不是 0x12,embedded_metadata_height = “0” 这没问题吧

我的原始有效数据是HDR4 PWL12的格式,active区的大小为3840 2160,我的DTS设置的有问题吗。我改embedded_metadata_height=0的情况也是出现我上面的问题

FYI,
discarding frame with err_data 131072 it meant a CRC mismatch was detected in CSI packet payload data. the payload is corrupted.

trace_x8b.txt (6.2 KB)
我很需要你们的帮忙,请查看trace信息

因为x8b输出的图像为 HDR4 PWL12 格式,但是我并不使用ORIN NX平台的的bayer_wdr_pwl。所以我是可以通过mode_type = “bayer” 的方式,以及不设置dynamic_pixel_bit_depth, 来获取我通过用户层默认的寄存器配置。来获取raw图吗

hello 1129538701,

it looks there’s CHANSEL_SHORT_FRAME reported, which meant a received frame height is less than VI’s expectation.
per your comment #13, and your device tree settings, that’s active rows = 2160, right?
I assume that short frame failure due to few rows (such as test-pattern rows) has detected by VI engine. so, please give it a try to increase your active_h settings for testing.

BTW,
let me share you VI tracing logs with a success image capture as an example,
here must be one pair of CHANSEL_PXL_SOF/CHANSEL_PXL_EOF to indicate a frame has detected by VI engine.
afterwards, it’s ATOMP_FRAME_DONE to indicate it’s complete writing a frame to memory.
for instance,

rtcpu_vinotify_event: tstamp:4058867917 cch:-1 vi:0 tag:CSIMUX_STREAM channel:0x00 frame:0 vi_tstamp:129874754944 data:0x0000000000000001
rtcpu_vinotify_event: tstamp:4059206674 cch:0 vi:0 tag:ATOMP_FS channel:0x00 frame:1 vi_tstamp:129891804896 data:0x0000000800000000
rtcpu_vinotify_event: tstamp:4059206818 cch:0 vi:0 tag:CHANSEL_PXL_SOF channel:0x23 frame:1 vi_tstamp:129891808928 data:0x0000000000000001
rtcpu_vinotify_event: tstamp:4059206976 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:1 vi_tstamp:129891815424 data:0x0000000008020001
rtcpu_vinotify_error: tstamp:4060164160 cch:0 vi:0 tag:CSIMUX_FRAME channel:0x00 frame:1 vi_tstamp:129925171392 data:0x00000000000000a0
rtcpu_vinotify_event: tstamp:4060166846 cch:0 vi:0 tag:CHANSEL_PXL_EOF channel:0x23 frame:1 vi_tstamp:129923836800 data:0x0000000004370002
rtcpu_vinotify_event: tstamp:4060167015 cch:0 vi:0 tag:ATOMP_FRAME_DONE channel:0x23 frame:1 vi_tstamp:129923837312 data:0x0000000000000000

may I also know what’s the stream formats looks like for coming to CSI channel? for instance, is it looks like Raw12 bayer formats? you must configure the device tree property to match the stream settings.

嗨, JC
我有修改sensor配置,将所有额外行去掉,只留下active rows 或许还有unique rows, 但是它的数据类型为0x16,现在还是有CHANSEL_SHORT_FRAME的错误。另外,我的x8b的技术支持说这是raw12。 我没有思路去解决这个问题了,需要你的帮助。
谢谢!

hello 1129538701,

in general, this is due to a received frame-height is less than VI’s expectation.
you may have a quick workaround to reduce the DT setting, active_h for testing.
let’s see whether the error logs changes by modify the values.

可以举个例子吗

hello 1129538701,

just for confirmation.. is your active rows still output 2160?
please try reduce the setting, such as active_h = "2158";, active_h = "2156";..etc for checking the error reports.

我使用1920 1080 正常出raw流了。但是我的第2路图像流出现了 CHANSEL_NOMATCH — data: 0x589的问题