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

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

?? sstfb.c

?? linux下的VIDEO接口驅動程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * linux/drivers/video/sstfb.c -- voodoo graphics frame buffer * *     Copyright (c) 2000-2002 Ghozlane Toumi <gtoumi@laposte.net> * *     Created 15 Jan 2000 by Ghozlane Toumi * * Contributions (and many thanks) : * * 03/2001 James Simmons   <jsimmons@linux-fbdev.org> * 04/2001 Paul Mundt      <lethal@chaoticdreams.org> * 05/2001 Urs Ganse       <ursg@uni.de> *     (initial work on voodoo2 port, interlace) * * * $Id: sstfb.c,v 1.26.4.1 2001/08/29 01:30:37 ghoz Exp $ *//* * The voodoo1 has the following memory mapped adress space: * 0x000000 - 0x3fffff : registers              (4Mb) * 0x400000 - 0x7fffff : linear frame buffer    (4Mb) * 0x800000 - 0xffffff : texture memory         (8Mb) *//* * misc notes, TODOs, toASKs, and deep thoughts-TODO: at one time or another test that the mode is acceptable by the monitor-ASK: I can choose different ordering for the color bitfields (rgba argb ...)      wich one should i use ? is there any preferred one ? It seems ARGB is      the one ...-ASK: later: how to cope with endianness ? the fbi chip has builtin functions      to do byte swizling /swapping, maybe use that ...-TODO: check the error paths . if something get wrong, the error doesn't seem      to be very well handled...if handled at all.. not good.-TODO: in  set_var check the validity of timings (hsync vsync)...-TODO: check and recheck the use of sst_wait_idle : we dont flush the fifo via       a nop command . so it's ok as long as the commands we pass don't go       through the fifo. warning: issuing a nop command seems to need pci_fifo-FIXME: in case of failure in the init sequence, be sure we return to a safe        state.-FIXME: 4MB boards have banked memory (FbiInit2 bits 1 & 20)-ASK: I stole "inverse" but seems it doesn't work... check what it realy does...-TODO: change struct sst_info fb_info from static to array/dynamic * *//* * debug info * SST_DEBUG : enable debugging * SST_DEBUG_REG : debug registers *   0 :  no debug *   1 : dac calls, [un]set_bits, FbiInit *   2 : insane debug level (log every register read/write) * SST_DEBUG_FUNC : functions *   0 : no debug *   1 : function call / debug ioctl *   2 : variables *   3 : flood . you don't want to do that. trust me. * SST_DEBUG_VAR : debug display/var structs *   0 : no debug *   1 : dumps display, fb_var * SST_DEBUG_IOCTL : enable sstfb specific ioctls *   0 : disable *   1 : enable debug ioctls : *   		toggle vga (0x46db) : toggle vga_pass_through *   		fill fb    (0x46dc) : fills fb *   		dump var   (0x46dd) : logs display[0-5].var *   		test disp  (0x46de) : draws a test motif *//* #define SST_DEBUG */#undef SST_DEBUG#define SST_DEBUG_REG   0#define SST_DEBUG_FUNC  0#define SST_DEBUG_VAR   0#define SST_DEBUG_IOCTL 1/* #define EN_24_32_BPP  *//* enable 24/32 bpp functions for testing only */#undef EN_24_32_BPP/*  Default video mode .  0 800x600@60  took from glide  1 640x480@75  took from glide  2 1024x768@76 std fb.mode  3 640x480@60  glide default */#define DEFAULT_MODE 1/* * Includes */#include <linux/string.h>#include <linux/config.h>#include <linux/kernel.h>#include <linux/module.h>#include <linux/tty.h>#include <linux/fb.h>#include <linux/pci.h>#include <linux/delay.h>#include <linux/init.h>#include <linux/version.h>#include <linux/slab.h>#include <asm/io.h>#include <asm/ioctl.h>#include <video/fbcon.h>#include <video/fbcon-cfb16.h>#ifdef  EN_24_32_BPP#  include <video/fbcon-cfb24.h>#  include <video/fbcon-cfb32.h>#endif#include "sstfb.h"/* void __Dump_regs(struct sstfb_info *);#define Dump_regs __Dump_regs(sst_info) *//********//* initialized by setup */static int inverse; /* =0 */	/* invert colormap */static int vgapass; /* =0 */	/* enable Vga passthrough cable */static int mem;     /* =0 */	/* mem size in Mb , 0 = autodetect */static int clipping = 1;	/* use clipping (slower, safer) */static int gfxclk;  /* =0 */	/* force FBI freq in Mhz . Dangerous */static int slowpci; /* =0 */	/* slow PCI settings */static int dev = -2;		/* specify device (0..n) -2=all -1=none*/static char * mode_option ;/********/int sstfb_init(void);int sstfb_setup(char *options);static int __devinit sstfb_probe(struct pci_dev *pdev, const struct pci_device_id *id);static void __devexit sstfb_remove(struct pci_dev *pdev);/* Framebuffer API */static int sstfb_open(struct fb_info *info, int user);static int sstfb_release(struct fb_info *info, int user);static int sstfb_get_fix(struct fb_fix_screeninfo *fix,                         int con, struct fb_info *info);static int sstfb_get_var(struct fb_var_screeninfo *var,                         int con, struct fb_info *info);static int sstfb_set_var(struct fb_var_screeninfo *var,                         int con, struct fb_info *info);static int sstfb_get_cmap(struct fb_cmap *cmap, int kspc,                          int con, struct fb_info *info);static int sstfb_set_cmap(struct fb_cmap *cmap, int kspc,                          int con, struct fb_info *info);static int sstfb_pan_display(struct fb_var_screeninfo *var,                             int con, struct fb_info *info);static int sstfb_ioctl(struct inode *inode, struct file *file,                       u_int cmd, u_long arg, int con,                       struct fb_info *info);/* Interface to the low level console driver */static int sstfbcon_switch(int con, struct fb_info *info);static int sstfbcon_updatevar(int con, struct fb_info *info);static void sstfbcon_blank(int blank, struct fb_info *info);/* Internal routines */static void sstfb_install_cmap(int con, struct fb_info *info);static int sstfb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,                           u_int *transp, struct fb_info *info);static int sstfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,                           u_int transp, struct fb_info *info);static int sstfb_set_par(const struct sstfb_par *par,                          struct sstfb_info *sst_info);static int sstfb_decode_var (const struct fb_var_screeninfo *var,                             struct sstfb_par *par,                             const struct sstfb_info *sst_info);static int sstfb_encode_var (struct fb_var_screeninfo *var,                             const struct sstfb_par *par,                             const struct sstfb_info *sst_info);static void sstfb_test16(struct sstfb_info *sst_info);#ifdef EN_24_32_BPPstatic void sstfb_test32(struct sstfb_info *sst_info);#endif/* Low level routines */static int sst_get_memsize(struct sstfb_info *sst_info, u_long *memsize);static int __sst_wait_idle(u_long vbase);#define sst_wait_idle()	 __sst_wait_idle(sst_info->mmio.vbase)static int sst_detect_dactype(struct sstfb_info *sst_info);static int sst_detect_att(struct sstfb_info *sst_info);static int sst_detect_ti(struct sstfb_info *sst_info);static int sst_detect_ics(struct sstfb_info *sst_info);static int sst_calc_pll(const int freq, int *freq_out, struct pll_timing *t);static int sst_set_pll_att_ti(struct sstfb_info *sst_info, const struct pll_timing *t, const int clock);static int sst_set_pll_ics(struct sstfb_info *sst_info, const struct pll_timing *t, const int clock);static void sst_set_vidmod_att_ti(struct sstfb_info *sst_info, const int bpp);static void sst_set_vidmod_ics(struct sstfb_info *sst_info, const int bpp);static int sst_init(struct sstfb_info *sst_info);static void sst_shutdown(struct sstfb_info *sst_info);static struct fb_ops sstfb_ops = {	owner : THIS_MODULE,	fb_open:	sstfb_open,	fb_release:	sstfb_release,	fb_get_fix:	sstfb_get_fix,	fb_get_var:	sstfb_get_var,	fb_set_var:	sstfb_set_var,	fb_get_cmap:	sstfb_get_cmap,	fb_set_cmap:	sstfb_set_cmap,	fb_pan_display:	sstfb_pan_display,	fb_ioctl:	sstfb_ioctl,};enum {	ID_VOODOO1 = 0,	ID_VOODOO2 = 1,};#define IS_VOODOO2(info) ((info)->type == ID_VOODOO2 )static struct sst_spec voodoo_spec[] __devinitdata = {	{ name : "Voodoo Graphics",	default_gfx_clock : 50000,	max_gfxclk : 60, },	{ name : "Voodoo2",	default_gfx_clock : 75000,	max_gfxclk : 85, },};static struct pci_device_id sstfb_id_tbl[] __devinitdata = {	{ PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO,	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_VOODOO1 },	{ PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO2,	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, ID_VOODOO2 },	{ 0 },};static struct pci_driver sstfb_driver = {	name:		"sstfb",	id_table:	sstfb_id_tbl,	probe:          sstfb_probe,	remove:		__devexit_p(sstfb_remove),};static struct fb_var_screeninfo	sstfb_default =#if ( DEFAULT_MODE == 0 )    { /* 800x600@60, 16 bpp .borowed from glide/sst1/include/sst1init.h */    800, 600, 800, 600, 0, 0, 16, 0,    {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},    0, 0, -1, -1, 0,    25000, 86, 41, 23, 1, 127, 4,    0, FB_VMODE_NONINTERLACED };#endif#if ( DEFAULT_MODE == 1 )    {/* 640x480@75, 16 bpp .borowed from glide/sst1/include/sst1init.h */    640, 480, 640, 480, 0, 0, 16, 0,    {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},    0, 0, -1, -1, 0,    31746, 118, 17, 16, 1, 63, 3,    0, FB_VMODE_NONINTERLACED };#endif#if ( DEFAULT_MODE == 2 )    { /* 1024x768@76 took from my /etc/fb.modes */    1024, 768, 1024, 768,0, 0, 16,0,    {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},    0, 0, -1, -1, 0,    11764, 208, 8, 36, 16, 120, 3 ,    0, FB_VMODE_NONINTERLACED };#endif#if ( DEFAULT_MODE == 3 )    { /* 640x480@60 , 16bpp glide default ?*/    640, 480, 640, 480, 0, 0, 16, 0,    {11, 5, 0}, {5, 6, 0}, {0, 5, 0}, {0, 0, 0},    0, 0, -1, -1, 0,    39721 ,  38, 26 ,  25 ,18  , 96 ,2,    0, FB_VMODE_NONINTERLACED };#endifstatic struct dac_switch dacs[] __devinitdata = {	{	name:		"TI TVP3409",		detect:		sst_detect_ti,		set_pll:	sst_set_pll_att_ti,		set_vidmod:	sst_set_vidmod_att_ti },	{	name:		"AT&T ATT20C409",		detect:		sst_detect_att,		set_pll:	sst_set_pll_att_ti,		set_vidmod:	sst_set_vidmod_att_ti },	{	name:		"ICS ICS5342",		detect:		sst_detect_ics,		set_pll:	sst_set_pll_ics,		set_vidmod:	sst_set_vidmod_ics },};/* * *  Definitions * */#if (SST_DEBUG_VAR > 0)/* debug info / dump a fb_var_screeninfo */static void sst_dbg_print_var(struct fb_var_screeninfo *var) {	dprintk(" {%d, %d, %d, %d, %d, %d, %d, %d,\n",	        var->xres, var->yres, var->xres_virtual, var->yres_virtual,	        var->xoffset, var->yoffset,	        var->bits_per_pixel, var->grayscale);	dprintk(" {%d, %d, %d}, {%d, %d, %d}, {%d, %d, %d}, {%d, %d, %d},\n",	        var->red.offset, var->red.length, var->red.msb_right,	        var->green.offset, var->green.length, var->green.msb_right,	        var->blue.offset, var->blue.length, var->blue.msb_right,	        var->transp.offset, var->transp.length,	        var->transp.msb_right);	dprintk(" %d, %d, %d, %d, %d,\n",	        var->nonstd, var->activate,	        var->height, var->width, var->accel_flags);	dprintk(" %d, %d, %d, %d, %d, %d, %d,\n",	        var->pixclock, var->left_margin, var->right_margin,	        var->upper_margin, var->lower_margin,	        var->hsync_len, var->vsync_len);	dprintk(" %#x, %#x}\n",var->sync, var->vmode);}#endif /* (SST_DEBUG_VAR > 0) */#if (SST_DEBUG_REG > 0)static void sst_dbg_print_read_reg (u32 reg, u32 val) {	char * regname =NULL;	switch (reg) {	case FBIINIT0: regname="FbiInit0"; break;	case FBIINIT1: regname="FbiInit1"; break;	case FBIINIT2: regname="FbiInit2"; break;	case FBIINIT3: regname="FbiInit3"; break;	case FBIINIT4: regname="FbiInit4"; break;	case FBIINIT5: regname="FbiInit5"; break;	case FBIINIT6: regname="FbiInit6"; break;	}	if (regname == NULL)		r_ddprintk("sst_read(%#x): %#x\n", reg, val);	else		r_dprintk(" sst_read(%s): %#x\n", regname, val);}static void sst_dbg_print_write_reg (u32 reg, u32 val) {	char * regname = NULL;	switch (reg) {	case FBIINIT0: regname="FbiInit0"; break;	case FBIINIT1: regname="FbiInit1"; break;	case FBIINIT2: regname="FbiInit2"; break;	case FBIINIT3: regname="FbiInit3"; break;	case FBIINIT4: regname="FbiInit4"; break;	case FBIINIT5: regname="FbiInit5"; break;	case FBIINIT6: regname="FbiInit6"; break;	}	if (regname == NULL)		r_ddprintk("sst_write(%#x, %#x)\n", reg, val);	else		r_dprintk(" sst_write(%s, %#x)\n", regname, val);}#else /*  (SST_DEBUG_REG > 0) */#  define sst_dbg_print_read_reg(reg, val)	do {}while(0)#  define sst_dbg_print_write_reg(reg, val)	do {}while(0)#endif /*  (SST_DEBUG_REG > 0) *//* register access */#define sst_read(reg)		__sst_read(sst_info->mmio.vbase, reg)#define sst_write(reg,val)	__sst_write(sst_info->mmio.vbase, reg, val)#define sst_set_bits(reg,val)	__sst_set_bits(sst_info->mmio.vbase, reg, val)#define sst_unset_bits(reg,val)	__sst_unset_bits(sst_info->mmio.vbase, reg, val)#define sst_dac_read(reg)	__sst_dac_read(sst_info->mmio.vbase, reg)#define sst_dac_write(reg,val)	__sst_dac_write(sst_info->mmio.vbase, reg, val)#define dac_i_read(reg)		__dac_i_read(sst_info->mmio.vbase, reg)#define dac_i_write(reg,val)	__dac_i_write(sst_info->mmio.vbase, reg, val)static inline u32 __sst_read(u_long vbase, u32 reg){	u32 ret;	ret = readl(vbase + reg);	sst_dbg_print_read_reg(reg, ret);	return ret;}static inline void __sst_write(u_long vbase, u32 reg, u32 val){	sst_dbg_print_write_reg(reg, val);	writel(val, vbase + reg);}static inline void __sst_set_bits(u_long vbase, u32 reg, u32 val){	r_dprintk("sst_set_bits(%#x, %#x)\n", reg, val);	__sst_write(vbase, reg, __sst_read(vbase, reg) | val);}static inline void __sst_unset_bits(u_long vbase, u32 reg, u32 val){	r_dprintk("sst_unset_bits(%#x, %#x)\n", reg, val);	__sst_write(vbase, reg, __sst_read(vbase, reg) & ~val);}/* dac access *//* dac_read should be remaped to FbiInit2 (via the pci reg init_enable) */static u8 __sst_dac_read(u_long vbase, u8 reg){	u8 ret;#ifdef SST_DEBUG	if ((reg & 0x07) != reg) {		dprintk("bug line %d: register adress '%d' is too high\n",		         __LINE__,reg);	}#endif	reg &= 0x07;	__sst_write(vbase, DAC_DATA, ((u32)reg << 8) | DAC_READ_CMD );	__sst_wait_idle(vbase);	/*udelay(10);*/	ret=(__sst_read(vbase, DAC_READ) & 0xff);	r_dprintk("sst_dac_read(%#x): %#x\n", reg, ret);	return (u8)ret;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区在线观看视频| a亚洲天堂av| 国产精品一区二区不卡| 成人一级片网址| 欧美在线一区二区| 日韩手机在线导航| 亚洲人成精品久久久久久| 亚洲激情综合网| 国产伦精品一区二区三区免费迷| 成人一区二区视频| 欧美人妇做爰xxxⅹ性高电影| 日韩欧美激情四射| 国产精品家庭影院| 五月天国产精品| 成人美女视频在线看| 538prom精品视频线放| 欧美国产激情二区三区 | 亚洲国产精品久久久久婷婷884| 亚洲大片精品永久免费| 国产精品1区2区3区在线观看| 国产精品99久久久久久久女警 | 久久亚洲精精品中文字幕早川悠里| 日韩你懂的在线观看| 亚洲欧美偷拍另类a∨色屁股| 婷婷综合久久一区二区三区| 国产成人自拍网| 8x8x8国产精品| 又紧又大又爽精品一区二区| 国产精品一区二区久久精品爱涩| 在线91免费看| 亚洲影院久久精品| youjizz国产精品| 欧美日韩亚洲另类| 亚洲丝袜精品丝袜在线| 国产白丝网站精品污在线入口| 欧美日产国产精品| 亚洲综合在线五月| 春色校园综合激情亚洲| 久久久www免费人成精品| 亚洲国产精品一区二区久久恐怖片 | bt7086福利一区国产| 久久这里只有精品6| 麻豆国产精品官网| 欧美日韩国产片| 亚洲最大成人综合| 在线亚洲免费视频| 亚洲欧美视频一区| 99久久99久久精品免费观看| 中文字幕高清不卡| 国产成人在线免费观看| 精品女同一区二区| 麻豆国产91在线播放| 精品免费99久久| 久久激情五月激情| 久久综合一区二区| 国产综合一区二区| 亚洲国产成人在线| 不卡电影一区二区三区| 欧美高清在线视频| 福利一区在线观看| 一区二区在线免费| 日韩欧美亚洲另类制服综合在线| 国产一区二区日韩精品| 亚洲视频图片小说| 91精品在线免费观看| 国产成人av电影在线| 亚洲精品视频在线观看免费| 欧美一区二区性放荡片| 国产99久久久精品| 日韩高清一级片| 国产欧美一二三区| 欧美日韩第一区日日骚| 国产成人在线看| 亚洲福中文字幕伊人影院| 久久欧美一区二区| 欧美三片在线视频观看| 国产自产视频一区二区三区| 一区二区三区久久久| 久久亚洲精品小早川怜子| 欧美三级在线视频| 成人黄色网址在线观看| 日本aⅴ免费视频一区二区三区| 日本一区二区三区高清不卡| 欧美巨大另类极品videosbest| 国产精品18久久久| 奇米在线7777在线精品| 亚洲免费在线视频一区 二区| 欧美变态凌虐bdsm| 欧美视频一区二区三区四区| 高清成人免费视频| 久久精品国内一区二区三区| 亚洲午夜精品在线| 亚洲欧美一区二区三区极速播放| 日韩精品资源二区在线| 欧美撒尿777hd撒尿| 91美女在线观看| 国产成人亚洲精品狼色在线| 久色婷婷小香蕉久久| 午夜精品一区二区三区三上悠亚| 亚洲天堂成人在线观看| 国产精品天美传媒| 久久久99免费| 久久久久久一级片| 亚洲人成网站在线| 欧美日韩成人一区二区| 亚洲国产精品综合小说图片区| 欧美精品自拍偷拍动漫精品| 丁香激情综合国产| 欧美精品久久一区| 亚洲 欧美综合在线网络| 成人高清在线视频| 色综合天天在线| 国产一区在线不卡| 国产精品国产a| 欧美系列亚洲系列| 欧美高清hd18日本| 国产色一区二区| 中文字幕在线播放不卡一区| 欧美午夜精品久久久久久超碰| 日韩1区2区3区| 蜜臀av一区二区在线免费观看 | 亚洲丝袜自拍清纯另类| 色综合久久天天| 蜜桃一区二区三区四区| 国产精品护士白丝一区av| 在线中文字幕一区二区| 69堂亚洲精品首页| 精品国产3级a| 久久精品一区二区三区四区| 欧美一卡二卡三卡四卡| 美女一区二区三区在线观看| 国产精品久久午夜夜伦鲁鲁| 久久综合九色综合97婷婷| 国产亚洲综合在线| 欧美伊人久久久久久久久影院 | 成人综合在线观看| 无码av免费一区二区三区试看 | 亚洲精品va在线观看| 欧美大白屁股肥臀xxxxxx| 极品销魂美女一区二区三区| 亚洲福利视频一区| 久久成人综合网| www.一区二区| 91精品久久久久久久99蜜桃| 欧美日韩国产中文| 精品三级av在线| 亚洲国产日日夜夜| 亚洲精品写真福利| 国产在线不卡一卡二卡三卡四卡| 成人免费视频网站在线观看| 7777精品伊人久久久大香线蕉的 | 亚洲欧洲色图综合| 国产成人在线观看免费网站| 亚洲精品国产一区二区精华液 | 欧美日韩一本到| 日韩欧美国产一区二区在线播放| 欧美午夜精品免费| 欧美一区二区三区啪啪| 久久综合九色综合97婷婷女人| 综合激情成人伊人| 五月激情综合婷婷| 高潮精品一区videoshd| 欧美日韩久久久一区| 久久久久久久久久久久电影| 亚洲一二三四在线| 国产精品18久久久久久久久| 欧美性生活大片视频| 国产人伦精品一区二区| 日韩av成人高清| av一区二区久久| 久久久亚洲高清| 午夜电影久久久| 色婷婷综合久久久久中文 | 日韩一级大片在线| 亚洲视频中文字幕| 国产精品性做久久久久久| 欧美日韩中字一区| 亚洲三级久久久| 国产成都精品91一区二区三| 欧美一级专区免费大片| 亚洲自拍偷拍图区| 91蝌蚪porny| 国产精品天美传媒| 国产馆精品极品| 日韩精品一区二区三区中文不卡| 亚洲一区二区三区四区五区黄| 成人性视频网站| 国产亚洲欧美日韩在线一区| 久久精品国产999大香线蕉| 911精品国产一区二区在线| 亚洲欧美日韩电影| av电影天堂一区二区在线| 欧美精品一区二区三区蜜桃| 蜜臀av在线播放一区二区三区| 欧美精三区欧美精三区| 亚洲成人一区二区| 欧美群妇大交群的观看方式| 亚洲国产精品人人做人人爽| 91久久精品一区二区三| 亚洲乱码精品一二三四区日韩在线|