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.

CMEMK Error:GETPHYS:Failed to convert virtual 0x43494000 to physical.

Hello .

I am wangjian ,does anybody  miss the problem below?

CMEMK Error:get_phys:Unable to find phys addr for 0x4394000
CMEMK Error:ger_phys:get_user_pages() failed:-14
CMEMK Error:GETPHYS:Failed to convert virtual 0x43494000 to physical.
It is appeared  when my program run for a time ,the long time is about one hour,and the short time is about ten minutes ,it is uncertain.I
I have changed the "loadmodules.sh" like this:CMEM_MODPARAMS="phys_start  = 0x87800000 phys_end = 0x88000000,pools = 20 x4096,10x131072,2x1048576,2x4194304,2x5242880,1x8294400,1x8294400".
but the problem is already exist.  and my board is TI official's  EVM-DM365,And my DVSDK version is 4.0
My program is like this:
static Int encodedecode(Venc1_Handle hVe1, Vdec2_Handle hVd2,
                        Buffer_Handle hVidBuf, Buffer_Handle hEncBuf,
                        Fifo_Handle displayFifo)
{
   Buffer_Handle           hOutBuf, hFreeBuf;
    Int                     ret;
    BufferGfx_Dimensions    dim;
    /******Add by wangjian*******/
    bool      IsDisplay = false;
    Buffer_Attrs bAttrs     = Buffer_Attrs_DEFAULT;
    Buffer_Handle     RcvEncode_Data = NULL;
    int       n = 0;
    int       m = 0;
    int       Totle_SendData =0;
    int       Already_SendData = 0;
    int       Already_RecvData = 0;
    //int       Remain_Data = 0;
    int       OffsetPtr = 0;
    int       Totle_EncData = 0;
    int       TotleEncData = 0;
    int       i = 0;
    int       Rcv_Report;
 
    char  Send_EncData[SEND_BUF_SIZE + 1] = {0};
    int totle;
    struct timeval timeout;
    fd_set fds;
    int maxfdp;
  
    FD_ZERO(&fds);
    FD_SET(fd,&fds);
    maxfdp = fd + 1;
    /************end*************/
    count = 0;
   
    RcvEncode_Data = Buffer_create(Vdec2_getInBufSize(hVd2),&bAttrs);
    BufferGfx_resetDimensions(hVidBuf);

    BufferGfx_getDimensions(hVidBuf, &dim);
    dim.height = Dmai_roundUp(dim.height, CODECHEIGHTALIGN);
    BufferGfx_setDimensions(hVidBuf, &dim);
    if (Venc1_process(hVe1, hVidBuf, hEncBuf) < 0) {
        ERR("Failed to encode video buffer\n");
        return FAILURE;
    }

    BufferGfx_resetDimensions(hVidBuf);
    if (Buffer_getNumBytesUsed(hEncBuf) == 0) {
        ERR("Encoder created 0 sized output frame\n");
        return FAILURE;
    }
     /******Add by wangjian*******/
    Totle_SendData = Buffer_getNumBytesUsed(hEncBuf);
    Send_EncData[0] = 0x4D;
    Send_EncData[1] = 0xff & Totle_SendData;
    Send_EncData[2] = Totle_SendData >> 8;
    totle = *(int *)(&Send_EncData[1]);
    n = sendto(fd,Send_EncData,3,0,(struct sockaddr*)&RemoteAddress,RemoteAddrLen);
 
  
    if(Totle_SendData <= SEND_BUF_SIZE)
    {
       Send_EncData[0] = 0x4f;
 
      memcpy(&Send_EncData[1],(char *)Buffer_getUserPtr(hEncBuf),Totle_SendData);
      n = sendto(fd,Send_EncData,Totle_SendData + 1,0,(struct sockaddr*)&RemoteAddress,RemoteAddrLen);
 
     usleep(6);
    }
    else
    {
        while(Already_SendData < Totle_SendData)
       {
        m = 0;
       Send_EncData[0] = 0x4F;
       memcpy(&Send_EncData[1],(char *)Buffer_getUserPtr(hEncBuf)+Already_SendData,SEND_BUF_SIZE);
       n = sendto(fd,Send_EncData,SEND_BUF_SIZE + 1,0,(struct sockaddr*)&RemoteAddress,RemoteAddrLen);
        Already_SendData = Already_SendData + SEND_BUF_SIZE;
      usleep(5);
       }
    Already_SendData = Already_SendData - SEND_BUF_SIZE;
    Remain_Data = Totle_SendData - Already_SendData;
    Send_EncData[0] = 0x4F;
    memcpy(&Send_EncData[1],(char *)Buffer_getUserPtr(hEncBuf)+Already_SendData,Remain_Data);
    n = sendto(fd,Send_EncData,Remain_Data + 1,0,(struct sockaddr*)&RemoteAddress,RemoteAddrLen); 
   }
   Delay_timer = false;
    while(!RcvEncodeOK1 && !Delay_timer)
    {
       usleep(7);
    }
    Delay_timer = true;
    if(RcvEncodeOK1 || Delay_timer)
    {   
     Buffer_setNumBytesUsed(RcvEncodeData1_handle,Totle_SendData + Remain_Data);
     gblIncVideoBytesProcessed(Buffer_getNumBytesUsed(RcvEncodeData1_handle));
     ret = Vdec2_process(hVd2, RcvEncodeData1_handle, hVidBuf);
     RcvEncodeOK1 = false;
     if (ret != Dmai_EOK)
       ERR("Failed to decode video buffer\n");
 
     hOutBuf = Vdec2_getDisplayBuf(hVd2);
     while (hOutBuf)
     {
  if (Fifo_put(displayFifo, hOutBuf) < 0)
  {
       ERR("Failed to send buffer to display thread\n");
       return FAILURE;
  }
  else
      hOutBuf = Vdec2_getDisplayBuf(hVd2);
     }
    }
    hFreeBuf = Vdec2_getFreeBuf(hVd2);
    while (hFreeBuf)
    {
        Buffer_freeUseMask(hFreeBuf, CODEC_FREE);
        hFreeBuf = Vdec2_getFreeBuf(hVd2);
    }
      
    Buffer_delete(hEncBuf);
    Buffer_freeUseMask(RcvEncodeData1_handle, 1);
    return SUCCESS;
}
thank you very much