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.

DMA blocking

Hi all,

          I am using dm365 to develop my camera system. In my system,there are two threads using the dma to trasfer the data accelerately. I alloc continuous memory for the dma and add a lock to make the dma call sequently. At begining, it works ok, but after a few minutes, it is blocked at the dma call. I have checked the paremeters which pass to dma function are all right. Can someone give me some advice on this issue.Thanks.

 

William.zhou

  • William,

    What operating system and version are you using?  Also, I am assuming that you are using driver calls to perform these DMA calls, correct?  Are you using a custom board with DM365 on it or the TI DM365 EVM or the IPNC reference design? 

  • Hi Jeff,

                 Thanks for your answer.

                 I am using a custom board. The OS is Linux version 2.6.18_pro500-davinci_evm-arm_v5t_le (root@helen) (gcc version 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)). The DVSDK version is dvsdk_2_10_01_18.I am using the driver contained in sdk to perform these dma calls. In my system, beside the two threads refered in my last post, the third thread is to do  the mpeg4 encoding, and the forth thread is to do streaming distribution. This guy seems to suffer the same issue as me. http://e2e.ti.com/support/dsp/davinci_digital_media_processors/dm3x/f/100/p/8138/32742.aspx#32742

    It seems that the mpeg4 encoder would cause the dma call DM365MM_memcpy blocking.

    My test seems to prove this. Last night, I disabled the encode thread and left the capture and preview threads running, it worked ok over the night.

     

  • I downloaded the lastest codec mpeg4enc_hdvicp from TI 365 update page and try to use the new mpeg4enc_hdvicp encode. First I extract the new stuff to the codec path.

    Then I re-config the *.cfg file which locate at my application path.

    /* var MPEG4ENC = xdc.useModule('ti.sdo.codecs.mpeg4enc.ce.MPEG4ENC');*/    //mark this line
    var MPEG4ENC_HDVICP = xdc.useModule('ti.sdo.codecs.mpeg4enc_hdvicp.ce.MPEG4ENC_HDVICP');   //add this line

    var myEngine = Engine.create("encode", [

    /*{name: "mpeg4enc", mod: MPEG4ENC, local: true, groupId: 1},*/  //mark this line
        {name: "mpeg4enc_hdvicp", mod: MPEG4ENC_HDVICP, local: true, groupId: 1},  //add this line
        {name: "h264enc", mod: H264ENC, local: true, groupId: 1},
        {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1},
        {name: "g711enc", mod: G711ENC, local: true},
    ]);

    The codec engine is created successful.

    But the call  "hVe1 = Venc1_create(hEngine, "mpeg4enc_hdvicp", params, dynParams); " is failed and without any errorcode. I trace into the dmai Venc1.c, it is failed at

    VIDENC1_create, but Engine_getLastError is 0.

    What happened. Is something I missed ?