CHANSEL_FAULT of imx334 sensor porting on AGX

Hi , Vendor:

We port kernel driver for sensor imx334 on AGX , it can’t function normally via v4l2-ctl command.

Then found that frames are discarded in dmesg kernel log

[ 407.470479] tegra194-vi5 15c10000.vi: corr_err: discarding frame 254, flags: 0, err_data 256
[ 407.503762] tegra194-vi5 15c10000.vi: corr_err: discarding frame 1, flags: 0, err_data 256
[ 407.537087] tegra194-vi5 15c10000.vi: corr_err: discarding frame 2, flags: 0, err_data 256
[ 407.570416] tegra194-vi5 15c10000.vi: corr_err: discarding frame 3, flags: 0, err_data 256
[ 407.603755] tegra194-vi5 15c10000.vi: corr_err: discarding frame 4, flags: 0, err_data 256
[ 407.637164] tegra194-vi5 15c10000.vi: corr_err: discarding frame 5, flags: 0, err_data 256
[ 407.670419] tegra194-vi5 15c10000.vi: corr_err: discarding frame 6, flags: 0, err_data 256
[ 407.703749] tegra194-vi5 15c10000.vi: corr_err: discarding frame 7, flags: 0, err_data 256
[ 407.737142] tegra194-vi5 15c10000.vi: corr_err: discarding frame 8, flags: 0, err_data 256
[ 407.770407] tegra194-vi5 15c10000.vi: corr_err: discarding frame 9, flags: 0, err_data 256
[ 407.803737] tegra194-vi5 15c10000.vi: corr_err: discarding frame 10, flags: 0, err_data 256
[ 407.837078] tegra194-vi5 15c10000.vi: corr_err: discarding frame 11, flags: 0, err_data 256
[ 407.870410] tegra194-vi5 15c10000.vi: corr_err: discarding frame 12, flags: 0, err_data 256
[ 407.903782] tegra194-vi5 15c10000.vi: corr_err: discarding frame 13, flags: 0, err_data 256
[ 407.937074] tegra194-vi5 15c10000.vi: corr_err: discarding frame 14, flags: 0, err_data 256
[ 407.970403] tegra194-vi5 15c10000.vi: corr_err: discarding frame 15, flags: 0, err_data 256
[ 408.003792] tegra194-vi5 15c10000.vi: corr_err: discarding frame 16, flags: 0, err_data 256
[ 408.037064] tegra194-vi5 15c10000.vi: corr_err: discarding frame 17, flags: 0, err_data 256
[ 408.070404] tegra194-vi5 15c10000.vi: corr_err: discarding frame 18, flags: 0, err_data 256

Then we enable event trace log

 kworker/0:0-7442  [000] ....   774.004423: rtcpu_vinotify_event: tstamp:24506529728 tag:ATOMP_FS channel:0x00 frame:1 vi_tstamp:24506514186 data:0x00000000
 kworker/0:0-7442  [000] ....   774.004564: rtcpu_vinotify_event: tstamp:24506529880 tag:CHANSEL_EMBED_SOF channel:0x23 frame:1 vi_tstamp:24506514694 data:0x00000004
 kworker/0:0-7442  [000] ....   774.004701: rtcpu_vinotify_event: tstamp:24506530054 tag:CHANSEL_EMBED_EOF channel:0x23 frame:1 vi_tstamp:24506515031 data:0x00000008
 kworker/0:0-7442  [000] ....   774.004848: rtcpu_vinotify_event: tstamp:24506530199 tag:ATOMP_EMB_DATA_DONE channel:0x23 frame:1 vi_tstamp:24506515061 data:0x00000000
 kworker/0:0-7442  [000] ....   774.004987: rtcpu_vinotify_event: tstamp:24506530383 tag:RESERVED_19 channel:0x23 frame:1 vi_tstamp:23999277408 data:0x03020001
 kworker/0:0-7442  [000] ....   774.005119: rtcpu_vinotify_event: tstamp:24506530530 tag:CHANSEL_NOMATCH channel:0x04 frame:1 vi_tstamp:24506515156 data:0x000006e9
 kworker/0:0-7442  [000] ....   774.005254: rtcpu_vinotify_event: tstamp:24506530702 tag:CHANSEL_PXL_SOF channel:0x23 frame:1 vi_tstamp:24506524416 data:0x00000001
 kworker/0:0-7442  [000] ....   774.005386: rtcpu_vinotify_event: tstamp:24506530846 tag:RESERVED_19 channel:0x23 frame:1 vi_tstamp:23999574144 data:0x08020001
 kworker/0:0-7442  [000] ....   774.005527: rtcpu_vinotify_event: tstamp:24506531017 tag:CHANSEL_FAULT channel:0x23 frame:1 vi_tstamp:24506524751 data:0x00000100
 kworker/0:0-7442  [000] ....   774.005665: rtcpu_vinotify_event: tstamp:24506531165 tag:RESERVED_19 channel:0x23 frame:1 vi_tstamp:23999600576 data:0x01020001
 kworker/0:0-7442  [000] ....   774.005843: rtcpu_vinotify_event: tstamp:24507552947 tag:CHANSEL_FAULT channel:0x23 frame:1 vi_tstamp:24507524245 data:0x086f0182
 kworker/0:0-7442  [000] ....   774.005989: rtcpu_vinotify_event: tstamp:24507553119 tag:RESERVED_19 channel:0x23 frame:1 vi_tstamp:24031572480 data:0x01020001
 kworker/0:0-7442  [000] ....   774.006143: rtcpu_vinotify_event: tstamp:24507553292 tag:ATOMP_FRAME_DONE channel:0x23 frame:1 vi_tstamp:24507524275 data:0x00000000
 kworker/0:0-7442  [000] ....   774.006286: rtcpu_vinotify_event: tstamp:24507553437 tag:RESERVED_19 channel:0x23 frame:1 vi_tstamp:24031577376 data:0x02020001
 kworker/0:0-7442  [000] ....   774.006420: rtcpu_vinotify_event: tstamp:24507553611 tag:CHANSEL_FAULT channel:0x23 frame:1 vi_tstamp:24507524372 data:0x087001c0
 kworker/0:0-7442  [000] ....   774.006552: rtcpu_vinotify_event: tstamp:24507553757 tag:RESERVED_19 channel:0x23 frame:1 vi_tstamp:24031586464 data:0x01020001
 kworker/0:0-7442  [000] ....   774.006682: rtcpu_vinotify_event: tstamp:24507553930 tag:FE channel:0x00 frame:1 vi_tstamp:24507533530 data:0x00000022
 kworker/0:0-7442  [000] ....   774.006810: rtcpu_vinotify_event: tstamp:24507554083 tag:ATOMP_FE channel:0x00 frame:1 vi_tstamp:24507533533 data:0x00000000 

We had make a survey on this forum and found that it is related to VI received line number which is not as VI expected.

We had tried to modified active_w , active_h and embedded_metadata_height, but is seems the same.

If there is any suggestion??

Our source code and log is as attachment

trace20210802.txt (1.6 MB)
imx334_patch.tar.xz (8.9 KB)

Thanks for help

Boost the NVCSI/VI/ISP clocks to try.
And check the CHANSEL_FAULT bit field to adjust the active_w/active_h

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.