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: Graph verify failed if create display node with pipeId 3

Part Number: TDA4VM

Hi TI Experts:

In vision_apps app_tidl_od_cam demo application,

I remove the original displayObj and try create 3 display node for different purpose(cropping, overlay, etc.).

For the first display node, pipeId is assigned to 0, and the graph is created and verified well.

-- the pipeId 1 is used for Grpx if g_display_option is set to true, so skip it --

For the second display node, pipeId is assigned to 2, and the graph is created and verified well.

But for the third display node, pipeId is assigned to 3, the graph is created but verify failed with below message.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
28007.912943 s: VX_ZONE_ERROR:[ownContextSendCmd:802] Command ack message returned failure cmd_status: -1
28007.912961 s: VX_ZONE_ERROR:[ownContextSendCmd:838] tivxEventWait() failed.
28007.912971 s: VX_ZONE_ERROR:[ownNodeKernelInit:525] Target kernel, TIVX_CMD_NODE_CREATE failed for node Display_node
28007.912980 s: VX_ZONE_ERROR:[ownNodeKernelInit:526] Please be sure the target callbacks have been registered for this core
28007.912988 s: VX_ZONE_ERROR:[ownNodeKernelInit:527] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
28007.912997 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:583] kernel init for node 0, kernel com.ti.hwa.display ... failed !!!
28007.913007 s: VX_ZONE_ERROR:[vxVerifyGraph:2055] Node kernel init failed
28007.913015 s: VX_ZONE_ERROR:[vxVerifyGraph:2109] Graph verify failed
[MCU2_0] 28007.912612 s: src/drv/disp/dss_dispApi.c @ Line 273:
[MCU2_0] 28007.912667 s: Driver instance already created!!
[MCU2_0] 28007.912717 s: src/fvid2_drvMgr.c @ Line 759:
[MCU2_0] 28007.912747 s: Driver create failed!!
[MCU2_0] 28007.912791 s: VX_ZONE_ERROR:[tivxDisplayCreate:545] DISPLAY: ERROR: Display Create Failed!
28007.960557 s: ISS: De-initializing sensor [ISX021-UB953_OTB] ... !!!
28007.960925 s: ISS: De-initializing sensor [ISX021-UB953_OTB] ... Done !!!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Does it mean pipeId 3 is already be used?

Please give some suggesstion if I would like to create the third display node.

Thanks a lot.

By the way, if Grpx is not enable, I can use pipeId 1 for the third display node.

Regards,
Christopher

  • Hi Christopher

    VIDL2 is used by the Display M2M node, so making it availble for DSS would require some code modifications.

    However, if you are not using the grpx, then that could be used as the third display.

    Regards,

    Nikhil

  • Hi Nikhil,

    Got it and thanks.
    I will use pipeId 1 for the third display.

    One more question, the purpose of the third display is to make transparent overlay on the second display.
    And the second display shows the original camera image using pipeId 0.

    I create both display with vx_image of VX_DF_IMAGE_RGBX format.
    Then I draw a triangle on the third display by RGBA pixels which alpha value is set to 128.
    But I can not see the effect of alpha blending as below image.


    How can I got the correct result of alpha blending between the 2nd (camera image) and 3rd (triangle) display?

    Thank you very much.

    Regards,
    Christopher

  • Hi Christopher,

    May I know if you are enabling the global alpha?
    Have you rearranged the z-ordert here for the layers?

    But I can not see the effect of alpha blending as below image

    May I know what is the expected image?

    Regards,

    Nikhil

  • Hi Nikhil,

    Thanks for the reply.

    I am expecting to see the effect like below.

    The transparent red triangle which drawn on the third display overlays the original camera image of the second display.
    The red triangle is drawn by OpenCV by RGBA format per pixel, and each pixel can have its own alpha value.
    We can see that the original image within red triangle is still visible.

    For the global alpha and z-ordert, I had not made further modification to enable it.
    Could you please give a guideline to configure it correctly.

    Many thanks.

    Regards,
    Christopher

  • Hi Nikhil,

    I try to set globalAlpha in tiovx/kernels_j7/hwa/display/vx_display_target.c by below code

    Fullscreen
    1
    2
    3
    4
    if (params->pipeId == 1) {
    displayParams->dispParams.alphaCfg.globalAlpha = 0x80U;
    displayParams->dispParams.alphaCfg.preMultiplyAlpha = FALSE;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    And I can see the effect of alpha blending as below image

    Just wondering if the effect of alpha blending is affected by globalAlpha value, not the 'A' value of RGB'A' format image buffer ?

    And is it possible that each pixel have an individual alpha value?

    Thank you.

    Regards,

    Christopher

  • Hi Christopher,

    I think since the preMultiplyAlpha is set to false, the transperancy should be from the pixel alpha rather than global.

    To confirm this, could you set the value of globalAlpha as 0xFF and check if you are getting a fully opaque triangle?
    If it is opaque, then the global alpha is coming into effect, else it is pixel alpha

    Regards,

    Nikhil

  • Hi Nikhil,

    The triangle is fully opaque under below setting: 

    Fullscreen
    1
    2
    3
    4
    if (params->pipeId == 1) {
    displayParams->dispParams.alphaCfg.globalAlpha = 0xFF;
    displayParams->dispParams.alphaCfg.preMultiplyAlpha = FALSE;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    And if I try to set preMultiplyAlpha to TRUE, the triangle is still fully opaque.

    Is it possible and how to get the effect from pixel alpha?

    Thanks.

    Regards,

    Christopher

  • Hi Christopher,

    As far as I know from the IP description from the TRM, global alpha comes into effect only when there is no pixel Alpha available. 

    Could you please confirm if the format set for pipe1 is correct? i.e. it is RGBA and not RGB or BGR565

    Could you read out the below register value when the program is running to know the format set in the DSS?

    Regards,

    Nikhil

  • Hi Nikhil,

    Thanks for the reply.

    I saw some  register r/w apis like CPS_ReadReg32 in pdk_jacinto_08_05_00_36 but I have no idea how to use it.

    Could you please provide some reference code or tools for DSS Register checking?

    I will try to check the value during program is running.

    By the way, I check the code in tiovx/kernels_j7/hwa/display/vx_display_target.c

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    switch (obj_desc_img->format)
    {
    case (vx_df_image)TIVX_DF_IMAGE_RGB565:
    format->dataFormat = FVID2_DF_BGR16_565;
    format->pitch[FVID2_RGB_ADDR_IDX] = (uint32_t)obj_desc_img->imagepatch_addr[0].stride_y;
    dispPrms->bpp = 2;
    break;
    case (vx_df_image)VX_DF_IMAGE_RGB:
    format->dataFormat = FVID2_DF_RGB24_888;
    format->pitch[FVID2_RGB_ADDR_IDX] = (uint32_t)obj_desc_img->imagepatch_addr[0].stride_y;
    dispPrms->bpp = 3;
    break;
    case (vx_df_image)VX_DF_IMAGE_RGBX:
    format->dataFormat = FVID2_DF_RGBX24_8888;
    format->pitch[FVID2_RGB_ADDR_IDX] = (uint32_t)obj_desc_img->imagepatch_addr[0].stride_y;
    dispPrms->bpp = 4;
    break;
    case (vx_df_image)TIVX_DF_IMAGE_BGRX:
    format->dataFormat = FVID2_DF_BGRX32_8888;
    format->pitch[FVID2_RGB_ADDR_IDX] = (uint32_t)obj_desc_img->imagepatch_addr[0].stride_y;
    dispPrms->bpp = 4;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    It seems there is no case that dataFormat is set as FVID2_DF_RGBA32_8888

    (The RTOS SDK I used is 8.5)

    Thanks.

    Regards,

    Christopher

  • Hi Nikhil,

    After modify  tiovx/kernels_j7/hwa/display/vx_display_target.c by following code, I can see the effect from pixel alpha

    Fullscreen
    1
    2
    3
    4
    5
    case (vx_df_image)VX_DF_IMAGE_RGBX:
    //format->dataFormat = FVID2_DF_RGBX24_8888;
    format->dataFormat = FVID2_DF_RGBA32_8888;
    format->pitch[FVID2_RGB_ADDR_IDX] = (uint32_t)obj_desc_img->imagepatch_addr[0].stride_y;
    dispPrms->bpp = 4;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I think this ticket could be marked as resolved.

    Thank you very much for the guidance.

    And please still provide some guideline (APIs or tools) for checking registers, this will be very helpful for further debugging.

    Thanks.

    Regards,

    Christopher

  • Hi Christopher,

    You could directly use devmem2 Linux command on the terminal to read the register.

    You could also print the register value using printf() by using a pointer to this register address and dereferencing it.

    Regards,

    Nikhil

  • Hi Nikhil,

    Got it and many thanks.

    Regards,

    Christopher