How to use csi g/h for 8 camera application

Dear all :
I want use csi g/h two port in Jetson agx orin, the v4l version is 35.1.
the camera in port csi a/b,csi c/d, csi e/f port work normal, except csi g/h.
hardware interface:
sensor0/sensor1 —>1x4—>max9295—>max9296---->csi a/b
sensor2/sensor3 —>1x4—>max9295—>max9296---->csi c/d
sensor4/sensor5 —>1x4—>max9295—>max9296---->csi e/f
sensor6/sensor7 —>1x4—>max9295—>max9296---->csi g/h–>the output of max9296 is no problem.

the device tree config of csi g/h is same with csi e/f,
tegra-capture-vi add:
port@6 port@7
nvcsi@15a00000 add:
channel@6 channel@7

but is run err:
[ 69.718144] tegra-camrtc-capture-vi tegra-capture-vi: Invalid NVCSI stream Id
[ 69.725554] tegra-camrtc-capture-vi tegra-capture-vi: Invalid NVCSI stream Id
[ 69.732944] Unable to handle kernel NULL pointer dereference at virtual address 00000000000002b8

how to config the virtual channel for csi g/h.

hello chenxinhai,

it shows an error about invalid stream-id. may I know what’s your port binding definitions?
please note that, there’re only 6 VI steams available. you may see-also Port Index session for reference, thanks

1 Like

Jerry, Tks for you replay.

I am trying to fix the MAX_NVCSI_STREAM_IDS value to 8 in capture-vi.c
/**

  • @brief Maximum number of NVCSI streams supported.
    */
    #define MAX_NVCSI_STREAM_IDS U32_C(0x8)

the error about invalid stream-id does not appear again, but cat get video stream:

“only 6 VI streams available” means in device tree nvcsi@15a00000 cannot exceed 6 channel.

hello chenxinhai,

please refer to developer guide, Jetson Virtual Channel with GMSL Camera Framework.
it’s capable to have multi-sources into CSI brick.
for example, 2x 4-lane through Aggregator into CSI-G/H. however, it’s single VI stream-5 to process the frames.
so, please update tegra-capture-vi{} of your device tree.

BTW, this should be minor, vc-id is staring from 0.

1 Like

it’s ok, tks!