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.

TDA4VM: Problem with display when rerunning application

Part Number: TDA4VM

Hello,

I'm having a problem when using the TIVX Display node interfacing to my application. It seems if I quit and restart the application, on the 3rd cycle it fails to initialize the display. I found the same problem happens when using the "run_app_tidl.sh" sample application. The error message is identical in both case, and it also fails on the 3rd start. It doesn't seem to matter how long it runs for before I quit, when I'm testing it's usually a 5-10 seconds. I'm using SDK 7.1.0.

I checked the other sample applications like AVP but it seems they don't have this problem. As far as I can tell the only difference in configuration is whether it's using TIVX_KERNEL_DISPLAY_BUFFER_COPY_MODE or TIVX_KERNEL_DISPLAY_ZERO_BUFFER_COPY_MODE.  In my app, I need TIVX_KERNEL_DISPLAY_BUFFER_COPY_MODE since data is from outside TIVX framework.

I think if fix could be applied to run_app_tidl.sh sample then it may fix it on my app also.

Procedure:

  1. cd /opt/vision_apps
  2. ./vision_apps_init.sh
  3. ./run_app_tidl.sh
  4. x
  5. repeat step #3

Error message

root@j7-evm:/opt/vision_apps# ./run_app_tidl.sh 
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=4) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
APP: Init ... Done !!!
  1098.515537 s:  VX_ZONE_INIT:Enabled
  1098.515623 s:  VX_ZONE_ERROR:Enabled
  1098.515694 s:  VX_ZONE_WARNING:Enabled
  1098.516193 s:  VX_ZONE_INIT:[tivxInit:71] Initialization Done !!!
  1098.516406 s:  VX_ZONE_INIT:[tivxHostInit:48] Initialization Done for HOST !!!
[C7x_1 ]   1098.561856 s:  VX_ZONE_WARNING:[tivxKernelTIDLCreate:614] All Interrupts DISABLED during TIDL process
  1098.564431 s:  VX_ZONE_ERROR:[ownContextSendCmd:782] Command ack message returned failure cmd_status: -8
  1098.564445 s:  VX_ZONE_ERROR:[ownContextSendCmd:818] tivxEventWait() failed.
  1098.564458 s:  VX_ZONE_ERROR:[ownNodeKernelInit:526] Target kernel, TIVX_CMD_NODE_CREATE failed
  1098.564466 s:  VX_ZONE_ERROR:[ownNodeKernelInit:527] Please be sure the target callbacks have been registered for this core
  1098.564473 s:  VX_ZONE_ERROR:[ownNodeKernelInit:528] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
  1098.564481 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:583] kernel init for node 0, kernel com.ti.hwa.display ... failed !!!
  1098.564490 s:  VX_ZONE_ERROR:[vxVerifyGraph:2010] Node kernel init failed
  1098.564497 s:  VX_ZONE_ERROR:[vxVerifyGraph:2064] Graph verify failed
app_tidl: ERROR: Verifying display graph ... Failed !!!
  1098.565316 s:  VX_ZONE_INIT:[tivxHostDeInit:56] De-Initialization Done for HOST !!!
  1098.569639 s:  VX_ZONE_INIT:[tivxDeInit:111] De-Initialization Done !!!
APP: Deinit ... !!!
REMOTE_SERVICE: Deinit ... !!!
REMOTE_SERVICE: Deinit ... Done !!!
IPC: Deinit ... !!!
IPC: DeInit ... Done !!!
MEM: Deinit ... !!!
MEM: Alloc's: 15 alloc's of 25477519 bytes 
MEM: Free's : 15 free's  of 25477519 bytes 
MEM: Open's : 0 allocs  of 0 bytes 
MEM: Deinit ... Done !!!
APP: Deinit ... Done !!!
root@j7-evm:/opt/vision_apps# [MCU2_0]   1098.564235 s:  VX_ZONE_ERROR:[tivxDisplayCreate:504] DISPLAY: ERROR: Couldn't allocate memory for copy buffer!

  • Hi gordon huang,

    It seems you are using buffer copy mode. Can you please switching no-buffer copy mode, by changing opMode to zero copy mode, as shown below..

    disp_params.opMode = TIVX_KERNEL_DISPLAY_ZERO_BUFFER_COPY_MODE;

    Regards,

    Brijesh

  • Hi,

    Is there a reason I can't use TIVX_KERNEL_DISPLAY_BUFFER_COPY_MODE? For my use case, the image I want to display is from another library which does not have memory allocated through tivxMemBufferAlloc(), so it's not possible to pass via zero buffer copy.

  • Hi,

    You can use it, but there seems to be somewhere memory leak. As we can see from below error, display is not able to allocate memory for the copy buffer, so is failing. 

    DISPLAY: ERROR: Couldn't allocate memory for copy buffer!

    Is it ok if you just run it once and reboot to run it again? 

    Regards,

    Brijesh

  • Hi,

    I found I can still use vxMapImagePatch() to manually copy image and have TIVX_KERNEL_DISPLAY_ZERO_BUFFER_COPY_MODE set at the same time. I think this is a valid solution for my use case.

    It seems this is also same in run_app_tidl.sh, if I change the mode it still works even though it is using vxCopyImagePatch() to explictly copy buffer.