fb_var_screeninfo

Description

Defines the variable screen information of the HiFB. This is the native structure of the Linux FrameBuffer.

Prototype

struct fb_var_screeninfo {
    __u32 xres;             /* visible resolution       */
    __u32 yres;
    __u32 xres_virtual;     /* virtual resolution       */
    __u32 yres_virtual;
    __u32 xoffset;          /* offset from virtual to visible */
    __u32 yoffset;          /* resolution           */
    __u32 bits_per_pixel;   
    __u32 grayscale;        /* 0 = color, 1 = grayscale,    */
                            /* >1 = FOURCC          */
    struct fb_bitfield red;     /* bitfield in fb mem if true color, */
    struct fb_bitfield green;   /* else only length is significant */
    struct fb_bitfield blue;
    struct fb_bitfield transp;  /* transparency         */  
    __u32 nonstd;           /* != 0 Non standard pixel format */
    __u32 activate;         /* see FB_ACTIVATE_*        */
    __u32 height;           /* height of picture in mm    */
    __u32 width;            /* width of picture in mm     */
    __u32 accel_flags;      /* (OBSOLETE) see fb_info.flags */

    /* Timing: All values in pixclocks, except pixclock (of course) */
    __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  */
    __u32 sync;             /* see FB_SYNC_*        */
    __u32 vmode;            /* see FB_VMODE_*       */
    __u32 rotate;           /* angle we rotate counter clockwise */
    __u32 colorspace;       /* colorspace for FOURCC-based modes */
    __u32 reserved[4];      /* Reserved for future compatibility */
};

Members

For layers G0 and G1, Gx_min and Gy_min in the following table equal the value 32. For layers G2, G3, and G4, Gx_min and Gy_min in the following table are equal the value 8. Gx_min and Gy_min indicate the minimum width and minimum height supported by the current layer, respectively.

Member

Description

xres

Visible screen width (in pixels), which is an even number.

Value range: [Gx_min, xres_virtual]

yres

Visible screen height (in pixels), which is an even number.

Value range: [Gy_min, yres_virtual]

xres_virtual

Virtual screen width (image width in the display buffer).

Value range: ≥ Gy_min

yres_virtual

Virtual screen height (image height in the display buffer).

Value range: ≥ Gy_min

xoffset

Offset pixels in the x direction.

Value range: [0, xres_virtual – xres].

yoffset

Offset pixels in the y direction.

Value range: [0, yres_virtual – yres]

bits_per_pixel

Number of bits occupied by each pixel.

Value range: 32, 16, 4, or 2

Note: 4 and 2 refers to the CLUT4 and CLUT2 modes respectively. The CMAP function needs to be enabled.

red

Bit field information of the red color in the color component.

green

Bit field information of the green color in the color component.

blue

Bit field information of the bluer color in the color component.

transp

Bit bit field information of alpha in the color component.

grayscale

Color mode, not supported in the current version.

nonstd

Standard pixel format or not. Not supported in the current version.

  • 0: yes
  • 1: No

activate

Sets the activation time. Not supported in the current version.

height

Screen height, in mm. Not supported in the current version.

width

Screen width, in mm. Not supported in the current version.

accel_flags

Acceleration flag. Not supported in the current version.

pixclock

Time required for displaying a point, in ns. Not supported in the current version.

left_margin

Left blanking signal. Not supported in the current version.

right_margin

Right blanking signal. Not supported in the current version.

upper_margin

Upper blanking signal. Not supported in the current version.

lower_margin

Lower blanking signal. Not supported in the current version.

hsync_len

Horizontal synchronization duration. Not supported in the current version.

vsync_len

Vertical synchronization duration. Not supported in the current version.

sync

Synchronization signal mode. Not supported in the current version.

vmode

Scanning mode. Not supported in the current version.

rotate

Clockwise rotation angle. Not supported in the current version.

colorspace

Color space in FOURCC mode. Not supported in the current version.

reserved[4]

Reserved and not supported by the current version.