Native surface creation

Jon Smirl jonsmirl at gmail.com
Sun Mar 13 16:45:46 PST 2005


On Sun, 13 Mar 2005 15:50:03 -0700, Brian Paul
<brian.paul at tungstengraphics.com> wrote:
> In any case, the point of all this isn't really stereo, but
> consideration of other mode attributes that we might have to be
> concerned with.  Other examples might be interlacing or syncing to
> external signals and the fact that the application may need to control
> those things to some degree.

My plan was to add all of these as drop downs in a list box. The mode
names are just strings that select from a set of fbdev fb_mode
structures.

One upside is that the list could contain things like:
HDTV 1080p
HDTV 1080i
HDTV 720p

On the other hand let's say you have a movie that plays at 640x480 and
you want to go full screen. I do need to make a way for you to figure
out the string for the 640x480 mode.

I could make a sysfs attribute named match. Write an fb_mode structure
to it and then read the attribute back and you get the mode string for
the closest matching mode.

struct fb_videomode {
        const char *name;       /* optional */
        u32 refresh;            /* optional */
        u32 xres;
        u32 yres;
        u32 pixclock;
        u32 left_margin;
        u32 right_margin;
        u32 upper_margin;
        u32 lower_margin;
        u32 hsync_len;
        u32 vsync_len;
        u32 sync;
        u32 vmode;
        u32 flag;
};

#define FB_SYNC_HOR_HIGH_ACT    1       /* horizontal sync high active  */
#define FB_SYNC_VERT_HIGH_ACT   2       /* vertical sync high active    */
#define FB_SYNC_EXT             4       /* external sync                */
#define FB_SYNC_COMP_HIGH_ACT   8       /* composite sync high active   */
#define FB_SYNC_BROADCAST       16      /* broadcast video timings      */
                                        /* vtotal = 144d/288n/576i => PAL  */
                                        /* vtotal = 121d/242n/484i => NTSC */
#define FB_SYNC_ON_GREEN        32      /* sync on green */

#define FB_VMODE_NONINTERLACED  0       /* non interlaced */
#define FB_VMODE_INTERLACED     1       /* interlaced   */
#define FB_VMODE_DOUBLE         2       /* double scan */

flags
#define FB_MODE_IS_DETAILED     1
#define FB_MODE_IS_STANDARD     2
#define FB_MODE_IS_VESA         4
#define FB_MODE_IS_CALCULATED   8
#define FB_MODE_IS_FIRST        16
#define FB_MODE_IS_FROM_VAR     32

I need to fix this to use enums. We could remove the unneeded fields
from this structure and add  it to egl.h.

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the dri-egl mailing list