⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fb.h

📁 Axis 221 camera embedded programing interface
💻 H
📖 第 1 页 / 共 3 页
字号:
};struct fb_tilecursor {	__u32 sx;                   /* cursor position in the x-axis */	__u32 sy;                   /* cursor position in the y-axis */	__u32 mode;                 /* 0 = erase, 1 = draw */	__u32 shape;                /* see FB_TILE_CURSOR_* */	__u32 fg;                   /* foreground color */	__u32 bg;                   /* background color */};struct fb_tile_ops {	/* set tile characteristics */	void (*fb_settile)(struct fb_info *info, struct fb_tilemap *map);	/* all dimensions from hereon are in terms of tiles */	/* move a rectangular region of tiles from one area to another*/	void (*fb_tilecopy)(struct fb_info *info, struct fb_tilearea *area);	/* fill a rectangular region with a tile */	void (*fb_tilefill)(struct fb_info *info, struct fb_tilerect *rect);	/* copy an array of tiles */	void (*fb_tileblit)(struct fb_info *info, struct fb_tileblit *blit);	/* cursor */	void (*fb_tilecursor)(struct fb_info *info,			      struct fb_tilecursor *cursor);};#endif /* CONFIG_FB_TILEBLITTING *//* FBINFO_* = fb_info.flags bit flags */#define FBINFO_MODULE		0x0001	/* Low-level driver is a module */#define FBINFO_HWACCEL_DISABLED	0x0002	/* When FBINFO_HWACCEL_DISABLED is set:	 *  Hardware acceleration is turned off.  Software implementations	 *  of required functions (copyarea(), fillrect(), and imageblit())	 *  takes over; acceleration engine should be in a quiescent state *//* hints */#define FBINFO_PARTIAL_PAN_OK	0x0040 /* otw use pan only for double-buffering */#define FBINFO_READS_FAST	0x0080 /* soft-copy faster than rendering *//* hardware supported ops *//*  semantics: when a bit is set, it indicates that the operation is *   accelerated by hardware. *  required functions will still work even if the bit is not set. *  optional functions may not even exist if the flag bit is not set. */#define FBINFO_HWACCEL_NONE		0x0000#define FBINFO_HWACCEL_COPYAREA		0x0100 /* required */#define FBINFO_HWACCEL_FILLRECT		0x0200 /* required */#define FBINFO_HWACCEL_IMAGEBLIT	0x0400 /* required */#define FBINFO_HWACCEL_ROTATE		0x0800 /* optional */#define FBINFO_HWACCEL_XPAN		0x1000 /* optional */#define FBINFO_HWACCEL_YPAN		0x2000 /* optional */#define FBINFO_HWACCEL_YWRAP		0x4000 /* optional */#define FBINFO_MISC_USEREVENT          0x10000 /* event request						  from userspace */#define FBINFO_MISC_TILEBLITTING       0x20000 /* use tile blitting *//* A driver may set this flag to indicate that it does want a set_par to be * called every time when fbcon_switch is executed. The advantage is that with * this flag set you can really be sure that set_par is always called before * any of the functions dependant on the correct hardware state or altering * that state, even if you are using some broken X releases. The disadvantage * is that it introduces unwanted delays to every console switch if set_par * is slow. It is a good idea to try this flag in the drivers initialization * code whenever there is a bug report related to switching between X and the * framebuffer console. */#define FBINFO_MISC_ALWAYS_SETPAR   0x40000struct fb_info {	int node;	int flags;	struct fb_var_screeninfo var;	/* Current var */	struct fb_fix_screeninfo fix;	/* Current fix */	struct fb_monspecs monspecs;	/* Current Monitor specs */	struct work_struct queue;	/* Framebuffer event queue */	struct fb_pixmap pixmap;	/* Image hardware mapper */	struct fb_pixmap sprite;	/* Cursor hardware mapper */	struct fb_cmap cmap;		/* Current cmap */	struct list_head modelist;      /* mode list */	struct fb_videomode *mode;	/* current mode */#ifdef CONFIG_FB_BACKLIGHT	/* Lock ordering:	 * bl_mutex (protects bl_dev and bl_curve)	 *   bl_dev->sem (backlight class)	 */	struct mutex bl_mutex;	/* assigned backlight device */	struct backlight_device *bl_dev;	/* Backlight level curve */	u8 bl_curve[FB_BACKLIGHT_LEVELS];#endif	struct fb_ops *fbops;	struct device *device;		/* This is the parent */	struct device *dev;		/* This is this fb device */	int class_flag;                    /* private sysfs flags */#ifdef CONFIG_FB_TILEBLITTING	struct fb_tile_ops *tileops;    /* Tile Blitting */#endif	char __iomem *screen_base;	/* Virtual address */	unsigned long screen_size;	/* Amount of ioremapped VRAM or 0 */ 	void *pseudo_palette;		/* Fake palette of 16 colors */ #define FBINFO_STATE_RUNNING	0#define FBINFO_STATE_SUSPENDED	1	u32 state;			/* Hardware state i.e suspend */	void *fbcon_par;                /* fbcon use-only private area */	/* From here on everything is device dependent */	void *par;	};#ifdef MODULE#define FBINFO_DEFAULT	FBINFO_MODULE#else#define FBINFO_DEFAULT	0#endif// This will go away#define FBINFO_FLAG_MODULE	FBINFO_MODULE#define FBINFO_FLAG_DEFAULT	FBINFO_DEFAULT/* This will go away * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags * when it wants to turn the acceleration engine on.  This is * really a separate operation, and should be modified via sysfs. *  But for now, we leave it broken with the following define */#define STUPID_ACCELF_TEXT_SHIT// This will go away#if defined(__sparc__)/* We map all of our framebuffers such that big-endian accesses * are what we want, so the following is sufficient. */// This will go away#define fb_readb sbus_readb#define fb_readw sbus_readw#define fb_readl sbus_readl#define fb_readq sbus_readq#define fb_writeb sbus_writeb#define fb_writew sbus_writew#define fb_writel sbus_writel#define fb_writeq sbus_writeq#define fb_memset sbus_memset_io#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__)#define fb_readb __raw_readb#define fb_readw __raw_readw#define fb_readl __raw_readl#define fb_readq __raw_readq#define fb_writeb __raw_writeb#define fb_writew __raw_writew#define fb_writel __raw_writel#define fb_writeq __raw_writeq#define fb_memset memset_io#else#define fb_readb(addr) (*(volatile u8 *) (addr))#define fb_readw(addr) (*(volatile u16 *) (addr))#define fb_readl(addr) (*(volatile u32 *) (addr))#define fb_readq(addr) (*(volatile u64 *) (addr))#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b))#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b))#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b))#define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b))#define fb_memset memset#endif#if defined (__BIG_ENDIAN)#define FB_LEFT_POS(bpp)          (32 - bpp)#define FB_SHIFT_HIGH(val, bits)  ((val) >> (bits))#define FB_SHIFT_LOW(val, bits)   ((val) << (bits))#else#define FB_LEFT_POS(bpp)          (0)#define FB_SHIFT_HIGH(val, bits)  ((val) << (bits))#define FB_SHIFT_LOW(val, bits)   ((val) >> (bits))#endif    /*     *  `Generic' versions of the frame buffer device operations     */extern int fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var); extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var); extern int fb_blank(struct fb_info *info, int blank);extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); extern void cfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image);/* drivers/video/fbmem.c */extern int register_framebuffer(struct fb_info *fb_info);extern int unregister_framebuffer(struct fb_info *fb_info);extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);extern int fb_show_logo(struct fb_info *fb_info, int rotate);extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size);extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx,				u32 height, u32 shift_high, u32 shift_low, u32 mod);extern void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height);extern void fb_set_suspend(struct fb_info *info, int state);extern int fb_get_color_depth(struct fb_var_screeninfo *var,			      struct fb_fix_screeninfo *fix);extern int fb_get_options(char *name, char **option);extern int fb_new_modelist(struct fb_info *info);extern struct fb_info *registered_fb[FB_MAX];extern int num_registered_fb;static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,					   u8 *src, u32 s_pitch, u32 height){	int i, j;	d_pitch -= s_pitch;	for (i = height; i--; ) {		/* s_pitch is a few bytes at the most, memcpy is suboptimal */		for (j = 0; j < s_pitch; j++)			*dst++ = *src++;		dst += d_pitch;	}}/* drivers/video/fbsysfs.c */extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);extern void framebuffer_release(struct fb_info *info);extern int fb_init_device(struct fb_info *fb_info);extern void fb_cleanup_device(struct fb_info *head);extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);/* drivers/video/fbmon.c */#define FB_MAXTIMINGS		0#define FB_VSYNCTIMINGS		1#define FB_HSYNCTIMINGS		2#define FB_DCLKTIMINGS		3#define FB_IGNOREMON		0x100#define FB_MODE_IS_UNKNOWN	0#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     32extern int fbmon_dpms(const struct fb_info *fb_info);extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,		       struct fb_info *info);extern int fb_validate_mode(const struct fb_var_screeninfo *var,			    struct fb_info *info);extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);extern const unsigned char *fb_firmware_edid(struct device *device);extern void fb_edid_to_monspecs(unsigned char *edid,				struct fb_monspecs *specs);extern void fb_destroy_modedb(struct fb_videomode *modedb);extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);/* drivers/video/modedb.c */#define VESA_MODEDB_SIZE 34extern void fb_var_to_videomode(struct fb_videomode *mode,				struct fb_var_screeninfo *var);extern void fb_videomode_to_var(struct fb_var_screeninfo *var,				struct fb_videomode *mode);extern int fb_mode_is_equal(struct fb_videomode *mode1,			    struct fb_videomode *mode2);extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head);extern void fb_delete_videomode(struct fb_videomode *mode,				struct list_head *head);extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var,					  struct list_head *head);extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var,					      struct list_head *head);extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode,						 struct list_head *head);extern void fb_destroy_modelist(struct list_head *head);extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num,				     struct list_head *head);extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs,						 struct list_head *head);/* drivers/video/fbcmap.c */extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);extern void fb_dealloc_cmap(struct fb_cmap *cmap);extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to);extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to);extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info);extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);extern const struct fb_cmap *fb_default_cmap(int len);extern void fb_invert_cmaps(void);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;};extern const struct fb_videomode vesa_modes[];struct fb_modelist {	struct list_head list;	struct fb_videomode mode;};extern int fb_find_mode(struct fb_var_screeninfo *var,			struct fb_info *info, const char *mode_option,			const struct fb_videomode *db,			unsigned int dbsize,			const struct fb_videomode *default_mode,			unsigned int default_bpp);#endif /* __KERNEL__ */#endif /* _LINUX_FB_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -