xavier平台mipi csi-dhpy调试问题记录
1. 前言
这边使用Toshiba TC358748X 的DVP转MIPI的芯片,
通过排线连接到nvidia xavier平台,
通过移植官方通用驱动,调试过程需要一些问题
2. 硬件连接
3. 视频采集
(1)gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)NV12’ ! omxh264enc ! qtmux ! filesink location=test.mp4 -ev
message:
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
EOS on shutdown enabled – waiting for EOS after Error
Waiting for EOS…
New clock: GstSystemClock
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = video/quicktime, variant=(string)apple
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)apple
(2)./yavta /dev/video0 -c1 -n1 -s1920x1080 -fUYVY -Fcam.raw
dmesg log:
[ 2991.490743] tegra194-vi5 15c10000.vi: unexpected response from camera processor
[ 2991.491039] video4linux video0: vi capture release failed
[ 2991.491166] tegra194-vi5 15c10000.vi: unexpected response from camera processor
[ 2991.491458] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 2991.491643] Mem abort info:
[ 2991.491707] ESR = 0x96000005
[ 2991.491777] Exception class = DABT (current EL), IL = 32 bits
[ 2991.491887] SET = 0, FnV = 0
[ 2991.491950] EA = 0, S1PTW = 0
[ 2991.492018] Data abort info:
[ 2991.492083] ISV = 0, ISS = 0x00000005
[ 2991.492165] CM = 0, WnR = 0
[ 2991.492230] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc7963b1000
[ 2991.492353] [0000000000000000] *pgd=0000000000000000, *pud=0000000000000000
[ 2991.492531] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 2991.492647] Modules linked in: bnep fuse zram overlay tpm_tis_spi tpm_tis_core tpm tc358746 spidev nvgpu bluedroid_pm ip_tables x_tables
[ 2991.493579] CPU: 0 PID: 9265 Comm: yavta Not tainted 4.9.140-tegra #34
[ 2991.494890] Hardware name: Jetson-AGX (DT)
[ 2991.499024] task: ffffffc759d51c00 task.stack: ffffffc74b1c8000
[ 2991.505244] PC is at vi_capture_request_unpin+0x40/0xb8
[ 2991.510052] LR is at vi_capture_request_unpin+0x34/0xb8
[ 2991.515287] pc : [] lr : [] pstate: 20400045
[ 2991.522895] sp : ffffffc74b1cba30
[ 2991.526044] x29: ffffffc74b1cba30 x28: 0000000000000000
[ 2991.532102] x27: ffffffc7bcece800 x26: 0000000000000001
[ 2991.537494] x25: ffffff8009f9d358 x24: 0000000000000013
[ 2991.543094] x23: ffffffc74b1db800 x22: 0000000000000000
[ 2991.548349] x21: ffffffc74b1dba68 x20: ffffffc74b06b200
[ 2991.553358] x19: 0000000000000000 x18: 00000000000035cf
[ 2991.558864] x17: 0000007faff70748 x16: 0000000000000000
[ 2991.564795] x15: 0000000000000000 x14: 000000000000005f
[ 2991.570481] x13: 0000000000000132 x12: 0000000000000400
[ 2991.576014] x11: 0000000000000400 x10: 0000000000000a20
[ 2991.582035] x9 : ffffffc74b1cb840 x8 : fffffffffffffffe
[ 2991.587827] x7 : ffffffc74b06bf00 x6 : ffffffc74b06b3c0
[ 2991.593078] x5 : ffffffc759d51c00 x4 : ffffffc7ffce50e0
[ 2991.598418] x3 : 0000000001da0e40 x2 : ffffffc74b06be40
[ 2991.603750] x1 : 0000000000000000 x0 : 0000000000000000
[ 2991.610757] Process yavta (pid: 9265, stack limit = 0xffffffc74b1c8000)
[ 2991.617127] Call trace:
[ 2991.619278] [] vi_capture_request_unpin+0x40/0xb8
[ 2991.625372] [] vi_capture_shutdown+0xac/0x118
[ 2991.630972] [] vi_channel_close_ex+0x2c/0x88
[ 2991.636573] [] vi5_channel_stop_streaming+0x64/0xa8
[ 2991.642504] [] tegra_channel_stop_streaming+0x34/0x48
[ 2991.648904] [] __vb2_queue_cancel+0x34/0x188
[ 2991.654512] [] vb2_core_streamoff+0x54/0xb8
[ 2991.659588] [] vb2_streamoff+0x54/0x88
[ 2991.664922] [] vb2_ioctl_streamoff+0x54/0x60
[ 2991.670502] [] v4l_streamoff+0x3c/0x50
[ 2991.675687] [] __video_do_ioctl+0x204/0x2c8
[ 2991.681284] [] video_usercopy+0x2a0/0x6a0
[ 2991.686884] [] video_ioctl2+0x3c/0x50
[ 2991.691854] [] v4l2_ioctl+0x88/0x118
[ 2991.697034] [] do_vfs_ioctl+0xb0/0x8d8
[ 2991.702615] [] SyS_ioctl+0x8c/0xa8
[ 2991.707259] [] el0_svc_naked+0x34/0x38
[ 2991.713045] —[ end trace 529ecb45319e6e44 ]—
重复执行如下命令:
gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)NV12’ ! omxh264enc ! qtmux ! filesink location=test.mp4 -ev
有时会报以下log
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
EOS on shutdown enabled – waiting for EOS after Error
Waiting for EOS…
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = video/quicktime, variant=(string)apple
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)apple
New clock: GstSystemClock
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = video/quicktime, variant=(string)apple, streamheader=(buffer)< 000002446d6f6f760000006c6d76686400000000dc25b31adc25b31a00000708000000000001000001000000000000000000000000010000000000000000000000000000000100000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000001937472616b0000005c746b686400000007dc25b31adc25b31a000000010000000000000000000000000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000400000000000000000000000000000f26d646961000000206d64686400000000dc25b31adc25b31a000000000000000055c400000000002168646c7200000000000000000000000000000000000000000000000000000000a96d696e660000002168646c720000000064686c72616c6973000000000000000000000000000000002464696e660000001c6472656600000000000000010000000c616c6973000000010000005c7374626c000000107374736400000000000000000000001073747473000000000000000000000010737473630000000000000000000000147374737a000000000000000000000000000000107374636f00000000000000000000003d75647461000000356d657461000000000000002168646c72000000006d686c726d6469720000000000000000000000000000000008696c73740000003d75647461000000356d657461000000000000002168646c72000000006d686c726d6469720000000000000000000000000000000008696c7374 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)apple, streamheader=(buffer)< 000002446d6f6f760000006c6d76686400000000dc25b31adc25b31a00000708000000000001000001000000000000000000000000010000000000000000000000000000000100000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000001937472616b0000005c746b686400000007dc25b31adc25b31a000000010000000000000000000000000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000400000000000000000000000000000f26d646961000000206d64686400000000dc25b31adc25b31a000000000000000055c400000000002168646c7200000000000000000000000000000000000000000000000000000000a96d696e660000002168646c720000000064686c72616c6973000000000000000000000000000000002464696e660000001c6472656600000000000000010000000c616c6973000000010000005c7374626c000000107374736400000000000000000000001073747473000000000000000000000010737473630000000000000000000000147374737a000000000000000000000000000000107374636f00000000000000000000003d75647461000000356d657461000000000000002168646c72000000006d686c726d6469720000000000000000000000000000000008696c73740000003d75647461000000356d657461000000000000002168646c72000000006d686c726d6469720000000000000000000000000000000008696c7374 >
Got EOS from element “pipeline0”.
EOS received - stopping pipeline…
Execution ended after 0:00:00.003681628
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
4. 查询trace信息
首先需要执行 v4l2采集命令
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY–set-ctrl --stream-mmap --stream-count=1000
再查询trace信息
sudo cat /sys/kernel/debug/tracing/trace
trace如下:
# tracer: nop
#
# entries-in-buffer/entries-written: 141/141 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
kworker/0:2-1179 [000] .... 110.641032: rtos_queue_peek_from_isr_failed: tstamp:3846786024 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 110.809018: rtos_queue_peek_from_isr_failed: tstamp:3851786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 110.977037: rtos_queue_peek_from_isr_failed: tstamp:3856786032 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 111.089013: rtos_queue_peek_from_isr_failed: tstamp:3861786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 111.257047: rtos_queue_peek_from_isr_failed: tstamp:3866786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 111.425017: rtos_queue_peek_from_isr_failed: tstamp:3871786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 111.593018: rtos_queue_peek_from_isr_failed: tstamp:3876786027 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 111.761126: rtos_queue_peek_from_isr_failed: tstamp:3881786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 111.929021: rtos_queue_peek_from_isr_failed: tstamp:3886786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 112.097019: rtos_queue_peek_from_isr_failed: tstamp:3891786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 112.209019: rtos_queue_peek_from_isr_failed: tstamp:3896786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 112.377033: rtos_queue_peek_from_isr_failed: tstamp:3901786028 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 112.545071: rtos_queue_peek_from_isr_failed: tstamp:3906786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 112.713008: rtos_queue_peek_from_isr_failed: tstamp:3911786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 112.881006: rtos_queue_peek_from_isr_failed: tstamp:3916786022 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 113.049016: rtos_queue_peek_from_isr_failed: tstamp:3921786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 113.217046: rtos_queue_peek_from_isr_failed: tstamp:3926786023 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 113.329008: rtos_queue_peek_from_isr_failed: tstamp:3931786023 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 113.497006: rtos_queue_peek_from_isr_failed: tstamp:3936786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 113.665033: rtos_queue_peek_from_isr_failed: tstamp:3941786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 113.833004: rtos_queue_peek_from_isr_failed: tstamp:3946786024 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 114.000999: rtos_queue_peek_from_isr_failed: tstamp:3951786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 114.169002: rtos_queue_peek_from_isr_failed: tstamp:3956786031 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 114.336999: rtos_queue_peek_from_isr_failed: tstamp:3961786021 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 114.448998: rtos_queue_peek_from_isr_failed: tstamp:3966786021 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 114.616991: rtos_queue_peek_from_isr_failed: tstamp:3971786021 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 114.785005: rtos_queue_peek_from_isr_failed: tstamp:3976786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 114.952990: rtos_queue_peek_from_isr_failed: tstamp:3981786018 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 115.120999: rtos_queue_peek_from_isr_failed: tstamp:3986786021 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 115.288990: rtos_queue_peek_from_isr_failed: tstamp:3991786021 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 115.457012: rtos_queue_peek_from_isr_failed: tstamp:3996786019 queue:0x0bcbcf78
kworker/0:2-1179 [000] .... 115.457016: rtos_queue_peek_from_isr_failed: tstamp:3998233154 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 139.036594: rtos_queue_peek_from_isr_failed: tstamp:4733887531 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 139.036602: rtcpu_start: tstamp:4733890170
kworker/0:3-1690 [000] .... 139.036604: rtos_queue_send_from_isr_failed: tstamp:4734008458 queue:0x0bcb41f8
kworker/0:3-1690 [000] .... 139.036606: rtos_queue_send_from_isr_failed: tstamp:4734008680 queue:0x0bcb8a60
kworker/0:3-1690 [000] .... 139.036607: rtos_queue_send_from_isr_failed: tstamp:4734008900 queue:0x0bcba5e0
kworker/0:3-1690 [000] .... 139.036609: rtos_queue_send_from_isr_failed: tstamp:4734009122 queue:0x0bcbb3a0
kworker/0:3-1690 [000] .... 139.036610: rtos_queue_send_from_isr_failed: tstamp:4734009345 queue:0x0bcbc160
kworker/0:3-1690 [000] .... 139.036613: rtcpu_string: tstamp:4734009968 id:0x04010000 str:"Configuring VI GoS.
"
kworker/0:3-1690 [000] .... 139.036666: rtcpu_string: tstamp:4734010236 id:0x04010000 str:"VM GOS[#0] addr=0xc2100000
"
kworker/0:3-1690 [000] .... 139.036679: rtcpu_string: tstamp:4734010564 id:0x04010000 str:"VM GOS[#1] addr=0xc2101000
"
kworker/0:3-1690 [000] .... 139.036689: rtcpu_string: tstamp:4734010930 id:0x04010000 str:"VM GOS[#2] addr=0xc2102000
"
kworker/0:3-1690 [000] .... 139.036699: rtcpu_string: tstamp:4734011272 id:0x04010000 str:"VM GOS[#3] addr=0xc2103000
"
kworker/0:3-1690 [000] .... 139.036709: rtcpu_string: tstamp:4734011578 id:0x04010000 str:"VM GOS[#4] addr=0xc2104000
"
kworker/0:3-1690 [000] .... 139.036718: rtcpu_string: tstamp:4734011884 id:0x04010000 str:"VM GOS[#5] addr=0xc2105000
"
kworker/0:3-1690 [000] .... 139.036727: rtcpu_string: tstamp:4734019964 id:0x04010000 str:"vi5_hwinit: firmware CL2018101701 protocol versi"
kworker/0:3-1690 [000] .... 139.036729: rtcpu_string: tstamp:4734020153 id:0x04010000 str:"on 2.2
"
kworker/0:3-1690 [000] .... 139.036740: rtos_queue_send_from_isr_failed: tstamp:4734049104 queue:0x0bcb41f8
kworker/0:3-1690 [000] .... 139.036741: rtos_queue_send_from_isr_failed: tstamp:4734049362 queue:0x0bcb8a60
kworker/0:3-1690 [000] .... 139.036743: rtos_queue_send_from_isr_failed: tstamp:4734049586 queue:0x0bcba5e0
kworker/0:3-1690 [000] .... 139.036744: rtos_queue_send_from_isr_failed: tstamp:4734049806 queue:0x0bcbb3a0
kworker/0:3-1690 [000] .... 139.036745: rtos_queue_send_from_isr_failed: tstamp:4734050023 queue:0x0bcbc160
kworker/0:3-1690 [000] .... 139.036747: rtcpu_string: tstamp:4734051203 id:0x04010000 str:"VI GOS[#0] set to VM GOS[4] base 0xc2104000
"
kworker/0:3-1690 [000] .... 139.036756: rtos_queue_send_from_isr_failed: tstamp:4734272466 queue:0x0bcb41f8
kworker/0:3-1690 [000] .... 139.036758: rtos_queue_send_from_isr_failed: tstamp:4734272617 queue:0x0bcb8a60
kworker/0:3-1690 [000] .... 139.036759: rtos_queue_send_from_isr_failed: tstamp:4734272768 queue:0x0bcba5e0
kworker/0:3-1690 [000] .... 139.036761: rtos_queue_send_from_isr_failed: tstamp:4734272915 queue:0x0bcbb3a0
kworker/0:3-1690 [000] .... 139.036762: rtos_queue_send_from_isr_failed: tstamp:4734273060 queue:0x0bcbc160
kworker/0:3-1690 [000] .... 139.036764: rtcpu_nvcsi_intr: tstamp:4734276115 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000089
kworker/0:3-1690 [000] .... 139.036766: rtcpu_nvcsi_intr: tstamp:4734276115 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000088
kworker/0:3-1690 [000] .... 139.036768: rtcpu_vinotify_event: tstamp:4734519030 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:5460788928 data:0x10000000
kworker/0:3-1690 [000] .... 139.036770: rtcpu_vinotify_event: tstamp:4734519171 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:5460792768 data:0x31000001
kworker/0:3-1690 [000] .... 139.036771: rtcpu_vinotify_event: tstamp:4734519332 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:5460793760 data:0x07020001
kworker/0:3-1690 [000] .... 139.036773: rtcpu_vinotify_event: tstamp:4734519467 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:5460851232 data:0x10000000
kworker/0:3-1690 [000] .... 139.036774: rtcpu_vinotify_event: tstamp:4734519624 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:5460855072 data:0x31000002
kworker/0:3-1690 [000] .... 139.036775: rtcpu_nvcsi_intr: tstamp:4734938558 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000004
kworker/0:3-1690 [000] .... 139.036777: rtcpu_nvcsi_intr: tstamp:4734938558 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000004
kworker/0:3-1690 [000] .... 139.204559: rtos_queue_peek_from_isr_failed: tstamp:4738887885 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 139.204567: rtcpu_nvcsi_intr: tstamp:4739331311 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000110
kworker/0:3-1690 [000] .... 139.204569: rtcpu_nvcsi_intr: tstamp:4739331311 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000110
kworker/0:3-1690 [000] .... 139.316534: rtos_queue_peek_from_isr_failed: tstamp:4743887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 139.484509: rtos_queue_peek_from_isr_failed: tstamp:4748887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 139.652500: rtos_queue_peek_from_isr_failed: tstamp:4753887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 139.820483: rtos_queue_peek_from_isr_failed: tstamp:4758887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 139.988469: rtos_queue_peek_from_isr_failed: tstamp:4763887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 140.156463: rtos_queue_peek_from_isr_failed: tstamp:4768887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 140.324437: rtos_queue_peek_from_isr_failed: tstamp:4773887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 140.436431: rtos_queue_peek_from_isr_failed: tstamp:4778887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 140.604418: rtos_queue_peek_from_isr_failed: tstamp:4783887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 140.772410: rtos_queue_peek_from_isr_failed: tstamp:4788887893 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 140.940387: rtos_queue_peek_from_isr_failed: tstamp:4793887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 141.108387: rtos_queue_peek_from_isr_failed: tstamp:4798887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 141.276362: rtos_queue_peek_from_isr_failed: tstamp:4803887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 141.444351: rtos_queue_peek_from_isr_failed: tstamp:4808887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 141.556340: rtos_queue_peek_from_isr_failed: tstamp:4813887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 141.724332: rtos_queue_peek_from_isr_failed: tstamp:4818887892 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 141.780315: rtos_queue_send_from_isr_failed: tstamp:4819351719 queue:0x0bcb41f8
kworker/0:3-1690 [000] .... 141.780320: rtos_queue_send_from_isr_failed: tstamp:4819351875 queue:0x0bcb8a60
kworker/0:3-1690 [000] .... 141.780322: rtos_queue_send_from_isr_failed: tstamp:4819352028 queue:0x0bcba5e0
kworker/0:3-1690 [000] .... 141.780351: rtos_queue_send_from_isr_failed: tstamp:4819352175 queue:0x0bcbb3a0
kworker/0:3-1690 [000] .... 141.780352: rtos_queue_send_from_isr_failed: tstamp:4819352321 queue:0x0bcbc160
kworker/0:3-1690 [000] .... 141.780354: rtos_queue_send_from_isr_failed: tstamp:4819400490 queue:0x0bcb41f8
kworker/0:3-1690 [000] .... 141.780355: rtos_queue_send_from_isr_failed: tstamp:4819400639 queue:0x0bcb8a60
kworker/0:3-1690 [000] .... 141.780356: rtos_queue_send_from_isr_failed: tstamp:4819400790 queue:0x0bcba5e0
kworker/0:3-1690 [000] .... 141.780358: rtos_queue_send_from_isr_failed: tstamp:4819400936 queue:0x0bcbb3a0
kworker/0:3-1690 [000] .... 141.780359: rtos_queue_send_from_isr_failed: tstamp:4819401083 queue:0x0bcbc160
kworker/0:3-1690 [000] .... 141.780362: rtcpu_string: tstamp:4819407322 id:0x04010000 str:"Configuring VI GoS.
"
kworker/0:3-1690 [000] .... 141.780393: rtcpu_string: tstamp:4819407518 id:0x04010000 str:"VM GOS[#0] addr=0xc2100000
"
kworker/0:3-1690 [000] .... 141.780407: rtcpu_nvcsi_intr: tstamp:4819407569 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000110
kworker/0:3-1690 [000] .... 141.780408: rtcpu_nvcsi_intr: tstamp:4819407569 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00000110
kworker/0:3-1690 [000] .... 141.780410: rtcpu_string: tstamp:4819408296 id:0x04010000 str:"VM GOS[#1] addr=0xc2101000
"
kworker/0:3-1690 [000] .... 141.780420: rtcpu_string: tstamp:4819408574 id:0x04010000 str:"VM GOS[#2] addr=0xc2102000
"
kworker/0:3-1690 [000] .... 141.780431: rtcpu_string: tstamp:4819408807 id:0x04010000 str:"VM GOS[#3] addr=0xc2103000
"
kworker/0:3-1690 [000] .... 141.780441: rtcpu_string: tstamp:4819409038 id:0x04010000 str:"VM GOS[#4] addr=0xc2104000
"
kworker/0:3-1690 [000] .... 141.780450: rtcpu_string: tstamp:4819409269 id:0x04010000 str:"VM GOS[#5] addr=0xc2105000
"
kworker/0:3-1690 [000] .... 141.892310: rtos_queue_peek_from_isr_failed: tstamp:4823887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 142.060299: rtos_queue_peek_from_isr_failed: tstamp:4828887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 142.228272: rtos_queue_peek_from_isr_failed: tstamp:4833887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 142.396254: rtos_queue_peek_from_isr_failed: tstamp:4838887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 142.564242: rtos_queue_peek_from_isr_failed: tstamp:4843887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 142.676236: rtos_queue_peek_from_isr_failed: tstamp:4848887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 142.844218: rtos_queue_peek_from_isr_failed: tstamp:4853887886 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 143.012205: rtos_queue_peek_from_isr_failed: tstamp:4858887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 143.180190: rtos_queue_peek_from_isr_failed: tstamp:4863887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 143.348177: rtos_queue_peek_from_isr_failed: tstamp:4868887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 143.516175: rtos_queue_peek_from_isr_failed: tstamp:4873887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 143.684162: rtos_queue_peek_from_isr_failed: tstamp:4878887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 143.796142: rtos_queue_peek_from_isr_failed: tstamp:4883887893 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 143.964138: rtos_queue_peek_from_isr_failed: tstamp:4888887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 144.132113: rtos_queue_peek_from_isr_failed: tstamp:4893887893 queue:0x0bcbcf78
kworker/0:0-4 [000] .... 144.300145: rtos_queue_peek_from_isr_failed: tstamp:4898887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 144.468088: rtos_queue_peek_from_isr_failed: tstamp:4903887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 144.636077: rtos_queue_peek_from_isr_failed: tstamp:4908887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 144.804061: rtos_queue_peek_from_isr_failed: tstamp:4913887892 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 145.084064: rtos_queue_peek_from_isr_failed: tstamp:4923887885 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 145.252031: rtos_queue_peek_from_isr_failed: tstamp:4928887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 145.420015: rtos_queue_peek_from_isr_failed: tstamp:4933887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 145.588021: rtos_queue_peek_from_isr_failed: tstamp:4938887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 145.755996: rtos_queue_peek_from_isr_failed: tstamp:4943887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 145.923986: rtos_queue_peek_from_isr_failed: tstamp:4948887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 146.035972: rtos_queue_peek_from_isr_failed: tstamp:4953887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 146.203992: rtos_queue_peek_from_isr_failed: tstamp:4958887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 146.371944: rtos_queue_peek_from_isr_failed: tstamp:4963887892 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 146.539932: rtos_queue_peek_from_isr_failed: tstamp:4968887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 146.707919: rtos_queue_peek_from_isr_failed: tstamp:4973887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 146.875907: rtos_queue_peek_from_isr_failed: tstamp:4978887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 147.043894: rtos_queue_peek_from_isr_failed: tstamp:4983887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 147.155886: rtos_queue_peek_from_isr_failed: tstamp:4988887889 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 147.323873: rtos_queue_peek_from_isr_failed: tstamp:4993887890 queue:0x0bcbcf78
kworker/0:3-1690 [000] .... 147.379872: rtos_queue_peek_from_isr_failed: tstamp:4995329052 queue:0x0bcbcf78
5.分析track信息
kworker/0:3-1690 [000] .... 139.036764: rtcpu_nvcsi_intr: tstamp:4734276115 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x00000089
REG NVCSI_PHY_0_CILB_INTR_0_STATUS_CILA_0 of the TRM
从这里可以看出是lane control error
可能原因:
可能是CSI信号或时序不符合MIPI规范
6. 示波器查询CSI信号
(1)Toshiba MIPI out , 不连接xavier主控接口
(2) Toshiba MIPI out, 连接xavier主控接口
看着CSI信号时序是正常的
7. 重新测试如下命令
/yavta /dev/video0 -c1 -n1 -s1920x1080 -fUYVY -Fcam.raw
kworker/0:1-8829 [000] .... 497.697231: rtos_queue_send_from_isr_failed: tstamp:15945062280 queue:0x0bcba5e0
kworker/0:1-8829 [000] .... 497.697231: rtos_queue_send_from_isr_failed: tstamp:15945062429 queue:0x0bcbb3a0
kworker/0:1-8829 [000] .... 497.697232: rtos_queue_send_from_isr_failed: tstamp:15945062574 queue:0x0bcbc160
kworker/0:1-8829 [000] .... 497.697233: rtcpu_vinotify_event: tstamp:15945168587 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:15944880240 data:0x00000000
kworker/0:1-8829 [000] .... 497.697235: rtcpu_vinotify_event: tstamp:15945168728 tag:FS channel:0x00 frame:0 vi_tstamp:15944921925 data:0x00000010
kworker/0:1-8829 [000] .... 497.697236: rtcpu_vinotify_event: tstamp:15945168889 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:15944921958 data:0x000003c9
kworker/0:1-8829 [000] .... 497.697236: rtcpu_vinotify_event: tstamp:15945169025 tag:FE channel:0x00 frame:0 vi_tstamp:15944974726 data:0x00000020
kworker/0:1-8829 [000] .... 497.697236: rtcpu_vinotify_event: tstamp:15945169181 tag:FS channel:0x00 frame:0 vi_tstamp:15945016413 data:0x00000010
kworker/0:1-8829 [000] .... 497.697237: rtcpu_vinotify_event: tstamp:15945169313 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:15945016447 data:0x000003c9
kworker/0:1-8829 [000] .... 497.697237: rtcpu_vinotify_event: tstamp:15945169518 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:16320873504 data:0x10000000
kworker/0:1-8829 [000] .... 497.697237: rtcpu_vinotify_event: tstamp:15945169656 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:16320902880 data:0x31000477
kworker/0:1-8829 [000] .... 497.697238: rtcpu_vinotify_event: tstamp:15945169815 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:16320911520 data:0x07020477
kworker/0:1-8829 [000] .... 497.697238: rtcpu_vinotify_event: tstamp:15945169951 tag:FE channel:0x00 frame:0 vi_tstamp:15945069214 data:0x00000020
kworker/0:1-8829 [000] .... 497.697238: rtcpu_vinotify_event: tstamp:15945170105 tag:FS channel:0x00 frame:0 vi_tstamp:15945110901 data:0x00000010
kworker/0:1-8829 [000] .... 497.697239: rtcpu_vinotify_event: tstamp:15945170249 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:15945110903 data:0x00000000
kworker/0:1-8829 [000] .... 497.697239: rtcpu_vinotify_event: tstamp:15945170409 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:15945110935 data:0x00000001
kworker/0:1-8829 [000] .... 497.697239: rtcpu_vinotify_event: tstamp:15945170544 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:16322326816 data:0x08020477
kworker/0:1-8829 [000] .... 497.697240: rtcpu_vinotify_event: tstamp:15945170699 tag:FE channel:0x00 frame:0 vi_tstamp:15945163703 data:0x00000020
kworker/0:1-8829 [000] .... 497.697240: rtcpu_vinotify_event: tstamp:15945170839 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:15945163703 data:0x01000000
kworker/0:1-8829 [000] .... 497.697240: rtcpu_vinotify_error: tstamp:15945208268 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:15945205423 data:0x000003c9
kworker/0:1-8829 [000] .... 497.697241: rtcpu_vinotify_error: tstamp:15945302752 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:15945299911 data:0x000003c9
kworker/0:1-8829 [000] .... 497.697241: rtos_queue_send_from_isr_failed: tstamp:15945329337 queue:0x0bcb41f8
kworker/0:1-8829 [000] .... 497.697241: rtos_queue_send_from_isr_failed: tstamp:15945329509 queue:0x0bcb8a60
kworker/0:1-8829 [000] .... 497.697242: rtos_queue_send_from_isr_failed: tstamp:15945329662 queue:0x0bcba5e0
kworker/0:1-8829 [000] .... 497.697242: rtos_queue_send_from_isr_failed: tstamp:15945329811 queue:0x0bcbb3a0
kworker/0:1-8829 [000] .... 497.697242: rtos_queue_send_from_isr_failed: tstamp:15945329956 queue:0x0bcbc160
kworker/0:1-8829 [000] .... 497.753116: rtcpu_vinotify_event: tstamp:15945540828 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:16324023040 data:0x01020477
kworker/0:1-8829 [000] .... 497.753119: rtcpu_vinotify_event: tstamp:15945541048 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:15945163705 data:0x00000000
kworker/0:1-8829 [000] .... 497.753119: rtcpu_vinotify_event: tstamp:15945541302 tag:FS channel:0x00 frame:0 vi_tstamp:15945205389 data:0x00000010
kworker/0:1-8829 [000] .... 497.753119: rtcpu_vinotify_event: tstamp:15945541512 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:15945205423 data:0x000003c9
kworker/0:1-8829 [000] .... 497.753120: rtcpu_vinotify_event: tstamp:15945541760 tag:FE channel:0x00 frame:0 vi_tstamp:15945258191 data:0x00000020
kworker/0:1-8829 [000] .... 497.753120: rtcpu_vinotify_event: tstamp:15945541971 tag:FS channel:0x00 frame:0 vi_tstamp:15945299878 data:0x00000010
kworker/0:1-8829 [000] .... 497.753120: rtcpu_vinotify_event: tstamp:15945542218 tag:CHANSEL_NOMATCH channel:0x01 frame:0 vi_tstamp:15945299911 data:0x000003c9
kworker/0:1-8829 [000] .... 497.753122: rtos_queue_send_from_isr_failed: tstamp:15945550837 queue:0x0bcb41f8
kworker/0:1-8829 [000] .... 497.753122: rtos_queue_send_from_isr_failed: tstamp:15945551061 queue:0x0bcb8a60
kworker/0:1-8829 [000] .... 497.753122: rtos_queue_send_from_isr_failed: tstamp:15945551284 queue:0x0bcba5e0
kworker/0:1-8829 [000] .... 497.753123: rtos_queue_send_from_isr_failed: tstamp:15945551503 queue:0x0bcbb3a0
kworker/0:1-8829 [000] .... 497.753123: rtos_queue_send_from_isr_failed: tstamp:15945551721 queue:0x0bcbc160
The dmesg log:
[ 497.201427] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 497.210498] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 497.219558] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 497.228630] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 497.234682] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 497.243747] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 0, err_data 131072
分析如下:
跟踪显示短帧,表明输出大小不符合预期。
tag:CHANSEL_SHORT_FRAME
8. 修改dtsi
tc358746@0e {
compatible = "toshiba,tc358746"; /* I2C device address */
reg = <0x0e>; /* shifted by 2 */
physical_w = "3.680"; /* Physical dimensions of sensor */
physical_h = "2.760";
devnode = "video0"; /* V4L2 device node location */
sensor_model = "TC358746";
post_crop_frame_drop = "0";
use_decibel_gain = "true";
delay_gain = "true";
use_sensor_mode_id = "true";
mode0 { /*TC358748_MODE_1920x1080_30FPS */
mclk_khz = "37125";
num_lanes = "2";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
// dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "yuyv";
// pixel_t = "yuv_yuyv16";
active_w = "1920";
active_h = "1080";
readout_orientation = "0";
line_length = "2200";
inherent_gain = "1";
mclk_multiplier = "1";
pix_clk_hz = "74250000";
gain_factor = "10";
min_gain_val = "0"; /* 0dB */
max_gain_val = "480"; /* 48dB */
step_gain_val = "3"; /* 0.3 */
default_gain = "0";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "3000000"; /* 1.5 */
max_framerate = "30000000"; /* 30 */
step_framerate = "1";
default_framerate= "30000000";
exposure_factor = "1000000";
min_exp_time = "30"; /* us */
max_exp_time = "660000"; /* us */
step_exp_time = "1";
default_exp_time = "33334";/* us */
embedded_metadata_height = "0";
};
dmesg :
仍然报错
kworker/0:0-4 [000] .... 752.407504: rtcpu_nvcsi_intr: tstamp:23903625561 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000100
kworker/0:0-4 [000] .... 752.407504: rtcpu_nvcsi_intr: tstamp:23903625561 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000100
kworker/0:0-4 [000] .... 752.407505: rtcpu_nvcsi_intr: tstamp:23903626189 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000100
kworker/0:0-4 [000] .... 752.407505: rtcpu_nvcsi_intr: tstamp:23903627593 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000100
kworker/0:0-4 [000] .... 752.407506: rtcpu_nvcsi_intr: tstamp:23903627593 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00000100
kworker/0:0-4 [000] .... 752.407506: rtcpu_nvcsi_intr: tstamp:23903628228 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000100
kworker/0:0-4 [000] .... 752.407506: rtcpu_nvcsi_intr: tstamp:23903629674 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x00000100
[ 844.056229] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 160
[ 844.106326] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 160
[ 844.356363] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 160
[ 844.522829] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 160
[ 844.556171] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 32, err_data 160
9. 修改clock
尝试修改 nvcsi/vi clocks
sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
这里通过提升VI 、ISP、NVCSI的clock;
可修复上面问题;
图像可正常采集
- 分享
- 举报
-
浏览量:9264次2020-12-03 17:46:05
-
浏览量:577次2023-05-31 13:58:11
-
浏览量:7417次2021-05-11 17:51:48
-
浏览量:6453次2021-04-21 17:42:58
-
浏览量:16549次2021-02-19 17:01:32
-
2021-05-06 16:03:00
-
浏览量:10848次2021-05-06 16:22:01
-
浏览量:5289次2021-07-09 15:20:08
-
浏览量:6225次2021-07-09 15:17:28
-
浏览量:5201次2021-07-09 15:23:33
-
浏览量:10606次2021-03-03 17:39:18
-
浏览量:7481次2021-05-20 17:08:14
-
浏览量:9388次2021-05-25 17:31:40
-
浏览量:7084次2021-05-20 16:37:42
-
浏览量:9219次2021-05-19 17:32:00
-
浏览量:7907次2021-05-25 15:32:16
-
浏览量:1569次2023-10-24 18:27:46
-
浏览量:2005次2023-09-19 16:02:04
-
浏览量:6122次2021-06-30 09:32:11
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
free-jdx
感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明