This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: How to stream select cameras from a FPD-Link multi camera setup using gstreamer with TDA4VM

Part Number: TDA4VM
Other Parts Discussed in Thread: AM67A, SYSCONFIG

Tool/software:

Hi,

This is related to the following post:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1376000/tda4vm-multi-camera-streaming-failed-and-get-dma-callback-warning/5317792#5317792

In our product, we are running up to 8 cameras, with each CSI interface supporting up to 4 cameras via FPD-Link deserializers (DS90UB962).

We are largely successful, however what we are finding is that streaming sometimes will fail v42-ctl is run:

For example:

v4l2-ctl -d /dev/video-tevs-cam3 --stream-mmap

(this will sometimes stall)

However, if all cameras in the multi camera setup are streamed at the same time, it is always successful.

v4l2-ctl -d /dev/video-tevs-cam0 --stream-mmap &
v4l2-ctl -d /dev/video-tevs-cam1 --stream-mmap &
v4l2-ctl -d /dev/video-tevs-cam2 --stream-mmap &
v4l2-ctl -d /dev/video-tevs-cam3 --stream-mmap &

Above, this will always succeed.

In the post above, it was mentioned that there is a issue with streaming one or a subset of cameras in a multicamera setup:

This is a known issue where we see the CSI2RX SHIM DMA context channel 0 accepts all handled data. Due to the driver implementation, all of the other sensors are still streaming so when one (or a subset) of cameras in a multi-camera system is streaming, DMA context 0 accepts frames from different virtual channels.

This issue is being addressed internally but for the time being, streaming from one or a subset of cameras in a multi-camera system is not supported.

In our use case, and in many others, not all cameras may be started streaming at the same time.  In some use cases, some cameras may stream all the time, while others may only stream when needed.  For example, in a robotics application, some cameras may be used for high resolution bar code scanning and are only streaming as needed, while others are being used for perception and navigation purposes.

Therefore, we need a solution to the above limitation.  We need to be able to stream single or a subset of cameras in a multicamera setup.

Thanks,

John

  • Hi John,

    Could you share which SDK version you are on?

    Thank you,

    Fabiana

  • Hi Fabiana,

    Yes - we are on SDK 9.1 presently.  Ideally, we are going to stay there and upgrade to SDK 10.1 when that is released in a few months.

    John

  • Hi John,

    The patch we have for the J722S 9.2 SDK release creates a shared resource pool between main R5 and A53 to share all the available BCDMA CSI (DMSS1) RX channels. Similar partitioning is done in other platforms as we do not have any use cases where both RTOS and Linux run capture at the same time.

    This fix is targeted to roll out in the 10.1 SDK releases.

    Thank you,

    Fabiana

  • Hi Fabiana,

    Thanks. 

    The patch we have for the J722S 9.2 SDK release creates a shared resource pool between main R5 and A53 to share all the available BCDMA CSI (DMSS1) RX channels. Similar partitioning is done in other platforms as we do not have any use cases where both RTOS and Linux run capture at the same time.

    So that I understand, this would resolve the problem we currently have in SDK9.1 (kernel 6.1) when streaming one or a subset of cameras in a multicamera setup?

    So that we can better understand the change you mention, can you please post a link to the patch for J722S (AM67A) 9.2 SDK release?

    This fix is targeted to roll out in the 10.1 SDK releases.

    By this, do you mean that this change made for AM67A (J722S) is going to be rolled out to other J7 platforms (J721E, J784S4, etc.)?

    Thanks,

    John

  • Hi,

    Due to a holiday, please expect a delay in response. Thank you for understanding.

    -Fabiana

  • Thanks Fabiana.  Just checking back with you on this.

  • Hi John,

    The binaries need to be built w the linked patch and the changes to resource partitioning tool for this change is available here:

    From 53f00aea23f6746218707dc011b7546eaae71587 Mon Sep 17 00:00:00 2001
    From: Vaishnav Achath <vaishnav.a@ti.com>
    Date: Mon, 5 Aug 2024 23:33:55 +0530
    Subject: [PATCH] out: j722s-evm: Enable DMSSS1 resource sharing for CSI
    
    Enable resource sharing for DMSS1 between A53 and Main R5
    
    Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
    ---
     out/j722s-evm.syscfg | 20 +++++++++++++++++---
     1 file changed, 17 insertions(+), 3 deletions(-)
    
    diff --git a/out/j722s-evm.syscfg b/out/j722s-evm.syscfg
    index 0bd56c0..694b758 100644
    --- a/out/j722s-evm.syscfg
    +++ b/out/j722s-evm.syscfg
    @@ -2,7 +2,7 @@
      * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
      * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
      * @cliArgs --device "J722S_TDA4VEN_TDA4AEN_AM67" --package "AMW" --part "Default" --product "K3-Respart-Tool@0.5"
    - * @versions {"tool":"1.18.999+112"}
    + * @versions {"tool":"1.19.0+3426"}
      */
     
     /**
    @@ -26,6 +26,9 @@ const resourceSharing8  = resourceSharing.addInstance();
     const resourceSharing9  = resourceSharing.addInstance();
     const resourceSharing10 = resourceSharing.addInstance();
     const resourceSharing11 = resourceSharing.addInstance();
    +const resourceSharing12 = resourceSharing.addInstance();
    +const resourceSharing13 = resourceSharing.addInstance();
    +const resourceSharing14 = resourceSharing.addInstance();
     
     /**
      * Write custom configuration values to the imported modules.
    @@ -57,7 +60,6 @@ A53_2.MAIN_GPIO_Interrupt_Router_count                     = 16;
     A53_2.WKUP_MCU_GPIO_Interrupt_Router_count                 = 4;
     A53_2.DMASS0_Interrupt_aggregator_Virtual_interrupts_count = 21;
     A53_2.Block_Copy_DMA_Block_copy_channel_count              = 16;
    -A53_2.Block_Copy_DMA_DMASS1_Split_TR_Rx_channel_count      = 4;
     A53_2.DMASS1_Interrupt_aggregator_Virtual_interrupts_count = 2;
     A53_2.DMASS1_Interrupt_aggregator_Global_events_count      = 56;
     A53_2.DMASS0_Interrupt_aggregator_Global_events_count      = 512;
    @@ -85,10 +87,10 @@ MAIN_0_R5_1.WKUP_MCU_GPIO_Interrupt_Router_count                 = 4;
     MAIN_0_R5_1.DMASS0_Interrupt_aggregator_Global_events_count      = 128;
     MAIN_0_R5_1.DMASS0_Interrupt_aggregator_Virtual_interrupts_count = 14;
     MAIN_0_R5_1.Block_Copy_DMA_Block_copy_channel_count              = 4;
    -MAIN_0_R5_1.Block_Copy_DMA_DMASS1_Split_TR_Rx_channel_count      = 20;
     MAIN_0_R5_1.Block_Copy_DMA_DMASS1_Split_TR_Tx_channel_count      = 8;
     MAIN_0_R5_1.DMASS1_Interrupt_aggregator_Virtual_interrupts_count = 18;
     MAIN_0_R5_1.DMASS1_Interrupt_aggregator_Global_events_count      = 64;
    +MAIN_0_R5_1.Block_Copy_DMA_DMASS1_Split_TR_Rx_channel_count      = 32;
     
     MCU_0_R5_0.allocOrder                                           = 3;
     MCU_0_R5_0.Block_Copy_DMA_Block_copy_channel_count              = 2;
    @@ -165,3 +167,15 @@ resourceSharing11.$name              = "modules_resourceSharing10";
     resourceSharing11.resourceName       = "Block Copy DMA Split TR Tx channel";
     resourceSharing11.sharedFromHostName = "WKUP_0_R5_1";
     resourceSharing11.sharedToHostName   = "C7X_0_0";
    +
    +resourceSharing12.$name = "modules_resourceSharing11";
    +
    +resourceSharing13.$name              = "modules_resourceSharing_dmss1";
    +resourceSharing13.resourceName       = "Block Copy DMA DMASS1 Split TR Rx channel";
    +resourceSharing13.sharedFromHostName = "MAIN_0_R5_1";
    +resourceSharing13.sharedToHostName   = "A53_2";
    +
    +resourceSharing14.$name              = "modules_resourceSharing_dmssring";
    +resourceSharing14.resourceName       = "Block Copy DMA Rings DMASS1 for Split TR Rx channel";
    +resourceSharing14.sharedFromHostName = "MAIN_0_R5_1";
    +resourceSharing14.sharedToHostName   = "A53_2";
    -- 
    2.34.1
    
    

    /cfs-file/__key/communityserver-discussions-components-files/791/0001_2D00_HACK_2D00_arm64_2D00_dts_2D00_ti_2D00_k3_2D00_j722s_2D00_Reduce_2D00_the_2D00_number_2D00_of_2D00_CSI2.patch

    Thank you,

    Fabiana

  • Hi Fabiana,

    Thanks for providing this information.  It seems that this is an intermediate step towards a more permanent solution (e.g. the "HACK" notation in the attached patch header and the info that this will break fusion implementations with greater than 4 cameras). Still, it is very helpful to know where the changes are being made, and within which codespaces, so thanks!

    Where does one find the default sysconfig file for the EVMs?  Is that packaged within the sysconfig tool download, or somewhere else, perhaps within the SDK?

    Thanks,

    John

  • Hi John,

    The baseline sysconfig file is located under /board-support/k3-respart-tool/out/j721e-evm.syscfg.

    The sysconfig tool generates the code files based on the device being used and its requirements. More on Sysconfig tool: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/10_00_00_08/exports/docs/linux/Foundational_Components/Tools/SysConfig_Tools.html

    Thank you,

    Fabiana