免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 735 | 回复: 0
打印 上一主题 下一主题

FrameBuffer的重要数据结构 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-09-01 09:46 |只看该作者 |倒序浏览
include/linux/fb.h中的一些重要的数据结构
struct fb_fix_screeninfo {
    char id[16];            /* identification string eg "TT Builtin" */
    unsigned long smem_start;    /* Start of frame buffer mem */
                    /* (physical address) */
    __u32 smem_len;            /* Length of frame buffer mem */
    __u32 type;            /* see FB_TYPE_*        */
    __u32 type_aux;            /* Interleave for interleaved Planes */
    __u32 visual;            /* see FB_VISUAL_*        */
    __u16 xpanstep;            /* zero if no hardware panning  */
    __u16 ypanstep;            /* zero if no hardware panning  */
    __u16 ywrapstep;        /* zero if no hardware ywrap    */
    __u32 line_length;        /* length of a line in bytes    */
    unsigned long mmio_start;    /* Start of Memory Mapped I/O   */
                    /* (physical address) */
    __u32 mmio_len;            /* Length of Memory Mapped I/O  */
    __u32 accel;            /* Type of acceleration available */
    __u16 reserved[3];        /* Reserved for future compatibility */
};
struct fb_bitfield {
    __u32 offset;            /* beginning of bitfield    */
    __u32 length;            /* length of bitfield        */
    __u32 msb_right;        /* != 0 : Most significant bit is */
                    /* right */
};
struct fb_info {
   char modename[40];            /* default video mode */
   kdev_t node;
   int flags;
   int open;                            /* Has this been open already ? */
#define FBINFO_FLAG_MODULE    1    /* Low-level driver is a module */
   struct fb_var_screeninfo var;        /* Current var */
   struct fb_fix_screeninfo fix;        /* Current fix */
   struct fb_monspecs monspecs;         /* Current Monitor specs */
   struct fb_cmap cmap;                 /* Current cmap */
   struct fb_ops *fbops;
   char *screen_base;                   /* Virtual address */
   struct display *disp;        /* initial display variable */
   struct vc_data *display_fg;        /* Console visible on this display */
   char fontname[40];            /* default font name */
   devfs_handle_t devfs_handle;         /* Devfs handle for new name         */
   devfs_handle_t devfs_lhandle;        /* Devfs handle for compat. symlink  */
   int (*changevar)(int);        /* tell console var has changed */
   int (*switch_con)(int, struct fb_info*);
                    /* tell fb to switch consoles */
   int (*updatevar)(int, struct fb_info*);
                    /* tell fb to update the vars */
   void (*blank)(int, struct fb_info*);    /* tell fb to (un)blank the screen */
                    /* arg = 0: unblank */
                    /* arg > 0: VESA level (arg-1) */
   void *pseudo_palette;                /* Fake palette of 16 colors and
                       the cursor's color for non
                                           palette mode */
   /* From here on everything is device dependent */
   void *par;   
};
struct fbgen_hwswitch {
    void (*detect)(void);
    int (*encode_fix)(struct fb_fix_screeninfo *fix, const void *par,
              struct fb_info_gen *info);
    int (*decode_var)(const struct fb_var_screeninfo *var, void *par,
              struct fb_info_gen *info);
    int (*encode_var)(struct fb_var_screeninfo *var, const void *par,
              struct fb_info_gen *info);
    void (*get_par)(void *par, struct fb_info_gen *info);
    void (*set_par)(const void *par, struct fb_info_gen *info);
    int (*getcolreg)(unsigned regno, unsigned *red, unsigned *green,
             unsigned *blue, unsigned *transp, struct fb_info *info);
    int (*setcolreg)(unsigned regno, unsigned red, unsigned green,
             unsigned blue, unsigned transp, struct fb_info *info);
    int (*pan_display)(const struct fb_var_screeninfo *var,
               struct fb_info_gen *info);
    int (*blank)(int blank_mode, struct fb_info_gen *info);
    void (*set_disp)(const void *par, struct display *disp,
             struct fb_info_gen *info);
};
struct fb_info_gen {
    struct fb_info info;
    /* Entries for a generic frame buffer device */
    /* Yes, this starts looking like C++ */
    u_int parsize;
    struct fbgen_hwswitch *fbhw;
   /* From here on everything is device dependent */
};


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/9128/showart_45537.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP