2560x1440 VESA_Q720P YUV422@25fps CSI Capture

Hi everyone!
I’m working with Toshiba tc358748 Parallel<->CSI chip.
tc358748 is configured in Parallel->CSI mode and capturing UYVY frame corresponding to this table https://drive.google.com/open?id=1VXGSg8qMOG-VvrrdiJC49VtlyQ2l3Gnw

v4l2-compliance for my driver returns no errors

v4l2-ctl -d /dev/video0 -w --verbose --set-fmt-video=width=2560,height=1440,pixelformat=UYVY --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.yuv
return:

VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
	Width/Height      : 2560/1440
	Pixel Format      : 'UYVY'
	Field             : None
	Bytes per Line    : 5120
	Size Image        : 7372800
	Colorspace        : SMPTE 170M
	Transfer Function : Default
	YCbCr Encoding    : Default
	Quantization      : Default
	Flags             : 
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
libv4l2: error dequeuing buf: Input/output error
VIDIOC_DQBUF: failed: Input/output error
VIDIOC_STREAMOFF: ok

But in console I have

[   68.269604] tegra-vi4 15700000.vi: Status:  7 channel:00 frame:0000
[   68.275911] tegra-vi4 15700000.vi:          timestamp sof 77967342688 eof 78007141632 data 0x00000001
[   68.285169] tegra-vi4 15700000.vi:          capture_id 1 stream  0 vchan  0
[   69.226190] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[   70.229461] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!

or sometimes Status: 4

I’ve tried different configs in dtb file.
Please could you help me with configuration in dtb?

mode0 {active_h, active_w etc. }

And also do I need to provide this in dtb?

tegra-camera-platform { num_csi_lanes, max_lane_speed, max_lane_speed, min_bits_per_pixel, vi_peak_byte_per_pixel, vi_bw_margin_pct, max_pixel_rate, isp_peak_byte_per_pixel, isp_bw_margin_pct; }

Using Tegra r28.1

Thanks in advance!

Follow below topic to check the tracing message.

https://devtalk.nvidia.com/default/topic/1022990/jetson-tx2/some-problems-with-my-imx219-driver-and-dtb-/post/5218484/#5218484

Could it help?

nvidia@tegra-ubuntu:~$ v4l2-ctl -d /dev/video0 -w --verbose --set-fmt-video=width=2560,height=1440,pixelformat=UYVY --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.yuv
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
	Width/Height      : 2560/1440
	Pixel Format      : 'UYVY'
	Field             : None
	Bytes per Line    : 5120
	Size Image        : 7372800
	Colorspace        : SMPTE 170M
	Transfer Function : Default
	YCbCr Encoding    : Default
	Quantization      : Default
	Flags             : 
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
libv4l2: error dequeuing buf: Input/output error
VIDIOC_DQBUF: failed: Input/output error
VIDIOC_STREAMOFF: ok

nvidia@tegra-ubuntu:~$ sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 21/21   #P:4
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/0:1-113   [000] ...1    55.427245: rtos_queue_peek_from_isr_failed: tstamp:2034816064 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    55.427252: rtcpu_start: tstamp:2034817585
     kworker/0:1-113   [000] ...1    55.427255: rtcpu_vinotify_handle_msg: tstamp:2035003600 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:2035003173 data:0x00000001
     kworker/0:1-113   [000] ...1    55.427256: rtcpu_vinotify_handle_msg: tstamp:2035467820 tag:CHANSEL_PXL_SOF channel:0x00 frame:0 vi_tstamp:2035467235 data:0x00000001
     kworker/0:1-113   [000] ...1    55.427258: rtcpu_vinotify_handle_msg: tstamp:2035468008 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:2035467240 data:0x00000000
     kworker/0:1-113   [000] ...1    55.427259: rtcpu_vinotify_handle_msg: tstamp:2035471073 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:0 vi_tstamp:2035470620 data:0x08000000
     kworker/0:1-113   [000] ...1    55.479319: rtcpu_vinotify_handle_msg: tstamp:2036711570 tag:CHANSEL_SHORT_FRAME channel:0x01 frame:0 vi_tstamp:2036710954 data:0x00000001
     kworker/0:1-113   [000] ...1    55.479326: rtcpu_vinotify_handle_msg: tstamp:2036711790 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:2036710957 data:0x00000000
     kworker/0:1-113   [000] ...1    55.583268: rtos_queue_peek_from_isr_failed: tstamp:2039816965 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    55.739264: rtos_queue_peek_from_isr_failed: tstamp:2044817472 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    55.895266: rtos_queue_peek_from_isr_failed: tstamp:2049817976 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    56.051292: rtos_queue_peek_from_isr_failed: tstamp:2054818483 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    56.207269: rtos_queue_peek_from_isr_failed: tstamp:2059818987 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    56.363265: rtos_queue_peek_from_isr_failed: tstamp:2064819495 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    56.519271: rtos_queue_peek_from_isr_failed: tstamp:2069820004 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    56.675264: rtos_queue_peek_from_isr_failed: tstamp:2074820508 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    56.831253: rtos_queue_peek_from_isr_failed: tstamp:2079821016 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    56.987265: rtos_queue_peek_from_isr_failed: tstamp:2084821522 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    57.195264: rtos_queue_peek_from_isr_failed: tstamp:2089822027 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    57.351264: rtos_queue_peek_from_isr_failed: tstamp:2094822536 queue:0x0b4a3c58
     kworker/0:1-113   [000] ...1    57.455282: rtos_queue_peek_from_isr_failed: tstamp:2098279964 queue:0x0b4a3c58

The tracing shows the CHANSEL_SHORT_FRAME that means output height isn’t as expected.

Yep. Have it working for now =)
We have: FPGA output parallel -> tc358748 converts to MIPI CSI -> Jetson capture.
We did changes in FPGA output signal timings and now it works.

Thank you!

Hi kosharov.ilya. I have the similar problems with tc358748. Could you please share where was the problem ?

Hi!
I cannot show you the exact register value because I do not know myself.
We have asked Toshiba for help and they provide a document .xlsm.
You could set your parameters in it and it generates register’s values.

Hello kucherov.ilya ,sorry for bothering you. We asked toshiba for this file ,but they keep silence. Is there any possible that you can give this file to me ?

Thank you in advance.