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: How to set DSI parameter for 4032x756 resulution

Part Number: TDA4VM

Hello,

I want to debug DSI with 4032x756 and 4 lanes on a custom board

1. vision_apps/apps/basic_demos/app_tirtos/common/app_init.c

    prm.timings.width = 4032U;
    prm.timings.height = 756U;
    prm.timings.hFrontPorch = 40U;
    prm.timings.hBackPorch = 40U;
    prm.timings.hSyncLen = 20U;
    prm.timings.vFrontPorch = 14U;
    prm.timings.vBackPorch = 10U;
    prm.timings.vSyncLen = 1U;
    prm.timings.pixelClock = 177262800ULL;

2.vision_apps/utils/dss/src/app_dss_defaults.c

    dsiParams.num_lanes = 4u;
3. ti/drv/dss/src/drv/dctrl/dss_dctrlDsi.c
    dsiObj->dphyTxIpDiv = 0x2;
    dsiObj->dphyTxOpDiv = 0x2;
    dsiObj->dphyTxFbDiv = 0x1BB;
    dsiObj->dphyTxRate = 0x210;
    dsiObj->cfgDsiTx.numOfLanes = 0x4u;
    dsiObj->privDsiTx.numOfLanes = 0x4u;

4.vision_apps/apps/basic_demos/app_rtos/common/app_cfg_mcu2_0.h

#undef ENABLE_CSI2TX
#undef ENABLE_DSS_EDP
#define ENABLE_DSS_DSI

The above is my parameter configuration

Please help to see if there are any mistakes and if there are any omissions

SDK:8.0

  • Hi,

    Can you please apply patches shared on the below FAQ and then you just need to set number of lanes and lane speed in Kbps from the application..

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1019565/faq-processor-sdk-j721e-how-to-change-lane-speed-and-number-of-lanes-for-dsi-output

    Other than this, how did you come to pixel clock of 177262800ULL?

    Regards,

    Brijesh

  • Hello, Brijesh

    My screen refresh rate is 55Hz

    (4032+40+40+20) x (756+14+10) x 55 = 177262800  (my vSyncLen is actually 0, If I write 0, an error will be reported "Set VP parameters IOCTL failed")

    The DS I am using is in vision_apps, does this patch have to be applied?

  • ok, it comes to around 177490060, so should be fine. 

    Yes, please apply this patch. This patch auto-calculates these parameters required for the lane speed. After the patch is applied, you would just need to set

    dsiParams.num_lanes = 4u;

    dsiParams.laneSpeedInKbps = 1000000;

    assuming you are trying to set lane speed as 1Gbps.

    Regards,

    Brijesh

  • Hello, Brijesh

    There is one thing I don't understand

        dsiObj->cfgDsiTx.numOfLanes = 0x4u;

        dsiObj->privDsiTx.numOfLanes = 0x4u;

    What are these two values defined according to?
  • Hello Zi Wang,

        dsiObj->cfgDsiTx.numOfLanes = 0x4u;

        dsiObj->privDsiTx.numOfLanes = 0x4u;

    Where do you see these two variables in the application? These are internally used by the DSS driver and not exposed to the application.

     

    From the application, we should just set the dsiParams.num_lanes = 4u and dsiParams.laneSpeedInKbps with the new patch.

    Regards,

    Brijesh

  • Hello, Brijesh

    These two parameters do not need to be dealt with, right?

    I found a new question

    I want to test DSI with /opt/vision_apps/run_app_tidl.sh

    But the following error occurred:

    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 !!!
    50.656024 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    50.659294 s: VX_ZONE_INIT:Enabled
    50.659316 s: VX_ZONE_ERROR:Enabled
    50.659321 s: VX_ZONE_WARNING:Enabled
    50.665591 s: VX_ZONE_INIT:[tivxInit:71] Initialization Done !!!
    50.665771 s: VX_ZONE_INIT:[tivxHostInit:48] Initialization Done for HOST !!!
    50.947882 s: VX_ZONE_ERROR:[ownContextSendCmd:783] Command ack message returned failure cmd_status: -1
    50.947908 s: VX_ZONE_ERROR:[ownContextSendCmd:819] tivxEventWait() failed.
    50.947928 s: VX_ZONE_ERROR:[ownNodeKernelInit:538] Target kernel, TIVX_CMD_NODE_CREATE failed for node DisplayNode
    50.947934 s: VX_ZONE_ERROR:[ownNodeKernelInit:539] Please be sure the target callbacks have been registered for this core
    50.947941 s: VX_ZONE_ERROR:[ownNodeKernelInit:540] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
    50.947948 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:583] kernel init for node 0, kernel com.ti.hwa.display ... failed !!!
    50.947955 s: VX_ZONE_ERROR:[vxVerifyGraph:2044] Node kernel init failed
    50.947961 s: VX_ZONE_ERROR:[vxVerifyGraph:2098] Graph verify failed
    app_tidl: ERROR: Verifying display graph ... Failed !!!
    50.948738 s: VX_ZONE_INIT:[tivxHostDeInit:56] De-Initialization Done for HOST !!!
    50.953044 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 25494823 bytes
    MEM: Free's : 15 free's of 25494823 bytes
    MEM: Open's : 0 allocs of 0 bytes
    MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!

    After that I restored the default ENABLE_DSS_EDP configuration in app_cfg_mcu2_0.h, after modification it is normal.

    Can't I test withrun_app_tidl or is there something wrong with my testing method?

  • Hi Zi Wang,

    Although, there is no error message from mcu2_0, most likely, it is failing because of mismatching resolution.

    By default, SDK supports 1280x800 resolution for DSI output, but most of the application outputs on 1080p resolution. In this case, we just need to make small change in the application. Each application sets the target resolution same as input resolution, can you please change it to 1280x800, as shown below? This will make sure to use internal pipeline scalar to downscale from 1080p to 1280x800 resolution.

    displayObj->disp_params.outWidth = 1280;
    displayObj->disp_params.outHeight = 800;

    Regards,

    Brijesh

  • Hello, Brijesh

    Here is my modification

    But TIDL still did not run successfully

  • Hi Zi Wang,

    Please set the posX and postY to 0. The error tells that start position + input frame size is greater than output frame size. 

    Regards,

    Brijesh

  • Hello, Brijesh

    Here is my modification

    err log:

    I also tried modifying to width=280 hight=800, but it still does not take effect

    The error message is still "The error tells that start position + input frame size is greater than output frame size. "

  • Hi Zi Wang,

    I think you have started a ticket for this issue, so i am closing this one. Lets continue our discussion on the other ticket. 

    Regards,

    Brijesh

  • ok, thanks for your reply