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.

TDA2EVM5777: How to set Custom Output Resolution on TDA2X over HDMI ?

Part Number: TDA2EVM5777

Hi,

I am running a simple camera usecase

Capture(1280x400 @ 60fps)) -> Display

Above  usecase is running fine and i am able to display camera output over HDMI.

Now, I modified the usecase as below:

Capture(1280x400 @ 60fps) -> VPE(Resize: 1152x576) -> Display

Build is successful. After running this usecase, Display is blurred.

Let me know what changes are required to enable HDMI display for custom resolution output?

Regards,

Sagar

  • Hi Sagar,

    Have you changed display parameters for 1152x576?

    Regards,

    Rishabh

  • Hi Rishabh,

    Do you mean,  I have to modify in

    Void setDisplayPrm(DisplayLink_CreateParams *pPrm,Chains_DisplayType displayType)

    such that

    ChainsCommon_SetDisplayPrms(pPrm,NULL,displayType,width,height)

    width=1152, height=576

    But, displayType will be unknown.

    What is the right display type in my case:

     typedef enum {
         CHAINS_DISPLAY_TYPE_LCD_7_INCH = 0,
         /**< Output displayed on 7 inch LCD */
         CHAINS_DISPLAY_TYPE_LCD_10_INCH,
         /**< Output displayed on 10-inch LCD */
         CHAINS_DISPLAY_TYPE_LDC_10_INCH_LCDCTRL_TC358778_MIPI_DSI_1920_1200,
         /**< Output is displayed on 10Inch 1920x1200 LDC */
         CHAINS_DISPLAY_TYPE_HDMI_720P,
         /**< Output displayed on HDMI in 720P resolution */
         CHAINS_DISPLAY_TYPE_HDMI_1080P,
         /**< Output displayed on HDMI in 1080P resolution */
         CHAINS_DISPLAY_TYPE_FPD
         /**< Output displayed via FPD resolution */
     } Chains_DisplayType;

    Regards,

    Sagar

  • Hi Sagar,

    Display type will not change as you are using the same display panel.

    Only input with and height to DSS will change, output will be scaled.

    Regards,

    Rishabh

  • Hi Rishabh,

    It will be great if you tell me filename or structure where i can change DSS width and height.

    Reagrds,

    Sagar

  • Hi Sagar,

    Please refer to PROCESSOR_SDK_VISION_03_07_00_00\vision_sdk\apps\src\rtos\usecases\vip_single_cam_view\chains_vipSingleCam_Display.c.

    While setting the DISPLAY_LINK_CMD_SET_CFG_PARAMS you need to set correct width, height and pitch.

    Regards,

    Rishabh

  • Hi,

    I haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Rishabh

  • Hi Rishabh,

    I am able to change the Display Link resolution to 1152x576. and here the display output.

    Few doubts:

    1. I am using a Display which is 1080p (Samsung TV)

    - When i have changed the display link resolution to  1152x576. I was asssuming that Display will scale it to fit it properly to output display. But, In the ourput i can see black portion.

    2. I also connected same to a normal projector over HDMI

    -  Its output is similar to below. But, instead of black portion its white (means image is not at centre. But, starts from left upper corner). 

    My final aim is to connect to DLP device which can accept only 1152x576 as input resolution over HDMI.

    Can i assume DLP will project it properly? Basically a centred image.

    Regards,

    Sagar

  • Hi Sagar,

    Can you check what is the display type. It should be CHAINS_DISPLAY_TYPE_HDMI_1080P.

    Regards,

    Rishabh

  • Hi Rishabh,

    Yes. displayType is CHAINS_DISPLAY_TYPE_HDMI_1080P

    Following change i have made in the code:

    Void ChainsCommon_GetDisplayWidthHeight(
    Chains_DisplayType displayType,
    UInt32 *displayWidth,
    UInt32 *displayHeight)
    {
    switch(displayType)
    {
    case CHAINS_DISPLAY_TYPE_LCD_7_INCH:
    *displayWidth = 800;
    *displayHeight = 480;
    break;
    case CHAINS_DISPLAY_TYPE_LCD_10_INCH:
    *displayWidth = 1280;
    *displayHeight = 800;
    break;
    case CHAINS_DISPLAY_TYPE_LDC_10_INCH_LCDCTRL_TC358778_MIPI_DSI_1920_1200:
    *displayWidth = 1920;
    *displayHeight = 1200;
    break;
    case CHAINS_DISPLAY_TYPE_HDMI_720P:
    *displayWidth = 1152;
    *displayHeight = 576;
    break;
    case CHAINS_DISPLAY_TYPE_HDMI_1080P:
    *displayWidth = 1152;
    *displayHeight = 576;
    break;
    case CHAINS_DISPLAY_TYPE_FPD:
    *displayWidth = 1280;
    *displayHeight = 720;
    break;
    default:
    OSA_assert(0);
    break;
    }
    }

    Actually i thought to create a new displayType of my own. But, I found many changes will be required for the same.

    And also i do not know vspolarity, fidpolarity and many more parameters. So, I kept the displayType as CHAINS_DISPLAY_TYPE_HDMI_1080P and changed the width and height.

    Regards,

    Sagar

  • Hi Sagar,

    Can you please change display height and width while setting DISPLAY_LINK_CMD_SET_CFG_PARAMS as suggested previously.

    DisplayLink_SetCfgParams chPrms;
    
    chPrms.isChInfoChangeValid  = 0x01U;
    chPrms.chInfo.width         = CAPTURE_SENSOR_WIDTH; //input width here
    chPrms.chInfo.height        = CAPTURE_SENSOR_HEIGHT; //input height here
    chPrms.chInfo.pitch[0U]     = CAPTURE_SENSOR_WIDTH; //input width here
    chPrms.chInfo.pitch[1U]     = chPrms.chInfo.pitch[0U];
    chPrms.chInfo.pitch[2U]     = chPrms.chInfo.pitch[0U];
    chPrms.chInfo.flags         =
            System_Link_Ch_Info_Set_Flag_Data_Format(chPrms.chInfo.flags,
                                                    SYSTEM_DF_YUV420SP_UV);
    
    System_linkControl(pObj->ucObj.Display_VideoLinkID,
                       DISPLAY_LINK_CMD_SET_CFG_PARAMS,
                       &chPrms,
                       sizeof(DisplayLink_SetCfgParams),
                       TRUE);

    Regards,

    Rishabh

  • Hi Rishabh,

    As per your suggestion, i did following changes in my usecase in StartApp function

    DisplayLink_SetCfgParams chPrms;
    
    chPrms.isChInfoChangeValid  = 0x01U;
    chPrms.chInfo.width         = 1152 ; //input width here
    chPrms.chInfo.height        = 576; //input height here
    chPrms.chInfo.pitch[0U]     = 1152; //input width here
    chPrms.chInfo.pitch[1U]     = chPrms.chInfo.pitch[0U];
    chPrms.chInfo.pitch[2U]     = chPrms.chInfo.pitch[0U];
    chPrms.chInfo.flags         =
            System_Link_Ch_Info_Set_Flag_Data_Format(chPrms.chInfo.flags,
                                                    SYSTEM_DF_RGB24_888);
    
    System_linkControl(pObj->ucObj.Display_VideoLinkID,
                       DISPLAY_LINK_CMD_SET_CFG_PARAMS,
                       &chPrms,
                       sizeof(DisplayLink_SetCfgParams),
                       TRUE);

    But, still i am getting the same output. as mentioned in previous reply.

    1. Are the changes i have done correct?

    2. If display link is configured for 1152x576 and if we connect this to 1080p HDMI Display. How will be the output?

    Is it scaled version of 1152x576 to the resolution of HDMI display ? or it will show a centred image? or it will show a image which i have shared earlier?

    3. Is there any print or log I can put in display link to check final configuration of display link? 

    - What width and height it is configured ? Which location will be right to check a log (please point me a function or file)?

    Regards,

    Sagar

  • Hi Sagar,

    It seems there are multiple places you need to change.

    1.  Make the change as I had suggested in my previous reply.

    2. Make the below change between the API calls ChainsCommon_SetDisplayPrms and ChainsCommon_StartDisplayCtrl

    ChainsCommon_SetDisplayPrms(&pUcObj->Display_VideoPrm,
                                &pUcObj->Display_GrpxPrm,
                                pObj->chainsCfg->displayType,
                                pObj->displayWidth,
                                pObj->displayHeight
                               );
                               
    pUcObj->DisplayPrm.rtParams.tarWidth = 1920; //1152in case of original buffer display
    pUcObj->DisplayPrm.rtParams.tarHeight = 1080; //576 in case of original buffer display
    pUcObj->DisplayPrm.rtParams.posX = 0;
    pUcObj->DisplayPrm.rtParams.posY = 0;
    pUcObj->DisplayPrm.displayId = DISPLAY_LINK_INST_DSS_VID1;
        
    ChainsCommon_StartDisplayCtrl(
        pObj->chainsCfg->displayType,
        pObj->displayWidth,
        pObj->displayHeight
        );

    Please make sure that you have not changed width and height in ChainsCommon_GetDisplayWidthHeight API for 1080P display.

    Regards,

    Rishabh

  • Hi,

    I haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Rishabh