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.

tying DVO2 and HDMI in RDK 3.2 MCFW

Expert 1840 points

Dear All,

I am working with a custom board using DM8148 TI CPU. For the first time, I try our board with ezsdk and the psp examples to test HDMI and DVO2 output. We success-ed to tie HDMI and DVO2 to display the graphic PIPE 0 by below setting:

echo 0 > /sys/devices/platform/vpss/graphics0/enabled
echo 0 > /sys/devices/platform/vpss/display0/enabled
echo 0 > /sys/devices/platform/vpss/display1/enabled

echo 1080p-30 > /sys/devices/platform/vpss/display0/mode
echo 1080p-30 > /sys/devices/platform/vpss/display1/mode
echo 74250,1920/88/148/44,1080/4/36/5,1 > /sys/devices/platform/vpss/display1/timings
echo 74250,1920/88/148/44,1080/4/36/5,1 > /sys/devices/platform/vpss/display0/timings

echo triplediscrete,rgb888 > /sys/devices/platform/vpss/display0/output
echo doublediscrete,yuv422spuv > /sys/devices/platform/vpss/display1/output

echo 5 > /sys/devices/platform/vpss/system/tiedvencs
echo 2:hdmi,dvo2 > /sys/devices/platform/vpss/graphics0/nodes

echo 1 > /sys/devices/platform/vpss/display0/enabled
echo 1 > /sys/devices/platform/vpss/display1/enabled
echo 1 > /sys/devices/platform/vpss/graphics0/enabled

fbset -xres 1920 -yres 1080 -vxres 1920 -vyres 1080

After that, We moved to develop software base on  RDK 3.2 with MCFW framework and We got troubles here.

As I knew, the setting for display could be done in these code files:

links_m3vpss\system\system_dctrl.c:

Vps_DcConfig gSystem_dctrlTriDisplayConfig = {
VPS_DC_USERSETTINGS, /* Use Case */
/* Edge information */
{
{VPS_DC_BP0_INPUT_PATH, VPS_DC_VCOMP_MUX} ,
{VPS_DC_VCOMP_MUX, VPS_DC_VCOMP},
{VPS_DC_CIG_NON_CONSTRAINED_OUTPUT, VPS_DC_HDMI_BLEND},
{VPS_DC_CIG_PIP_OUTPUT, VPS_DC_DVO2_BLEND} ,
{VPS_DC_SEC1_INPUT_PATH, VPS_DC_SDVENC_MUX} ,
{VPS_DC_SDVENC_MUX, VPS_DC_SDVENC_BLEND} ,
{VPS_DC_GRPX0_INPUT_PATH, VPS_DC_HDMI_BLEND} ,
{VPS_DC_GRPX0_INPUT_PATH, VPS_DC_DVO2_BLEND} ,
{VPS_DC_GRPX2_INPUT_PATH, VPS_DC_SDVENC_BLEND},

{VPS_DC_MAIN_INPUT_PATH, VPS_DC_VCOMP},
{VPS_DC_AUX_INPUT_PATH, VPS_DC_VCOMP_MUX},
{VPS_DC_BP1_INPUT_PATH, VPS_DC_SDVENC_MUX},
}

,
12,
/* VENC information */
{
/* Mode information */
{
// Bioz
//{VPS_DC_VENC_HDMI, {FVID2_STD_1080P_60}
{VPS_DC_VENC_HDMI, {FVID2_STD_1080P_30}
// ~Bioz
}
, /* 1080p30 is mode
* is overwritten
* later inside
* System_displayCtrlInit
// Bioz */
//{VPS_DC_VENC_DVO2, {FVID2_STD_1080P_60}
{VPS_DC_VENC_DVO2, {FVID2_STD_1080P_30}
// ~Bioz
}
, /* 1080p30 is mode
* is overwritten
* later inside
* System_displayCtrlInit
*/
{VPS_DC_VENC_SD, {FVID2_STD_NTSC}
}
}
,
(VPS_DC_VENC_HDMI | VPS_DC_VENC_DVO2), /* Tied VENC bit
* mask */
3u /* Number of VENCs
*/
}
};

Int32 System_displayCtrlInit(VDIS_PARAMS_S * pPrm)

{

...

dctrlTriDisplayConfig = &(gSystem_dctrlTriDisplayConfig);
dctrlTriDisplayConfig->vencInfo.tiedVencs = pPrm->tiedDevicesMask;

...

}

mcfw_api\ti_vdis.c:

Void Vdis_params_init(VDIS_PARAMS_S * pContext)
{

...

// Bioz
#if 0
pContext->deviceParams[i].resolution = VSYS_STD_1080P_60;
#else
pContext->deviceParams[i].resolution = VSYS_STD_1080P_30;
#endif

pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dvoFmt = VDIS_DVOFMT_DOUBLECHAN_DISCSYNC;
pContext->deviceParams[VDIS_DEV_DVO2].outputInfo.dataFormat = SYSTEM_DF_YUV422SP_UV;

pContext->deviceParams[VDIS_DEV_HDMI].outputInfo.dvoFmt = VDIS_DVOFMT_TRIPLECHAN_EMBSYNC;
pContext->deviceParams[VDIS_DEV_HDMI].outputInfo.dataFormat = SYSTEM_DF_RGB24_888;

...

}

multich_usecase\ti_mcfw_ipnc_main.c:

vdisParams.deviceParams[VDIS_DEV_HDMI].resolution = VSYS_STD_1080P_30;
vdisParams.deviceParams[VDIS_DEV_DVO2].resolution = VSYS_STD_1080P_30;
Vdis_tiedVencInit(VDIS_DEV_DVO2, VDIS_DEV_HDMI, &vdisParams);

Just only HDMI output worked, the DVO2 didnot work. It look like the HDMI and DVO2 was not tied together correctly.

I checked the system/tiedvenc, I always saw 0 and the graphics0/nodes always 1:HDMI.

I will be very grateful if you can help me to figure out my mistake or give me some hint for solving this problem.  

  • Hi,

    By Default RDK supports HDMi and DVO2 tied together for DM8148 platform. You need not do any changes in mesh configuration (system_dctrl.c) to support this.

    If it is a custom board, which external video encoder you have connected to DVO2? In case of TI8148 EVM we configure Sii9022a. If you are not using Sii9022a on your custom board you must set enableConfigExtVideoEncoder in VDIS_PARAMS_S to FALSE before Vdis_init() and ensure that the device that replaces Sii9022a is configured correctly using i2c or by any other means.

  • H,

     

    Could you try what is suggested at below link?

     

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/236635/829406.aspx#829406

     

    Regards,

    Brijesh Jadav

  • Dear Yogesh Marathe,

    Thank you very much for your quick response. During look the source code of RDK I also think it has already support HDMI and DVO2 tied together for DM8148. So I just modify the resolution to make it output 1080p30 instead of 1080p60. You could see some change above. Our custom board connect the VDO2 to a HD-SDI transmitter directly, we don't have any encoder beside. Whenever the timing, clock and format was correct the device should work. As I described before, I had already success to make our device work with ezsdk and original psp color bar display example. I didn't modify any thing in ezsdk except the script load-hd-firmware.sh with some configuration to match with 1080p30. I really wondered which thing is difference between the ezsdk setting and RDK can effect to result. From your experiences, please give a hand to make it clearer.

    best regards 

  • Bioz,

    Do you mean that if you pass 1080P60 as resolution from application, you see display outputting correctly on your custom board? Also incase of 1080P30 do you see background color on the display? The background color is same color that you observe on HDMI after load.sh (a shade of black)

    I doubt that the clk value is not being set correctly when you are passing 1080P30 as resolution. Please use Vps_printf() and print value returned by System_getClk() for gSystem_objVpss.vpllCfg[SYSTEM_VPLL_OUTPUT_VENC_D].outputClk in system_dtrl.c for DVO2 and let me know the value.

  • Dear 

    I have already tried that post and my system was not work correctly. HDMI also did not work. I think the reason is our board DM8148 was not support VPS_DC_VENC_HDCOMP.


    Dear Yogesh Marathe

    I mean I success in making our board HDMI, DVO2 tied work with 1080P30 (not 1080P60) for ezSDK and psp display example. I have already seen the video correctly output on HDMI and DVO2 in the same time with same content (running Color bar).

    Follow your instruction I added these code into system_dcctr.c:

    /* Clock VENC_D is always tied to HDMI (DVO1)*/
    gSystem_objVpss.vpllCfg[SYSTEM_VPLL_OUTPUT_VENC_D].outputClk =
    System_getClk(pPrm->deviceParams[SYSTEM_DC_VENC_HDMI].resolution);

    Vps_rprintf("\n\n\n\ngSystem_objVpss.vpllCfg[SYSTEM_VPLL_OUTPUT_VENC_D].outputClk = %d \n\n\n\n", System_getClk(pPrm->deviceParams[SYSTEM_DC_VENC_HDMI].resolution));

    and the debug showed:

    [m3vpss ] gSystem_objVpss.vpllCfg[SYSTEM_VPLL_OUTPUT_VENC_D].outputClk = 74250

    I think this clk value is correct for 1080P30.

    Best regards



  • Dear Yogesh Marathe

    I have just realized that on the LCD display for HDMI out notice that video is 1080p60. I am very surprise about that. May I miss something to change the output from 1080p60 to 1080p30? or the HDVPSS of RDK has fixed the output format is 1080p60. If you have any idea about this please help me! thanks

  • Bioz,

    I believe you are passing parameters correctly it may happen that 1080P30 is not handled in hdvpss in some switch case and default value would be 1080P60, hence you are observing this. Let me find that out if that is the case and get back to you.

  • Hi,

     

    the only difference between 1080p30 and 1080p60 is pclk, so if you are setting pclk to 148.5MHz, it will output 1080p60, or if you are setting pclk to 74.25MHz, it will output 1080p30. So could you please check your pclk and see if it is set correctly?

     

    Thanks,

    Brijesh Jadav

  • Brijesh,

    Bioz already checked the pixel clk as in system_dctrl.c and it is getting set to 74250 which is correct.

    I just tried this out on RDK 3.50 release and I observe following prints

     DEMO: HDMI TV/Monitor connected !!!
     DEMO: TV Detected - HDMI interface !!!
     DEMO: INFO : Resolution is not supported by sink !!!
     Switching to 1080P60 !!

    I did exact same changes as Bioz has done in his application and results are same I'm also not able to see 1080P30.

    Bioz,

    Which release you are on? do you see similar prints on the console?

  • Yogesh, The back to 1080P60 is because the TV you have connected doesnt support 1080P30. This feature of switching based on TV EDID info is added only in RDK 3.5.

    Bioz is not using DVR RDK.He is using IPNC RDK 3.2 version.

  • Ok, now RDK does not work in force mode, it reads EDID of the sink and checks if the mode is supported or not. If it is not supported, then it switches to 1080p60 mode.

     

    Regards,

    Brijesh Jadav

  • Ok thanks Brijesh and Badri.

    Bioz,

    Can you confirm once again when you tried setting 1080P30 through sysfs, it was set correctly to 1080P30? Im asking this because meanwhile you said HDMI was actually showing 1080P60 after your changes.

     

  • Dear Yogesh Marathe,

    Firstly, I want to say that I am now checking the RDK 3.5 and I got the same problem.

    When I use EZSDK, I can make the output through DVO2 and HDMI correctly 1080p30, this resolution showed clearly in my LCD display.

    For RDK 3.5, I have also already modified the autotest tool in UBOOT to support testing HDMI with 1080p30 as below

    u-boot\include\asm\arch\clocks_ti814x.h:

    #define HDMI_N 19

    // Bioz
    //#define HDMI_M 1485
    #define HDMI_M 742
    // ~Bioz 

    #define HDMI_CLKCTRL 0x290a1001

    #define HDMI_M2 10

    #define VIDEO0_N 19
    #define VIDEO0_M 540
    #define VIDEO0_M2 10
    #define VIDEO0_CLKCTRL 0x09000801

    #define VIDEO1_N 19
    // Bioz
    //#define VIDEO1_M 1485
    #define VIDEO1_M 742
    // ~Bioz
    #define VIDEO1_CLKCTRL 0x290a1001
    #define VIDEO1_M2 10

    I can see the color bar with resolution 1080p30 on LCD display. Because I didn't know how to set the HDMI and DVO2 tied in auto test so I just try to test HDMI for 1080p30 in this case. If you know how to tied HDMI and DVO2 in autotest tool, please let me know, so I can test it also.

    Really thanks for your support, I am looking forward to hearing from you.