J784S4XEVM: Copy 2D buffer from CMA (Linux A72) to DSP

Part Number: J784S4XEVM
Other Parts Discussed in Thread: AM69A

Tool/software:

Hi ,

I need some support for transfer 2D buffer from CMA/Kernel memory to L2 memory of DSP/ on J784s4.
- I can create linux device driver to transfer 1D buffer from CMA to CMA, Kernel memory to Kernel memory.

Question here:

1. Is linux DMA driver in J784s4 support 2D buffer transfer from CMA to CMA, Kernel to Kernel memory ? I see J784s4 support UDMA controller with support 1D/2D/3D/4D transfer, can I use UDMA on linux A72 ?
2. How about process to transfer buffer from CMA to L2 memory of DSP ?


Thanks,
BRs

Ninh Nguyen

  • Hi,

    I see J784s4 support UDMA controller with support 1D/2D/3D/4D transfer

    The 1D/2D/3D/4D copy you see in vision_apps uses the RTOS based UDMA driver.

    I'm not sure about the UDMA linux driver. Let me check this internally and get back to you

    Regards,

    Nikhil

  • Hi,

    The Linux UDMA driver cannot be accessed from the user-space. I believe you already have an understanding regarding this right? 

    This can only be called from another linux drivers using dma-engine API. Now this DMA engine API would only have parameters such as src, dest and size. i.e. you cannot configure the icnt and dim internally.

    Additionally, you would have to map the L2 physical memory of DSP in the Linux driver where the dma engine is used, and this is something we have not done till now.

    Hence, I would suggest using the RTOS driver for your usecase.  

    Regards,

    Nikhil

  • Hi,
    Thanks for your response,

    Yes, I know about user-space.

    "This can only be called from another linux drivers using dma-engine API. Now this DMA engine API would only have parameters such as src, dest and size. i.e. you cannot configure the icnt and dim internally."
    => So if I want to use icnt and dim api for DMA then I need implement by my self or it cannot access by A72 ?

    "you would have to map the L2 physical memory of DSP in the Linux driver where the dma engine is used, and this is something we have not done till now."
    => Can you share me more about this, in diagram SoC of j784s4, I see in the "SPRUJ52 - J84S4 AM69A TRM" the L2 of DSP is connect to Central MSMC,
    so for mapping L2 of DSP I need mapping over MSMC memory ?


    " I would suggest using the RTOS driver for your usecase."
    => For this use case, the A72 need send a IPC msg to MCU for infomation about dest and source address need to be send and trigger start UDMA from MCU right ?

    Thanks,
    BRs

    Ninh Nguyen