How to retrieve MIPI frame info

Is there any way to retrieve details about the retrieved MIPI CSI frame info, e.g. actually received line length/frame length/active pixels and other related info?

I have seen the different status masks in the CSI and VI interfaces, but have not (yet) found how to retrieve more details about the received MIPI CSI frames.

Any hints or even pointers to source code locations would be helpful.

hello Thomas_K,

please refer to documentation for Approaches for Validating and Testing the V4L2 Driver.
or,
you may also access TRM through download center, please check [31.7 VI Input CSI Interface Registers].
for example,
you may dump the register, VI_CSI_0_CSI_IMAGE_SIZE_0, to check the image size;
there’s register, VI_CSI_0_ERROR_INT_MASK_0, to report specific signaling errors.
thanks

Hi Jerry,

thank you very much. The driver is running and fully functional, and the validation/testing parts in the documentation all work. The reason behind the question was having access to actual VI frame information for validation and proving the frame has the proper format, not just functional validation.

Your answer seems to confirm that the information is not readily available in the drivers but needs to be pulled from the VI registers. I guess the proper place to add code to dump respective registers would be somewhere along the vi_fops code? I’m still digging through the code to find the proper location - any pointers are highly appreciated.

hello Thomas_K,

you may enable camera stream and using i2cdump to check register values.
please note that, there’re different version of VI drivers,
TX1/Nano were using vi2_fops; TX2 was based-on vi4_fops, and Xavier/NX was working with vi5_fops.
thanks

Hi Jerry,

I guess you refer to camera registers when talking about i2cdump - we know very well what’s configured on camera side. The missing link in terms of validation is really double checking that the proper frame format is received on Jetson, especially when using different cropping modes in the sensor or things like that.
So it’s really the VI part that we need to access. Thanks for your additional info on vi_fops and which are used where, this helps.

BR,
Thomas