亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fbmem.c

?? 該程序是在linux arm下實現的基于framebuffer的LCD驅動
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* *  linux/drivers/video/fbmem.c * *  Copyright (C) 1994 Martin Schaller * *	2001 - Documented with DocBook *	- Brad Douglas <brad@neruo.com> * * This file is subject to the terms and conditions of the GNU General Public * License.  See the file COPYING in the main directory of this archive * for more details. */#include <linux/config.h>#include <linux/module.h>#include <linux/types.h>#include <linux/errno.h>#include <linux/sched.h>#include <linux/smp_lock.h>#include <linux/kernel.h>#include <linux/major.h>#include <linux/slab.h>#include <linux/mman.h>#include <linux/tty.h>#include <linux/console.h>#include <linux/init.h>#include <linux/proc_fs.h>#ifdef CONFIG_KMOD#include <linux/kmod.h>#endif#include <linux/devfs_fs_kernel.h>#if defined(__mc68000__) || defined(CONFIG_APUS)#include <asm/setup.h>#endif#include <asm/io.h>#include <asm/uaccess.h>#include <asm/page.h>#include <asm/pgtable.h>#include <linux/fb.h>#include <video/fbcon.h>    /*     *  Frame buffer device initialization and setup routines     */extern int acornfb_init(void);extern int acornfb_setup(char*);extern int amifb_init(void);extern int amifb_setup(char*);extern int atafb_init(void);extern int atafb_setup(char*);extern int macfb_init(void);extern int macfb_setup(char*);extern int cyberfb_init(void);extern int cyberfb_setup(char*);extern int pm2fb_init(void);extern int pm2fb_setup(char*);extern int pm3fb_init(void);extern int pm3fb_setup(char*);extern int cyber2000fb_init(void);extern int retz3fb_init(void);extern int retz3fb_setup(char*);extern int clgenfb_init(void);extern int clgenfb_setup(char*);extern int hitfb_init(void);extern int vfb_init(void);extern int vfb_setup(char*);extern int offb_init(void);extern int atyfb_init(void);extern int atyfb_setup(char*);extern int aty128fb_init(void);extern int aty128fb_setup(char*);extern int neofb_init(void);extern int neofb_setup(char*);extern int igafb_init(void);extern int igafb_setup(char*);extern int imsttfb_init(void);extern int imsttfb_setup(char*);extern int dnfb_init(void);extern int tgafb_init(void);extern int tgafb_setup(char*);extern int virgefb_init(void);extern int virgefb_setup(char*);extern int resolver_video_setup(char*);extern int s3triofb_init(void);extern int vesafb_init(void);extern int vesafb_setup(char*);extern int vga16fb_init(void);extern int vga16fb_setup(char*);extern int hgafb_init(void);extern int hgafb_setup(char*);extern int matroxfb_init(void);extern int matroxfb_setup(char*);extern int hpfb_init(void);extern int sbusfb_init(void);extern int sbusfb_setup(char*);extern int control_init(void);extern int control_setup(char*);extern int platinum_init(void);extern int platinum_setup(char*);extern int valkyriefb_init(void);extern int valkyriefb_setup(char*);extern int chips_init(void);extern int g364fb_init(void);extern int sa1100fb_init(void);extern int fm2fb_init(void);extern int fm2fb_setup(char*);extern int q40fb_init(void);extern int sun3fb_init(void);extern int sun3fb_setup(char *);extern int sgivwfb_init(void);extern int sgivwfb_setup(char*);extern int rivafb_init(void);extern int rivafb_setup(char*);extern int tdfxfb_init(void);extern int tdfxfb_setup(char*);extern int tridentfb_init(void);extern int tridentfb_setup(char*);extern int sisfb_init(void);extern int sisfb_setup(char*);extern int stifb_init(void);extern int stifb_setup(char*);extern int pmagbafb_init(void);extern int pmagbbfb_init(void);extern void maxinefb_init(void);extern int tx3912fb_init(void);extern int radeonfb_init(void);extern int radeonfb_setup(char*);extern int e1355fb_init(void);extern int e1355fb_setup(char*);extern int au1100fb_init(void);extern int au1100fb_setup(char*);extern int pvr2fb_init(void);extern int pvr2fb_setup(char*);extern int sstfb_init(void);extern int sstfb_setup(char*);/*
 * 配置各種顯示設備的數據結構
 */
static struct {	const char *name;	//設備名稱	int (*init)(void);	//指向設備初始化函數	int (*setup)(char*);//指向設備安裝函數} fb_drivers[] __initdata = {#ifdef CONFIG_FB_SBUS	/*	 * Sbusfb must be initialized _before_ other frame buffer devices that	 * use PCI probing	 */	{ "sbus", sbusfb_init, sbusfb_setup },#endif	/*	 * Chipset specific drivers that use resource management	 */#ifdef CONFIG_FB_RETINAZ3	{ "retz3", retz3fb_init, retz3fb_setup },#endif#ifdef CONFIG_FB_AMIGA	{ "amifb", amifb_init, amifb_setup },#endif#ifdef CONFIG_FB_CYBER	{ "cyber", cyberfb_init, cyberfb_setup },#endif#ifdef CONFIG_FB_CYBER2000	{ "cyber2000", cyber2000fb_init, NULL },#endif#ifdef CONFIG_FB_PM2	{ "pm2fb", pm2fb_init, pm2fb_setup },#endif#ifdef CONFIG_FB_PM3	{ "pm3fb", pm3fb_init, pm3fb_setup },#endif#ifdef CONFIG_FB_CLGEN	{ "clgen", clgenfb_init, clgenfb_setup },#endif#ifdef CONFIG_FB_ATY	{ "atyfb", atyfb_init, atyfb_setup },#endif#ifdef CONFIG_FB_MATROX	{ "matrox", matroxfb_init, matroxfb_setup },#endif#ifdef CONFIG_FB_ATY128	{ "aty128fb", aty128fb_init, aty128fb_setup },#endif#ifdef CONFIG_FB_NEOMAGIC	{ "neo", neofb_init, neofb_setup },#endif#ifdef CONFIG_FB_VIRGE	{ "virge", virgefb_init, virgefb_setup },#endif#ifdef CONFIG_FB_RIVA	{ "riva", rivafb_init, rivafb_setup },#endif#ifdef CONFIG_FB_RADEON	{ "radeon", radeonfb_init, radeonfb_setup },#endif#ifdef CONFIG_FB_CONTROL	{ "controlfb", control_init, control_setup },#endif#ifdef CONFIG_FB_PLATINUM	{ "platinumfb", platinum_init, platinum_setup },#endif#ifdef CONFIG_FB_VALKYRIE	{ "valkyriefb", valkyriefb_init, valkyriefb_setup },#endif#ifdef CONFIG_FB_CT65550	{ "chipsfb", chips_init, NULL },#endif#ifdef CONFIG_FB_IMSTT	{ "imsttfb", imsttfb_init, imsttfb_setup },#endif#ifdef CONFIG_FB_S3TRIO	{ "s3trio", s3triofb_init, NULL },#endif #ifdef CONFIG_FB_FM2	{ "fm2fb", fm2fb_init, fm2fb_setup },#endif #ifdef CONFIG_FB_SIS	{ "sisfb", sisfb_init, sisfb_setup },#endif#ifdef CONFIG_FB_TRIDENT	{ "trident", tridentfb_init, tridentfb_setup },#endif#ifdef CONFIG_FB_VOODOO1	{ "sst", sstfb_init, sstfb_setup },#endif	/*	 * Generic drivers that are used as fallbacks	 * 	 * These depend on resource management and must be initialized	 * _after_ all other frame buffer devices that use resource	 * management!	 */#ifdef CONFIG_FB_OF	{ "offb", offb_init, NULL },#endif#ifdef CONFIG_FB_VESA	{ "vesa", vesafb_init, vesafb_setup },#endif 	/*	 * Chipset specific drivers that don't use resource management (yet)	 */#ifdef CONFIG_FB_3DFX	{ "tdfx", tdfxfb_init, tdfxfb_setup },#endif#ifdef CONFIG_FB_SGIVW	{ "sgivw", sgivwfb_init, sgivwfb_setup },#endif#ifdef CONFIG_FB_ACORN	{ "acorn", acornfb_init, acornfb_setup },#endif#ifdef CONFIG_FB_ATARI	{ "atafb", atafb_init, atafb_setup },#endif#ifdef CONFIG_FB_MAC	{ "macfb", macfb_init, macfb_setup },#endif#ifdef CONFIG_FB_HGA	{ "hga", hgafb_init, hgafb_setup },#endif #ifdef CONFIG_FB_IGA	{ "igafb", igafb_init, igafb_setup },#endif#ifdef CONFIG_APOLLO	{ "apollo", dnfb_init, NULL },#endif#ifdef CONFIG_FB_Q40	{ "q40fb", q40fb_init, NULL },#endif#ifdef CONFIG_FB_TGA	{ "tga", tgafb_init, tgafb_setup },#endif#ifdef CONFIG_FB_HP300	{ "hpfb", hpfb_init, NULL },#endif #ifdef CONFIG_FB_G364	{ "g364", g364fb_init, NULL },#endif#ifdef CONFIG_FB_SA1100	{ "sa1100", sa1100fb_init, NULL },#endif#ifdef CONFIG_FB_SUN3	{ "sun3", sun3fb_init, sun3fb_setup },#endif#ifdef CONFIG_FB_HIT	{ "hitfb", hitfb_init, NULL },#endif#ifdef CONFIG_FB_TX3912	{ "tx3912", tx3912fb_init, NULL },#endif#ifdef CONFIG_FB_E1355	{ "e1355fb", e1355fb_init, e1355fb_setup },#endif#ifdef CONFIG_FB_PVR2	{ "pvr2", pvr2fb_init, pvr2fb_setup },#endif#ifdef CONFIG_FB_PMAG_BA	{ "pmagbafb", pmagbafb_init, NULL },#endif#ifdef CONFIG_FB_PMAGB_B	{ "pmagbbfb", pmagbbfb_init, NULL },#endif#ifdef CONFIG_FB_MAXINE	{ "maxinefb", maxinefb_init, NULL },#endif#ifdef CONFIG_FB_AU1100	{ "au1100fb", au1100fb_init, au1100fb_setup },#endif 	/*	 * Generic drivers that don't use resource management (yet)	 */#ifdef CONFIG_FB_VGA16	{ "vga16", vga16fb_init, vga16fb_setup },#endif #ifdef CONFIG_FB_STI	{ "stifb", stifb_init, stifb_setup },#endif#ifdef CONFIG_GSP_RESOLVER	/* Not a real frame buffer device... */	{ "resolver", NULL, resolver_video_setup },#endif#ifdef CONFIG_FB_VIRTUAL	/*	 * Vfb must be last to avoid that it becomes your primary display if	 * other display devices are present	 */	{ "vfb", vfb_init, vfb_setup },#endif};
/*
 * 定義表示設備數目的常量
 */#define NUM_FB_DRIVERS	(sizeof(fb_drivers)/sizeof(*fb_drivers))extern const char *global_mode_option;static initcall_t pref_init_funcs[FB_MAX];static int num_pref_init_funcs __initdata = 0;//registered_fb:指向已登記入內核的設備的fb_info結構的數組
struct fb_info *registered_fb[FB_MAX];int num_registered_fb;extern int fbcon_softback_size; static int first_fb_vc;static int last_fb_vc = MAX_NR_CONSOLES-1;static int fbcon_is_default = 1;#ifdef CONFIG_FB_OFstatic int ofonly __initdata = 0;#endif
/*
 * 
 */static int fbmem_read_proc(char *buf, char **start, off_t offset,			   int len, int *eof, void *private){	struct fb_info **fi;	int clen;	clen = 0;

	/*
	 * 將已登記的各個顯示設備的設備號及名稱寫到buf+clen的位置,
	 * 其中clen記錄了已登記的設備信息的字節數
	 */	for (fi = registered_fb; fi < &registered_fb[FB_MAX] && len < 4000; fi++)		if (*fi)			clen += sprintf(buf + clen, "%d %s\n",				        GET_FB_IDX((*fi)->node),				        (*fi)->modename);
	*start = buf + offset;	//FB中用于顯示信息的內存的起始地址
	if (clen > offset)		clen -= offset;	else		clen = 0;	return clen < len ? clen : len;}
/*
 * 將file指向的FB中、ppos位置開始的的count個字節讀入buf中
 */static ssize_tfb_read(struct file *file, char *buf, size_t count, loff_t *ppos){	unsigned long p = *ppos;
	// 獲取設備節點	struct inode *inode = file->f_dentry->d_inode;

	/* 以下語句用于指向可對FB進行底層操作的函數 */	int fbidx = GET_FB_IDX(inode->i_rdev);	struct fb_info *info = registered_fb[fbidx];	struct fb_ops *fb = info->fbops;
	struct fb_fix_screeninfo fix;	
	// 若未找到可對FB進行底層操作的函數或設備不可顯示,則出錯返回	if (! fb || ! info->disp)		return -ENODEV;
	// 用fix指向FB的不可修改信息	fb->fb_get_fix(&fix,PROC_CONSOLE(info), info);
	// 起始位置p不合法,返回
	if (p >= fix.smem_len)	    return 0;
	// 需要傳輸的字節數connt大于FB的容量,調整count值至FB的最大容量
	if (count >= fix.smem_len)	    count = fix.smem_len;

	// 從起始位置開始后的count字節超出FB的范圍,調整count值	if (count + p > fix.smem_len)		count = fix.smem_len - p;

	// count值合法,進行字節傳輸	if (count) {	    char *base_addr;	    base_addr = info->disp->screen_base;
	    count -= copy_to_user(buf, base_addr+p, count);
	    if (!count)	    	return -EFAULT;	    *ppos += count;	// 修改起始位置	}	return count;}
/*
 * 將buf中count個字節寫入到file指向的FB的ppos位置處
 */static ssize_tfb_write(struct file *file, const char *buf, size_t count, loff_t *ppos){	unsigned long p = *ppos;	struct inode *inode = file->f_dentry->d_inode;	int fbidx = GET_FB_IDX(inode->i_rdev);	struct fb_info *info = registered_fb[fbidx];	struct fb_ops *fb = info->fbops;
	struct fb_fix_screeninfo fix;	int err;	if (! fb || ! info->disp)		return -ENODEV;	fb->fb_get_fix(&fix, PROC_CONSOLE(info), info);
	if (p > fix.smem_len)	    return -ENOSPC;	if (count >= fix.smem_len)	    count = fix.smem_len;	err = 0;	if (count + p > fix.smem_len) {	    count = fix.smem_len - p;	    err = -ENOSPC;	}
	if (count) {	    char *base_addr;	    base_addr = info->disp->screen_base;	    count -= copy_from_user(base_addr+p, buf, count);	    *ppos += count;	    err = -EFAULT;	}	if (count)		return count;	return err;}
/*
 * 加載設備fbn,其中n從0到31
 */#ifdef CONFIG_KMODstatic void try_to_load(int fb){	char modname[16];	sprintf(modname, "fb%d", fb);	request_module(modname);}#endif /* CONFIG_KMOD */
/*
 * 
 */static int fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,	 unsigned long arg){	int fbidx = GET_FB_IDX(inode->i_rdev);	struct fb_info *info = registered_fb[fbidx];	struct fb_ops *fb = info->fbops;
	struct fb_cmap cmap;	struct fb_var_screeninfo var;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看一区二区精品视频| 在线电影一区二区三区| 一区二区三区精品久久久| 日韩成人免费电影| 国产欧美精品一区二区色综合朱莉| hitomi一区二区三区精品| 亚洲视频你懂的| 精品av综合导航| 91极品视觉盛宴| 国产精品一区二区久久精品爱涩 | 欧美mv日韩mv国产| 91在线精品秘密一区二区| 久久狠狠亚洲综合| 天堂av在线一区| 一区二区三区精品| 成人欧美一区二区三区小说 | 风间由美一区二区av101| 亚洲成a天堂v人片| 中文字幕中文乱码欧美一区二区| 日韩欧美在线1卡| 色老头久久综合| 国产一区二区三区免费看| 午夜视频在线观看一区二区三区| 亚洲日本在线看| 国产日韩欧美一区二区三区乱码| 日韩一区二区高清| 欧美日韩视频在线第一区| 99国内精品久久| 91日韩一区二区三区| 成人免费看的视频| 丁香六月久久综合狠狠色| k8久久久一区二区三区 | 亚洲欧美日韩国产一区二区三区| 国产日韩欧美一区二区三区综合| 国产精品伦理一区二区| 欧美精品一区二区三区高清aⅴ| 欧美在线影院一区二区| 在线免费观看成人短视频| 91色婷婷久久久久合中文| 99vv1com这只有精品| 成人黄色免费短视频| 成人性生交大片免费看中文 | 日韩成人免费电影| 一区二区三区在线免费播放 | 亚洲摸摸操操av| 中文字幕+乱码+中文字幕一区| 国产精品网站导航| 欧美一区中文字幕| 在线不卡免费av| 欧美成人video| 成人欧美一区二区三区视频网页| 亚洲精品视频在线看| 日韩电影免费一区| 国产suv精品一区二区6| 欧美视频完全免费看| 精品蜜桃在线看| 一区二区三区蜜桃网| 精品一区二区三区视频在线观看 | 亚洲激情中文1区| 日韩av在线播放中文字幕| 国内精品在线播放| 日本乱码高清不卡字幕| 久久综合一区二区| 亚洲一区二区免费视频| 国产成人av电影在线观看| 欧美专区在线观看一区| 久久先锋影音av| 亚洲成av人综合在线观看| 懂色av一区二区三区蜜臀| 欧美高清dvd| 国产精品素人视频| 奇米888四色在线精品| 99视频精品在线| 337p粉嫩大胆色噜噜噜噜亚洲 | 美女网站在线免费欧美精品| 99精品桃花视频在线观看| 日韩欧美一区在线观看| 一区二区三区中文免费| 成人av网站在线观看免费| 久久伊人蜜桃av一区二区| 五月天视频一区| 欧美撒尿777hd撒尿| 亚洲视频在线一区观看| 国产不卡视频在线观看| 欧美岛国在线观看| 日韩激情视频在线观看| 欧美视频中文字幕| 综合久久国产九一剧情麻豆| 国产一区二区免费看| 欧美一区二区三区公司| 亚洲天堂精品视频| 成人国产精品免费| 国产欧美一区二区精品忘忧草 | 国产福利91精品一区| 欧美不卡一二三| 久久精品国产99国产| 日韩欧美一区二区免费| 另类小说欧美激情| 日韩一区二区视频| 美女高潮久久久| 欧美一区二区三区公司| 麻豆国产精品视频| 久久婷婷国产综合国色天香| 国产伦精品一区二区三区在线观看 | 欧美在线观看禁18| 亚洲一区在线播放| 欧美日韩一本到| 无码av免费一区二区三区试看| 欧美男女性生活在线直播观看| 一区二区三区四区不卡在线| 在线免费观看视频一区| 日韩中文字幕区一区有砖一区| 91欧美一区二区| 一区二区欧美在线观看| 欧美日本精品一区二区三区| 日韩av成人高清| 国产视频亚洲色图| 99久久国产综合精品色伊 | 亚洲大片免费看| 久久久国际精品| 欧美色图激情小说| 五月天欧美精品| 久久毛片高清国产| 色拍拍在线精品视频8848| 久久精品国产精品青草| 中文字幕一区在线| 欧美日韩视频专区在线播放| 激情综合五月婷婷| 亚洲欧美另类久久久精品| 欧美日韩黄色一区二区| 国产一区二区剧情av在线| 亚洲欧洲中文日韩久久av乱码| 91免费观看在线| 一区二区三区欧美激情| 欧美日韩国产综合视频在线观看 | 国产亚洲成aⅴ人片在线观看| 91免费视频大全| 激情综合网av| 悠悠色在线精品| 久久婷婷综合激情| 欧美日韩在线观看一区二区| 久久成人免费网| 亚洲激情图片小说视频| 欧美精品免费视频| 99视频超级精品| 国产美女精品在线| 日本欧美加勒比视频| 亚洲同性同志一二三专区| 久久精品欧美日韩精品 | 国产精品丝袜91| 日韩一二在线观看| 欧美日韩中文字幕一区| 成人黄色一级视频| 激情综合网天天干| 日韩国产高清影视| 一区二区激情小说| 亚洲色欲色欲www| 国产午夜精品一区二区三区嫩草 | 中文字幕在线视频一区| 精品日韩一区二区三区| 在线观看91av| 欧美日韩在线观看一区二区| 99热精品一区二区| 福利一区二区在线| 国产伦精品一区二区三区免费迷 | 在线播放91灌醉迷j高跟美女| 岛国av在线一区| 国产成人夜色高潮福利影视| 精品综合久久久久久8888| 蜜臀久久99精品久久久画质超高清 | 中文字幕一区免费在线观看| 亚洲欧美在线另类| 亚洲综合图片区| 日韩在线观看一区二区| 国内成+人亚洲+欧美+综合在线| 精品系列免费在线观看| 不卡在线视频中文字幕| 在线观看免费一区| 欧美成人精精品一区二区频| 久久精品视频免费| 亚洲一区在线观看免费| 麻豆成人91精品二区三区| 成人自拍视频在线| 欧洲在线/亚洲| 精品福利视频一区二区三区| 中文字幕欧美一区| 日韩精品色哟哟| 国产成人av电影在线观看| 欧美色图片你懂的| 久久看人人爽人人| 艳妇臀荡乳欲伦亚洲一区| 国模套图日韩精品一区二区| 91啪在线观看| 久久夜色精品国产欧美乱极品| 亚洲欧美综合色| 激情图区综合网| 欧美日韩你懂得| 亚洲欧洲日产国码二区| 奇米色一区二区| 欧美在线一二三|