Hey.
I am trying to write a driver for toshiba tc358748. I took imx219 as a basis.
Working with devkit jetson nano A02.
I have configured the tc358748 to output 1920 * 1080, 2 data lines, color bars.
Came across a problem. loading the driver.
dmesg
[ 54.648747] tc: loading out-of-tree module taints kernel.
[ 54.655958] tc_probe
[ 54.658328] tc_parse_dt
[ 54.660866] tc_power_get
[ 54.663630] tc358746 6-000e: tegracam sensor driver:tc_v2.0.6
[ 54.663633] tc_board_setup
[ 54.666476] tc_power_on
[ 54.692096] i2c_read
[ 54.695352] tc_power_off
[ 54.698056] vi 54080000.vi: subdev tc358746 6-000e bound
[ 54.707967] tc_open
[ 54.708985] tc_power_on
[ 54.732131] tc_set_mode
[ 54.734625] tc_bridge_setup count 1076
[ 55.040142] tc_start_streaming
[ 55.043544] tc_stop_streaming
[ 55.097718] tc_power_off
[ 55.100653] tc_power_on
[ 55.127866] tc_power_off
yavta -c -f YUYV -s 1920x1080 -F /dev/video0
Device /dev/video0 opened.
Devicevi-output, tc358746 6-000e' on
platform:54080000.vi:0’ (driver ‘tegra-video’) supports video, capture, without mplanes.
Video format set: YUYV (56595559) 1920x1080 (stride 3840) field none buffer size 4147200
Video format: YUYV (56595559) 1920x1080 (stride 3840) field none buffer size 4147200
8 buffers requested.
length: 4147200 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0x7fb61b4000.
length: 4147200 offset: 4149248 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0x7fb5dbf000.
length: 4147200 offset: 8298496 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0x7fb59ca000.
length: 4147200 offset: 12447744 timestamp type/source: mono/EoF
Buffer 3/0 mapped at address 0x7fb55d5000.
length: 4147200 offset: 16596992 timestamp type/source: mono/EoF
Buffer 4/0 mapped at address 0x7fb51e0000.
length: 4147200 offset: 20746240 timestamp type/source: mono/EoF
Buffer 5/0 mapped at address 0x7fb4deb000.
length: 4147200 offset: 24895488 timestamp type/source: mono/EoF
Buffer 6/0 mapped at address 0x7fb49f6000.
length: 4147200 offset: 29044736 timestamp type/source: mono/EoF
Buffer 7/0 mapped at address 0x7fb4601000.
dmesg
[ 183.660349] tc_power_on
[ 183.686406] tc_set_mode
[ 183.688894] tc_bridge_setup count 1076
[ 184.082361] tc_start_streaming
[ 184.085715] tc_stop_streaming
[ 184.140171] tc_power_off
[ 184.143326] tc_power_on
[ 184.212337] tc_set_mode
[ 184.214818] tc_bridge_setup count 1076
[ 184.472399] tc_start_streaming
[ 184.677744] video4linux video0: frame start syncpt timeout!0
[ 184.885734] video4linux video0: frame start syncpt timeout!0
[ 185.093739] video4linux video0: frame start syncpt timeout!0
v4l2-compliance
v4l2-compliance SHA : not available
Driver Info:
Driver name : tegra-video
Card type : vi-output, tc358746 6-000e
Bus info : platform:54080000.vi:0
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix FormatCompliance test for device /dev/video0 (not using libv4l2):
Required ioctls:
test VIDIOC_QUERYCAP: OKAllow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OKDebug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OKInput ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)Test input 0:
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 1 Private Controls: 17Format ioctls:
fail: v4l2-test-formats.cpp(273): duplicate format 56595559 (YUYV)
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
test VIDIOC_G/S_PARM: FAIL
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OKTest input 0:
Total: 43, Succeeded: 41, Failed: 2, Warnings: 0
cat / sys / kernel / debug / tracing / trace
Outputs nothing
root@jetson-desktop:/home/jetson# echo 1 > /sys/kernel/debug/tracing/tracing_on
root@jetson-desktop:/home/jetson# echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
root@jetson-desktop:/home/jetson# echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
root@jetson-desktop:/home/jetson# echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
root@jetson-desktop:/home/jetson# echo 2 > /sys/kernel/debug/camrtc/log-level
bash: /sys/kernel/debug/camrtc/log-level: No such file or directory
root@jetson-desktop:/home/jetson# echo > /sys/kernel/debug/tracing/trace
root@jetson-desktop:/home/jetson# cat /sys/kernel/debug/tracing/trace
tracer: nopentries-in-buffer/entries-written: 0/0 #P:4
_-----=> irqs-off / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / delay TASK-PID CPU# |||| TIMESTAMP FUNCTION | | | |||| | |
root@jetson-desktop:/home/jetson#