MIPI cal err on using our onboard camera

Hi,

We are trying to use our camera on TX2 L4T v28.1. The camera follows the D-PHY CSI2 standard.

When we give the v4l2 commands, we always get the mipi timeout

[   57.529808] tegra_mipi_cal 3990000.mipical: Number of lanes 4194304 and value is 1 and cal&val 1
[   57.538677] tegra_mipi_cal 3990000.mipical: Mipi cal timeout,val:9781, lanes:400000 and result is 0
[   57.550141] tegra_mipi_cal 3990000.mipical: MIPI_CAL_CTRL                  0x04 0x2a000010
[   57.558546] tegra_mipi_cal 3990000.mipical: CIL_MIPI_CAL_STATUS            0x0c 0x00009781
[   57.566937] tegra_mipi_cal 3990000.mipical: CIL_MIPI_CAL_STATUS_2          0x10 0x00000000
[   57.575299] tegra_mipi_cal 3990000.mipical: CILA_MIPI_CAL_CONFIG           0x18 0x00000000
[   57.583648] tegra_mipi_cal 3990000.mipical: CILB_MIPI_CAL_CONFIG           0x1c 0x00000000
[   57.591978] tegra_mipi_cal 3990000.mipical: CILC_MIPI_CAL_CONFIG           0x20 0x00200000
[   57.600342] tegra_mipi_cal 3990000.mipical: CILD_MIPI_CAL_CONFIG           0x24 0x00000000
[   57.608696] tegra_mipi_cal 3990000.mipical: CILE_MIPI_CAL_CONFIG           0x28 0x00000000
[   57.617022] tegra_mipi_cal 3990000.mipical: CILF_MIPI_CAL_CONFIG           0x2c 0x00000000
[   57.625343] tegra_mipi_cal 3990000.mipical: DSIA_MIPI_CAL_CONFIG           0x3c 0x00000200
[   57.633652] tegra_mipi_cal 3990000.mipical: DSIB_MIPI_CAL_CONFIG           0x40 0x00000200
[   57.641956] tegra_mipi_cal 3990000.mipical: DSIC_MIPI_CAL_CONFIG           0x44 0x00000200
[   57.650255] tegra_mipi_cal 3990000.mipical: DSID_MIPI_CAL_CONFIG           0x48 0x00000200
[   57.658567] tegra_mipi_cal 3990000.mipical: MIPI_BIAS_PAD_CFG0             0x5c 0x00000000
[   57.666880] tegra_mipi_cal 3990000.mipical: MIPI_BIAS_PAD_CFG1             0x60 0x00000000
[   57.675197] tegra_mipi_cal 3990000.mipical: MIPI_BIAS_PAD_CFG2             0x64 0x00010010
[   57.683508] tegra_mipi_cal 3990000.mipical: DSIA_MIPI_CAL_CONFIG_2         0x68 0x00000002
[   57.691813] tegra_mipi_cal 3990000.mipical: DSIB_MIPI_CAL_CONFIG_2         0x6c 0x00000002
[   57.700115] tegra_mipi_cal 3990000.mipical: DSIC_MIPI_CAL_CONFIG_2         0x74 0x00000002
[   57.708414] tegra_mipi_cal 3990000.mipical: DSID_MIPI_CAL_CONFIG_2         0x78 0x00000002

And the PXL SOF error is not consistent. After reboot sometimes we get the following error and sometimes not

[   57.813183] tegra-vi4 15700000.vi: Status:  7 channel:00 frame:0002
[   57.819489] tegra-vi4 15700000.vi:          timestamp sof 65640339840 eof 65656349696 data 0x00000001
[   57.828756] tegra-vi4 15700000.vi:          capture_id 1 stream  2 vchan  0
[   58.793859] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11

Can someone please explain the issue we are facing?

hello tharunprasanth,

  1. we already release-28.2.1 for a while, are you wish keeping develop your process on 28.1?
  2. MIPI calibration messages not always harmful, may I know is your camera function works?
  3. please also enable the tracing logs as following below for checking.
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo > /sys/kernel/debug/tracing/trace
cat /sys/kernel/debug/tracing/trace

Thanks JerryChang for your reply.

  1. We will be porting to 28.2 sooner.
  2. with v4l2 I am able to dump the frame into a raw file and the tx2 seems to get the frame from our camera. (though the colors are not correct. The camera uses “GRBG” 12 bit MIPI color format. But L4T v28.1 has support only for RGGB 12 bit MIPI)
  3. we were able to resolve the CHANSEL error. It was due to camera power sequence failure. V4L2-ctl command is capturing the frames from camera. But still we have MIPI calibration issues. The log can be seen below
# tracer: nop
#
# entries-in-buffer/entries-written: 491/491   #P:6
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/0:1-113   [000] ...1  1631.393959: rtos_queue_peek_from_isr_failed: tstamp:51283701576 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1  1631.393967: rtcpu_start: tstamp:51283704511
     kworker/0:1-113   [000] ...1  1631.550033: rtos_queue_peek_from_isr_failed: tstamp:51288702933 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1  1631.706018: rtos_queue_peek_from_isr_failed: tstamp:51293703440 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1  1631.862000: rtos_queue_peek_from_isr_failed: tstamp:51298703942 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1  1632.017956: rtos_queue_peek_from_isr_failed: tstamp:51303703992 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1  1632.122040: rtcpu_vinotify_handle_msg: tstamp:51307342526 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:4062701817 data:0x00000001
     kworker/0:1-113   [000] ...1  1632.173962: rtcpu_vinotify_handle_msg: tstamp:51307858601 tag:CHANSEL_PXL_SOF channel:0x00 frame:2 vi_tstamp:4063217795 data:0x00000001
     kworker/0:1-113   [000] ...1  1632.173967: rtcpu_vinotify_handle_msg: tstamp:51307858747 tag:ATOMP_FS channel:0x00 frame:2 vi_tstamp:4063217806 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.173968: rtcpu_vinotify_handle_msg: tstamp:51307863894 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:2 vi_tstamp:4063223228 data:0x08000000
     kworker/0:1-113   [000] ...1  1632.173969: rtcpu_vinotify_handle_msg: tstamp:51308355892 tag:CHANSEL_PXL_EOF channel:0x00 frame:2 vi_tstamp:4063715030 data:0x031f0002
     kworker/0:1-113   [000] ...1  1632.173971: rtcpu_vinotify_handle_msg: tstamp:51308356058 tag:ATOMP_FE channel:0x00 frame:2 vi_tstamp:4063715052 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.173972: rtcpu_vinotify_handle_msg: tstamp:51308374581 tag:CHANSEL_PXL_SOF channel:0x00 frame:3 vi_tstamp:4063733771 data:0x00000001
     kworker/0:1-113   [000] ...1  1632.173973: rtcpu_vinotify_handle_msg: tstamp:51308374767 tag:ATOMP_FS channel:0x00 frame:3 vi_tstamp:4063733782 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.173974: rtcpu_vinotify_handle_msg: tstamp:51308379461 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:3 vi_tstamp:4063738765 data:0x08000000
     kworker/0:1-113   [000] ...1  1632.173978: rtos_queue_peek_from_isr_failed: tstamp:51308704474 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1  1632.173979: rtcpu_vinotify_handle_msg: tstamp:51308871868 tag:CHANSEL_PXL_EOF channel:0x00 frame:3 vi_tstamp:4064231006 data:0x031f0002
     kworker/0:1-113   [000] ...1  1632.173980: rtcpu_vinotify_handle_msg: tstamp:51308872005 tag:ATOMP_FE channel:0x00 frame:3 vi_tstamp:4064231029 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.173982: rtcpu_vinotify_handle_msg: tstamp:51308890571 tag:CHANSEL_PXL_SOF channel:0x00 frame:4 vi_tstamp:4064249748 data:0x00000001
     kworker/0:1-113   [000] ...1  1632.173983: rtcpu_vinotify_handle_msg: tstamp:51308890755 tag:ATOMP_FS channel:0x00 frame:4 vi_tstamp:4064249760 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.173984: rtcpu_vinotify_handle_msg: tstamp:51308895873 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:4 vi_tstamp:4064255189 data:0x08000000
     kworker/0:1-113   [000] ...1  1632.225971: rtcpu_vinotify_handle_msg: tstamp:51309387836 tag:CHANSEL_PXL_EOF channel:0x00 frame:4 vi_tstamp:4064746984 data:0x031f0002
     kworker/0:1-113   [000] ...1  1632.225976: rtcpu_vinotify_handle_msg: tstamp:51309387974 tag:ATOMP_FE channel:0x00 frame:4 vi_tstamp:4064747006 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.225979: rtcpu_vinotify_handle_msg: tstamp:51309406532 tag:CHANSEL_PXL_SOF channel:0x00 frame:5 vi_tstamp:4064765725 data:0x00000001
     kworker/0:1-113   [000] ...1  1632.225981: rtcpu_vinotify_handle_msg: tstamp:51309406716 tag:ATOMP_FS channel:0x00 frame:5 vi_tstamp:4064765736 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.225983: rtcpu_vinotify_handle_msg: tstamp:51309903848 tag:CHANSEL_PXL_EOF channel:0x00 frame:5 vi_tstamp:4065262960 data:0x031f0002
     kworker/0:1-113   [000] ...1  1632.225986: rtcpu_vinotify_handle_msg: tstamp:51309904027 tag:ATOMP_FE channel:0x00 frame:5 vi_tstamp:4065262982 data:0x00000000
     kworker/0:1-113   [000] ...1  1632.225988: rtcpu_vinotify_handle_msg: tstamp:51310438494 tag:CHANSEL_PXL_SOF channel:0x00 frame:7 vi_tstamp:4065797678 data:0x00000001
     kworker/0:1-113   [000] ...1  1632.225990: rtcpu_vinotify_handle_msg: tstamp:51310438677 tag:ATOMP_FS channel:0x00 frame:7 vi_tstamp:4065797689 data:0x00000000

But when we try to launch gst-launch we get some errors
The gst-launch command we use

gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=10 ! "video/x-bayer, format=rggb, width=1280, height=800" ! filesink location=test_1280x800.bayer

and the error

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:00.000593703
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Thanks,

Also, when we launch “nvgstcapture-1.0” we get the following kernel logs. Please help usin resolving this issue

[ 2403.591307] ar0144 2-0010: ar0144_power_off: power off
[ 2437.044009] ar0144 2-0010: ar0144_power_on: power on
[ 2437.089754] ar0144 2-0010: ar0144_power_off: power off
[ 2725.319806] ar0144 2-0010: ar0144_power_on: power on
[ 2725.330570] ar0144 2-0010: ar0144_power_off: power off
[ 2725.340223] ar0144 2-0010: ar0144_power_on: power on
[ 2725.350984] ar0144 2-0010: ar0144_power_off: power off
[ 2725.387863] ar0144 2-0010: ar0144_power_on: power on
[ 2725.398531] ar0144 2-0010: ar0144_power_off: power off
[ 2725.406698] ar0144 2-0010: ar0144_power_on: power on
[ 2725.417390] ar0144 2-0010: ar0144_power_off: power off
[ 2725.425548] ar0144 2-0010: ar0144_power_on: power on
[ 2725.436268] ar0144 2-0010: ar0144_power_off: power off
[ 2725.515032] ar0144 2-0010: ar0144_power_on: power on
[ 2726.036783] tegra_mipi_cal 3990000.mipical: Number of lanes 1048576 and value is 1 and cal&val 1
[ 2726.045887] tegra_mipi_cal 3990000.mipical: Mipi cal timeout,val:9781, lanes:100000 and result is 0
[ 2726.058502] tegra_mipi_cal 3990000.mipical: MIPI_CAL_CTRL                  0x04 0x2a000010
[ 2726.067050] tegra_mipi_cal 3990000.mipical: CIL_MIPI_CAL_STATUS            0x0c 0x00009781
[ 2726.075472] tegra_mipi_cal 3990000.mipical: CIL_MIPI_CAL_STATUS_2          0x10 0x00000000
[ 2726.083897] tegra_mipi_cal 3990000.mipical: CILA_MIPI_CAL_CONFIG           0x18 0x00200000
[ 2726.092321] tegra_mipi_cal 3990000.mipical: CILB_MIPI_CAL_CONFIG           0x1c 0x00000000
[ 2726.100662] tegra_mipi_cal 3990000.mipical: CILC_MIPI_CAL_CONFIG           0x20 0x00000000
[ 2726.109020] tegra_mipi_cal 3990000.mipical: CILD_MIPI_CAL_CONFIG           0x24 0x00000000
[ 2726.117384] tegra_mipi_cal 3990000.mipical: CILE_MIPI_CAL_CONFIG           0x28 0x00000000
[ 2726.125707] tegra_mipi_cal 3990000.mipical: CILF_MIPI_CAL_CONFIG           0x2c 0x00000000
[ 2726.134025] tegra_mipi_cal 3990000.mipical: DSIA_MIPI_CAL_CONFIG           0x3c 0x00000200
[ 2726.142326] tegra_mipi_cal 3990000.mipical: DSIB_MIPI_CAL_CONFIG           0x40 0x00000200
[ 2726.150633] tegra_mipi_cal 3990000.mipical: DSIC_MIPI_CAL_CONFIG           0x44 0x00000200
[ 2726.158927] tegra_mipi_cal 3990000.mipical: DSID_MIPI_CAL_CONFIG           0x48 0x00000200
[ 2726.167241] tegra_mipi_cal 3990000.mipical: MIPI_BIAS_PAD_CFG0             0x5c 0x00000000
[ 2726.175553] tegra_mipi_cal 3990000.mipical: MIPI_BIAS_PAD_CFG1             0x60 0x00000000
[ 2726.183862] tegra_mipi_cal 3990000.mipical: MIPI_BIAS_PAD_CFG2             0x64 0x00010010
[ 2726.192165] tegra_mipi_cal 3990000.mipical: DSIA_MIPI_CAL_CONFIG_2         0x68 0x00000002
[ 2726.200480] tegra_mipi_cal 3990000.mipical: DSIB_MIPI_CAL_CONFIG_2         0x6c 0x00000002
[ 2726.208778] tegra_mipi_cal 3990000.mipical: DSIC_MIPI_CAL_CONFIG_2         0x74 0x00000002
[ 2726.217076] tegra_mipi_cal 3990000.mipical: DSID_MIPI_CAL_CONFIG_2         0x78 0x00000002
[ 2726.225379] ar0144 2-0010: ar0144_s_stream++
[ 2726.283621] ar0144 2-0010: ar0144_s_stream--
[ 2727.884896] fence timeout on [ffffffc18ded0f00] after 1500ms
[ 2727.890642] name=[nvhost_sync:20], current value=1210 waiting value=1211
[ 2727.897424] ---- mlocks ----
[ 2727.900348] 8: locked by channel 6
[ 2727.903827] 
[ 2727.905122] fence timeout on [ffffffc18db89700] after 1500ms
[ 2727.905136] name=[nvhost_sync:23], current value=4 waiting value=5
[ 2727.905142] ---- mlocks ----
[ 2727.905158] 8: locked by channel 6
[ 2727.905201] 
[ 2727.905205] ---- syncpts ----
[ 2727.905225] id 4 (disp_d) min 11 max 11 refs 1 (previous client : )
[ 2727.905234] id 5 (disp_e) min 1 max 1 refs 1 (previous client : )
[ 2727.905243] id 7 (vblank1) min 19275 max 0 refs 1 (previous client : )
[ 2727.905266] id 18 (17000000.gp10b_507) min 7948 max 7948 refs 1 (previous client : 17000000.gp10b_507)
[ 2727.905274] id 19 (17000000.gp10b_506) min 10 max 10 refs 1 (previous client : 17000000.gp10b_506)
[ 2727.905283] id 20 (15600000.isp_nvcamera-daemon_0) min 1210 max 1214 refs 4 (previous client : tegra-vi4)
[ 2727.905291] id 21 (15600000.isp_nvcamera-daemon_1) min 1207 max 1209 refs 4 (previous client : tegra-vi4)
[ 2727.905298] id 22 (15600000.isp_nvcamera-daemon_2) min 3 max 5 refs 4 (previous client : )
[ 2727.905304] id 23 (15600000.isp_nvcamera-daemon_3) min 4 max 5 refs 4 (previous client : )
[ 2727.905311] id 24 (15600000.isp_nvcamera-daemon_4) min 38 max 47 refs 8 (previous client : )
[ 2727.905318] id 25 (15600000.isp_nvcamera-daemon_5) min 4 max 5 refs 4 (previous client : )
[ 2727.905333] id 32 (17000000.gp10b_501) min 2 max 2 refs 1 (previous client : )
[ 2727.905344] id 36 (15340000.vic_nvgstcapture-1._0) min 3 max 3 refs 1 (previous client : )
[ 2727.905354] id 39 (17000000.gp10b_494) min 7 max 7 refs 1 (previous client : 15700000.vi_0)
[ 2727.905366] id 40 (15700000.vi_0) min 7 max 7 refs 2 (previous client : 15700000.vi_0)
[ 2727.905378] id 44 (15340000.vic_nvcamera-daemon_0) min 3 max 3 refs 1 (previous client : )
[ 2727.905417] id 50 (17000000.gp10b_495) min 2 max 2 refs 1 (previous client : )
[ 2727.905441] id 51 (150c0000.nvcsi_0) min 20 max 20 refs 2 (previous client : )
[ 2727.905451] id 52 (17000000.gp10b_493) min 8 max 8 refs 1 (previous client : )
[ 2727.905460] id 53 (17000000.gp10b_492) min 6 max 6 refs 1 (previous client : )
[ 2727.905469] id 54 (17000000.gp10b_491) min 6 max 6 refs 1 (previous client : )
[ 2727.905478] id 55 (17000000.gp10b_490) min 6 max 6 refs 1 (previous client : )
[ 2727.905487] id 56 (17000000.gp10b_489) min 6 max 6 refs 1 (previous client : )
[ 2727.905496] id 57 (17000000.gp10b_488) min 6 max 6 refs 1 (previous client : )
[ 2727.906154] 
[ 2727.906157] ---- channels ----
[ 2727.906172] 
[ 2727.906172] channel 4 - 15340000.vic
[ 2727.906172] 
[ 2727.906176] NvHost basic channel registers:
[ 2727.906182] CMDFIFO_STAT_0:  00002040
[ 2727.906186] CMDFIFO_RDATA_0: 20000000
[ 2727.906194] CMDP_OFFSET_0:   00000000
[ 2727.906202] CMDP_CLASS_0:    00000000
[ 2727.906206] CHANNELSTAT_0:   00000000
[ 2727.906210] The CDMA sync queue is empty.
[ 2727.906212] 
[ 2727.906225] 
[ 2727.906225] channel 1 - 15820000.se
[ 2727.906225] 
[ 2727.906227] NvHost basic channel registers:
[ 2727.906232] CMDFIFO_STAT_0:  00002040
[ 2727.906236] CMDFIFO_RDATA_0: 5a1432ac
[ 2727.906242] CMDP_OFFSET_0:   00000000
[ 2727.906246] CMDP_CLASS_0:    00000000
[ 2727.906250] CHANNELSTAT_0:   00000000
[ 2727.906253] The CDMA sync queue is empty.
[ 2727.906255] 
[ 2727.906261] 
[ 2727.906261] channel 2 - 15830000.se
[ 2727.906261] 
[ 2727.906264] NvHost basic channel registers:
[ 2727.906268] CMDFIFO_STAT_0:  00002040
[ 2727.906272] CMDFIFO_RDATA_0: 3080a485
[ 2727.906278] CMDP_OFFSET_0:   00000000
[ 2727.906285] CMDP_CLASS_0:    00000000
[ 2727.906289] CHANNELSTAT_0:   00000000
[ 2727.906291] The CDMA sync queue is empty.
[ 2727.906293] 
[ 2727.906299] 
[ 2727.906299] channel 3 - 15840000.se
[ 2727.906299] 
[ 2727.906302] NvHost basic channel registers:
[ 2727.906306] CMDFIFO_STAT_0:  00002040
[ 2727.906310] CMDFIFO_RDATA_0: 14312078
[ 2727.906316] CMDP_OFFSET_0:   00000000
[ 2727.906319] CMDP_CLASS_0:    00000000
[ 2727.906323] CHANNELSTAT_0:   00000000
[ 2727.906326] The CDMA sync queue is empty.
[ 2727.906328] 
[ 2727.906334] 
[ 2727.906334] channel 6 - 15600000.isp
[ 2727.906334] 
[ 2727.906337] NvHost basic channel registers:
[ 2727.906340] CMDFIFO_STAT_0:  00004000
[ 2727.906345] CMDFIFO_RDATA_0: 004e0041
[ 2727.906351] CMDP_OFFSET_0:   00000050
[ 2727.906355] CMDP_CLASS_0:    00000001
[ 2727.906361] CHANNELSTAT_0:   00000000
[ 2727.906373] 
[ 2727.906373] ffffffc05d6a6200: JOB, syncpt_id=20, syncpt_val=1212, first_get=000006d8, timeout=10000, num_slots=19
[ 2727.906390]     GATHER at 5a710000+3c1c, 12 words
[ 2727.906424] 20000001 00006414 20000001 00006815 20000001 00006c16 20000001 00007c17 20000001 00007419 200c0001 00000005 
[ 2727.906432]     GATHER at 5a710000+3c4c, 2 words
[ 2727.906442] 20000001 00000018 
[ 2727.906445] 
[ 2727.906452] 
[ 2727.906452] channel 5 - 150c0000.nvcsi
[ 2727.906452] 
[ 2727.906455] NvHost basic channel registers:
[ 2727.906460] CMDFIFO_STAT_0:  00002040
[ 2727.906464] CMDFIFO_RDATA_0: 00000033
[ 2727.906469] CMDP_OFFSET_0:   00000000
[ 2727.906473] CMDP_CLASS_0:    00000001
[ 2727.906477] CHANNELSTAT_0:   00000000
[ 2727.906480] The CDMA sync queue is empty.
[ 2727.906481] 
[ 2727.906488] 
[ 2727.906488] channel 0 - 15700000.vi
[ 2727.906488] 
[ 2727.906491] NvHost basic channel registers:
[ 2727.906494] CMDFIFO_STAT_0:  00002040
[ 2727.906498] CMDFIFO_RDATA_0: 00000028
[ 2727.906504] CMDP_OFFSET_0:   00000000
[ 2727.906507] CMDP_CLASS_0:    00000001
[ 2727.906511] CHANNELSTAT_0:   00000000
[ 2727.906514] The CDMA sync queue is empty.
[ 2727.906516] 
[ 2727.906525] 
[ 2727.906525] ---- host general irq ----
[ 2727.906525] 
[ 2727.906530] sync_intc0mask = 0x00000001
[ 2727.906534] sync_intmask = 0x50000003
[ 2727.906537] 
[ 2727.906537] ---- host syncpt irq mask ----
[ 2727.906537] 
[ 2727.906540] 
[ 2727.906540] ---- host syncpt irq status ----
[ 2727.906540] 
[ 2727.906545] syncpt_thresh_cpu0_int_status(0) = 0x00000000
[ 2727.906550] syncpt_thresh_cpu0_int_status(1) = 0x00000000
[ 2727.906555] syncpt_thresh_cpu0_int_status(2) = 0x00000000
[ 2727.906560] syncpt_thresh_cpu0_int_status(3) = 0x00000000
[ 2727.906564] syncpt_thresh_cpu0_int_status(4) = 0x00000000
[ 2727.906568] syncpt_thresh_cpu0_int_status(5) = 0x00000000
[ 2727.906573] syncpt_thresh_cpu0_int_status(6) = 0x00000000
[ 2727.906577] syncpt_thresh_cpu0_int_status(7) = 0x00000000
[ 2727.906581] syncpt_thresh_cpu0_int_status(8) = 0x00000000
[ 2727.906586] syncpt_thresh_cpu0_int_status(9) = 0x00000000
[ 2727.906590] syncpt_thresh_cpu0_int_status(10) = 0x00000000
[ 2727.906595] syncpt_thresh_cpu0_int_status(11) = 0x00000000
[ 2727.906603] syncpt_thresh_cpu0_int_status(12) = 0x00000000
[ 2727.906607] syncpt_thresh_cpu0_int_status(13) = 0x00000000
[ 2727.906612] syncpt_thresh_cpu0_int_status(14) = 0x00000000
[ 2727.906616] syncpt_thresh_cpu0_int_status(15) = 0x00000000
[ 2727.906621] syncpt_thresh_cpu0_int_status(16) = 0x00000000
[ 2727.906625] syncpt_thresh_cpu0_int_status(17) = 0x00000000
[ 2728.522181] ---- syncpts ----
[ 2728.525280] id 4 (disp_d) min 11 max 11 refs 1 (previous client : )
[ 2728.531609] id 5 (disp_e) min 1 max 1 refs 1 (previous client : )
[ 2728.537763] id 7 (vblank1) min 19275 max 0 refs 1 (previous client : )
[ 2728.544345] id 18 (17000000.gp10b_507) min 7948 max 7948 refs 1 (previous client : 17000000.gp10b_507)
[ 2728.553722] id 19 (17000000.gp10b_506) min 10 max 10 refs 1 (previous client : 17000000.gp10b_506)
[ 2728.562759] id 20 (15600000.isp_nvcamera-daemon_0) min 1210 max 1214 refs 4 (previous client : tegra-vi4)
[ 2728.572400] id 21 (15600000.isp_nvcamera-daemon_1) min 1207 max 1209 refs 4 (previous client : tegra-vi4)
[ 2728.582034] id 22 (15600000.isp_nvcamera-daemon_2) min 3 max 5 refs 4 (previous client : )
[ 2728.590360] id 23 (15600000.isp_nvcamera-daemon_3) min 4 max 5 refs 4 (previous client : )
[ 2728.598690] id 24 (15600000.isp_nvcamera-daemon_4) min 38 max 47 refs 8 (previous client : )
[ 2728.607218] id 25 (15600000.isp_nvcamera-daemon_5) min 4 max 5 refs 4 (previous client : )
[ 2728.607229] id 32 (17000000.gp10b_501) min 2 max 2 refs 1 (previous client : )
[ 2728.607238] id 36 (15340000.vic_nvgstcapture-1._0) min 1299 max 1302 refs 3 (previous client : )
[ 2728.607245] id 39 (17000000.gp10b_494) min 7 max 7 refs 1 (previous client : 15700000.vi_0)
[ 2728.607250] id 40 (15700000.vi_0) min 7 max 7 refs 2 (previous client : 15700000.vi_0)
[ 2728.607258] id 44 (15340000.vic_nvcamera-daemon_0) min 3 max 3 refs 1 (previous client : )
[ 2728.607268] id 50 (17000000.gp10b_495) min 2 max 2 refs 1 (previous client : )
[ 2728.607273] id 51 (150c0000.nvcsi_0) min 20 max 20 refs 2 (previous client : )
[ 2728.607277] id 52 (17000000.gp10b_493) min 8 max 8 refs 1 (previous client : )
[ 2728.607282] id 53 (17000000.gp10b_492) min 6 max 6 refs 1 (previous client : )
[ 2728.607286] id 54 (17000000.gp10b_491) min 6 max 6 refs 1 (previous client : )
[ 2728.607290] id 55 (17000000.gp10b_490) min 6 max 6 refs 1 (previous client : )
[ 2728.607295] id 56 (17000000.gp10b_489) min 6 max 6 refs 1 (previous client : )
[ 2728.607299] id 57 (17000000.gp10b_488) min 6 max 6 refs 1 (previous client : )
[ 2728.607868] 
[ 2728.607870] ---- channels ----
[ 2728.607879] 
[ 2728.607879] channel 4 - 15340000.vic
[ 2728.607879] 
[ 2728.607881] NvHost basic channel registers:
[ 2728.607885] CMDFIFO_STAT_0:  00002040
[ 2728.607889] CMDFIFO_RDATA_0: e100005d
[ 2728.607894] CMDP_OFFSET_0:   00000100
[ 2728.607897] CMDP_CLASS_0:    00000000
[ 2728.607899] CHANNELSTAT_0:   00000000
[ 2728.607906] 
[ 2728.607906] ffffffc1c9b5dc00: JOB, syncpt_id=36, syncpt_val=1302, first_get=000008f8, timeout=10000, num_slots=16
[ 2728.607916]     GATHER at 5a758000+1c28, 32 words
[ 2728.607964] 10100002 000001c1 00b90110 10100002 000001c2 005a5030 10100002 000001cc 00000000 10100002 000001c3 005a5f40 10100002 000001c8 005aa800 10100002 000001c9 005a7e00 10100002 000001ca 005a9c00 10100002 00000480 005ae000 10100002 00000481 005ae600 10100002 000000c0 00000100 20000001 00000424 
[ 2728.607969]     GATHER at 5a758000+1ca8, 2 words
[ 2728.607973] 20000001 00000424 
[ 2728.607975] 
[ 2728.607982] 
[ 2728.607982] channel 1 - 15820000.se
[ 2728.607982] 
[ 2728.607984] NvHost basic channel registers:
[ 2728.607987] CMDFIFO_STAT_0:  00002040
[ 2728.607990] CMDFIFO_RDATA_0: 5a1432ac
[ 2728.607995] CMDP_OFFSET_0:   00000000
[ 2728.607997] CMDP_CLASS_0:    00000000
[ 2728.608000] CHANNELSTAT_0:   00000000
[ 2728.608002] The CDMA sync queue is empty.
[ 2728.608003] 
[ 2728.608007] 
[ 2728.608007] channel 2 - 15830000.se
[ 2728.608007] 
[ 2728.608009] NvHost basic channel registers:
[ 2728.608011] CMDFIFO_STAT_0:  00002040
[ 2728.608014] CMDFIFO_RDATA_0: 3080a485
[ 2728.608018] CMDP_OFFSET_0:   00000000
[ 2728.608021] CMDP_CLASS_0:    00000000
[ 2728.608023] CHANNELSTAT_0:   00000000
[ 2728.608026] The CDMA sync queue is empty.
[ 2728.608027] 
[ 2728.608031] 
[ 2728.608031] channel 3 - 15840000.se
[ 2728.608031] 
[ 2728.608032] NvHost basic channel registers:
[ 2728.608035] CMDFIFO_STAT_0:  00002040
[ 2728.608037] CMDFIFO_RDATA_0: 14312078
[ 2728.608041] CMDP_OFFSET_0:   00000000
[ 2728.608044] CMDP_CLASS_0:    00000000
[ 2728.608047] CHANNELSTAT_0:   00000000
[ 2728.608048] The CDMA sync queue is empty.
[ 2728.608049] 
[ 2728.608053] 
[ 2728.608053] channel 6 - 15600000.isp
[ 2728.608053] 
[ 2728.608055] NvHost basic channel registers:
[ 2728.608057] CMDFIFO_STAT_0:  00004000
[ 2728.608060] CMDFIFO_RDATA_0: 004e0041
[ 2728.608065] CMDP_OFFSET_0:   00000050
[ 2728.608067] CMDP_CLASS_0:    00000001
[ 2728.608070] CHANNELSTAT_0:   00000000
[ 2728.608076] 
[ 2728.608076] ffffffc05d6a6200: JOB, syncpt_id=20, syncpt_val=1212, first_get=000006d8, timeout=10000, num_slots=19
[ 2728.608081]     GATHER at 5a710000+3c1c, 12 words
[ 2728.608099] 20000001 00006414 20000001 00006815 20000001 00006c16 20000001 00007c17 20000001 00007419 200c0001 00000005 
[ 2728.608103]     GATHER at 5a710000+3c4c, 2 words
[ 2728.608107] 20000001 00000018 
[ 2728.608109]

hello tharunprasanth,

your tracing logs shows sensor data streaming is corrected.
regarding to mipi calibration timeout failure,
a) may I know number of lanes of your sensor
b) had you following the MIPI spec of sensor signaling
c) please tune the cil_settletime, you could refer to [Sensor Driver Programming Guide] to have property description.

moreover,
looks your camera device is a bayer sensor, please try to access your camera sensor with nvcamerasrc.
for example,

gst-launch-1.0 nvcamerasrc num-buffers=1 ! 'video/x-raw(memory:NVMM), width=2592, height=1944' ! nvjpegenc ! filesink location=sample.jpg

a) our sensor uses 2 lanes

We are able to dump the frames into raw file using v4l2-ctl command but the nvcamera daemon was not working with our sensor. Then based on this post https://devtalk.nvidia.com/default/topic/1030505/jetson-tx2/nvcamera-daemon-breakage/2, we changed the mclk_multiplier from 2.75 to 4 and pixel_xlk from 75Mhz to 160MHz and nvcamera-daemon was able to stream frames from our sensor. But it reads the frames in monochrome format instead of RGGB. v4l2-ctl dump was giving frames in color

Can you please explain why we need to increase the pixel_clk, though our sensor’s pixel clk is set to 75MHz?

I have attached the part of our dtsi below.

mode0 { // AR0144_MODE_1280X800
180                                 mclk_khz = "27000";
181                                 num_lanes = "2";
182                                 tegra_sinterface = "serial_a";
183                                 discontinuous_clk = "yes";
184                                 dpcm_enable = "false";
185                                 cil_settletime = "0";
186
187                                 dynamic_pixel_bit_depth = "12";
188                                 csi_pixel_bit_depth = "12";
189
190                                 active_w = "1280";
191                                 active_h = "800";
192                                 pixel_t = "bayer_bggr12";
193                                 readout_orientation = "0";
194                                 line_length = "1488";
195                                 inherent_gain = "1";
196                                 mclk_multiplier = "4";
197 //                              pix_clk_hz = "74250000";
198                                 pix_clk_hz = "160000000";
199                                 min_gain_val = "1.0";
200                                 max_gain_val = "16";
201                                 min_hdr_ratio = "1";
202                                 max_hdr_ratio = "64";
203                                 min_framerate = "1.816577";
204                                 max_framerate = "60";
205                                 min_exp_time = "34";
206                                 max_exp_time = "550385";
207                                 embedded_metadata_height = "0";
208                         };

hello tharunprasanth,

glad to know your sensor drivers works with nvcamera-daemon.

(1)

we changed the mclk_multiplier from 2.75 to 4 and pixel_xlk from 75Mhz to 160MHz
you should not increase both pixel_clk and mclk_multiplier simultaneously, please notice the formula as below:

pixel_clk = mclk * mclk_multiplier

(2)

But it reads the frames in monochrome format instead of RGGB. v4l2-ctl dump was giving frames in color
please share your command of accessing camera sensor with nvcamerasrc,
thanks

please share your command of accessing camera sensor with nvcamerasrc,

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=1280, height=800, framerate=60/1, format=NV12' ! nvvidconv flip-method=2 ! nvegltransform ! nveglglessink -e

This shows the stream in mono chrome and not in color

hello tharunprasanth,

please exclude video convert and EGL pipeline elements to display camera output frames directly.
for example,

gst-launch-1.0 nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvoverlaysink -ev

Hi Jerry,

According to your explanation regarding the pixclk & mclk_multiplier.

Our situation was:

  • pixclk = 74.25 MHz
  • mclk = 27MHz

Therefore, previously we tried mclk_multipler of 2.75 (which satisfies the formula: pixclk = mclk *mclk_multiplier).

BUT…in this configuration, we were able to get a frame from running v4l2 -ctl command but not from

gst-launch-1.0 nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvoverlaysink -ev

Do you have any insight into this?

Thanks.

Hi Jerry,

We are able to get the video stream in color with both nvgstcapture and gst-launch. The issue was L4T V28.1 has support only for RGGB 12 and our sensor uses GRBG 12. So we made changes in device tree, camera_common.c and sensor_common.c to add support for GRBG_12 and now we get the stream with color. But still we see grey tint in the background with nvgstcapture and gst-launch(nvcamerasrc) and not with v4l2-ctl. v4l2-ctl shows frames with no grey tint. I have attached the screen shots from both nvgstcapture and v4l2-ctl. Is this issue related to the different pipeline used by nvcamerasrc? How can we tune our sensor for nvcamerasrc?. Thanks.


v4l2_capture.bmp (2.93 MB)

hello tharunprasanth,

this looks tuning related issues. may I know which ISP configuration files you had applied into?
please contact our camera preferred partners [url]https://developer.nvidia.com/embedded/community/partners[/url], if you need tuning support.
thanks

Jerry,

Can you please answer our question #10

hello tharunprasanth,

please stay the device tree settings as below

pixclk = 74.25 MHz
mclk = 27MHz

and please have a try to execute below commands manually,

$ sudo -i
# echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked 
# echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked

then try to access camera sensor with nvcamerasrc again,
thanks

JerryChang,

Thank you for your post. It worked using the pixclk and i didn’t need to set mrq_rate_locked to 1.

But I have a question on “mclk_multiplier”. If I use this formula

pixclk/mclk

then i get 2.75. If i set mclk_multiplier in device tree to 2.75, nvcamerasrc is not working. I need to set it to 6.67. Any insight

hello tharunprasanth,

It worked using the pixclk and i didn’t need to set mrq_rate_locked to 1.
may I have more details about how your use-case works.
could you please also have a comparison about the working and failure properties settings.
thanks