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.

DVRRDK DMA question

what is the difference between the DMA used in SCD and OSD of DSP?

in SCD, Utils_dma........ is used,
while in OSD, SWOSD_TI_DMA....... is used

Thanks

  • For OSD, EDMA channel are allocated via Resource manager.

    For SCD, EDMA channels are provided by RDK framework. RDK framework uses EDMA LLD for allocation EDMA channels.

  • is there any incompatibility between the 2 methods?

    I am planning to create my own dsp OSD algorithm, and planning to use Utils_dma as it seems to be easier to use.

    Then I tried to add the Utils_dma altorithm in osdLink_alg.c for some testing.

    and modify AlgLink_algCreate() in algLink_priv.c to call Utils_dmaOpen() before AlgLink_OsdalgCreate()

    but then when execute, the DSP firmware assert at SWOSD_open() in  osdLink_alg.c

    and if i change back the sequence, it seems to be able to create?

  • any idea?

    and it is ok to create ch using Utils_dmaCreateChDSP in both swosd and scd, right?

  • EDMA allocation using LLD and FC are two separate way of allocating channels. There is one issue, if you try to open edma channel before OSD link. OSD link has edma allocation code, wherein, underneath it does not know if you have already open edma instance. If you have already open EDMA through Utils function then OSD EDMA alloc call will throw an error. You can either remove all the edma related code on OSD and add your code as per Utils call. Or modify existing EDMA related function call to accommodate your requirement.

    I would like to understand, why do you want to remove existing resource management of OSD link. You can as well modify existing APIs to add/remove few EDMA channels as per your need.  SW OSD edma API are easy to understand and use. 

  • another question about DMA in DSP,

    is the Utils_dmaCopy2D() in utils_dma_dsp.c a blocking function?
    The parameter enableIntCb in Utils_dmaCreateChDSP() is never used.

    But in utils_dma.c, enableIntCb can trigger Utils_dmaCallback,
    so that would be non-blocking, right?

    If so, can I do the same modification to  utils_dma_dsp.c?

  • You are right on your statements. Utils_dmaCopy2D() is blocking call while utils_dma copy function is non-blocking call.

    No you can not do the same modification on DSP side.

  • Ritesh Rajore said:
    No you can not do the same modification on DSP side.

    so DSP must use blocking DMA call? why?

  • There was an issue observed during edma interrupt registration when RM based edma allocation and Utils_dma based edma allocation are used together. EDMA3 Interrupt registration is required for call back function call initiation. Whenever a transfer is completed an interrupt is raised and the subroutine of corresponding interrupt would start callBack function.

    If you need call back function then you can go ahead with RM based edma allocation that is currently used in OSD dma transfers.