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.

OMAP3530 EVM MISTRAL

Other Parts Discussed in Thread: OMAP3530

Hi,
Now I am using Omap3530 EVM Mistral kit for my development, I am facing problem

to display image on LCD monitor through DVI interface. The Image is not coming

properly (pixel or resolution related issue). My compile time configuration on Linux

kernel 2.6.29(OMAP35x-PSP-SDK-02.01.02.09) is 720P (1280x720). My Boot time

parameters are

**omapfb.video_mode="1280x720MR-24@60" omap-dss.def_disp="dvi"**.


Can I have solution for this?

  • Those bootargs parameters appear to work for me, when you say

    balakrishnan said:

    The Image is not coming properly (pixel or resolution related issue).

    what do you mean? Could you post a picture of your screen output?

    Note that the out of the box EVM demo that shows a picture slideshow on the LCD is not designed to write to the DVI frame buffer, so it will show the pictures all out of sync, you need an application that is expecting to write to the DVI display to see something proper.

  • Hi,

          Thank you, Now the Image is coming clearly in DVI output, What I did is 

    " Through sample application, I have  configured frame buffer setting".

    once again thanks for you 

     

    With Regards

    J.Balakrishnan

     

  • HI Balakrishnan,

    I am tooo working on OMAP3530 DSS and am trying to display image on DVI Monitor.

    I am facing probelm in getting Video and Graphics simultaneously. Dsiplay / Image is clear when either of the plane is enabled. When I enable both the planes, the screen is flickering.

    Is it possible share me the sample Application you have used? or as SD card bootable image if you can get both the Video and Graphics enabled??

     

    Regards

    Anto

  • Hi all,

    I have requirement to render video and graphics simulataneously on different parts of the display through DVI interface. I have gstreamer application which makes use of v4l2 (/dev/video1) to display the video playback (of course make use of ti's plugins to access DSPacceleration). Now I need to perform some scrolling text over them for which according to my understanding I have to make use of frame buffer.

    I tried modifying the demo image viewer application of ti and could not make it work. (I am using same PSP release said above).

    As I am new to linux and Linux driver programming, can you suggest me the changes that required to be made or some demo codes for writing to DVI and some references to understand things.

    I am also exploring the option of making use of graphics acceleration through opengl, as I guess it would allow me make use of the processor resource effectively. But again as I am a beginner II need to have a demo source codes for video playback of .mp4 (container format) and perform some basic graphics operation simultaneosly using opengl to acheive my objecitve effectively.

    I will be gratefull for any suggestions pointers to acheive my objective?

    Thank and Regards,

    Hari

  • Hello balakrishnan,

    Can you please share the sample application which configured frame buffer setting? It will be really helpful.

    Thanks,

    Bhargav

  • #include <stdio.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <sys/mman.h>
    #include <fcntl.h>
    #include <linux/fb.h>
    #include <stdlib.h>

    //#define DEBUG


    typedef struct
    {
        __u32 xres;                     /* visible resolution           */
            __u32 yres;
        __u32 pixclock;                 /* pixel clock in ps (pico seconds) */
            __u32 left_margin;              /* time from sync to picture    */
            __u32 right_margin;             /* time from picture to sync    */
            __u32 upper_margin;             /* time from sync to picture    */
            __u32 lower_margin;
            __u32 hsync_len;                /* length of horizontal sync    */
            __u32 vsync_len;                /* length of vertical sync      */
    } MODESTRUCT;

    MODESTRUCT ModeStruct[4] = { {640,  480, 42553, 80, 48,  3, 7,  32,  4},
                     //{848,  480, 29630, 16, 112, 6, 23, 112, 8},
                     {848,  480, 29630, 96, 112, 6, 23, 32, 8},
                     {1280, 768, 14652, 80, 48,  3, 12, 32,  7},             
                     {1280, 960, 11730, 80, 48,  3, 21, 32,  4}
                  };          

    int main()
    {
        int ifbfd, iModeValue;
        struct fb_var_screeninfo var, prevar;
        int ret;

        printf("\n\t\t\tChanging Display Resolution");
        printf("\n\t\t=====================================");
        printf("\n\t\t\t640x480   ---> 1");
        printf("\n\t\t\t8480x480  ---> 2");
        printf("\n\t\t\t1280x768  ---> 3");
        printf("\n\t\t\t1280x960  ---> 4");
        printf("\n\t\t=====================================");
        printf("\n\n\t\t\tEnter Mode Values : ");
        scanf("%d", &iModeValue);

        if(iModeValue <= 0 || iModeValue >= 5)
        {
            printf("\nEntered Mode values are wrong!....");   
            return 1;
        }

        /* call to open a video Display logical channel
         * in blocking mode */
        ifbfd =open ("/dev/fb0", O_RDWR);
        if(ifbfd == -1)
        {
            printf("Framebuffer open error \n");
            return 1;   
        }
    #ifdef DEBUG
        printf("Framebuffer file descriptor %d \n", ifbfd);    
    #endif   

        ret = ioctl(ifbfd, FBIOGET_VSCREENINFO, &var);
    #ifdef DEBUG
            printf("FBIOGET_VSCREENINFO retrun value %d \n", ret);
    #endif
            if (ret < 0)
            {
                    perror("FBIOGET_VSCREENINFO\n");
                    close(ifbfd);
                    exit(0);
            }
    #ifdef DEBUG   
        printf("xres = %lu yres = %lu, xres_virtual = %lu, yres_virtual = %lu \n", var.xres, var.yres, var.xres_virtual, var.yres_virtual);

        printf("red.length = %lu, green.length = %lu, blue.length = %lu, red.offset = %lu, green.offset = %lu, blue.offset = %lu \n", var.red.length, var.green.length, var.blue.length, var.red.offset, var.green.offset, var.blue.offset);

        printf("Current nonstd is %d, bits_per_pixel is :%d \n", var.nonstd, var.bits_per_pixel);
        printf("\n activate : %lu", var.activate);
        printf("\n height of picture in mm : %lu ", var.height);
        printf("\n width of picture in mm  : %lu ", var.width);                   
        printf("\n (OBSOLETE) see fb_info.flags : %lu ", var.accel_flags);
        printf("\n pixel clock in ps (pico seconds) : %lu ",var.pixclock);
        printf("\n time from sync to picture(left margin) : %lu ", var.left_margin);
        printf("\n time from picture to sync(right margin) : %lu ", var.right_margin);
        printf("\n time from sync to picture(upper margin) : %lu ", var.upper_margin);
        printf("\n lower margin : %lu ", var.lower_margin);
        printf("\n length of horizontal sync : %lu ", var.hsync_len);
        printf("\n length of vertical sync   : %lu ", var.vsync_len);
        printf("\n see FB_SYNC_* : %lu ", var.sync);
        printf("\n see FB_VMODE_*: %lu ", var.vmode);
        fflush(stdout);
        sleep(1);
    #endif
        iModeValue--;

        var.xres = ModeStruct[iModeValue].xres;
            var.yres = ModeStruct[iModeValue].yres;
            var.xres_virtual = ModeStruct[iModeValue].xres;   
            var.yres_virtual = ModeStruct[iModeValue].yres;
            var.pixclock = ModeStruct[iModeValue].pixclock;                 /* pixel clock in ps (pico seconds) */
            var.left_margin = ModeStruct[iModeValue].left_margin;              /* time from sync to picture    */
            var.right_margin = ModeStruct[iModeValue].right_margin;             /* time from picture to sync    */
            var.upper_margin = ModeStruct[iModeValue].upper_margin;             /* time from sync to picture    */
            var.lower_margin = ModeStruct[iModeValue].lower_margin;
            var.hsync_len = ModeStruct[iModeValue].hsync_len;                /* length of horizontal sync    */
            var.vsync_len = ModeStruct[iModeValue].vsync_len;                /* length of vertical sync      */

    #if 0
        xAxis = 640;
            yAxis = 480;
        var.pixclock = 42553;                 /* pixel clock in ps (pico seconds) */
            var.left_margin = 80;              /* time from sync to picture    */
            var.right_margin = 48;             /* time from picture to sync    */
            var.upper_margin = 3;             /* time from sync to picture    */
            var.lower_margin = 7;
            var.hsync_len = 32;                /* length of horizontal sync    */
            var.vsync_len = 4;                /* length of vertical sync      */
    #endif
    #if 0
        xAxis = 848;
            yAxis = 480;
        var.pixclock = 29630;                 /* pixel clock in ps (pico seconds) */
            var.left_margin = 16;              /* time from sync to picture    */
            var.right_margin = 112;             /* time from picture to sync    */
            var.upper_margin = 6;             /* time from sync to picture    */
            var.lower_margin = 23;
            var.hsync_len = 112;                /* length of horizontal sync    */
            var.vsync_len = 8;                /* length of vertical sync      */
    #endif
    #if 0
        xAxis = 1280;
            yAxis = 768;
        var.pixclock = 14652;                 /* pixel clock in ps (pico seconds) */
            var.left_margin = 80;              /* time from sync to picture    */
            var.right_margin = 48;             /* time from picture to sync    */
            var.upper_margin = 3;             /* time from sync to picture    */
            var.lower_margin = 12;
            var.hsync_len = 32;                /* length of horizontal sync    */
            var.vsync_len = 7;                /* length of vertical sync      */
    #endif
    #if 0
        xAxis = 1280;
            yAxis = 960;
        var.pixclock = 11730;                 /* pixel clock in ps (pico seconds) */
            var.left_margin = 80;              /* time from sync to picture    */
            var.right_margin = 48;             /* time from picture to sync    */
            var.upper_margin = 3;             /* time from sync to picture    */
            var.lower_margin = 21;
            var.hsync_len = 32;                /* length of horizontal sync    */
            var.vsync_len = 4;                /* length of vertical sync      */
    #endif

        var.bits_per_pixel = 16;
        var.red.length = 5;
        var.green.length = 6;
        var.blue.length = 5;
        var.red.offset = 11;
        var.green.offset = 5;
        var.blue.offset = 0;
        var.activate = FB_ACTIVATE_FORCE | FB_ACTIVATE_NOW | FB_ACTIVATE_ALL;

        ret = ioctl(ifbfd, FBIOPUT_VSCREENINFO, &var);
    #ifdef DEBUG
        printf("FBIOPUT_VSCREENINFO retrun value %d \n", ret);
    #endif
        if (ret < 0)
        {
            perror("FBIOPUT_VSCREENINFO\n");
            close(ifbfd);
            exit(0);
        }   
    #ifdef DEBUG
    /**********************************************************************************************************/
        ret = ioctl(ifbfd, FBIOGET_VSCREENINFO, &var);
            printf("FBIOGET_VSCREENINFO retrun value %d \n", ret);
            if (ret < 0)
            {
                    perror("FBIOGET_VSCREENINFO\n");
                    close(ifbfd);
                    exit(0);
            }

            printf("var.xres = %lu var.yres = %lu, var.xres_virtual = %lu, var.yres_virtual = %lu \n", var.xres, var.yres, var.xres_virtual, var.yres_virtual);

            printf("red.length = %lu, green.length = %lu, blue.length = %lu, red.offset = %lu, green.offset = %lu, blue.offset = %lu \n", var.red.length, var.green.length, var.blue.length, var.red.offset, var.green.offset, var.blue.offset);

            printf("Current nonstd is %d, bits_per_pixel is :%d \n", var.nonstd, var.bits_per_pixel);
            printf("\n activate : %lu", var.activate);
            printf("\n height of picture in mm : %lu ", var.height);
            printf("\n width of picture in mm  : %lu ", var.width);
            printf("\n (OBSOLETE) see fb_info.flags : %lu ", var.accel_flags);
            printf("\n pixel clock in ps (pico seconds) : %lu ",var.pixclock);
            printf("\n time from sync to picture(left margin) : %lu ", var.left_margin);
            printf("\n time from picture to sync(right margin) : %lu ", var.right_margin);
            printf("\n time from sync to picture(upper margin) : %lu ", var.upper_margin);
            printf("\n lower margin : %lu ", var.lower_margin);
            printf("\n length of horizontal sync : %lu ", var.hsync_len);
            printf("\n length of vertical sync   : %lu ", var.vsync_len);
            printf("\n see FB_SYNC_* : %lu ", var.sync);
            printf("\n see FB_VMODE_*: %lu ", var.vmode);
            fflush(stdout);
            sleep(1);
    /********************************************************************************************************/
    #endif
        printf("\n\t\t****Screen Resolution has been Changed****");
        /* closing of channels */
        close (ifbfd);
       
        return 0;
    }

  • Balakrishnan,

    I am facing some what similar problem. I am trying to dispaly 960P (960x1080) resolution using DM365. 960P resolution is same as 1080P (1920x1080) except it outputs alternate horizontal pixels.

    Since this is an non-standard resolution, I am facing few issues in calculating the timing parameters for this.

    Can u help in calculating the timing parameters like hsync_len, vsync_len and margins for this resolution. Also I want to understand how to divide the clock so that I can output alteranate horizontal pixels.

    Please help me to resolve these..

    Regards

    Jai