youts or that do not * work with normal memory mapped access */ ssize_t (*fb_read)(struct fb_info *info, char __user *buf, size_t count, loff_t *ppos); ssize_t (*fb_write)(struct fb_info *info, const char __user *buf, size_t count, loff_t *ppos);
检测可变参数,并调整到支持的值 /* checks var and eventually tweaks it to something supported, * DO NOT MODIFY PAR */ int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info);
设置视频模式 /* set the video mode according to info->var */ int (*fb_set_par)(struct fb_info *info);
设置color寄存器的值 /* set color register */ int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info);
批量设置color寄存器,设置颜色表 /* set color registers in batch */ int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
显示空白 /* blank display */ int (*fb_blank)(int blank, struct fb_info *info);
pan显示 /* pan display */ int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info);
填充矩形 /* Draws a rectangle */ void (*fb_fillrect) (struct fb_info *info, const struct fb_fillrect *rect);
数据复制 /* Copy data from area to another */ void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region);
图形填充 /* Draws a image to the display */ void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image);
绘制光标 /* Draws cursor */ int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor);
旋转显示 /* Rotates the display */ void (*fb_rotate)(struct fb_info *info, int angle);
等待blit空闲 /* wait for blit idle, optional */ int (*fb_sync)(struct fb_info *info);
fb特定的ioctl操作 /* perform fb specific ioctl (optional) */ int (*fb_ioctl)(struct fb_info *info, unsigned int cmd, unsigned long arg);
处理32兼容的ioctl操作 /* Handle 32bit compat ioctl (optional) */ int (*fb_compat_ioctl)(struct fb_info *info, unsigned cmd, unsigned long arg);
fb特定的mmap操作 /* perform fb specific mmap */ int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);
保存目前的硬件状态 /* save current hardware state */ void (*fb_save_state)(struct fb_info *info);
恢复被保存的硬件状态 /* restore saved state */ void (*fb_restore_state)(struct fb_info *info);
通过fb_info获得framebuffer的能力 /* get capability given var */ void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps, struct fb_var_screeninfo *var); };
(3)、
fb_fix_screeninfo结构体中,记录了用户不能修改的固定显示控制器参数。这些固定的参数如缓冲区的物理地址、缓冲区的长度等等。 struct fb_fix_screeninfo { char id[16]; /* identification string eg "TT Builtin" */
字符串形式的标识符 unsigned long smem_start;/* Start of frame buffer mem */
/* (physical address) */
fb缓存的开始位置 __u32 smem_len;/* Length of frame buffer mem */
fb缓存的长度 __u32 type; /* see FB_TYPE_* */
FB_TYPE_*类型 __u32 type_aux;/* Interleave for interleaved Planes */
分界 __u32 visual; /* see FB_VISUAL_* */
屏幕使用的色彩模式 __u16 xpanstep;/* zero if no hardware panning */
如果没有硬件panning ,赋0 __u16 ypanstep;/* zero if no hardware panning */
__u16 ywrapstep;/* zero if no hardware ywrap */
1行的字节数 __u32 line_length;/* length of a line in bytes */
内存映射I/O的开始位置 unsigned long mmio_start;/* Start of Memory Mapped I/O */ /* (physical address) */
内存映射I/O的长度 __u32 mmio_len;/* Length of Memory Mapped I/O */ __u32 accel; /* Indicate to driver which */ /* specific chip/card we have*/ __u16 reserved[3];/* Reserved for future compatibility */ };
(4)、
fb_var_sc |