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.

How to change SD display to 720X480?

Hi.  I'm using a custom board with a dm8148 device.  I want to display a 720X480 image to display2 (SD) using SGX.  I have tried the following:

echo ntsc > /sys/devices/platform/vpss/display2/mode # ntsc 

echo 1:sd > /sys/devices/platform/vpss/graphics0/nodes

fbset -fb /dev/fb0 -depth 32 -xres 720 -yres 480 -vxres 720 -vyres 480

When I initialize OpenGL and call eglCreateWindowSurface, I get an "EGL_NOT_INITIALIZED" error.

If I change the above fbset command to: 

fbset -fb /dev/fb0 -depth 32 -xres 640 -yres 480 -vxres 640 -vyres 480, openGL does not complain and I see the SD image on my analog display as a 640X480 image.

I want the display to show 720X480.  Is this possible?

Thanks,

Kim

  • Hello,

    What is the software release that you are using here?

    You could check this wiki:
    processors.wiki.ti.com/.../TI81XX_PSP_VPSS_Video_Driver_User_Guide

    BR
    Margarita
  • Hi Margarita,

    I have looked at that wiki and I could not find anything that would cause the OpenGL code to not work when I set the frame buffer to 720X480 for ntsc mode on display2.  When the mode is set to "ntsc" on display2 and then fbset run with 720X480, I get this for fbset:

    mode "720x480-235"
    # D: 54.002 MHz, H: 62.502 kHz, V: 235.411 Hz
    geometry 720 480 720 480 32
    timings 18518 68 12 41 5 64 5
    laced true
    rgba 8/16,8/8,8/0,8/24
    endmode

    I saw another post about the video modes are defined in this file:ti-ezsdk_dm814x-evm_5_05_02_00\board-support\linux-04.04.00.02\drivers\video\ti81xx\vpss\sysfs.h.  I looked in this file and for "ntsc" I see this:

    {"ntsc", FVID2_STD_NTSC,
    {FVID2_STD_NTSC, 720, 480, FVID2_SF_INTERLACED,
    216000, 60, 12, 68, 64, 5, 41, 5},
    TI81xx_MODE_HDMI
    },

    This structure timing does not match what I see when I run fbset with 720X480.  Should they match?

    In the wiki link, for display2 it says that the timings cannot be set.  Is this an issue with what I see?

    I've attached some output I see when I ran a script I saw from another post.  Maybe this info helps.

    Thanks,

    Kim

    2705.SDMoreInfo.txt

  • Hello,

    I see this structure :

    static const struct dc_vencmode_info vmode_info[]

    in:
    /board-support/linux-2.6.37-psp04.04.00.01/drivers/video/ti81xx/vpss

    sysfs.h

    If you use different timing, it may not be detected by the display.

    BR
    Margarita

  • Hi Margarita,

    It's interesting that in your sysfs.h, the entry for "ntsc" does not contain TI81xx_MODE_HDMI.  I checked the /board-support/linux-2.6.37-psp04.04.00.01/drivers/video/ti81xx/vpss/sysfs.h and it looks the same as the linux-04.04.00.02 version:

    {"ntsc", FVID2_STD_NTSC,
    {FVID2_STD_NTSC, 720, 480, FVID2_SF_INTERLACED,
    216000, 60, 12, 68, 64, 5, 41, 5},
    TI81xx_MODE_HDMI
    },

    Which version of linux are you using?  Maybe your version is more up to date?

    Thanks,

    Kim

  • Also, I'm not sure that I can change the timing at all for display2. According to processors.wiki.ti.com/.../TI81XX_PSP_VPSS_Video_Driver_User_Guide

    "Displays the timing configuration.(Not available now)"
    How could I change the timing? In the kernel?
    Thanks,
    Kim
  • Hello,

    You could check this topic:

    You could check this file dctrl.c in the same folder as sysfs.

    BR
    Margarita

  • Hi Margarita,

    I was able to get passed the eglCreateWindowSurface funtion call by setting the fb like this:

    fbset -fb /dev/fb0 -depth 32 -xres 720 -yres 480 -vxres 800 -vyres 480

    Not too surprising, the output looks really messed up.  Do you know why these settings were able to work for the eglCreateWindowSurface function call?  How can I get a good image that is 720X480, do you know? I am still wondering why the fbset -fb /dev/fb0 -depth 32 -xres 720 -yres 480 -vxres 720 -vyres 480 doesn't allow me to get passed the eglCreateWindowSurface funtion call.  And why the above fb settings allow the function to not fail.

    Do you know if there is source code available for eglCreatewindowSurface?

    thanks,

    Kim

  • Hello,

    What is the software release that you are using here?



    BR
    Margarita

  • Hi Margarita,

    I figured it out....or at least what works for me. I am using ezsdk version 5_05_02_00. The solution was to use this for the fbset command:
    fbset -fb /dev/fb0 -depth 32 -xres 704 -yres 480 -vxres 704 -vyres 480
    Now the image looks correct on an SD display.

    Thanks,
    Kim