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.

DM365 EDMA copy

Hi All, 

 

Is there a simple way I can use the DM365 HW components to carry out a memory copy using DMA than the CPU at application level. I apparently forward ported the /dev/dm350 rszcopy functions to dm365; but the memory copy is simply not happening.

Also, the memory source and destination buffers are malloced buffers rather than CMEM ones; is it okay>

Awaiting help from all!

CheerS!

  • I don't know whether a library exists to utilize DMA or not, but regardless, the DMA HW will work on physical memory, and the memory must be physically contiguous (at least within a given DMA operation).  So, unless you can guarantee the memory is physically contiguous (malloc() doesn't ensure this), you can't use DMA.

    Chris

  • Hi Chris,

    Thanx for the prompt replies!

    There is a module in the DVSDK 2_10_00_14 version called dm365mm; which is basically a user space mmap module for the DM365 platform. This dm35xmm is also present for the DM355 platform; apparently the one from which I was sort of inspired. However, I guess what I let go of the fact about the contigous memory buffers; but also I think some of the IOCTLs in the driver for the same have been changed!

    I will surely post the sample user space copy example if I get it correct after a renewed look into the driver + application linkage!

    Anways, thanx for the inputs!

     

     

  • Hi, did you manage to get a userspace copy going ?  I read in the VPBE Frame Buffer driver doc (sprug92a) that using DMA copy is the way to go and not memcpy. 

    Thanks, Jinh T.

  • Hi Jinh,

    You can look at  DMAI  :  /dvsdk_4.01.00.09/dmai_2_20_00_14/packages/ti/sdo/dmai/linux/dm365/ Framecopy_accel.c
    for how to use DMA copy using  /dev/dm365mmap.

    Also look at /dvsdk-demos_4_00_00_21/dm365/decode/display.c  which uses DMAI frame_copy functions.
    Just make sure you set (Framecopy_Attrs) fcAttrs.accel = TRUE, to use DMA instead of memcpy.
    I often make modified local  function in my applications, based on these DMAI functions.

    Regards,
    Marko.