Dear sir,
I got very high loading on DM8148 ARM when modifing VcapVenc_ipcFrameFileWrite( ) from copy YUV raw data to file to copy YUV raw data to memory (RAM).
Is there any method to off-load CPU?
Thank you.
Regards,
Alfred Yang
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.
Dear sir,
I got very high loading on DM8148 ARM when modifing VcapVenc_ipcFrameFileWrite( ) from copy YUV raw data to file to copy YUV raw data to memory (RAM).
Is there any method to off-load CPU?
Thank you.
Regards,
Alfred Yang
Hi Alfred,
Using the DMA controller to transfer bulks of data (like YUV raw data) from peripheral to memory (and vice versa) should off-load the ARM significantly.
Best Regards,
Pavel
Hi Cindy,
Cindy Lee said:How to use DMA Controller? Could you show me some sampe code?
You can refer to below resources:
http://processors.wiki.ti.com/index.php/TI81XX_PSP_EDMA_Driver_User_Guide
http://processors.wiki.ti.com/index.php/EDMA_sample_test_application
ti-ezsdk_dm814x-evm_5_05_02_00/example-applications/linux-driver-examples-psp04.04.00.01/edma/
DM814x TRM, chapter 8 EDMA, section 8.5 EDMA Transfer Examples, section 8.8 Setting Up a Transfer
Regards,
Pavel
Thank you for your reply!
now I use osa_dma mechanism.
But it dose not work, because OSA_dmaInit() failed. please refer to code below:
IpcFramesInLink_getFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0, &bufList);
buf = &bufList.frames[0];
OSA_DmaChHndl g_dmaHndl;
Vsys_AllocBufInfo g_frameBufInfo;
Vsys_allocBuf(SHARED_REGION_ID, 720 *480 * 2 /** 2*/, 16, &g_frameBufInfo);
g_dma_status = OSA_dmaInit();
if (g_dma_status = OSA_EFAIL)
{
printf("dma init failed!\n");
}
g_dma_status = OSA_dmaOpen(&g_dmaHndl, OSA_DMA_MODE_NORMAL, 1/* * 2*/);
if (g_dma_status = OSA_EFAIL)
{
printf("dma open failed!\n");
}
OSA_DmaCopy1D copy1D;
copy1D.srcPhysAddr = (unsigned int)buf->phyAddr[0][0] -offset;
copy1D.dstPhysAddr = g_frameBufInfo.physAddr;
copy1D.size = (buf->frameWidth * buf->frameHeight) * 2;
int status_copy_1D = -1;
status_copy_1D = OSA_dmaCopy1D(&g_dmaHndl, ©1D, 1);
OSA_dmaClose(&g_dmaHndl);
OSA_dmaExit();
Vsys_freeBuf(SHARED_REGION_ID, g_frameBufInfo.virtAddr, 720 *480 * 2);
Cindy,
Cindy Lee said:now I use osa_dma mechanism.
I am working with DM814x EZSDK, and I can not find this osa_dma mechanism! Are you working with EZSDK or other DM814x SDK (IPNC RDK, DVR RDK)?
Regards,
Pavel
Cindy,
Cindy Lee said:I am working with DVR RDK.
I would recommend you to create new post with DVR RDK in the title, thus our DVR RDK team will see it and response.
Regards,
Pavel