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.

TDA2E: Sgx3DsrvLink issue

Expert 1615 points
Part Number: TDA2E

Hi,

Is it possible that  sometimes in Sgx3DsrvLink_tskMain at OSA_tskWaitMsg will wait message for a abnormally  long time,

maybe 1~10 minutes,

and then receive the message again,

my customize usecase like below,

the links that was crossed out by black was taken off,

In particular, this situation often occurs in software versions where the alg links require more computation,

also usually occurs in 720p/25fps instead of 720p/30fps vedio format.

my environment

vision_sdk302

tda2eg

Linux version 4.4.84-00018-gd326d64-dirty

  • Hi,

    Please make sure that you are freeing each msg after it is received and the mailbox for that link is not full.

    If the mailbox has psace and the link is not busy in doing any task then it should be able to receive new msg without any delay.

    When your link is receiving msg after long delay , during that time is it busy in doing any task?

    Regards,

    Anuj

  • Hi,

    After your explanation,

    I think that in the part of alg link,

    the frequency of transmitting system_linkControl to sgx link is too high,

    causing the mailbox to block.

    I will check mailbox count when issue occurs.

    Waiting for my test results~

    SJay 

    SJay

  • Hi,

    could i increase UTILS_MBX_ACK_QUE_CNT_MAX?

    default value is 4,

    if i could  increase it, how many size could i increase?

    SJay

  • Hi,

    Originally in alg link each frame will use system_linkControl to send cmd to sgx link,


    i tried to change when alg detect something and need to warning,

    then just use system_linkControl to send cmd to sgx link,

    but the issue has not improved after my system  running overnight.

    In addition, I print pTsk->mbxHndl.rcvMbx.count and pTsk->mbxHndl.ackMbx.count in sgx link,

    both of them are 0,

    it's not same as my thoughts,

    In general, I think there will be at least 2 links to send SYSTEM_CMD_NEW_DATA to sgx,

    is't not?

    SJay

  • Hi,

    I think your usecase is getting hang somewhere .

    So you need to debug that.

    You can use null link to close your pipeline and check which link is causing hang.

    You can also add some prints in all link and check where exactly it is getting hang.

    Regards,

    Anuj

  • Hi,

    After add  the log information,


    Found that the links still with new data when issue occurs are below,


    Capture, sync,


    and the other with no new data links are alg, sgx, display,


    I am currently tracking dup and sync.


    Is it possible that a certain video stream has not entered sync link then lead to this issue?

    SJay

  • Hi,

    I also confirmed the instId of new data frames in the capture link does continue to have 4 channels instId.

    So the problem looks like in the sync link.

    SJay

  • Hi,

    As suggested earlier please use null link.

    If you doubt sync link is a issue then add a null link after sync and close the usecase there and run that usecase.

    Your usecase will be capture -> sync -> null

    If this works then issue is somewhere else then add some more link from your original usecase and terminate it using null link and check again.

    Regards,

    Anuj

  • Hi,

       i found when issue occur , syncDone is always false,

       the default setting ,syncDelta  is 16, syncThreshold is 33,

      it looks like for 30fps (NTCS), means 33ms per frame,

      this issue is always happend when i use PAL camera,

      PAL s 25fps, 40 ms per frame,

      so  i think i need to set syncDelta  to 20, syncThreshold to 40, when i use PAL camera,

      i will try this setting, wait my testing results!

      Another problem is that usually the last link will send SYSTEM_CMD_NEW_DATA to the next link,

    then capture is the first link, who passed SYSTEM_CMD_NEW_DATA to the capture link? Is it displaylink?

    By the way use null link to check which link is abnormal is a method i didn't know before,

    thanks you for giving me this way! i will try it in the future.

    SJay 

  • Hi,

    Sync link is used to synchronize frames.

    If the FPS is changed then sync delta and threshold both will change.

    Capture link or any kind of source link get  SYSTEM_CMD_NEW_DATA command from its driver callback or a timer based callback.

    Yes you can use a null link to terminate a usecase path and with null linl if it works that means till that link usecase is working fine.

    Regards,

    Anuj

  • Hi,

    As I expected, the issue did not happen again.

    I will find the time to study some of the drivers.

    thanks a lot!

    SJay