GMSL Virtual Channel ID support

Hi all,

Recently RidgeRun has been working on adding support for Virtual Channel ID and we wanted to share our progress in case others are doing the same. We got it working on TX2 and Xavier, you can find more info in: https://developer.ridgerun.com/wiki/index.php?title=GMSL_Virtual_Channel_ID

Next step is to get it working when passing the data through the ISP, has somebody done that already?

hello jchaves,

deserializer should generate the sensor signaling as same as normal CSI stream.
from ISP point-of-view, there’s no much difference between virtual channel enable/disable.

however, you’ll need to check you had assign correct vi-id in your sensor device tree.
please check Sensor Driver Programming Guide. since all the drivers sensor/CSI/VI need vc-id information to program. it’s defined in same way as stream-id or port field. you must need it in mode-N{} for user-space drivers, for example, Argus based use-cases.
thanks

Hi JerryChang,

Thanks for your reply! I have another question. Since I haven’t needed to set serdes_pix_clk_hz in the sensors device tree in order to capture simultaneously, I was wondering what this property actually does. Right now I’m able to capture using directly the V4L2 Interface (v4l2src) but I’m not sure if this property is required to be able to capture with nvarguscamerasrc or libargus for that matter. Thanks in advance.

hello jchaves,

suggest you configure the serdes_pix_clk_hz property for camera modules that use Serializer/Deserializer.
because it’s the csi driver pixel clock configuration, please check the csi driver as below,

<i>$l4t-r32.1/kernel_src/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi.c</i>

u64 read_pixel_clk_from_dt(struct tegra_csi_channel *chan)
{
            ...
                if (sig_props->serdes_pixel_clock.val != 0ULL)
                        pix_clk = sig_props->serdes_pixel_clock.val;
                else
                        pix_clk = sig_props->pixel_clock.val;

        return pix_clk;

please also note that you should specify SerDes pixel clock correctly to avoid buffer overrun issues.
you should also ensure the serdes_pix_clk_hz is larger than pix_clk_hz, or you’ll meet the failure as below, thanks

<i>$l4t-r32.1/kernel_src/kernel/nvidia/drivers/media/platform/tegra/camera/sensor_common.c</i>

if (signal->serdes_pixel_clock.val != 0ULL && 
    signal->serdes_pixel_clock.val < signal->pixel_clock.val) {
                dev_err(dev, "%s: serdes_pix_clk_hz is lower than pix_clk_hz!\n", __func__);
            return -EINVAL;