Hi @JerryChang
Thank you very much for your support.
i am able to create 2 video nodes but able to access video 1 only, could you please give me some pointer in driver when I can look for /dev/v4l-subdevX linking and creation of /dev/videoX nodes.
because if I capture the data from the video1 with below configuration and able to dump the frame.
v4l2-ctl --set-ctrl=operating_mode=3 -d /dev/v4l-subdev3
v4l2-ctl --set-ctrl=ab_bits=6 -d /dev/v4l-subdev3
v4l2-ctl --set-ctrl=depth_enable=1 -d /dev/v4l-subdev3
v4l2-ctl --device /dev/video1 --set-fmt-video=width=512,height=512,pixelformat=RG12 --stream-mmap --stream-to=mode3.bin --stream-count=1
may be the issue with handling the dev nodes in driver.
hello kishan.kava,
you may dig into…
$public_sources/kernel_src/nvidia-oot/drivers/media/platform/tegra/camera/vi/graph.c
Hi @JerryChang
I tried to capture the frame from both nodes, whenever I request the video0 and video1
it separately sends the stream on and stream off for both.
Ideally virtual channel should work on single stream off and should be able to get the frames from both the node.
- Is due to it link with dummy node, which is probed separately, like below logs?
- I have defined the VC id in both ports configuration but I am not able to read this property in my i2c driver is possible to read the port configuration?
[ 10.645308] abcd1234 2-0039: probing abcd1234 v4l2 sensor
[ 10.645318] abcd1234 2-0039: Probing 0x39
[ 10.645358] abcd1234 2-0039: adi,use-vc: true
[ 10.645361] abcd1234 2-0039: No vc-id info: FFFF
[ 10.645365] abcd1234 2-0039: Read from the DTSI: Video Node: video1
[ 10.645374] abcd1234 2-0039: Reset-gpios not found -2
[ 10.651455] tegra-camrtc-capture-vi tegra-capture-vi: subdev abcd1234 2-0038 bound
[ 10.707400] abcd1234 2-0039: Detected abcd1234 sensor
[ 10.716853] abcd1234 2-0038: probing abcd1234 v4l2 sensor
[ 10.716859] abcd1234 2-0038: Probing 0x38
[ 10.717311] abcd1234 2-0038: adi,use-vc: true
[ 10.717316] abcd1234 2-0038: No vc-id info: FFFF
[ 10.717325] abcd1234 2-0038: Read from the DTSI: Video Node: video0
[ 10.717337] abcd1234 2-0038: Reset-gpios not found -2
[ 10.717612] debugfs: Directory ‘abcd1234_b’ with parent ‘/’ already present!
[ 10.718640] tegra-camrtc-capture-vi tegra-capture-vi: subdev abcd1234 2-0038 bound
hello kishan.kava,
I assume these two node use the same kernel driver, right?
for instance, did you use compatible = "cam,abcd";
for both video nodes in the device tree?
Hi @JerryChang
Yes, both nodes use the same driver, and I used the same compatible in driver as well as DTS for both nodes.
please check Virtual Channel Programming in the Module Device Tree.
for instance, you must set the vc-id
property in the gmsl-link node for each sensor to match the vc_id
property in the sensor mode device node.
Hi @JerryChang
I have defined the “vc-id” in port configuration, taken reference from the IMX390.
I do not use SerDes so as per the below ticket reference i did not add the “gmsl-link”
Question about Virtual Channel Support - Jetson & Embedded Systems / Jetson Xavier NX - NVIDIA Developer Forums
sensor mode you mean, mode we define in i2c node line this?
mode3 {
mclk_khz = "104250";
num_lanes = "2";
tegra_sinterface = "serial_b";
lane_polarity = "6";
phy_mode = "DPHY";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "8";
csi_pixel_bit_depth = "8";
mode_type = "bayer";
pixel_phase = "bggr";
active_w = "2560";
active_h = "512";
readout_orientation = "0";
line_length = "2560";
inherent_gain = "1";
mclk_multiplier = "4";
pix_clk_hz = "312500000";
min_gain_val = "0";
max_gain_val = "48";
gain_step_pitch = "0.3";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1.5";
max_framerate = "30";
min_exp_time = "30";
max_exp_time = "660000";
embedded_metadata_height = "1";
};
hello kishan.kava,
yes, you should have vc_id
defined in the sensor mode, which must be as same as vc-id
defined in the port bindings.
here’s an example,
tca9546@70 {
i2c@0 {
imx390_a@1b {
compatible = "sony,imx390";
mode0 {/*mode IMX390_MODE_1920X1080_CROP_30FPS*/
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_a";
vc_id = "0";
...
};
ports {
port@0 {
reg = <0>;
imx390_imx390_out0: endpoint {
vc-id = <0>;
port-index = <0>;
bus-width = <2>;
Hi @JerryChang
Thank you for your support!
I am able to capture the frames from both video node (video0 and video1) separately.
I want to capture 2 streams from the same frame count but as this design will send the separate stream on/off command via subdev for both video nodes. it treats as separate node.
I am capturing using the v4l2-ctl utility, could you please help me here how i can get both stream from single request?
The functionality of virtual channel should capture the 2 streams from the single request.
hello kishan.kava,
no, it’s already treat as separate nodes by using virtual channel.
Hi @JerryChang
So, is it possible if I remove the dummy node from the dts and create only one subdev.
From single subdev link 2 video nodes to capture the 2 channel frames from the single request control?
Sensor is sending the two image data in each channel for each frame count. but at host side currently with this approach, we are receiving the data like below (as serial)
End result is like below diagram, because sensor send the 2 frames for one for each channel.
hello kishan.kava,
I don’t know, we’ve never verified this scenario.
you may see-also Constraints section for reference.