fb_var_screeninfo
说明
定义HIFB的可变屏幕信息,此为Linux FrameBuffer结构体。
定义
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 */
};
成员
G0、G1图层,下表中的Gx_min、Gy_min为32;G2、G3、G4图层,下表中的Gx_min、Gy_min为8。Gx_min表示当前图层支持的最小宽度,Gy_min表示当前图层支持的最小高度。
成员名称 |
描述 |
|---|---|
xres |
可见屏幕宽度(像素数),需要为偶数。 取值范围:[Gx_min, xres_virtual]。 |
yres |
可见屏幕高度(像素数),需要为偶数。 取值范围:[Gy_min, yres_virtual]。 |
xres_virtual |
虚拟屏幕宽度(显存中图像宽度)。 取值范围:大于或等于Gx_min。 |
yres_virtual |
虚拟屏幕高度(显存中图像高度)。 取值范围:大于或等于Gy_min。 |
xoffset |
在x方向上的偏移像素数。 取值范围:[0, xres_virtual - xres]。 |
yoffset |
在y方向上的偏移像素数。 取值范围:[0, yres_virtual - yres] |
bits_per_pixel |
每个像素所占的比特数。 取值范围:32/16/4/2 注:4和2分别对应CLUT4和CLUT2模式,需要使能CMAP功能。 |
red |
颜色分量中红色的位域信息。 |
green |
颜色分量中绿色的位域信息。 |
blue |
颜色分量中蓝色的位域信息。 |
transp |
颜色分量中alpha分量的位域信息。 |
grayscale |
颜色模式,当前版本不支持。 |
nonstd |
是否为标准像素格式,当前版本不支持。
|
activate |
设置生效的时刻,当前版本不支持。 |
height |
屏幕高,单位为mm,当前版本不支持。 |
width |
屏幕宽,单位为mm,当前版本不支持。 |
accel_flags |
加速标志,当前版本不支持。 |
pixclock |
显示一个点需要的时间,单位为ns,当前版本不支持。 |
left_margin |
左消隐信号,当前版本不支持。 |
right_margin |
右消隐信号,当前版本不支持。 |
upper_margin |
上消隐信号,当前版本不支持。 |
lower_margin |
下消隐信号,当前版本不支持。 |
hsync_len |
水平同步时长,当前版本不支持。 |
vsync_len |
垂直同步时长,当前版本不支持。 |
sync |
同步信号方式,当前版本不支持。 |
vmode |
扫描模式,当前版本不支持。 |
rotate |
顺时针旋转的角度,当前版本不支持。 |
colorspace |
FOURCC模式的色彩空间, 当前版本不支持。 |
reserved[4] |
预留参数,当前版本不支持。 |