Hello support,
I allow myself to contact you because I encounter an integration problem with TC358743 bridge (bridge device that converts HDMI stream to MIPI CSI-2 TX).
Before contacting you, I took care to check my “integration” as you describe in the documentation (Tegra Linux Driver Package Development Guide/camera_dev.html).
I encounter the following error: (from vi2_fops.c)
[ 65.086547] video4linux video0: frame start syncpt timeout!0
[ 65.092881] video4linux video0: TEGRA_VI_CSI_ERROR_STATUS 0x00000000
- Driver integration
My kernel: 4.9.253-tegra (branch l4t-r32.7.1)
According to documentation, I added in drivers/media/i2c/tc358743:
/* frame format */
static const struct camera_common_frmfmt tc358743_frmfmt[] = {
{{1280, 720}, tc358743_30_60fps, 3, 0, tc358743_MODE_1280X720},
{{1920, 1080}, tc358743_30_60fps, 3, 0, tc358743_MODE_1920X1080},
};
and I use:
sd->entity.ops = &tc358743_media_ops;
state->pad.flags = MEDIA_PAD_FL_SOURCE;
err = tegra_media_entity_init(&sd->entity, 1, &state->pad, true, true);
if (err < 0)
goto err_hdl;
etc…
And I looked at your examples, such as:
kernel/nvdia/drivers/media/{imx185.c, imx185_v1.c or tc358840.c}
My dtsi file (tegra210-tc358743.dtsi (4.6 KB))
was added in tegra210-p3448-0000-p3449-0000-b00.dts
:
#include "tegra210-porg-p3448-common.dtsi"
//#include "porg-platforms/tegra210-porg-camera-rbpcv3-dual-imx477.dtsi"
//#include "porg-platforms/tegra210-porg-camera-rbpcv2-dual-imx219.dtsi"
#include "porg-platforms/tegra210-porg-pinmux-p3448-0000-b00.dtsi"
#include "porg-platforms/tegra210-porg-gpio-p3448-0000-b00.dtsi"
#include "porg-platforms/tegra210-porg-p3448-emc-a00.dtsi"
#include "tegra210-tc358743.dtsi"
- Test environment:
For testing, I used a Jetson Nanodev kit and a TC358743 kit before switching to my hardware soon.
The geekworm’s card is functional with a PI3 but no with a Nano.
Here are some elements to help you understand the problem:
media-ctl -p -d /dev/media0
Media controller API version 0.1.0
Media device information
------------------------
driver vi
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 0.0.0
Device topology
- entity 1: nvcsi--1 (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "tc358743 6-000f":0 [ENABLED]
pad1: Source
-> "vi-output, tc358743 6-000f":0 [ENABLED]
- entity 4: tc358743 6-000f (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:UYVY8_1X16/1920x1080 field:none colorspace:smpte170m]
[dv.caps:BT.656/1120 min:1x1@0 max:10000x10000@165000000 stds:CEA-861,DMT,CVT,GTF caps:progressive,reduced-blanking,custom]
[dv.detect:BT.656/1120 1920x1080p60 (2200x1125) stds: flags:]
[dv.current:BT.656/1120 1920x1080p60 (2200x1125) stds: flags:]
-> "nvcsi--1":0 [ENABLED]
- entity 6: vi-output, tc358743 6-000f (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "nvcsi--1":1 [ENABLED]
v4l2-ctl --list-devices
vi-output, tc358743 6-000f (platform:54080000.vi:0):
/dev/video
v4l2-ctl --device=/dev/video0 --list-ctrls
User Controls
audio_sampling_rate 0x00981980 (int) : min=0 max=768000 step=1 default=0 value=44100 flags=read-only
audio_present 0x00981981 (bool) : default=0 value=0 flags=read-only
Camera Controls
bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
height_align 0x009a2066 (int) : min=1 max=16 step=1 default=1 value=1
size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
write_isp_format 0x009a2068 (bool) : default=0 value=0
sensor_signal_properties 0x009a2069 (u32) : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
sensor_image_properties 0x009a206a (u32) : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
sensor_control_properties 0x009a206b (u32) : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
sensor_dv_timings 0x009a206c (u32) : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
low_latency_mode 0x009a206d (bool) : default=0 value=0
preferred_stride 0x009a206e (int) : min=0 max=65535 step=1 default=0 value=0
sensor_modes 0x009a2082 (int) : min=0 max=30 step=1 default=30 value=30 flags=read-only
Digital Video Controls
power_present 0x00a00964 (bitmask): max=0x00000001 default=0x00000000 value=0x00000001 flags=read-only
v4l2-ctl --info
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, tc358743 6-000f
Bus info : platform:54080000.vi:0
Driver version: 4.9.253
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
v4l2-ctl --query-dv-timings
Active width: 1920
Active height: 1080
Total width: 2200
Total height: 1125
Frame format: progressive
Polarities: -vsync -hsync
Pixelclock: 148500000 Hz (60.00 frames per second)
Horizontal frontporch: 0
Horizontal sync: 280
Horizontal backporch: 0
Vertical frontporch: 0
Vertical sync: 45
Vertical backporch: 0
Standards:
Flags:
v4l2-ctl --device /dev/video0 --stream-mmap --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-to=frame.raw --stream-count=1
[ 2721.846246] video4linux video0: frame start syncpt timeout!0
[ 2721.852582] video4linux video0: TEGRA_VI_CSI_ERROR_STATUS 0x00000000
[ 2722.062229] video4linux video0: frame start syncpt timeout!0
[ 2722.068625] video4linux video0: TEGRA_VI_CSI_ERROR_STATUS 0x00000000
Thank you in advance,
Best regards,
Sylvain