Qualcomm CAMSS character device for VFE nodes

Hi,

According to https://www.kernel.org/doc/html/v4.14/media/v4l-drivers/qcom_camss.html#documentation :

msm_vfe0_video0 is mapped to /dev/video0, msm_vfe0_video1 is mapped to /dev/video1, and so on…

However, this seems to not be consistent. i.e. msm_vfe0_video3 sometimes gets mapped to /dev/video5, instead of /dev/video3.

I was wondering if this was a known bug?

FWIW, this is the camera pipeline setup:
media-ctl -d /dev/media0 -l ‘“msm_csiphy0”:1->“msm_csid0”:0[1],“msm_csid0”:1->“msm_ispif0”:0[1],“msm_ispif0”:1->“msm_vfe0_pix”:0[1]’

Many thanks,

@ag01

The device node ordering depends on the driver probe order. Even though the kernel media drivers can create static device node numbers, camss driver allocates it dynamically.

https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/tree/drivers/media/platform/qcom/camss/camss-video.c?h=debian-qcom-dragonboard410c-19.01#n924

You can find more info here: https://www.kernel.org/doc/html/latest/media/kapi/v4l2-dev.html#video-device-registration

Use /dev/v4l/by-id instead, as explained by Mani, ordering is not guaranteed. The video device ID is consistent.

I have nothing in /dev/v4l/by-id. Would /dev/v4l/by-path/platform-1b0ac00.camss-video-index3 be consistent?

Yes, by-path should be consistent as well.

great, thank you very much :slight_smile: