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

📄 sis_main.h

📁 底层驱动开发
💻 H
📖 第 1 页 / 共 3 页
字号:
	  0,	  { 0x00c, 0, 0, 0, 0 },	  { 'e'  , 0, 0, 0, 0 },	  0x1558, 0x0287,	  "Clevo", "L285/L287 (Version 1)", CUT_CLEVO1024, "CLEVO_L28X_1"	},	{ SIS_650, "", "",	  0,	  { 0x00c, 0, 0, 0, 0 },	  { 'y'  , 0, 0, 0, 0 },	  0x1558, 0x0287,	  "Clevo", "L285/L287 (Version 2)", CUT_CLEVO10242, "CLEVO_L28X_2"	},	{ SIS_650, "", "",	  0,	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1558, 0x0400,  /* possibly 401 and 402 as well; not panelsize specific (?) */	  "Clevo", "D400S/D410S/D400H/D410H", CUT_CLEVO1400, "CLEVO_D4X0"	},	{ SIS_650, "", "",	  0,	/* Shift LCD in LCD-via-CRT1 mode */	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1558, 0x2263,	  "Clevo", "D22ES/D27ES", CUT_UNIWILL1024, "CLEVO_D2X0ES"	},	{ SIS_650, "", "",	  0,	/* Shift LCD in LCD-via-CRT1 mode */	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1734, 0x101f,	  "Uniwill", "N243S9", CUT_UNIWILL1024, "UNIWILL_N243S9"	},	{ SIS_650, "", "",	  0,	/* Shift LCD in LCD-via-CRT1 mode */	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1584, 0x5103,	  "Uniwill", "N35BS1", CUT_UNIWILL10242, "UNIWILL_N35BS1"	},	{ SIS_650, "1.09.2c", "",  /* Other versions, too? */	  0,	/* Shift LCD in LCD-via-CRT1 mode */	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1019, 0x0f05,	  "ECS", "A928", CUT_UNIWILL1024, "ECS_A928"	},	{ SIS_740, "1.11.27a", "",	  0,	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1043, 0x1612,	  "Asus", "L3000D/L3500D", CUT_ASUSL3000D, "ASUS_L3X00"	},	{ SIS_650, "1.10.9k", "",	  0,	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1025, 0x0028,	  "Acer", "Aspire 1700", CUT_ACER1280, "ACER_ASPIRE1700"	},	{ SIS_650, "1.10.7w", "",	  0,	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x14c0, 0x0012,	  "Compal", "??? (V1)", CUT_COMPAL1400_1, "COMPAL_1400_1"	},	{ SIS_650, "1.10.7x", "",	  0,	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x14c0, 0x0012,	  "Compal", "??? (V2)", CUT_COMPAL1400_2, "COMPAL_1400_2"	},	{ SIS_650, "1.10.8o", "",	  0,	/* For EMI (unknown) */	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1043, 0x1612,	  "Asus", "A2H (V1)", CUT_ASUSA2H_1, "ASUS_A2H_1"	},	{ SIS_650, "1.10.8q", "",	  0,	/* For EMI */	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0x1043, 0x1612,	  "Asus", "A2H (V2)", CUT_ASUSA2H_2, "ASUS_A2H_2"	},	{ 4321, "", "",			/* never autodetected */	  0,	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0, 0,	  "Generic", "LVDS/Parallel 848x480", CUT_PANEL848, "PANEL848x480"	},	{ 4322, "", "",			/* never autodetected */	  0,	  { 0, 0, 0, 0, 0 },	  { 0, 0, 0, 0, 0 },	  0, 0,	  "Generic", "LVDS/Parallel 856x480", CUT_PANEL856, "PANEL856x480"	},	{ 0, "", "",	  0,	  { 0, 0, 0, 0 },	  { 0, 0, 0, 0 },	  0, 0,	  "", "", CUT_NONE, ""	}};/* ---------------------- Prototypes ------------------------- *//* Interface used by the world */#ifndef MODULESISINITSTATIC int sisfb_setup(char *options);#endif/* Interface to the low level console driver */SISINITSTATIC int sisfb_init(void);/* fbdev routines */static int	sisfb_get_fix(struct fb_fix_screeninfo *fix, int con,				struct fb_info *info);#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)static int	sisfb_get_fix(struct fb_fix_screeninfo *fix,				int con,				struct fb_info *info);static int	sisfb_get_var(struct fb_var_screeninfo *var,				int con,				struct fb_info *info);static int	sisfb_set_var(struct fb_var_screeninfo *var,				int con,				struct fb_info *info);static void	sisfb_crtc_to_var(struct sis_video_info *ivideo,				struct fb_var_screeninfo *var);static int	sisfb_get_cmap(struct fb_cmap *cmap,				int kspc,				int con,				struct fb_info *info);static int	sisfb_set_cmap(struct fb_cmap *cmap,				int kspc,				int con,				struct fb_info *info);static int	sisfb_update_var(int con,				struct fb_info *info);static int	sisfb_switch(int con,			     struct fb_info *info);static void	sisfb_blank(int blank,				struct fb_info *info);static void	sisfb_set_disp(int con,				struct fb_var_screeninfo *var,				struct fb_info *info);static int	sis_getcolreg(unsigned regno, unsigned *red, unsigned *green,				unsigned *blue, unsigned *transp,				struct fb_info *fb_info);static void	sisfb_do_install_cmap(int con,				struct fb_info *info);static int	sisfb_ioctl(struct inode *inode, struct file *file,				unsigned int cmd, unsigned long arg, int con,				struct fb_info *info);#endif#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)static int	sisfb_ioctl(struct inode *inode, struct file *file,				unsigned int cmd, unsigned long arg,				struct fb_info *info);static int	sisfb_set_par(struct fb_info *info);static int	sisfb_blank(int blank,				struct fb_info *info);extern void	fbcon_sis_fillrect(struct fb_info *info,				const struct fb_fillrect *rect);extern void	fbcon_sis_copyarea(struct fb_info *info,				const struct fb_copyarea *area);extern int	fbcon_sis_sync(struct fb_info *info);#endif/* Internal 2D accelerator functions */extern int	sisfb_initaccel(struct sis_video_info *ivideo);extern void	sisfb_syncaccel(struct sis_video_info *ivideo);/* Internal general routines */static void	sisfb_search_mode(char *name, BOOLEAN quiet);static int	sisfb_validate_mode(struct sis_video_info *ivideo, int modeindex, u32 vbflags);static u8	sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate,				int index);static int	sisfb_setcolreg(unsigned regno, unsigned red, unsigned green,				unsigned blue, unsigned transp,				struct fb_info *fb_info);static int	sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive,				struct fb_info *info);static void	sisfb_pre_setmode(struct sis_video_info *ivideo);static void	sisfb_post_setmode(struct sis_video_info *ivideo);static BOOLEAN	sisfb_CheckVBRetrace(struct sis_video_info *ivideo);static BOOLEAN	sisfbcheckvretracecrt2(struct sis_video_info *ivideo);static BOOLEAN	sisfbcheckvretracecrt1(struct sis_video_info *ivideo);static BOOLEAN	sisfb_bridgeisslave(struct sis_video_info *ivideo);static void	sisfb_detect_VB_connect(struct sis_video_info *ivideo);static void	sisfb_get_VB_type(struct sis_video_info *ivideo);static void	sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val);static void	sisfb_set_TVyposoffset(struct sis_video_info *ivideo, int val);#ifdef CONFIG_FB_SIS_300unsigned int	sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);void		sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg, unsigned int val);unsigned int	sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);#endif#ifdef CONFIG_FB_SIS_315void		sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg, unsigned char val);unsigned int	sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);#endif/* SiS-specific exported functions */void			sis_malloc(struct sis_memreq *req);void			sis_malloc_new(struct pci_dev *pdev, struct sis_memreq *req);void			sis_free(u32 base);void			sis_free_new(struct pci_dev *pdev, u32 base);/* Internal heap routines */static int		sisfb_heap_init(struct sis_video_info *ivideo);static struct SIS_OH *	sisfb_poh_new_node(struct SIS_HEAP *memheap);static struct SIS_OH *	sisfb_poh_allocate(struct SIS_HEAP *memheap, u32 size);static void		sisfb_delete_node(struct SIS_OH *poh);static void		sisfb_insert_node(struct SIS_OH *pohList, struct SIS_OH *poh);static struct SIS_OH *	sisfb_poh_free(struct SIS_HEAP *memheap, u32 base);static void		sisfb_free_node(struct SIS_HEAP *memheap, struct SIS_OH *poh);/* Routines from init.c/init301.c */extern unsigned short	SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,				int VDisplay, int Depth, BOOLEAN FSTN, unsigned short CustomT,				int LCDwith, int LCDheight, unsigned int VBFlags2);extern unsigned short	SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,				int VDisplay, int Depth, unsigned int VBFlags2);extern unsigned short	SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay,				int VDisplay, int Depth, unsigned int VBFlags2);extern void		SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);extern BOOLEAN		SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);extern void		SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);extern void		SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);extern BOOLEAN		SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);extern BOOLEAN		sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno,				int *htotal, int *vtotal, unsigned char rateindex);#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)extern int		sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr,				unsigned char modeno, unsigned char rateindex);extern int		sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,				unsigned char rateindex, struct fb_var_screeninfo *var);#endif#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)extern void		SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,				int yres, struct fb_var_screeninfo *var, BOOLEAN writeres);#endif/* Chrontel TV, DDC and DPMS functions */extern unsigned short	SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg);extern void		SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);extern unsigned short	SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg);extern void		SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);extern void		SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,				unsigned char myor, unsigned char myand);extern void		SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);extern void		SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);extern unsigned short	SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine,				unsigned short adaptnum, unsigned short DDCdatatype, unsigned char *buffer,				unsigned int VBFlags2);extern unsigned short	SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr);#ifdef CONFIG_FB_SIS_315extern void		SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr);extern void		SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);#endifextern void		SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);extern void		SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);#endif

⌨️ 快捷键说明

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