Porting Camera driver to TX2

@ShaneCCC
well here is the output of the v4l command with tracing enabled

root@tegra-ubuntu:~# v4l2-ctl --device /dev/video0  --stream-mmap --stream-to=frame0.raw --stream-count=1 --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
	Index    : 0
	Type     : Video Capture
	Flags    : mapped, done
	Field    : None
	Sequence : 0
	Length   : 25034752
	Bytesused: 25034752
	Timestamp: 0.18446744073441926529s (Monotonic, End-of-Frame)

VIDIOC_STREAMOFF: ok

root@tegra-ubuntu:~# cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 68/68   #P:4
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/5:0-5800  [005] ...1   468.834670: rtos_queue_peek_from_isr_failed: tstamp:14965746351 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   468.834681: rtcpu_start: tstamp:14965748913
     kworker/5:0-5800  [005] ...1   468.834685: rtcpu_dbg_set_loglevel: tstamp:14965752952 old:0 new:2
     kworker/5:0-5800  [005] ...1   468.834688: rtos_queue_peek_from_isr_failed: tstamp:14965786042 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   502.381388: rtos_queue_peek_from_isr_failed: tstamp:16014584844 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   502.381391: rtcpu_start: tstamp:16014585622
     kworker/5:0-5800  [005] ...1   502.534843: rtos_queue_peek_from_isr_failed: tstamp:16019585777 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   502.742846: rtos_queue_peek_from_isr_failed: tstamp:16024586247 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   502.898970: rtos_queue_peek_from_isr_failed: tstamp:16029586725 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   503.014804: rtos_queue_peek_from_isr_failed: tstamp:16034587242 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   503.218845: rtos_queue_peek_from_isr_failed: tstamp:16039587768 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   503.270835: rtcpu_vinotify_handle_msg: tstamp:16041133487 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:3156230914 data:0x00000000
     kworker/5:0-5800  [005] ...1   503.270837: rtcpu_vinotify_handle_msg: tstamp:16041133645 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3156231234 data:0x00010800
     kworker/5:0-5800  [005] ...1   503.270839: rtcpu_vinotify_handle_msg: tstamp:16041139085 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3156236769 data:0x00000801
     kworker/5:0-5800  [005] ...1   503.270841: rtcpu_vinotify_handle_msg: tstamp:16042130809 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:3157228305 data:0x00000001
     kworker/5:0-5800  [005] ...1   503.270842: rtcpu_vinotify_handle_msg: tstamp:16042130975 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:3157228308 data:0x00000000
     kworker/5:0-5800  [005] ...1   503.374829: rtos_queue_peek_from_isr_failed: tstamp:16044588277 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   503.530827: rtos_queue_peek_from_isr_failed: tstamp:16049588781 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   503.686865: rtos_queue_peek_from_isr_failed: tstamp:16054589323 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   503.842858: rtos_queue_peek_from_isr_failed: tstamp:16059589794 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   503.998871: rtos_queue_peek_from_isr_failed: tstamp:16064590302 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   504.154857: rtos_queue_peek_from_isr_failed: tstamp:16069590811 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   504.258878: rtcpu_vinotify_handle_msg: tstamp:16072383476 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:3187480957 data:0x00000000
     kworker/5:0-5800  [005] ...1   504.258883: rtcpu_vinotify_handle_msg: tstamp:16072383615 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3187481277 data:0x00010800
     kworker/5:0-5800  [005] ...1   504.258886: rtcpu_vinotify_handle_msg: tstamp:16072389126 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3187486811 data:0x00000801
     kworker/5:0-5800  [005] ...1   504.258888: rtcpu_vinotify_handle_msg: tstamp:16073380852 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:3188478347 data:0x00000001
     kworker/5:0-5800  [005] ...1   504.258890: rtcpu_vinotify_handle_msg: tstamp:16073381018 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:3188478351 data:0x00000000
     kworker/5:0-5800  [005] ...1   504.310865: rtos_queue_peek_from_isr_failed: tstamp:16074591316 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   504.466847: rtos_queue_peek_from_isr_failed: tstamp:16079591854 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   504.622843: rtos_queue_peek_from_isr_failed: tstamp:16084592329 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   504.778858: rtos_queue_peek_from_isr_failed: tstamp:16089592837 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   504.934855: rtos_queue_peek_from_isr_failed: tstamp:16094593411 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   505.142838: rtos_queue_peek_from_isr_failed: tstamp:16099593850 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   505.246852: rtcpu_vinotify_handle_msg: tstamp:16103633522 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:3218730999 data:0x00000000
     kworker/5:0-5800  [005] ...1   505.246857: rtcpu_vinotify_handle_msg: tstamp:16103633660 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3218731320 data:0x00010800
     kworker/5:0-5800  [005] ...1   505.246858: rtcpu_vinotify_handle_msg: tstamp:16103639167 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3218736854 data:0x00000801
     kworker/5:0-5800  [005] ...1   505.298851: rtos_queue_peek_from_isr_failed: tstamp:16104594353 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   505.298853: rtcpu_vinotify_handle_msg: tstamp:16104630892 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:3219728390 data:0x00000001
     kworker/5:0-5800  [005] ...1   505.298855: rtcpu_vinotify_handle_msg: tstamp:16104631054 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:3219728393 data:0x00000000
     kworker/5:0-5800  [005] ...1   505.454839: rtos_queue_peek_from_isr_failed: tstamp:16109594864 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   505.610882: rtos_queue_peek_from_isr_failed: tstamp:16114595372 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   505.766849: rtos_queue_peek_from_isr_failed: tstamp:16119595886 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   505.922851: rtos_queue_peek_from_isr_failed: tstamp:16124596374 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   506.078886: rtos_queue_peek_from_isr_failed: tstamp:16129596910 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   506.234897: rtos_queue_peek_from_isr_failed: tstamp:16134597398 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   506.286838: rtcpu_vinotify_handle_msg: tstamp:16135925231 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:3251022710 data:0x00000000
     kworker/5:0-5800  [005] ...1   506.286841: rtcpu_vinotify_handle_msg: tstamp:16135925370 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3251023031 data:0x00010800
     kworker/5:0-5800  [005] ...1   506.286841: rtcpu_vinotify_handle_msg: tstamp:16135930878 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3251028564 data:0x00000801
     kworker/5:0-5800  [005] ...1   506.338846: rtcpu_vinotify_handle_msg: tstamp:16136922571 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:3252020101 data:0x00000001
     kworker/5:0-5800  [005] ...1   506.338849: rtcpu_vinotify_handle_msg: tstamp:16136922700 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:3252020104 data:0x00000000
     kworker/5:0-5800  [005] ...1   506.390839: rtos_queue_peek_from_isr_failed: tstamp:16139597889 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   506.546834: rtos_queue_peek_from_isr_failed: tstamp:16144598394 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   506.702841: rtos_queue_peek_from_isr_failed: tstamp:16149598902 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   506.858852: rtos_queue_peek_from_isr_failed: tstamp:16154599493 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   507.014888: rtos_queue_peek_from_isr_failed: tstamp:16159599932 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   507.222903: rtos_queue_peek_from_isr_failed: tstamp:16164600437 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   507.274892: rtcpu_vinotify_handle_msg: tstamp:16167175319 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:3282272752 data:0x00000000
     kworker/5:0-5800  [005] ...1   507.274897: rtcpu_vinotify_handle_msg: tstamp:16167175473 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3282273073 data:0x00010800
     kworker/5:0-5800  [005] ...1   507.274899: rtcpu_vinotify_handle_msg: tstamp:16167180919 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3282278607 data:0x00000801
     kworker/5:0-5800  [005] ...1   507.326881: rtcpu_vinotify_handle_msg: tstamp:16168172648 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:3283270144 data:0x00000001
     kworker/5:0-5800  [005] ...1   507.326885: rtcpu_vinotify_handle_msg: tstamp:16168172813 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:3283270147 data:0x00000000
     kworker/5:0-5800  [005] ...1   507.378881: rtos_queue_peek_from_isr_failed: tstamp:16169600946 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   507.534877: rtos_queue_peek_from_isr_failed: tstamp:16174601452 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   507.690882: rtos_queue_peek_from_isr_failed: tstamp:16179601959 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   507.846878: rtos_queue_peek_from_isr_failed: tstamp:16184602463 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   508.002940: rtos_queue_peek_from_isr_failed: tstamp:16189602972 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   508.158868: rtos_queue_peek_from_isr_failed: tstamp:16194603549 queue:0x0b4a3c58
     kworker/5:0-5800  [005] ...1   508.262890: rtos_queue_peek_from_isr_failed: tstamp:16197695958 queue:0x0b4a3c58

and DMESG:

[  503.056112] imx377 30-001a: imx377_s_stream++ enable 1
[  503.156580] imx377 30-001a: imx377_set_gain - val = 4194304
[  503.162191] imx377 30-001a: input gain value: 256
[  503.166985] imx377 30-001a: imx377_set_gain: gain 00 val: 256
[  503.173487] imx377 30-001a: imx377_set_frame_rate: val: 125829120
[  503.179646] imx377 30-001a: imx377_set_frame_length length = 3200
[  503.185813] imx377 30-001a: imx377_set_frame_length: val: 3200
[  503.193070] imx377 30-001a: imx377_set_exposure: val: 125
[  503.198605] imx377 30-001a: imx377_set_coarse_time: input val: 22
[  503.204766] imx377 30-001a: imx377_set_coarse_time: set val: 3178
[  504.210910] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  505.214871] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  506.218907] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  507.222908] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[  508.226905] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[  508.232843] imx377 30-001a: imx377_s_stream++ enable 0
[  508.337990] imx377 30-001a: imx377_set_gain - val = 4194304
[  508.343627] imx377 30-001a: input gain value: 256
[  508.348413] imx377 30-001a: imx377_set_gain: gain 00 val: 256
[  508.355145] imx377 30-001a: imx377_set_frame_rate: val: 125829120
[  508.361388] imx377 30-001a: imx377_set_frame_length length = 3200
[  508.367553] imx377 30-001a: imx377_set_frame_length: val: 3200
[  508.374632] imx377 30-001a: imx377_set_exposure: val: 125
[  508.380169] imx377 30-001a: imx377_set_coarse_time: input val: 22
[  508.386333] imx377 30-001a: imx377_set_coarse_time: set val: 3178
[  508.435953] imx377 30-001a: imx377_power_off: power off
[  508.441284] imx377 30-001a: imx377_power_off: GPIO RESET PIN: 461 Value: 0

What is this supposed to help with ?

@amatasan
The log show the CHANSEL_SHORT_FRAME that could be the sensor output size is not as expect. You may need to check the precise sensor output resolution with vendor.

Hi @ShaneCCC
Well, Vendor is of no use, but we got the information:

Effective pixels: 4056x3046
Active pixels: 4024x3036
Recommneded: 4000x3000

so… with 4000x3000:

# tracer: nop
#
# entries-in-buffer/entries-written: 64/64   #P:4
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/3:1-103   [003] ...1   126.926934: rtos_queue_peek_from_isr_failed: tstamp:4282015174 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   126.926939: rtcpu_start: tstamp:4282015906
     kworker/3:1-103   [003] ...1   127.082975: rtos_queue_peek_from_isr_failed: tstamp:4287016047 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   127.238998: rtos_queue_peek_from_isr_failed: tstamp:4292016550 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   127.394960: rtos_queue_peek_from_isr_failed: tstamp:4297017054 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   127.562931: rtos_queue_peek_from_isr_failed: tstamp:4302017567 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   127.715520: rtos_queue_peek_from_isr_failed: tstamp:4307018067 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   127.766954: rtcpu_vinotify_handle_msg: tstamp:4308536097 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:13568150 data:0x00000000
     kworker/3:1-103   [003] ...1   127.766958: rtcpu_vinotify_handle_msg: tstamp:4308536242 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:13568470 data:0x00010800
     kworker/3:1-103   [003] ...1   127.766960: rtcpu_vinotify_handle_msg: tstamp:4308541727 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:13574004 data:0x00000801
     kworker/3:1-103   [003] ...1   127.818948: rtcpu_vinotify_handle_msg: tstamp:4309518241 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:14550502 data:0x0bb70982
     kworker/3:1-103   [003] ...1   127.818950: rtcpu_vinotify_handle_msg: tstamp:4309533317 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:14565544 data:0x00000000
     kworker/3:1-103   [003] ...1   127.870944: rtos_queue_peek_from_isr_failed: tstamp:4312018574 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   128.026985: rtos_queue_peek_from_isr_failed: tstamp:4317019085 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   128.234963: rtos_queue_peek_from_isr_failed: tstamp:4322019589 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   128.390963: rtos_queue_peek_from_isr_failed: tstamp:4327020097 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   128.546962: rtos_queue_peek_from_isr_failed: tstamp:4332020601 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   128.702963: rtos_queue_peek_from_isr_failed: tstamp:4337021110 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   128.754967: rtcpu_vinotify_handle_msg: tstamp:4339786135 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:44818192 data:0x00000000
     kworker/3:1-103   [003] ...1   128.754971: rtcpu_vinotify_handle_msg: tstamp:4339786273 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:44818513 data:0x00010800
     kworker/3:1-103   [003] ...1   128.754974: rtcpu_vinotify_handle_msg: tstamp:4339791767 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:44824047 data:0x00000801
     kworker/3:1-103   [003] ...1   128.806963: rtcpu_vinotify_handle_msg: tstamp:4340768284 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:45800545 data:0x0bb70982
     kworker/3:1-103   [003] ...1   128.806966: rtcpu_vinotify_handle_msg: tstamp:4340783362 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:45815586 data:0x00000000
     kworker/3:1-103   [003] ...1   128.858959: rtos_queue_peek_from_isr_failed: tstamp:4342021619 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   129.014955: rtos_queue_peek_from_isr_failed: tstamp:4347022123 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   129.170961: rtos_queue_peek_from_isr_failed: tstamp:4352022632 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   129.326960: rtos_queue_peek_from_isr_failed: tstamp:4357023136 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   129.482958: rtos_queue_peek_from_isr_failed: tstamp:4362023645 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   129.638963: rtos_queue_peek_from_isr_failed: tstamp:4367024149 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   129.794970: rtcpu_vinotify_handle_msg: tstamp:4371036176 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:76068235 data:0x00000000
     kworker/3:1-103   [003] ...1   129.794975: rtcpu_vinotify_handle_msg: tstamp:4371036321 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:76068556 data:0x00010800
     kworker/3:1-103   [003] ...1   129.794977: rtcpu_vinotify_handle_msg: tstamp:4371041808 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:76074089 data:0x00000801
     kworker/3:1-103   [003] ...1   129.794980: rtcpu_vinotify_handle_msg: tstamp:4372018325 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:77050587 data:0x0bb70982
     kworker/3:1-103   [003] ...1   129.794983: rtos_queue_peek_from_isr_failed: tstamp:4372024661 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   129.794985: rtcpu_vinotify_handle_msg: tstamp:4372033404 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:77065629 data:0x00000000
     kworker/3:1-103   [003] ...1   129.950977: rtos_queue_peek_from_isr_failed: tstamp:4377025165 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   130.106964: rtos_queue_peek_from_isr_failed: tstamp:4382025671 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   130.314964: rtos_queue_peek_from_isr_failed: tstamp:4387026183 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   130.470958: rtos_queue_peek_from_isr_failed: tstamp:4392026684 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   130.626960: rtos_queue_peek_from_isr_failed: tstamp:4397027193 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   130.782994: rtos_queue_peek_from_isr_failed: tstamp:4402027697 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   130.834930: rtcpu_vinotify_handle_msg: tstamp:4403327886 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:108359946 data:0x00000000
     kworker/3:1-103   [003] ...1   130.834933: rtcpu_vinotify_handle_msg: tstamp:4403328024 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:108360266 data:0x00010800
     kworker/3:1-103   [003] ...1   130.834933: rtcpu_vinotify_handle_msg: tstamp:4403333520 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:108365800 data:0x00000801
     kworker/3:1-103   [003] ...1   130.834934: rtcpu_vinotify_handle_msg: tstamp:4404310004 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:109342298 data:0x0bb70982
     kworker/3:1-103   [003] ...1   130.834935: rtcpu_vinotify_handle_msg: tstamp:4404325083 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:109357340 data:0x00000000
     kworker/3:1-103   [003] ...1   130.938976: rtos_queue_peek_from_isr_failed: tstamp:4407028206 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   131.094979: rtos_queue_peek_from_isr_failed: tstamp:4412028714 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   131.250961: rtos_queue_peek_from_isr_failed: tstamp:4417029219 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   131.406964: rtos_queue_peek_from_isr_failed: tstamp:4422029727 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   131.562963: rtos_queue_peek_from_isr_failed: tstamp:4427030232 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   131.718970: rtos_queue_peek_from_isr_failed: tstamp:4432030740 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   131.823007: rtcpu_vinotify_handle_msg: tstamp:4434577929 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:139609988 data:0x00000000
     kworker/3:1-103   [003] ...1   131.823014: rtcpu_vinotify_handle_msg: tstamp:4434578079 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:139610309 data:0x00010800
     kworker/3:1-103   [003] ...1   131.823016: rtcpu_vinotify_handle_msg: tstamp:4434583564 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:139615843 data:0x00000801
     kworker/3:1-103   [003] ...1   131.823019: rtcpu_vinotify_handle_msg: tstamp:4435560076 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:140592341 data:0x0bb70982
     kworker/3:1-103   [003] ...1   131.823021: rtcpu_vinotify_handle_msg: tstamp:4435575148 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:140607382 data:0x00000000
     kworker/3:1-103   [003] ...1   131.874978: rtos_queue_peek_from_isr_failed: tstamp:4437031249 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   132.030966: rtos_queue_peek_from_isr_failed: tstamp:4442031782 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   132.186949: rtos_queue_peek_from_isr_failed: tstamp:4447032261 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   132.394965: rtos_queue_peek_from_isr_failed: tstamp:4452032766 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   132.550971: rtos_queue_peek_from_isr_failed: tstamp:4457033274 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   132.706964: rtos_queue_peek_from_isr_failed: tstamp:4462033779 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   132.810961: rtos_queue_peek_from_isr_failed: tstamp:4465063819 queue:0x0b4a3c58

and according to the TRM and this post ( https://devtalk.nvidia.com/default/topic/1023414/jetson-tx2/payload-definition-for-csimux-and-chansel-vinotify-messages/post/5210763/#5210763):

Last message (data: 0x0bb70982)will match the last pixel 0x0bb7 = 2999, and 0x0982 = EMBED_RUNAWAY | PIXEL_LONGLINE | PIXEL_SPURIOUS | PIXEL_EOF, but I am not sure if that is correct.

other embedded_metadata_height =2 values give me:

# tracer: nop
#
# entries-in-buffer/entries-written: 26/26   #P:4
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/3:1-103   [003] ...1   644.441741: rtos_queue_peek_from_isr_failed: tstamp:20453482275 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   644.441747: rtcpu_start: tstamp:20453483091
     kworker/3:1-103   [003] ...1   644.597772: rtos_queue_peek_from_isr_failed: tstamp:20458483180 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   644.753764: rtos_queue_peek_from_isr_failed: tstamp:20463483660 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   644.909774: rtos_queue_peek_from_isr_failed: tstamp:20468484167 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   645.077744: rtos_queue_peek_from_isr_failed: tstamp:20473484655 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   645.233754: rtos_queue_peek_from_isr_failed: tstamp:20478485181 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   645.285783: rtcpu_vinotify_handle_msg: tstamp:20479989356 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:3300119737 data:0x00000000
     kworker/3:1-103   [003] ...1   645.285788: rtcpu_vinotify_handle_msg: tstamp:20479995410 tag:CHANSEL_PXL_SOF channel:0x00 frame:0 vi_tstamp:3300125592 data:0x00000001
     kworker/3:1-103   [003] ...1   645.285790: rtcpu_vinotify_handle_msg: tstamp:20479995612 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:3300125851 data:0x00000100
     kworker/3:1-103   [003] ...1   645.285793: rtcpu_vinotify_handle_msg: tstamp:20479996438 tag:CHANSEL_LOAD_FRAMED channel:0x04 frame:0 vi_tstamp:3300126573 data:0x08000000
     kworker/3:1-103   [003] ...1   645.285795: rtcpu_vinotify_handle_msg: tstamp:20479996570 tag:CHANSEL_FAULT_FE channel:0x04 frame:0 vi_tstamp:3300126573 data:0x00000001
     kworker/3:1-103   [003] ...1   645.285797: rtcpu_vinotify_handle_msg: tstamp:20479996742 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:3300126577 data:0x00000000
     kworker/3:1-103   [003] ...1   645.389783: rtos_queue_peek_from_isr_failed: tstamp:20483485697 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   645.545774: rtos_queue_peek_from_isr_failed: tstamp:20488486195 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   645.701775: rtos_queue_peek_from_isr_failed: tstamp:20493486699 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   645.857794: rtos_queue_peek_from_isr_failed: tstamp:20498487215 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   646.013789: rtos_queue_peek_from_isr_failed: tstamp:20503487720 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   646.169787: rtos_queue_peek_from_isr_failed: tstamp:20508488220 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   646.325793: rtos_queue_peek_from_isr_failed: tstamp:20513488729 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   646.481792: rtos_queue_peek_from_isr_failed: tstamp:20518489233 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   646.637796: rtos_queue_peek_from_isr_failed: tstamp:20523489751 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   646.793785: rtos_queue_peek_from_isr_failed: tstamp:20528490238 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   647.001788: rtos_queue_peek_from_isr_failed: tstamp:20533490764 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   647.157786: rtos_queue_peek_from_isr_failed: tstamp:20538491263 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   647.261769: rtos_queue_peek_from_isr_failed: tstamp:20542768116 queue:0x0b4a3c58

and embedded_metadata_height = 0:

v4l2-ctl-10379 [000] dnH1   688.691255: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691258: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691261: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691264: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691267: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691270: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691273: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691276: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691279: tegra_mcerr_hard_irq: MCERR detected.
        v4l2-ctl-10379 [000] dnH1   688.691282: tegra_mcerr_hard_irq: MCERR detected.
     kworker/3:1-103   [003] ...1   688.854278: rtos_queue_peek_from_isr_failed: tstamp:21840199913 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   688.958276: rtos_queue_peek_from_isr_failed: tstamp:21845200407 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   689.114267: rtos_queue_peek_from_isr_failed: tstamp:21850200935 queue:0x0b4a3c58
          <idle>-0     [000] d.h1   689.180671: arm_smmu_context_fault: Unhandled context fault: iova=0x00000000, fsynr=0x250011, cb=19, sid=4(0x4 - VI), pgd=0 pud=0, pmd=0, pte=0
     kworker/3:1-103   [003] ...1   689.218310: rtcpu_vinotify_handle_msg: tstamp:21852765809 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:377928773 data:0x00004004
     kworker/3:1-103   [003] ...1   689.218315: rtcpu_vinotify_handle_msg: tstamp:21852765949 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:377928778 data:0x00000000
     kworker/3:1-103   [003] ...1   689.218317: rtcpu_vinotify_handle_msg: tstamp:21852771551 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:377934633 data:0x00004001
     kworker/3:1-103   [003] ...1   689.218320: rtcpu_vinotify_handle_msg: tstamp:21853748067 tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:378911130 data:0x0bb74182
     kworker/3:1-103   [003] ...1   689.218323: rtcpu_vinotify_handle_msg: tstamp:21853763259 tag:CHANSEL_SHORT_FRAME channel:0x10 frame:0 vi_tstamp:378926168 data:0x00001000
     kworker/3:1-103   [003] ...1   689.218325: rtcpu_vinotify_handle_msg: tstamp:21853763434 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:378926171 data:0x00000000
     kworker/3:1-103   [003] ...1   689.270298: rtos_queue_peek_from_isr_failed: tstamp:21855201434 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   689.426292: rtos_queue_peek_from_isr_failed: tstamp:21860201943 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   689.582293: rtos_queue_peek_from_isr_failed: tstamp:21865202448 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   689.738294: rtos_queue_peek_from_isr_failed: tstamp:21870202956 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   689.894305: rtos_queue_peek_from_isr_failed: tstamp:21875203494 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   690.050300: rtos_queue_peek_from_isr_failed: tstamp:21880203972 queue:0x0b4a3c58
     kworker/3:1-103   [003] ...1   690.154319: rtos_queue_peek_from_isr_failed: tstamp:21883295477 queue:0x0b4a3c58

what am I missing ?

No Matter what resolution I pick on width it is always rounded to 4096 or 4224 (rounded to 128 as mentioned by other users), and no matter what i put on height, it will just mark a different line on: tag:CHANSEL_FAULT channel:0x00 frame:0 vi_tstamp:140592341 data:0x0be50982 e.g. for line 3045.

Ahhhhhhhhhhh…!!!

Seems it reports EMBED_RUNAWAY  VI received more embedded lines then expected.
And the last line (3000th line) seems longer than expected.

Hi @ShaneCCC

I don’t understand what you mean, I also tried different values for embedded lines and still no changes, I understand that the line is longer than expected, but according to the manual the line is 4104 pixels long, and even if i pick that resolution, which is the one suggested on the driver from the vendor, still no changes on the error messages.

Is there any other place where i can check out for more issues ? all those recommendations make no difference on the result, while it seems to be working for V4l, even without proper color processing, it won’t work with the gstreamer tools, so i assume that the problem might be somewhere else or on the way gstreamer pulls the information from the camera.

hi @ShaneCCC
So I suppose there is no answer on how to solve this on the TX2 ???
We will probably stop testing and trying, and wait until you guys make a new release, since we have no answer from camera manufacturer either.

See you around…

That could be the sensor driver and setting problem. It’s better get the help form vendor otherwise even new release you must face the same problem again.

Hi all,

I am able to stream from a YUV sensor in L4T24.2/TX1. There is no PXL_SOF issue even though my sensor misses some data packet(including SOF packets) while streaming. But with the same sensor in L4T27.1/TX2, PXL_SOF issue occurs during long run of streaming and once it occurs, unlike TX1 my TX2 stops streaming and doesn’t recover.

I need to know is there any way to ignore/recover from PXL_SOF error in cases where my data stream misses the SOF packet of a frame once, but not always.

Thanks

Hi @desarpmar,

Yes, we see that most of the issues occur in the TX2 setting, as we see many, even the camera manufacturers, and others, struggle with TX2 as well. We have tested a couple sensors, and TX1 does fine, with some hiccups, but somehow working, while TX2 still is partly or non-functional.

As of today we have a few months without an answer, so we are trying to get away from this setup for now, unfortunately the Jetson still seems to be the most powerful board in the market, and other boards also struggle with HW, OS and software compatibility (kernel version, updated libraries, drivers, etc) as well, hopefully this will change in the near future.

NVIDIA seems incapable of helping IHVs make working cameras for the TX2, especially if you want the built in image processor to work, and want more than one camera supported at the same time.

I would recommend looking at USB3 cameras for now. And, once you go USB3, you will find that low-power chips like Intel Core i7-7Y75 (4.5W) and i7-7500U (15W) are quite interesting for mainstream performance. These have general purpose CPUs that are fast enough to run forward inference for many popular machine learning frameworks, using their SSE/AVX technology.

Thanks amatasan & snarky. Looks like many people are frustrated coz of the PXL_SOF issue. Meanwhile, while going through TX1/24.2 code, in “/tegra/camera/channel.c”, I noticed “tegra_channel_ec_recover”
function which as mentioned in the comment “perform error recovery for timeout”.

/* Arm capture and wait for notifier or syncpoint */
	err = chan->fops->soc_channel_capture_frame(chan, &ts, thresh);
	if (err) {
		state = VB2_BUF_STATE_ERROR;
		/* perform error recovery for timeout */
		<b>tegra_channel_ec_recover(chan);</b>
	} else if (!chan->vi->pg_mode) {
		/* Marking error frames and resume capture */
		/* TODO: TPG has frame height short error always set */
		err = tegra_channel_error_status(chan);
		if (err) {
			state = VB2_BUF_STATE_ERROR;
			chan->capture_state = CAPTURE_ERROR;
			/* do we have to run recover here ?? */
			/* tegra_channel_ec_recover(chan); */
		}
	}

Can someone from NVIDIA explain why this error recovery procedure is missing for TX2? Is there any similar protocol or can we use this same procedure for TX2?

@dasarpmar
Due to the TX2 VI logic is totally different witt TX1. I think the recovery function didn’t need to TX2.

@ShaneCCC So what we need to do to recover from PXL_SOF issue with a working camera while streaming? The only way I’m doing to recover from the issue is to reboot the Jetson board. Thanks

@dasarpmar
I think you should figure out what cause the PXL_SOF.

@ShaneCCC I think that if there’s no solution yet someone from NVIDIA should figure out what causes the PXL_SOF issue, as many people have reported this issue. Either that or let us know what you need from us to figure out what causes this issue.

We are experiencing this issue on 28.2.1 on TX2, and there has been no reply to this thread for over a year now. We have been waiting for a solution in this thread for 8 months. If there is a solution in another thread that we’re missing or something we can do please let us know. This issue has been extremely disappointing for us.

Sorry if there is an obvious solution and we’re reviving an old thread, but this is the top result on every search engine for this issue.

@rogern239v
Did you upgrade to 28.2.1?
Please have a check below wiki for some debug tip and 28.2.1 have add the recovery for TX2.
https://elinux.org/Jetson_TX2_Camera_BringUp