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

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

?? sticon-bmode.c

?? linux下的VIDEO接口驅動程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*TPG CVS users: please don't commit changes to this file directly, sendthem to prumpf@tux.org and wait for a new version instead.  Otherwise,your changes will get lost when prumpf releases the next version, asthis file *will* be replaced with it.  You have been warned.2000-05-30, <deller@gmx.de>*/#if 1#define DPRINTK(x)	printk x#else#define DPRINTK(x)#endif/* *  linux/drivers/video/sticon.c  - console driver using HP's STI firmware * *	Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> * *  Based on linux/drivers/video/vgacon.c and linux/drivers/video/fbcon.c, *  which were * *	Created 28 Sep 1997 by Geert Uytterhoeven *	Rewritten by Martin Mares <mj@ucw.cz>, July 1998 *	Copyright (C) 1991, 1992  Linus Torvalds *			    1995  Jay Estabrook *	Copyright (C) 1995 Geert Uytterhoeven *	Copyright (C) 1993 Bjoern Brauel *			   Roman Hodek *	Copyright (C) 1993 Hamish Macdonald *			   Greg Harp *	Copyright (C) 1994 David Carter [carter@compsci.bristol.ac.uk] * *	      with work by William Rucklidge (wjr@cs.cornell.edu) *			   Geert Uytterhoeven *			   Jes Sorensen (jds@kom.auc.dk) *			   Martin Apel *	      with work by Guenther Kelleter *			   Martin Schaller *			   Andreas Schwab *			   Emmanuel Marty (core@ggi-project.org) *			   Jakub Jelinek (jj@ultra.linux.cz) *			   Martin Mares <mj@ucw.cz> * *  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. *//* *  TODO: *   - call STI in virtual mode rather than in real mode *   - support for PCI-only STI ROMs (which don't have a traditional region *     list) *   - safe detection (i.e. verify there is a graphics device at a given *     address first, not just read a random device's io space) *   - support for multiple STI devices in one machine *   - support for byte-mode STI ROMs *   - support for just using STI to switch to a colour fb (stifb ?) *   - try to make it work on m68k hp workstations ;) */#include <linux/types.h>#include <linux/sched.h>#include <linux/fs.h>#include <linux/kernel.h>#include <linux/tty.h>#include <linux/console.h>#include <linux/string.h>#include <linux/kd.h>#include <linux/slab.h>#include <linux/vt_kern.h>#include <linux/selection.h>#include <linux/ioport.h>#include <linux/init.h>#include <linux/delay.h>#include <asm/io.h>#include <asm/real.h>#include <linux/module.h>#include <linux/fb.h>#include <linux/smp.h>#include <asm/irq.h>#include <asm/system.h>#include <asm/uaccess.h>#include <video/fbcon.h>#include <video/font.h>#include "sti-bmode.h"/* The latency of the STI functions cannot really be reduced by setting * this to 0;  STI doesn't seem to be designed to allow calling a different * function (or the same function with different arguments) after a * function exited with 1 as return value. * * As all of the functions below could be called from interrupt context, * we have to spin_lock_irqsave around the do { ret = bla(); } while(ret==1) * block.  Really bad latency there. * * Probably the best solution to all this is have the generic code manage * the screen buffer and a kernel thread to call STI occasionally. *  * Luckily, the frame buffer guys have the same problem so we can just wait * for them to fix it and steal their solution.   prumpf * * Actually, another long-term viable solution is to completely do STI * support in userspace - that way we avoid the potential license issues * of using proprietary fonts, too. */ #define STI_WAIT 1#define STI_PTR(p) ( (typeof(p)) virt_to_phys(p))#define PTR_STI(p) ( (typeof(p)) phys_to_virt((unsigned long)p) )static struct sti_struct default_sti = {	SPIN_LOCK_UNLOCKED,};static struct sti_font_flags default_font_flags = {	STI_WAIT, 0, 0, NULL};/* The colour indices used by STI are *   0 - Black *   1 - White *   2 - Red *   3 - Yellow/Brown *   4 - Green *   5 - Cyan *   6 - Blue *   7 - Magenta * * So we have the same colours as VGA (basically one bit each for R, G, B), * but have to translate them, anyway. */static u8 col_trans[8] = {        0, 6, 4, 5,        2, 7, 3, 1};#define c_fg(sti, c) col_trans[((c>> 8) & 7)]#define c_bg(sti, c) col_trans[((c>>11) & 7)]#define c_index(sti, c) (c&0xff)#define sti_onscreen_x(sti) (PTR_STI(sti->glob_cfg)->onscreen_x)#define sti_onscreen_y(sti) (PTR_STI(sti->glob_cfg)->onscreen_y)#define sti_font_x(sti) (STI_U8(PTR_STI(sti->font)->width))#define sti_font_y(sti) (STI_U8(PTR_STI(sti->font)->height))static struct sti_init_flags default_init_flags = {	STI_WAIT, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, NULL};static void sti_init_graph(struct sti_struct *sti) {	struct sti_init_inptr_ext inptr_ext = {		0, { 0 }, 0, NULL	};	struct sti_init_inptr inptr = {		3, STI_PTR(&inptr_ext)	};	struct sti_init_outptr outptr = { 0 };	unsigned long flags;	s32 ret;	spin_lock_irqsave(&sti->lock, flags);	ret = STI_CALL(sti->init_graph, &default_init_flags, &inptr,		&outptr, sti->glob_cfg);	spin_unlock_irqrestore(&sti->lock, flags);	sti->text_planes = outptr.text_planes;}#if 0static struct sti_conf_flags default_conf_flags = {	STI_WAIT, 0, NULL};static void sti_inq_conf(struct sti_struct *sti){	struct sti_conf_inptr inptr = { NULL };	struct sti_conf_outptr_ext outptr_ext = { future_ptr: NULL };	struct sti_conf_outptr outptr = {		ext_ptr: STI_PTR(&outptr_ext)	};	unsigned long flags;	s32 ret;		do {		spin_lock_irqsave(&sti->lock, flags);		ret = STI_CALL(sti->inq_conf, &default_conf_flags,			&inptr, &outptr, sti->glob_cfg);		spin_unlock_irqrestore(&sti->lock, flags);	} while(ret == 1);}#endifstatic void sti_putc(struct sti_struct *sti, int c, int y, int x){	struct sti_font_inptr inptr = {		(u32) sti->font, c_index(sti, c), c_fg(sti, c), c_bg(sti, c),		x * sti_font_x(sti), y * sti_font_y(sti), NULL	};	struct sti_font_outptr outptr = {		0, NULL	};	s32 ret;	unsigned long flags;	do {		spin_lock_irqsave(&sti->lock, flags);		ret = STI_CALL(sti->font_unpmv, &default_font_flags,			&inptr, &outptr, sti->glob_cfg);		spin_unlock_irqrestore(&sti->lock, flags);	} while(ret == 1);}static struct sti_blkmv_flags clear_blkmv_flags = {	STI_WAIT, 1, 1, 0, 0, NULL};static void sti_set(struct sti_struct *sti, int src_y, int src_x,	int height, int width, u8 color){	struct sti_blkmv_inptr inptr = {		color, color,		src_x, src_y ,		src_x, src_y ,		width, height,		NULL	};	struct sti_blkmv_outptr outptr = { 0, NULL };	s32 ret = 0;	unsigned long flags;		do {		spin_lock_irqsave(&sti->lock, flags);		ret = STI_CALL(sti->block_move, &clear_blkmv_flags,			&inptr, &outptr, sti->glob_cfg);		spin_unlock_irqrestore(&sti->lock, flags);	} while(ret == 1);}static void sti_clear(struct sti_struct *sti, int src_y, int src_x,	int height, int width){	struct sti_blkmv_inptr inptr = {		0, 0,		src_x * sti_font_x(sti), src_y * sti_font_y(sti),		src_x * sti_font_x(sti), src_y * sti_font_y(sti),		width * sti_font_x(sti), height* sti_font_y(sti),		NULL	};	struct sti_blkmv_outptr outptr = { 0, NULL };	s32 ret = 0;	unsigned long flags;	do {		spin_lock_irqsave(&sti->lock, flags);		ret = STI_CALL(sti->block_move, &clear_blkmv_flags,			&inptr, &outptr, sti->glob_cfg);		spin_unlock_irqrestore(&sti->lock, flags);	} while(ret == 1);}static struct sti_blkmv_flags default_blkmv_flags = {	STI_WAIT, 0, 0, 0, 0, NULL};static void sti_bmove(struct sti_struct *sti, int src_y, int src_x,	int dst_y, int dst_x, int height, int width){	struct sti_blkmv_inptr inptr = {		0, 0,		src_x * sti_font_x(sti), src_y * sti_font_y(sti),		dst_x * sti_font_x(sti), dst_y * sti_font_y(sti),		width * sti_font_x(sti), height* sti_font_y(sti),		NULL	};	struct sti_blkmv_outptr outptr = { 0, NULL };	s32 ret = 0;	unsigned long flags;	do {		spin_lock_irqsave(&sti->lock, flags);		ret = STI_CALL(sti->block_move, &default_blkmv_flags,			&inptr, &outptr, sti->glob_cfg);		spin_unlock_irqrestore(&sti->lock, flags);	} while(ret == 1);}/* STICON */static const char __init *sticon_startup(void){	return "STI console";}static int sticon_set_palette(struct vc_data *c, unsigned char *table){	return -EINVAL;}static int sticon_font_op(struct vc_data *c, struct console_font_op *op){	return -ENOSYS;}static void sticon_putc(struct vc_data *conp, int c, int ypos, int xpos){	sti_putc(&default_sti, c, ypos, xpos);}static void sticon_putcs(struct vc_data *conp, const unsigned short *s,	int count, int ypos, int xpos){	while(count--) {		sti_putc(&default_sti, scr_readw(s++), ypos, xpos++);	}}static void sticon_cursor(struct vc_data *conp, int mode){}static int sticon_scroll(struct vc_data *conp, int t, int b, int dir,			int count){	struct sti_struct *sti = &default_sti;	if(console_blanked)		return 0;	sticon_cursor(conp, CM_ERASE);	switch(dir) {	case SM_UP:		sti_bmove(sti, t+count, 0, t, 0, b-t-count, conp->vc_cols);		sti_clear(sti, b-count, 0, count, conp->vc_cols);		break;	case SM_DOWN:		sti_bmove(sti, t, 0, t+count, 0, b-t-count, conp->vc_cols);		sti_clear(sti, t, 0, count, conp->vc_cols);		break;	}	return 0;}	static void sticon_bmove(struct vc_data *conp, int sy, int sx, int dy, int dx,	int height, int width){	sti_bmove(&default_sti, sy, sx, dy, dx, height, width);}static void sticon_init(struct vc_data *c, int init){	struct sti_struct *sti = &default_sti;	int vc_cols, vc_rows;	sti_set(sti, 0, 0, sti_onscreen_y(sti), sti_onscreen_x(sti), 0);	c->vc_can_do_color = 1;	vc_cols = PTR_STI(sti->glob_cfg)->onscreen_x / sti_font_x(sti);	vc_rows = PTR_STI(sti->glob_cfg)->onscreen_y / sti_font_y(sti);	vc_resize_con(vc_rows, vc_cols, c->vc_num);}static void sticon_deinit(struct vc_data *c){}static void sticon_clear(struct vc_data *conp, int sy, int sx, int height,			int width){	sti_clear(&default_sti, sy, sx, height, width);}static int sticon_switch(struct vc_data *conp){	return 0;}static int sticon_blank(struct vc_data *conp, int blank){	return 0;}static int sticon_scrolldelta(struct vc_data *conp, int lines){	return 0;}static int sticon_set_origin(struct vc_data *conp){	return 0;}static u8 sticon_build_attr(struct vc_data *conp, u8 color, u8 intens, u8 blink, u8 underline, u8 reverse){	u8 attr = ((color & 0x70) >> 1) | ((color & 7));	if(reverse) {		color = ((color>>3)&0x7) | ((color &0x7)<<3);	}	return attr;}static struct consw sti_con = {	con_startup: 		sticon_startup, 	con_init: 		sticon_init,	con_deinit: 		sticon_deinit,	con_clear: 		sticon_clear,	con_putc: 		sticon_putc,	con_putcs: 		sticon_putcs,	con_cursor: 		sticon_cursor,	con_scroll: 		sticon_scroll,	con_bmove: 		sticon_bmove,	con_switch: 		sticon_switch,	con_blank: 		sticon_blank,	con_font_op:		sticon_font_op,	con_set_palette:	sticon_set_palette,	con_scrolldelta:	sticon_scrolldelta,	con_set_origin: 	sticon_set_origin,	con_build_attr:		sticon_build_attr,};#include <asm/pgalloc.h>	/* need cache flush routines */static void __init sti_rom_copy(unsigned long base, unsigned long offset,				unsigned long count, void *dest){	void *savedest = dest;	int savecount = count;	while(count >= 4) {		count -= 4;		*(u32 *)dest = gsc_readl(base + offset);#if 0		DPRINTK(("%08x\n", *(u32 *)dest));		if(*(u32 *)dest == 0x64646464) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久91精品国产一区二区三区| 欧美日韩在线播| 日韩avvvv在线播放| 亚洲图片欧美色图| 一区二区三区在线视频免费观看 | 午夜免费久久看| 亚洲一区二区在线观看视频| 伊人一区二区三区| 亚洲国产sm捆绑调教视频| 一区二区三区四区激情| 亚洲一区免费视频| 首页国产欧美久久| 国产在线精品一区二区| 丁香网亚洲国际| 不卡区在线中文字幕| 色综合一区二区| 欧美体内she精高潮| 欧美一级久久久| ww久久中文字幕| 自拍偷在线精品自拍偷无码专区 | 婷婷国产在线综合| 午夜久久久影院| 黄色精品一二区| 成人99免费视频| 欧洲精品中文字幕| 日韩美女主播在线视频一区二区三区| 精品国产一区二区三区四区四 | 亚洲一区日韩精品中文字幕| 日韩精品三区四区| 国产精品综合二区| 色综合久久99| 精品毛片乱码1区2区3区| 中文字幕不卡的av| 丝瓜av网站精品一区二区| 久久99精品国产91久久来源| 成人免费高清在线观看| 3751色影院一区二区三区| 久久精品这里都是精品| 亚洲国产一区二区三区| 国产一区二区导航在线播放| 在线看不卡av| 欧美激情在线免费观看| 丝袜美腿亚洲一区| av午夜一区麻豆| 日韩小视频在线观看专区| 亚洲免费av高清| 国产在线精品一区二区| 777a∨成人精品桃花网| 日韩美女视频一区二区| 精久久久久久久久久久| 欧美无乱码久久久免费午夜一区| 国产日本亚洲高清| 麻豆精品在线观看| 欧美日韩黄色一区二区| 亚洲婷婷在线视频| 精品一区二区三区影院在线午夜| 色av成人天堂桃色av| 国产欧美精品一区aⅴ影院| 蜜臀精品一区二区三区在线观看| 91豆麻精品91久久久久久| 国产精品亲子伦对白| 日本欧美久久久久免费播放网| 色婷婷香蕉在线一区二区| 国产精品久久国产精麻豆99网站| 久久se精品一区二区| 91精品国产一区二区三区蜜臀| 亚洲人亚洲人成电影网站色| 岛国精品在线观看| 久久看人人爽人人| 国产精品综合av一区二区国产馆| 日韩精品一区在线| 午夜久久电影网| 色欧美日韩亚洲| 亚洲综合免费观看高清在线观看| 97精品久久久午夜一区二区三区| 国产精品午夜在线| 99精品视频在线观看| 在线亚洲一区二区| 欧美人妇做爰xxxⅹ性高电影| 色狠狠一区二区| jlzzjlzz欧美大全| 粗大黑人巨茎大战欧美成人| 亚洲精品在线一区二区| 久久国产精品99久久人人澡| 欧美三级日韩三级国产三级| 亚洲不卡在线观看| 欧美日韩国产高清一区二区三区| 午夜精品福利一区二区蜜股av | 国产精品人妖ts系列视频| 国产精品一区2区| 亚洲国产成人一区二区三区| 成人精品一区二区三区四区| 综合久久久久久久| 欧美日韩一卡二卡| 日韩电影免费一区| 国产91精品入口| av高清不卡在线| 日韩一级完整毛片| 亚洲自拍与偷拍| 日本女人一区二区三区| 日韩精品一级中文字幕精品视频免费观看| 一区二区三区欧美久久| 亚洲精品一区二区三区四区高清| 成人性视频免费网站| 日韩视频一区在线观看| 久久99久久久久久久久久久| 久久久久久一级片| 色乱码一区二区三区88| 免费成人结看片| 国产精品每日更新在线播放网址| 色视频一区二区| 蜜臀av性久久久久蜜臀aⅴ流畅| 久久理论电影网| 91在线国产福利| 久久电影国产免费久久电影| 国产精品久久久久国产精品日日| 欧美日韩国产在线观看| 国产激情一区二区三区桃花岛亚洲| 亚洲欧美日韩国产一区二区三区 | 色综合久久综合网欧美综合网| 亚洲另类春色校园小说| 26uuu欧美日本| 精品视频色一区| 成人免费视频app| 免费高清不卡av| 亚洲视频在线一区| 久久综合九色综合欧美就去吻| 欧美日韩一区二区三区四区五区| 国产成人午夜精品影院观看视频| 天堂精品中文字幕在线| 综合久久给合久久狠狠狠97色| 2020国产精品自拍| 欧美日韩国产三级| 色中色一区二区| 成人黄色av电影| 国产一区二区三区四区五区美女| 婷婷久久综合九色综合伊人色| 亚洲成人自拍网| 国产精品久久久久毛片软件| 久久久久久一级片| 久久综合色一综合色88| 欧美一区二区大片| 欧美久久一二区| 在线观看视频一区二区欧美日韩| 成人美女视频在线观看| 国产精品一区二区免费不卡| 午夜不卡av免费| 亚洲精品欧美激情| 亚洲精品视频在线| 亚洲欧美日韩在线播放| 亚洲欧美另类小说视频| 亚洲欧美怡红院| 亚洲素人一区二区| 亚洲三级免费电影| 中文字幕亚洲视频| 亚洲视频免费看| 亚洲乱码国产乱码精品精98午夜| 亚洲欧美国产三级| 一区二区三区自拍| 亚洲成人自拍偷拍| 日本欧美肥老太交大片| 久久激情五月激情| 国产美女av一区二区三区| 国产成人自拍网| 成人av免费在线观看| 色婷婷激情综合| 欧美视频一二三区| 日韩一区二区中文字幕| 久久一夜天堂av一区二区三区| 久久久久国产精品免费免费搜索| 欧美激情一区二区三区不卡| 综合分类小说区另类春色亚洲小说欧美| 日韩一区在线看| 亚洲精品伦理在线| 日韩影院免费视频| 国产在线国偷精品免费看| 成人久久18免费网站麻豆| 色综合天天综合狠狠| 91精品国产综合久久精品图片| 精品久久久久久久久久久久久久久| 久久婷婷一区二区三区| 亚洲女子a中天字幕| 日韩不卡免费视频| 成熟亚洲日本毛茸茸凸凹| 91国产免费看| 亚洲黄色av一区| 久久精品av麻豆的观看方式| 成人在线视频一区| 欧美精选一区二区| 中文字幕欧美日韩一区| 亚洲国产一区视频| 国产另类ts人妖一区二区| 91精品1区2区| 久久婷婷久久一区二区三区| 一区二区在线电影| 国产在线播放一区三区四| 欧美亚洲丝袜传媒另类| 国产日韩欧美高清在线| 午夜精品久久久久久久99樱桃| 国产精品一级在线|