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.

Dm8168 Decode_display Display mode to be used for 800x600 resolution

Hello All,

We are working on the DM8168 Decoder with decode_display example.

We are trying display the 800x600 scaled resolution.

The input given to the decoder component is 1280x720 and output's 1280x720. The 1280x720 decoded output is given to the scalar component input and the the scalar output is set to 800x600. Then the 800x600 scaled output is given to display component input and is output as 800x600.

We have set the display to 800x600 using this sysfs commands

        echo 0 > /sys/devices/platform/vpss/display0/enabled
        echo 800x600@60 > /sys/devices/platform/vpss/display0/mode
        echo 1 > /sys/devices/platform/vpss/display0/enabled

We are using On-Chip HDMI to display this resolution.

The problem we are having is

In the function "IL_ClientSetDisplayParams()". what do i set the Display mode at "driverId.eDispVencMode".

We tried setting this to "driverId.eDispVencMode = OMX_DC_MODE_CUSTOM;" mode but this did not work, it is giving us error below,

set input port params (width = 800, height = 600)
setting input and output memory type to default
enable input port
got eventEnable/Disable Event
 connect call for decoder-scalar
  connect call for scalar-display
  decoder inport buffers allocated
  decoder outport buffers allocated
 got eventState changed to: OMX_StateIdle
 decoder state IDLE
  Scalar input port use buffer done
  scalar outport buffers allocated
 got eventState changed to: OMX_StateIdle
 scalar state IDLE
 got eventState changed to: OMX_StateIdle
 ctrl-dc state IDLE
 got eventState changed to: OMX_StateIdle
 display state IDLE
 got eventState changed to: OMX_StateExecuting
 display control state execute
 got event*** unrecoverable error: OMX_ErrorBadParameter (0x80001005)

And the supported values for this "eDispVencMode"  are

typedef enum
{
    OMX_DC_MODE_NTSC = 0,
    /**< Mode Id for NTSC, currently NOT supported */
    OMX_DC_MODE_PAL,
    /**< Mode Id for PAL, currently NOT supported */
    OMX_DC_MODE_1080P_60,
    /**< Mode Id for 1080p at 60fps mode */
    OMX_DC_MODE_720P_60,
    /**< Mode Id for 720p at 60fps mode */
    OMX_DC_MODE_1080I_60,
    /**< Mode Id for 1080I at 60fps mode */
    OMX_DC_MODE_1080P_30,
    /**< Mode Id for 1080P at 30fps mode */
    OMX_DC_MODE_CUSTOM,
    /**< Mode Id for Custom mode */  
    OMX_DC_MODE_Max = 0x7FFFFFFF
    /**< This should be the last mode id */
} Omx_DcModeId;

Can anyone suggest us to get this resolution working. Any way of adding this custom display modes for On-Chip HDMI?


Thanks,

Srikanth.

  • Hello,

    What is the ezsdk version that you are using here?
    When you are setting custom mode do you make changes in /decode_display/src/dm816x platform_utils.h file?

    Something like:

    #define DISPLAY_VENC_MODE OMX_DC_MODE_CUSTOM


    #define DISPLAY_WIDTH (800)
    #define DISPLAY_HEIGHT (480)
    #define PIXEL_CLOCK (33500)
    #define H_FRONT_PORCH (164)
    #define H_BACK_PORCH (89)
    #define H_SYNC_LENGTH (10)
    #define V_FRONT_PORCH (10)
    #define V_BACK_PORCH (23)
    #define V_SYNC_LENGTH (10)

    You could try to set the display resolution as well by:
    root@dm816x-evm:~# echo 0 > /sys/devices/platform/vpss/display0/enabled
    root@dm816x-evm:~# echo 33500,800/164/89/10,480/10/23/10,1 > /sys/devices/platform/vpss/display0/timings
    root@dm816x-evm:~# echo 1 > /sys/devices/platform/vpss/display0/enabled
    root@dm816x-evm:~# fbset -xres 800 -yres 480 -vxres 800 -vyres 480

    BR
    Margarita

  • Hello Margarita,


    The EZSDK version we are using is "ti-ezsdk_dm816x-evm_5_05_02_00".

    We have added the following custom mode entries for 800x600 resolution to the "platform_utils.h" file

    #define DISPLAY_VENC_MODE OMX_DC_MODE_CUSTOM


    #define DISPLAY_WIDTH (800)
    #define DISPLAY_HEIGHT (600)
    #define PIXEL_CLOCK (40000)
    #define H_FRONT_PORCH (40)
    #define H_BACK_PORCH (88)
    #define H_SYNC_LENGTH (128)
    #define V_FRONT_PORCH (1)
    #define V_BACK_PORCH (23)
    #define V_SYNC_LENGTH (4)

    and used this sysfs commands as you suggested

    echo 0 > /sys/devices/platform/vpss/display0/enabled
    echo 40000,800/40/88/128,600/1/23/4,1 > /sys/devices/platform/vpss/display0/timings
    echo 1 > /sys/devices/platform/vpss/display0/enabled
    /usr/sbin/fbset -xres 800 -yres 600 -vxres 800 -vyres 600


    But we are having the same error

     display state IDLE
     got eventState changed to: OMX_StateExecuting
     display control state execute
     got event*** unrecoverable error: OMX_ErrorBadParameter (0x80001005)

    (A small experiment)We tried loading the 720p60 display timings with sysfs command and the decoder component input is 720p60 --> output is also 720p60 --> scalar component input is 720p60 --> but scalar component output is scaled to 800x600 --> and Display component is set to 720p60.

    we used the display mode "driverId.eDispVencMode = OMX_DC_MODE_720P_60;". Then we are able to see a 800x600 video in a 1280x720 black frame and the video is also playing fine.

    Is there a way from which i can add an extra display mode "driverId.eDispVencMode = OMX_DC_MODE_800x600_60;". Because we have to support scaling and display of the VGA resolutions (800x600, 1024x768, 1280x768, 1280x1024, 1440x900, .....) on the On-chip HDMI.


    Thanks,

    Srikanth.

  • Hello Margarita,

    We are facing one more problem in the scaling part of the Decode_display example.

    We provided a input of 1920x1080 to the decoder and trying to scale it down to 1280x720P, the decoder application hangs at scaler semp_pend(). This is the prints from the console.

    Decoder-Display example

    ===============================

    OMX_Init completed

    UIAClient is ready to send a UIA configuration command

    UIAClient received UIA_CONFIGURE_ACK

    UIAClient is done sending requests

    UIAClient is ready to send a UIA configuration command

    UIAClient received UIA_CONFIGURE_ACK

    UIAClient is done sending requests

    decoder component is created

    PADX: 32 PADY: 24

    level set is 12

    scalar compoenent is created

    set input port params (width = 1920, height = 1080)

    set output port params (width = 1280, height = 720)

    set number of channels

    set input resolution

    set output resolution

    enable scalar input port

    got eventEnable/Disable Event

    enable scalar output port

    got eventEnable/Disable Event

    found handle 0x181220 for component OMX.TI.VPSSM3.VFDC

    got display handle

    found handle 0x185228 for component OMX.TI.VPSSM3.CTRL.DC

    Buffer Size computed: 4147200

    set input port params (width = 1280, height = 720)

    --------- IL_ClientSetDisplayParams : OMX_DC_MODE_720P_60 selected ---------

    --------- IL_ClientSetDisplayParams : OMX_DC_MODE_720P_60 selected ---------

    setting input and output memory type to default

    enable input port

    got eventEnable/Disable Event

    connect call for decoder-scalar

     connect call for scalar-display

     decoder inport buffers allocated

     decoder outport buffers allocated

    got eventState changed to: OMX_StateIdle

    decoder state IDLE

     Scalar input port use buffer done

     scalar outport buffers allocated

    It hangs here and we are unable to kill the application.

    We have taken a log using "./loggerSMDump.out 0x9E400000 0x100000 all > log.txt"  and attached here8371.log.txt


    We have a problem when doing up scaling (input 1280x720 and output 1920x1080). We found out that the buffers are not sufficient so in function "IL_ClientInit()" initialized the component buffersize to the maximum as width=1920 and height=1080. Then up scaling works fine.

    Can you please check and let us know.

    Thanks for the help.


    Regards,

    Srikanth.

  • Hello Margarita,

    We are little busy with other things.

    sorry, The scalar problem is my configuration problem only, we solved it and the scalar is working fine.


    Can you please tell us if this is possible

    Is there a way from which we can add an extra display mode "driverId.eDispVencMode = OMX_DC_MODE_800x600_60;". Because we have to support scale and display of the VGA resolutions (800x600, 1024x768, 1280x768, 1280x1024, 1440x900, .....) on the On-chip HDMI.


    Thanks for all the help.


    Regards,

    Srikanth.

  • Hello,

    Our requirement is that we have to support more display modes (800x600, 1024x768, 1280x768, 1280x1024, 1440x900, .....) for On-Chip HDMI. HDMI  display driver supports all these timings and i can set them writing to "/proc".  But display component supports these modes only

    typedef enum
    {
        OMX_DC_MODE_NTSC = 0,
        /**< Mode Id for NTSC, currently NOT supported */
        OMX_DC_MODE_PAL,
        /**< Mode Id for PAL, currently NOT supported */
        OMX_DC_MODE_1080P_60,
        /**< Mode Id for 1080p at 60fps mode */
        OMX_DC_MODE_720P_60,
        /**< Mode Id for 720p at 60fps mode */
        OMX_DC_MODE_1080I_60,
        /**< Mode Id for 1080I at 60fps mode */
        OMX_DC_MODE_1080P_30,
        /**< Mode Id for 1080P at 30fps mode */
        OMX_DC_MODE_CUSTOM,
        /**< Mode Id for Custom mode */  
        OMX_DC_MODE_Max = 0x7FFFFFFF
        /**< This should be the last mode id */
    } Omx_DcModeId;


    Is there any way to add an extra display mode, something like "driverId.eDispVencMode = OMX_DC_MODE_800x600_60;"?

    Thanks,

    Srikanth.

  • Hello,

    Do you have the overlay package?
    If yes, please check omx_vfdc.c file around line 555.

    BR
    Margarita
  • Hello Margarita,

    Thank you very much for the reply.

    We have the overlay package. We will install this and check and let you know.


    Best Regards,

    Srikanth.

  • Hello,

    Please check in omx_vfdc.c file
    switch (pVFDCDvrInstID->eDispVencMode) {
    ....

    BR
    Margarita