亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
在线观看欧美黄色| 久久久噜噜噜久久中文字幕色伊伊| 欧美一卡2卡三卡4卡5免费| 久久美女艺术照精彩视频福利播放| 亚洲欧美电影院| 精品一区二区影视| 欧美性videosxxxxx| 中文字幕成人网| 狠狠色丁香婷婷综合久久片| 欧美午夜影院一区| 国产精品久久久久一区二区三区共| 视频一区中文字幕国产| 9人人澡人人爽人人精品| 精品1区2区在线观看| 午夜在线电影亚洲一区| 色综合天天综合狠狠| 中文字幕电影一区| 久久精品免费看| 4438x成人网最大色成网站| 亚洲精品高清在线观看| 成人免费视频网站在线观看| 精品人伦一区二区色婷婷| 婷婷久久综合九色国产成人| 91国偷自产一区二区三区观看| 中文字幕成人av| 国产91对白在线观看九色| www久久久久| 极品瑜伽女神91| 欧美va亚洲va香蕉在线| 蜜臀av性久久久久蜜臀av麻豆| 欧美精品高清视频| 香蕉影视欧美成人| 9191国产精品| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美日韩免费观看一区二区三区 | 久久精品国内一区二区三区| 欧美午夜不卡在线观看免费| 亚洲一区二区三区四区在线| 欧美制服丝袜第一页| 一区二区三区欧美日韩| 在线观看日韩电影| 性做久久久久久免费观看| 欧美美女一区二区在线观看| 日本人妖一区二区| 欧美丰满少妇xxxxx高潮对白| 天天色综合成人网| 欧美日本一区二区三区| 日日骚欧美日韩| 欧美电影免费观看高清完整版在线| 精品一区二区三区欧美| 精品国产伦一区二区三区观看方式 | 欧美国产亚洲另类动漫| 国产精品一区在线观看乱码 | 免费观看在线色综合| 欧美精品高清视频| 蜜桃视频一区二区三区| 国产亚洲一区二区三区四区| 成人午夜电影小说| 亚洲午夜久久久久久久久电影院 | 免费不卡在线观看| 26uuu另类欧美| 99精品黄色片免费大全| 午夜精品久久久久久久蜜桃app| 日韩精品专区在线| av在线不卡网| 天天综合日日夜夜精品| 精品99久久久久久| 色成人在线视频| 秋霞午夜av一区二区三区| 久久精品男人的天堂| 色素色在线综合| 久久国产精品无码网站| 亚洲免费观看在线视频| 欧美电视剧在线观看完整版| 97精品超碰一区二区三区| 视频一区二区三区在线| 国产精品每日更新| 日韩一区二区三区电影在线观看| www.亚洲国产| 久久精品国产77777蜜臀| 亚洲三级在线免费观看| 精品国产乱码久久久久久闺蜜 | 日本一区二区免费在线观看视频 | 91精选在线观看| 成人97人人超碰人人99| 日韩av电影免费观看高清完整版在线观看| 久久久久9999亚洲精品| 欧美日韩国产影片| 99精品黄色片免费大全| 国产一二精品视频| 日韩福利视频导航| 一区二区三区视频在线看| 中文字幕精品一区二区三区精品| 欧美一级夜夜爽| 91久久线看在观草草青青| 成人一级视频在线观看| 精品一区二区免费在线观看| 午夜久久久久久电影| 亚洲三级视频在线观看| 国产人久久人人人人爽| 欧美精品一区二区三区高清aⅴ | 五月婷婷综合在线| 亚洲欧美日韩在线不卡| 天天综合天天综合色| 一区二区三区四区五区视频在线观看| 中文在线资源观看网站视频免费不卡 | 亚洲成人动漫av| 亚洲精品中文在线影院| 亚洲欧美怡红院| 国产亚洲成年网址在线观看| 欧美岛国在线观看| 91精品国产aⅴ一区二区| 555www色欧美视频| 欧美日韩一区不卡| 欧美日韩国产高清一区| 欧美日韩免费在线视频| 欧美卡1卡2卡| 欧美日韩电影一区| 欧美人体做爰大胆视频| 在线综合亚洲欧美在线视频| 欧美日韩精品欧美日韩精品| 欧美久久久久久久久久| 欧美绝品在线观看成人午夜影视| 欧美日韩中文字幕一区二区| 欧美高清精品3d| 这里只有精品99re| 欧美成人一区二区三区片免费| 欧美成人女星排名| 26uuu色噜噜精品一区| 日本一区二区三区视频视频| 国产精品久久久久久久久免费相片 | 欧美日韩精品一区二区天天拍小说| 欧美最猛性xxxxx直播| 欧美日韩亚洲综合在线| 91精品国产91热久久久做人人| 欧美电视剧在线看免费| 久久久www免费人成精品| 国产精品美女一区二区| 亚洲人被黑人高潮完整版| 一区二区三区国产精华| 天天操天天干天天综合网| 成人永久aaa| 91官网在线观看| 制服丝袜亚洲网站| 精品1区2区3区| 精品国产第一区二区三区观看体验| 久久久精品天堂| 国产精品久99| 亚洲超碰97人人做人人爱| 韩国女主播成人在线| bt7086福利一区国产| 欧美精选一区二区| 国产亚洲成aⅴ人片在线观看| 亚洲精品视频在线观看免费| 美国毛片一区二区| av网站一区二区三区| 欧美一区二区三区免费视频| 亚洲国产成人午夜在线一区| 午夜精品久久久久久久蜜桃app| 国产一区二区三区国产| 在线观看视频一区二区欧美日韩 | 在线观看亚洲成人| 久久久久久久网| 亚洲成人动漫精品| 国产精品综合一区二区| 欧美日韩国产美| 中文字幕欧美一区| 久久不见久久见免费视频1| 色美美综合视频| 26uuu欧美| 日韩在线一区二区三区| 9l国产精品久久久久麻豆| 欧美xxx久久| 午夜精品久久久久影视| 91农村精品一区二区在线| 久久久噜噜噜久噜久久综合| 天天色天天操综合| 91福利视频在线| 亚洲欧洲日韩女同| 国产乱码精品一区二区三区忘忧草 | 国产精品一区二区在线观看不卡| 欧美剧情电影在线观看完整版免费励志电影 | 国产精品丝袜91| 激情图区综合网| 日韩一区二区三| 午夜精品久久久久久久久久久 | 国产精品亚洲视频| 在线电影国产精品| 一区二区三区中文字幕| 99久久久精品免费观看国产蜜| 精品久久久久久无| 免费高清在线视频一区·| 欧美日韩aaa| 亚瑟在线精品视频| 欧美亚洲免费在线一区| 一区二区三区在线视频免费| 99国产精品视频免费观看| 国产精品久久久久影院老司| 成人高清免费在线播放| 亚洲欧洲精品一区二区三区不卡|