You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
From: James S. <jsi...@us...> - 2002-11-05 14:36:22
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/alpha In directory usw-pr-cvs1:/tmp/cvs-serv18629/arch/alpha Removed Files: config.in Log Message: bug fixes. Now it compiles. --- config.in DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:51:17
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/console In directory usw-pr-cvs1:/tmp/cvs-serv13726/console Added Files: Kconfig Makefile Log Message: Synced to fbdev tree and console BK tree. --- NEW FILE: Kconfig --- # # Video configuration # menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" depends on !ARCH_ACORN && !ARCH_EBSA110 || !4xx && !8xx help Saying Y here will allow you to use Linux in text mode through a display that complies with the generic VGA standard. Virtually everyone wants that. The program SVGATextMode can be used to utilize SVGA video cards to their full potential in text mode. Download it from <ftp://ibiblio.org/pub/Linux/utils/console/>. Say Y. # if [ "$CONFIG_PCI" = "y" -a "$CONFIG_VGA_CONSOLE" = "y" ]; then # bool ' Allow VGA on any bus?' CONFIG_VGA_HOSE # if [ "$CONFIG_VGA_HOSE" = "y" ]; then # define_bool CONFIG_DUMMY_CONSOLE y # fi # fi config VIDEO_SELECT bool "Video mode selection support" ---help--- This enables support for text mode selection on kernel startup. If you want to take advantage of some high-resolution text mode your card's BIOS offers, but the traditional Linux utilities like SVGATextMode don't, you can say Y here and set the mode using the "vga=" option from your boot loader (lilo or loadlin) or set "vga=ask" which brings up a video mode menu on kernel startup. (Try "man bootparam" or see the documentation of your boot loader about how to pass options to the kernel.) Read the file <file:Documentation/svga.txt> for more information about the Video mode selection support. If unsure, say N. config MDA_CONSOLE tristate "MDA text console (dual-headed) (EXPERIMENTAL)" ---help--- Say Y here if you have an old MDA or monochrome Hercules graphics adapter in your system acting as a second head ( = video card). You will then be able to use two monitors with your Linux system. Do not say Y here if your MDA card is the primary card in your system; the normal VGA driver will handle it. This driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called mdacon.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say N. config SGI_NEWPORT_CONSOLE tristate "SGI Newport Console support" depends on SGI_IP22 help Say Y here if you want the console on the Newport aka XL graphics card of your Indy. Most people say Y here. # bool 'IODC console' CONFIG_IODC_CONSOLE config STI_CONSOLE bool "STI console" depends on PARISC help The STI console is the builtin display/keyboard on HP-PARISC machines. Say Y here to build support for it into your kernel. The alternative is to use your primary serial port as a console. config PROM_CONSOLE bool "PROM console" depends on SPARC32 || SPARC64 help Say Y to build a console driver for Sun machines that uses the terminal emulation built into their console PROMS. config DUMMY_CONSOLE bool depends on !PROM_CONSOLE=y || VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y || !IODC_CONSOLE && GSC_PS2 default y config FRAMEBUFFER_CONSOLE bool "Framebuffer Console support" depends on FB config PCI_CONSOLE bool depends on FRAMEBUFFER_CONSOLE default y config FBCON_ADVANCED bool "Advanced low level driver options" depends on FRAMEBUFFER_CONSOLE ---help--- The frame buffer console uses character drawing routines that are tailored to the specific organization of pixels in the memory of your graphics hardware. These are called the low level frame buffer console drivers. Note that they are used for text console output only; they are NOT needed for graphical applications. If you say N here, the needed low level drivers are automatically enabled, depending on what frame buffer devices you selected above. This is recommended for most users. If you say Y here, you have more fine-grained control over which low level drivers are enabled. You can e.g. leave out low level drivers for color depths you do not intend to use for text consoles. Low level frame buffer console drivers can be modules ( = code which can be inserted and removed from the running kernel whenever you want). The modules will be called fbcon-*.o. If you want to compile (some of) them as modules, read <file:Documentation/modules.txt>. If unsure, say N. config FBCON_ACCEL tristate "Hardware acceleration support" if FBCON_ADVANCED depends on FB default m if !FBCON_ADVANCED && FB_NEOMAGIC!=y && !FB_VESA && !FB_FM2 && FB_HIT!=y && !FB_HP300 && !FB_Q40 && !FB_ANAKIN && !FB_G364 && FB_VIRTUAL!=y && !FB_CLPS711X && !FB_PMAG_BA && !FB_PMAGB_B && FB_3DFX!=y && !FB_TX3912 && !FB_MAXINE && !FB_APOLLO && FB_ATY!=y && !FB_MAC && FB_RIVA!=y && FB_HGA!=y && !FB_OF && FB_SGIVW!=y && (FB_NEOMAGIC=m || FB_HIT=m || FB_VIRTUAL=m || FB_3DFX=m || FB_RIVA=m || FB_SGIVW=m || FB_HGA=m) default y if !FBCON_ADVANCED && (FB_NEOMAGIC=y || FB_VESA || FB_FM2 || FB_HIT=y || FB_HP300 || FB_Q40 || FB_ANAKIN || FB_G364 || FB_VIRTUAL=y || FB_CLPS711X || FB_PMAG_BA || FB_PMAGB_B || FB_3DFX=y || FB_TX3912 || FB_MAXINE || FB_APOLLO || FB_ATY=y || FB_MAC || FB_RIVA=y || FB_OF || FB_SGIVW=y || FB_HGA=y) config FBCON_AFB tristate "Amiga bitplanes support" if FBCON_ADVANCED depends on FB default m if !FBCON_ADVANCED && FB_AMIGA=m default y if !FBCON_ADVANCED && FB_AMIGA=y help This is the low level frame buffer console driver for 1 to 8 bitplanes (2 to 256 colors) on Amiga. config FBCON_ILBM tristate "Amiga interleaved bitplanes support" if FBCON_ADVANCED depends on FB default m if !FBCON_ADVANCED && FB_AMIGA=m default y if !FBCON_ADVANCED && FB_AMIGA=y help This is the low level frame buffer console driver for 1 to 8 interleaved bitplanes (2 to 256 colors) on Amiga. config FBCON_IPLAN2P2 tristate "Atari interleaved bitplanes (2 planes) support" if FBCON_ADVANCED depends on FB default y if !FBCON_ADVANCED && FB_ATARI help This is the low level frame buffer console driver for 2 interleaved bitplanes (4 colors) on Atari. config FBCON_IPLAN2P4 tristate "Atari interleaved bitplanes (4 planes) support" if FBCON_ADVANCED depends on FB default y if !FBCON_ADVANCED && FB_ATARI help This is the low level frame buffer console driver for 4 interleaved bitplanes (16 colors) on Atari. config FBCON_IPLAN2P8 tristate "Atari interleaved bitplanes (8 planes) support" if FBCON_ADVANCED depends on FB default y if !FBCON_ADVANCED && FB_ATARI help This is the low level frame buffer console driver for 8 interleaved bitplanes (256 colors) on Atari. # Guess what we need config FBCON_STI tristate depends on !FBCON_ADVANCED && FB_STI default y config FBCON_FONTWIDTH8_ONLY bool "Support only 8 pixels wide fonts" depends on FB help Answer Y here will make the kernel provide only the 8x8 fonts (these are the less readable). If unsure, say N. config FONT_SUN8x16 bool "Sparc console 8x16 font" depends on FB && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64) help This is the high resolution console font for Sun machines. Say Y. config FONT_SUN12x22 bool "Sparc console 12x22 font (not supported by all drivers)" depends on FB && !FBCON_FONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64) help This is the high resolution console font for Sun machines with very big letters (like the letters used in the SPARC PROM). If the standard font is unreadable for you, say Y, otherwise say N. config FBCON_FONTS bool "Select other fonts" if SPARC32 || SPARC64 depends on FB help Say Y here if you would like to use fonts other than the default your frame buffer console usually use. Note that the answer to this question won't directly affect the kernel: saying N will just cause the configurator to skip all the questions about foreign fonts. If unsure, say N (the default choices are safe). config FBCON_FONTS prompt "Select compiled-in fonts" depends on FB && !SPARC32 && !SPARC64 config FONT_8x8 bool "VGA 8x8 font" if FBCON_FONTS depends on FB default y if !SPARC32 && !SPARC64 && !FBCON_FONTS help This is the "high resolution" font for the VGA frame buffer (the one provided by the text console 80x50 (and higher) modes). Note that this is a poor quality font. The VGA 8x16 font is quite a lot more readable. Given the resolution provided by the frame buffer device, answer N here is safe. config FONT_8x16 bool "VGA 8x16 font" if FBCON_FONTS depends on FB && SGI_NEWPORT_CONSOLE=y default y if !SPARC32 && !SPARC64 && !FBCON_FONTS help This is the "high resolution" font for the VGA frame buffer (the one provided by the VGA text console 80x25 mode. If unsure, say Y. config FONT_6x11 bool "Mac console 6x11 font (not supported by all drivers)" if FBCON_FONTS depends on FB && !FBCON_FONTWIDTH8_ONLY default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && MAC help Small console font with Macintosh-style high-half glyphs. Some Mac framebuffer drivers don't support this one at all. config FONT_PEARL_8x8 bool "Pearl (old m68k) console 8x8 font" if FBCON_FONTS depends on FB default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && AMIGA help Small console font with PC-style control-character and high-half glyphs. config FONT_ACORN_8x8 bool "Acorn console 8x8 font" if FBCON_FONTS depends on FB default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && ARM && ARCH_ACORN help Small console font with PC-style control characters and high-half glyphs. config FONT_MINI_4x6 bool "Mini 4x6 font" depends on !SPARC32 && !SPARC64 && FBCON_FONTS endmenu --- NEW FILE: Makefile --- # Makefile for the Linux graphics to console drivers. # 5 Aug 1999, James Simmons, <mailto:jsi...@us...> # Rewritten to use lists instead of if-statements. # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. export-objs := fbcon.o fbcon-accel.o fbcon-afb.o fbcon-ilbm.o \ fbcon-iplan2p2.o fbcon-iplan2p4.o fbcon-iplan2p8.o \ fbcon-hga.o # Each configuration option enables a list of files. obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o obj-$(CONFIG_VGA_CONSOLE) += vgacon.o obj-$(CONFIG_MDA_CONSOLE) += mdacon.o obj-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o obj-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o obj-$(CONFIG_FONT_8x8) += font_8x8.o obj-$(CONFIG_FONT_8x16) += font_8x16.o obj-$(CONFIG_FONT_6x11) += font_6x11.o obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o obj-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o fonts.o # Generic Low Level Drivers obj-$(CONFIG_FBCON_AFB) += fbcon-afb.o obj-$(CONFIG_FBCON_ILBM) += fbcon-ilbm.o obj-$(CONFIG_FBCON_IPLAN2P2) += fbcon-iplan2p2.o obj-$(CONFIG_FBCON_IPLAN2P4) += fbcon-iplan2p4.o obj-$(CONFIG_FBCON_IPLAN2P8) += fbcon-iplan2p8.o obj-$(CONFIG_FBCON_STI) += fbcon-sti.o obj-$(CONFIG_FBCON_ACCEL) += fbcon-accel.o # Files generated that shall be removed upon make clean clean-files := promcon_tbl.c include $(TOPDIR)/Rules.make $(obj)/promcon_tbl.c: $(src)/prom.uni $(objtree)/scripts/conmakehash $< | \ sed -e '/#include <[^>]*>/p' -e 's/types/init/' \ -e 's/dfont\(_uni.*\]\)/promfont\1 __initdata/' > $@ |
From: James S. <jsi...@us...> - 2002-11-01 23:51:16
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv13726 Added Files: Kconfig Log Message: Synced to fbdev tree and console BK tree. --- NEW FILE: Kconfig --- # # Video configuration # menu "Graphics support" config FB bool "Support for frame buffer devices" ---help--- The frame buffer device provides an abstraction for the graphics hardware. It represents the frame buffer of some video hardware and allows application software to access the graphics hardware through a well-defined interface, so the software doesn't need to know anything about the low-level (hardware register) stuff. Frame buffer devices work identically across the different architectures supported by Linux and make the implementation of application programs easier and more portable; at this point, an X server exists which uses the frame buffer device exclusively. On several non-X86 architectures, the frame buffer device is the only way to use the graphics hardware. The device is accessed through special device nodes, usually located in the /dev directory, i.e. /dev/fb*. You need an utility program called fbset to make full use of frame buffer devices. Please read <file:Documentation/fb/framebuffer.txt> and the Framebuffer-HOWTO at <http://www.tahallah.demon.co.uk/programming/prog.html> for more information. Say Y here and to the driver for your graphics board below if you are compiling a kernel for a non-x86 architecture. If you are compiling for the x86 architecture, you can say Y if you want to play with it, but it is not essential. Please note that running graphical applications that directly touch the hardware (e.g. an accelerated X server) and that are not frame buffer device-aware may cause unexpected results. If unsure, say N. config FB_CLGEN tristate "Cirrus Logic support" depends on FB && (AMIGA || PCI) ---help--- This enables support for Cirrus Logic GD542x/543x based boards on Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. If you have a PCI-based system, this enables support for these chips: GD-543x, GD-544x, GD-5480. Please read the file <file:Documentation/fb/clgenfb.txt>. Say N unless you have such a graphics board or plan to get one before you next recompile the kernel. config FB_PM2 tristate "Permedia2 support" depends on FB && (AMIGA || PCI) help This is the frame buffer device driver for the Permedia2 AGP frame buffer card from ASK, aka `Graphic Blaster Exxtreme'. There is a product page at <http://www.ask.com.hk/product/Permedia%202/permedia2.htm>. config FB_PM2_FIFO_DISCONNECT bool "enable FIFO disconnect feature" depends on FB_PM2 && PCI help Support the Permedia2 FIFOI disconnect feature (see CONFIG_FB_PM2). config FB_PM2_PCI bool "generic Permedia2 PCI board support" depends on FB_PM2 && PCI help Say Y to enable support for Permedia2 AGP frame buffer card from 3Dlabs (aka `Graphic Blaster Exxtreme') on the PCI bus. config FB_PM2_CVPPC bool "Phase5 CVisionPPC/BVisionPPC support" depends on FB_PM2 && AMIGA help Say Y to enable support for the Amiga Phase 5 CVisionPPC BVisionPPC framebuffer cards. Phase 5 is no longer with us, alas. config FB_ACORN bool "Acorn VIDC support" depends on FB && ARM && ARCH_ACORN help This is the frame buffer device driver for the Acorn VIDC graphics hardware found in Acorn RISC PCs and other ARM-based machines. If unsure, say N. config FB_ANAKIN bool "Anakin LCD support" depends on FB && ARM && ARCH_ANAKIN config FB_CLPS711X bool "CLPS711X LCD support" depends on FB && ARM && ARCH_CLPS711X config FB_SA1100 bool "SA-1100 LCD support" depends on FB && ARM && ARCH_SA1100 help This is a framebuffer device for the SA-1100 LCD Controller. See <http://www.linux-fbdev.org/> for information on framebuffer devices. If you plan to use the LCD display with your SA-1100 system, say Y here. choice prompt "CerfBoard LCD Display Size" depends on FB_SA1100 && SA1100_CERF default CERF_LCD_57_A config CERF_LCD_38_A bool "3.8_Color" config CERF_LCD_38_B bool "3.8_Mono" config CERF_LCD_57_A bool "5.7" config CERF_LCD_72_A bool "7.2" endchoice config SA1100_CERF_LCD_BACKLIGHT bool "Cerfboard Backlight (CerfPDA)" depends on FB_SA1100 && SA1100_CERF_CPLD config FB_CYBER2000 tristate "CyberPro 2000/2010/5000 support" depends on FB && PCI help This enables support for the Integraphics CyberPro 20x0 and 5000 VGA chips used in the Rebel.com Netwinder and other machines. Say Y if you have a NetWinder or a graphics card containing this device, otherwise say N. config FB_APOLLO bool depends on FB && APOLLO default y config FB_Q40 bool depends on FB && Q40 default y config FB_AMIGA tristate "Amiga native chipset support" depends on FB && AMIGA help This is the frame buffer device driver for the builtin graphics chipset found in Amigas. The driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called amifb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. config FB_AMIGA_OCS bool "Amiga OCS chipset support" depends on FB_AMIGA help This enables support for the original Agnus and Denise video chips, found in the Amiga 1000 and most A500's and A2000's. If you intend to run Linux on any of these systems, say Y; otherwise say N. config FB_AMIGA_ECS bool "Amiga ECS chipset support" depends on FB_AMIGA help This enables support for the Enhanced Chip Set, found in later A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If you intend to run Linux on any of these systems, say Y; otherwise say N. config FB_AMIGA_AGA bool "Amiga AGA chipset support" depends on FB_AMIGA help This enables support for the Advanced Graphics Architecture (also known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T and CD32. If you intend to run Linux on any of these systems, say Y; otherwise say N. config FB_CYBER tristate "Amiga CyberVision support" depends on FB && ZORRO help This enables support for the Cybervision 64 graphics card from Phase5. Please note that its use is not all that intuitive (i.e. if you have any questions, be sure to ask!). Say N unless you have a Cybervision 64 or plan to get one before you next recompile the kernel. Please note that this driver DOES NOT support the Cybervision 64 3D card, as they use incompatible video chips. config FB_VIRGE bool "Amiga CyberVision3D support " depends on FB && ZORRO help This enables support for the Cybervision 64/3D graphics card from Phase5. Please note that its use is not all that intuitive (i.e. if you have any questions, be sure to ask!). Say N unless you have a Cybervision 64/3D or plan to get one before you next recompile the kernel. Please note that this driver DOES NOT support the older Cybervision 64 card, as they use incompatible video chips. config FB_RETINAZ3 tristate "Amiga RetinaZ3 support" depends on FB && ZORRO help This enables support for the Retina Z3 graphics card. Say N unless you have a Retina Z3 or plan to get one before you next recompile the kernel. config FB_FM2 bool "Amiga FrameMaster II/Rainbow II support" depends on FB && ZORRO help This is the frame buffer device driver for the Amiga FrameMaster card from BSC (exhibited 1992 but not shipped as a CBM product). config FB_ATARI bool "Atari native chipset support" depends on FB && ATARI help This is the frame buffer device driver for the builtin graphics chipset found in Ataris. config FB_ATY tristate "ATI Mach64 display support" if PCI depends on FB help This driver supports graphics boards with the ATI Mach64 chips. Say Y if you have such a graphics board. The driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called atyfb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. config FB_ATY prompt "ATI Mach64 display support" depends on FB && (SPARC64 && PCI && FB_PCI || ATARI) config FB_ATY_GX bool "Mach64 GX support" if PCI depends on FB_ATY default y if ATARI help Say Y here to support use of the ATI Mach64 Graphics Expression board (or other boards based on the Mach64 GX chipset) as a framebuffer device. The ATI product support page for these boards is at <http://support.ati.com/products/pc/mach64/graphics_xpression.html>. config FB_OF bool "Open Firmware frame buffer device support" depends on FB && PPC && ALL_PPC help Say Y if you want support with Open Firmware for your graphics board. config FB_CONTROL bool "Apple \"control\" display support" depends on FB && PPC && ALL_PPC help This driver supports a frame buffer for the graphics adapter in the Power Macintosh 7300 and others. config FB_PLATINUM bool "Apple \"platinum\" display support" depends on FB && PPC && ALL_PPC help This driver supports a frame buffer for the "platinum" graphics adapter in some Power Macintoshes. config FB_VALKYRIE bool "Apple \"valkyrie\" display support" depends on FB && (MAC || PPC && ALL_PPC) help This driver supports a frame buffer for the "valkyrie" graphics adapter in some Power Macintoshes. config FB_CT65550 bool "Chips 65550 display support" depends on FB && PPC help This is the frame buffer device driver for the Chips & Technologies 65550 graphics chip in PowerBooks. config FB_IMSTT bool "IMS Twin Turbo display support" depends on FB && PCI help The IMS Twin Turbo is a PCI-based frame buffer card bundled with many Macintosh and compatible computers. config FB_S3TRIO bool "S3 Trio display support" depends on FB && PPC help If you have a S3 Trio say Y. Say N for S3 Virge. config FB_VGA16 tristate "VGA 16-color graphics console" depends on FB && (X86 || PPC) help This is the frame buffer device driver for VGA 16 color graphic cards. Say Y if you have such a card. This code is also available as a module. If you want to compile it as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read <file:Documentation/modules.txt>. The module will be called vga16fb.o. config FB_STI bool "Generic STI frame buffer device support" depends on FB && PARISC ---help--- STI refers to the HP "Standard Text Interface" which is a set of BIOS routines contained in a ROM chip in HP PA-RISC based machines. Enabling this option will implement the linux framebuffer device and an fbcon color text console using calls to the STI BIOS routines. The HP framebuffer device is usually planar, uses a strange memory layout, and changing the plane mask to create colored pixels requires a call to the STI routines, so do not expect /dev/fb to actually be useful. However, it is the best we have as far as graphics on the HP chipsets due to lack of hardware level documentation for the various on-board HP chipsets used in these systems. It is sufficient for basic text console functions, including fonts. You should probably enable this option, unless you are having trouble getting video when booting the kernel (make sure it isn't just that you are running the console on the serial port, though). Really old HP boxes may not have STI, and must use the PDC BIOS console or the IODC BIOS. config FB_MAC bool depends on FB && MAC default y # bool ' Apple DAFB display support' CONFIG_FB_DAFB config FB_HP300 bool depends on FB && HP300 default y config FB_TGA tristate "TGA framebuffer support" depends on FB && ALPHA help This is the frame buffer device driver for generic TGA graphic cards. Say Y if you have one of those. config FB_VESA bool "VESA VGA graphics console" depends on FB && X86 help This is the frame buffer device driver for generic VESA 2.0 compliant graphic cards. The older VESA 1.2 cards are not supported. You will get a boot time penguin logo at no additional cost. Please read <file:Documentation/fb/vesafb.txt>. If unsure, say Y. config FB_HGA tristate "Hercules mono graphics console" depends on FB && X86 help Say Y here if you have a Hercules mono graphics card. This driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called hgafb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. As this card technology is 15 years old, most people will answer N here. config VIDEO_SELECT bool depends on FB && X86 default y config FB_SGIVW tristate "SGI Visual Workstation framebuffer support" depends on FB && VISWS help SGI Visual Workstation support for framebuffer graphics. config BUS_I2C bool depends on FB && VISWS default y config FB_SUN3 bool "Sun3 framebuffer support" depends on FB && (SUN3 || SUN3X) config FB_BWTWO bool "BWtwo support" depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) help This is the frame buffer device driver for the BWtwo frame buffer. config FB_CGTHREE bool "CGthree support" depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) help This is the frame buffer device driver for the CGthree frame buffer. config FB_CGSIX bool "CGsix (GX,TurboGX) support" depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) help This is the frame buffer device driver for the CGsix (GX, TurboGX) frame buffer. config FB_PVR2 tristate "NEC PowerVR 2 display support" depends on FB && SH_DREAMCAST ---help--- Say Y here if you have a PowerVR 2 card in your box. If you plan to run linux on your Dreamcast, you will have to say Y here. This driver may or may not work on other PowerVR 2 cards, but is totally untested. Use at your own risk. If unsure, say N. This driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called pvr2fb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. You can pass several parameters to the driver at boot time or at module load time. The parameters look like "video=pvr2:XXX", where the meaning of XXX can be found at the end of the main source file (<file:drivers/video/pvr2fb.c>). Please see the file <file:Documentation/fb/pvr2fb.txt>. config FB_PVR2_DEBUG bool "Debug pvr2fb" depends on FB_PVR2=y help Say Y here if you wish for the pvr2fb driver to print out debugging messages. Most people will want to say N here. If unsure, you will also want to say N. config FB_E1355 bool "Epson 1355 framebuffer support" depends on FB && SUPERH help Build in support for the SED1355 Epson Research Embedded RAMDAC LCD/CRT Controller (since redesignated as the S1D13505) as a framebuffer. Product specs at <http://www.erd.epson.com/vdc/html/products.htm>. config E1355_REG_BASE hex "Register Base Address" depends on FB_E1355 default "a8000000" help Epson SED1355/S1D13505 LCD/CRT controller register base address. See the manuals at <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for discussion. config E1355_FB_BASE hex "Framebuffer Base Address" depends on FB_E1355 default "a8200000" help Epson SED1355/S1D13505 LCD/CRT controller memory base address. See the manuals at <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for discussion. config FB_RIVA tristate "nVidia Riva support" depends on FB && PCI help This driver supports graphics boards with the nVidia Riva/Geforce chips. Say Y if you have such a graphics board. The driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called rivafb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. config FB_MATROX tristate "Matrox acceleration" depends on FB && PCI ---help--- Say Y here if you have a Matrox Millennium, Matrox Millennium II, Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox Mystique G200, Matrox Millennium G200, Matrox Marvel G200 video, Matrox G400, G450 or G550 card in your box. This driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called matroxfb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. You can pass several parameters to the driver at boot time or at module load time. The parameters look like "video=matrox:XXX", and are described in <file:Documentation/fb/matroxfb.txt>. config FB_MATROX_MILLENIUM bool "Millennium I/II support" depends on FB_MATROX help Say Y here if you have a Matrox Millennium or Matrox Millennium II video card. If you select "Advanced lowlevel driver options" below, you should check 4 bpp packed pixel, 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can also use font widths different from 8. config FB_MATROX_MYSTIQUE bool "Mystique support" depends on FB_MATROX help Say Y here if you have a Matrox Mystique or Matrox Mystique 220 video card. If you select "Advanced lowlevel driver options" below, you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can also use font widths different from 8. config FB_MATROX_G450 bool "G100/G200/G400/G450/G550 support" depends on FB_MATROX ---help--- Say Y here if you have a Matrox G100, G200, G400, G450 or G550 based video card. If you select "Advanced lowlevel driver options", you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can also use font widths different from 8. If you need support for G400 secondary head, you must first say Y to "I2C support" and "I2C bit-banging support" in the character devices section, and then to "Matrox I2C support" and "G400 second head support" here in the framebuffer section. G450/G550 secondary head and digital output are supported without additional modules. The driver starts in monitor mode. You must use the matroxset tool (available at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to swap primary and secondary head outputs, or to change output mode. Secondary head driver always start in 640x480 resolution and you must use fbset to change it. Do not forget that second head supports only 16 and 32 bpp packed pixels, so it is a good idea to compile them into the kernel too. You can use only some font widths, as the driver uses generic painting procedures (the secondary head does not use acceleration engine). G450/G550 hardware can display TV picture only from secondary CRTC, and it performs no scaling, so picture must have 525 or 625 lines. config FB_MATROX_G100A bool "G100/G200/G400 support" depends on FB_MATROX && !FB_MATROX_G450 ---help--- Say Y here if you have a Matrox G100, G200 or G400 based video card. If you select "Advanced lowlevel driver options", you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can also use font widths different from 8. If you need support for G400 secondary head, you must first say Y to "I2C support" and "I2C bit-banging support" in the character devices section, and then to "Matrox I2C support" and "G400 second head support" here in the framebuffer section. config FB_MATROX_G100 bool depends on FB_MATROX && (FB_MATROX_G450 || FB_MATROX_G100A) default y config FB_MATROX_I2C tristate "Matrox I2C support" depends on FB_MATROX && I2C_ALGOBIT ---help--- This drivers creates I2C buses which are needed for accessing the DDC (I2C) bus present on all Matroxes, an I2C bus which interconnects Matrox optional devices, like MGA-TVO on G200 and G400, and the secondary head DDC bus, present on G400 only. You can say Y or M here if you want to experiment with monitor detection code. You must say Y or M here if you want to use either second head of G400 or MGA-TVO on G200 or G400. If you compile it as module, it will create a module named i2c-matroxfb.o. config FB_MATROX_MAVEN tristate "G400 second head support" depends on FB_MATROX_G100 && FB_MATROX_I2C ---help--- WARNING !!! This support does not work with G450 !!! Say Y or M here if you want to use a secondary head (meaning two monitors in parallel) on G400 or MGA-TVO add-on on G200. Secondary head is not compatible with accelerated XFree 3.3.x SVGA servers - secondary head output is blanked while you are in X. With XFree 3.9.17 preview you can use both heads if you use SVGA over fbdev or the fbdev driver on first head and the fbdev driver on second head. If you compile it as module, two modules are created, matroxfb_crtc2.o and matroxfb_maven.o. Matroxfb_maven is needed for both G200 and G400, matroxfb_crtc2 is needed only by G400. You must also load i2c-matroxfb to get it to run. The driver starts in monitor mode and you must use the matroxset tool (available at <ftp://platan.vc.cvut.cz/pub/linux/matrox-latest/>) to switch it to PAL or NTSC or to swap primary and secondary head outputs. Secondary head driver also always start in 640x480 resolution, you must use fbset to change it. Also do not forget that second head supports only 16 and 32 bpp packed pixels, so it is a good idea to compile them into the kernel too. You can use only some font widths, as the driver uses generic painting procedures (the secondary head does not use acceleration engine). config FB_MATROX_MULTIHEAD bool "Multihead support" depends on FB_MATROX ---help--- Say Y here if you have more than one (supported) Matrox device in your computer and you want to use all of them for different monitors ("multihead"). If you have only one device, you should say N because the driver compiled with Y is larger and a bit slower, especially on ia32 (ix86). If you said M to "Matrox unified accelerated driver" and N here, you will still be able to use several Matrox devices simultaneously: insert several instances of the module matroxfb.o into the kernel with insmod, supplying the parameter "dev=N" where N is 0, 1, etc. for the different Matrox devices. This method is slightly faster but uses 40 KB of kernel memory per Matrox card. There is no need for enabling 'Matrox multihead support' if you have only one Matrox card in the box. config FB_ATY_CT bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support" depends on PCI && FB_ATY default y if SPARC64 && FB_PCI help Say Y here to support use of ATI's 64-bit Rage boards (or other boards based on the Mach64 CT, VT, GT, and LT chipsets) as a framebuffer device. The ATI product support page for these boards is at <http://support.ati.com/products/pc/mach64/>. config FB_RADEON tristate "ATI Radeon display support" depends on FB && PCI help Choose this option if you want to use an ATI Radeon graphics card as a framebuffer device. There are both PCI and AGP versions. You don't need to choose this to run the Radeon in plain VGA mode. There is a product page at <http://www.ati.com/na/pages/products/pc/radeon32/index.html>. config FB_ATY128 tristate "ATI Rage128 display support" depends on FB && PCI help This driver supports graphics boards with the ATI Rage128 chips. Say Y if you have such a graphics board and read <file:Documentation/fb/aty128fb.txt>. The driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called aty128fb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. config FB_SIS tristate "SIS acceleration" depends on FB && PCI help This is the frame buffer device driver for the SiS 630 and 640 Super Socket 7 UMA cards. Specs available at <http://www.sis.com.tw/>. config FB_SIS_300 bool "SIS 630/540/730 support" depends on FB_SIS help This is the frame buffer device driver for the SiS 630 and related Super Socket 7 UMA cards. Specs available at <http://www.sis.com.tw/>. config FB_SIS_315 bool "SIS 315H/315 support" depends on FB_SIS help This is the frame buffer device driver for the SiS 315 graphics card. Specs available at <http://www.sis.com.tw/>. config FB_NEOMAGIC tristate "NeoMagic display support" depends on FB && PCI help This driver supports notebooks with NeoMagic PCI chips. Say Y if you have such a graphics card. The driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called neofb.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. config FB_3DFX tristate "3Dfx Banshee/Voodoo3 display support" depends on FB && PCI help This driver supports graphics boards with the 3Dfx Banshee/Voodoo3 chips. Say Y if you have such a graphics board. The driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called tdfxfb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. config FB_VOODOO1 tristate "3Dfx Voodoo Graphics (sst1) support" depends on FB && PCI ---help--- Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or Voodoo2 (cvg) based graphics card. This driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called sstfb.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. WARNING: Do not use any application that uses the 3D engine (namely glide) while using this driver. Please read the file Documentation/fb/README-sstfb.txt for supported options and other important info support. config FB_TRIDENT tristate "Trident support" depends on FB && PCI ---help--- This driver is supposed to support graphics boards with the Trident CyberXXXX/Image/CyberBlade chips mostly found in laptops but also on some motherboards. For more information, read <file:Documentation/fb/tridentfb.txt> Say Y if you have such a graphics board. The driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called rivafb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. config FB_PM3 tristate "Permedia3 support" depends on FB && PCI help This is the frame buffer device driver for the 3DLabs Permedia3 chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 & similar boards, 3DLabs Permedia3 Create!, Appian Jeronimo 2000 and maybe other boards. config FB_SBUS bool "SBUS and UPA framebuffers" depends on FB && (SPARC32 || SPARC64) help Say Y if you want support for SBUS or UPA based frame buffer device. config FB_CREATOR bool "Creator/Creator3D support" depends on FB_SBUS && SPARC64 help This is the frame buffer device driver for the Creator and Creator3D graphics boards. config FB_TCX bool "TCX (SS4/SS5 only) support" depends on FB_SBUS && SPARC32 help This is the frame buffer device driver for the TCX 24/8bit frame buffer. config FB_CGFOURTEEN bool "CGfourteen (SX) support" depends on FB_SBUS && SPARC32 help This is the frame buffer device driver for the CGfourteen frame buffer on Desktop SPARCsystems with the SX graphics option. config FB_P9100 bool "P9100 (Sparcbook 3 only) support" depends on FB_SBUS && SPARC32 help This is the frame buffer device driver for the P9100 card supported on Sparcbook 3 machines. config FB_LEO bool "Leo (ZX) support" depends on FB_SBUS help This is the frame buffer device driver for the SBUS-based Sun ZX (leo) frame buffer cards. config FB_PCI bool "PCI framebuffers" depends on FB && PCI && (SPARC64 || SPARC32) config FB_IGA bool "IGA 168x display support" depends on SPARC32 && FB_PCI help This is the framebuffer device for the INTERGRAPHICS 1680 and successor frame buffer cards. config FB_HIT tristate "HD64461 Frame Buffer support" depends on FB && HD64461 help This is the frame buffer device driver for the Hitachi HD64461 LCD frame buffer card. config FB_PMAG_BA bool "PMAG-BA TURBOchannel framebuffer support" depends on FB && DECSTATION && TC help Say Y here to directly support the on-board PMAG-BA framebuffer in the 5000/1xx versions of the DECstation. There is a page dedicated to Linux on DECstations at <http://decstation.unix-ag.org/>. config FB_PMAGB_B bool "PMAGB-B TURBOchannel framebuffer spport" depends on FB && DECSTATION && TC help Say Y here to directly support the on-board PMAGB-B framebuffer in the 5000/1xx versions of the DECstation. There is a page dedicated to Linux on DECstations at <http://decstation.unix-ag.org/>. config FB_MAXINE bool "Maxine (Personal DECstation) onboard framebuffer spport" depends on FB && DECSTATION && TC help Say Y here to directly support the on-board framebuffer in the Maxine (5000/20, /25, /33) version of the DECstation. There is a page dedicated to Linux on DECstations at <http://decstation.unix-ag.org/>. config FB_TX3912 bool "TMPTX3912/PR31700 frame buffer support" depends on FB && NINO help The TX3912 is a Toshiba RISC processor based on the MIPS 3900 core see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>. Say Y here to enable kernel support for the on-board framebuffer. config FB_VIRTUAL tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" depends on FB ---help--- This is a `virtual' frame buffer device. It operates on a chunk of unswappable kernel memory instead of on the memory of a graphics board. This means you cannot see any output sent to this frame buffer device, while it does consume precious memory. The main use of this frame buffer device is testing and debugging the frame buffer subsystem. Do NOT enable it for normal systems! To protect the innocent, it has to be enabled explicitly at boot time using the kernel option `video=vfb:'. This driver is also available as a module ( = code which can be inserted and removed from the running kernel whenever you want). The module will be called vfb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say N. source "drivers/video/console/Kconfig" endmenu |
From: James S. <jsi...@us...> - 2002-11-01 23:48:21
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/console In directory usw-pr-cvs1:/tmp/cvs-serv12831/console Added Files: nvvgacon.c vgacon.c Log Message: More files go byebye. --- NEW FILE: nvvgacon.c --- /* * nvvgacon.c -- Low level NVIDIA VGA based console driver * * Written by Matan Ziv-Av <ma...@sv...> * * This file is based on the VGA console driver (vgacon.c) and the MDA * console driver (mdacon.c): * * (c) 1998 Andrew Apted <aj...@ne...> * * including portions (c) 1995-1998 Patrick Caulfield. * * Created 28 Sep 1997 by Geert Uytterhoeven * * Rewritten by Martin Mares <mj...@uc...>, July 1998 * * and on the old console.c, vga.c and vesa_blank.c drivers: * * Copyright (C) 1991, 1992 Linus Torvalds * 1995 Jay Estabrook * * 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. */ #define VT_BUF_HAVE_MEMSETW #define VT_BUF_HAVE_MEMCPYW #define VT_BUF_HAVE_MEMMOVEW #include <linux/config.h> #include <linux/types.h> #include <linux/sched.h> #include <linux/fs.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/tty.h> #include <linux/string.h> #include <linux/kd.h> #include <linux/slab.h> #include <linux/console.h> #include <linux/vt_buffer.h> #include <linux/vt_kern.h> #include <linux/ioport.h> #include <linux/init.h> #include <linux/spinlock.h> #include <linux/pci.h> #include "vga.h" #define BLANK 0x0020 static spinlock_t nvvgacon_lock = SPIN_LOCK_UNLOCKED; /* * Interface used by the world */ static const char *nvvgacon_startup(struct vt_struct *vt, int init); static void nvvgacon_init(struct vc_data *c); static void nvvgacon_deinit(struct vc_data *c); static void nvvgacon_cursor(struct vc_data *c, int mode); static int nvvgacon_switch(struct vc_data *c); static int nvvgacon_blank(struct vc_data *c, int blank); static int nvvgacon_font_op(struct vc_data *c, struct console_font_op *op); static int nvvgacon_set_palette(struct vc_data *c, unsigned char *table); static int nvvgacon_scrolldelta(struct vc_data *c, int lines); static int nvvgacon_set_origin(struct vc_data *c); static int nvvgacon_scroll(struct vc_data *c, int t, int b, int dir, int lines); static u8 nvvgacon_build_attr(struct vc_data *c, u8 color, u8 intensity, u8 blink, u8 underline, u8 reverse); static void nvvgacon_invert_region(struct vc_data *c, u16 *p, int count); static void nvvgacon_bmove(struct vc_data *c, int sy, int sx, int dy, int dx, int height, int width); static void nvvgacon_clear(struct vc_data *c, int y, int x, int height, int width); //static unsigned long nvvgacon_uni_pagedir[2]; const struct consw nvvga_con; /* Description of the hardware situation */ static char *nvvga_vram_base; /* */ static char *nvvga_mmio_base0; /* misc, seq and graphics*/ static char *nvvga_mmio_base1; /* crt and attribute */ static char *nvvga_mmio_base2; /* dac */ static unsigned char nvvga_font_is_default = 1; static int nvvga_vesa_blanked; static int nvvga_palette_blanked; static int nvvga_is_gfx; static int nvvga_512_chars; static char *nvvga_video_port_reg, *seq_port_reg; static char *nvvga_video_port_val, *seq_port_val; static char *video_misc_wr, *video_misc_rd; static char *attrib_port; static char *dac_reg, *dac_val; static int vram = 0; static struct vc_data nvvga_default; #ifdef MODULE_PARM MODULE_PARM(vram, "i"); #endif static inline void write_vga(unsigned char reg, unsigned int val) { unsigned int v1, v2; v1 = reg + (val & 0xff00); v2 = reg + 1 + ((val << 8) & 0xff00); writew(v1, nvvga_video_port_reg); writew(v2, nvvga_video_port_reg); } #undef scr_memsetw #undef scr_memcpyw #undef scr_memmovew static inline void scr_memsetw(u16 *dest, u16 val, unsigned int length) { for(length >>= 1;length>0;length--) { scr_writew(val,dest); dest+=4; } } static inline void scr_memcpyw(u16 *dest, u16 *src, unsigned int length) { for(length >>= 1;length>0;length--) { scr_writew(scr_readw(src),dest); dest+=4; src+=4; } } static inline void scr_memmovew(u16 *dest, u16 *src, unsigned int length) { if(dest<src)scr_memcpyw(dest,src,length); else { length >>= 1; dest+=4*length-4; src+=4*length-4; for(;length>0;length--) { scr_writew(scr_readw(src),dest); dest-=4; src-=4; } } } int nvvgacon_detect(void) { unsigned long vram_base, mmio_base; struct pci_dev *dev = NULL; while ((dev = pci_find_device(PCI_VENDOR_ID_NVIDIA,PCI_ANY_ID,dev))) { vram_base = dev->resource[1].start; mmio_base = dev->resource[0].start; nvvga_vram_base=ioremap(vram_base,8*64*1024); nvvga_mmio_base0=ioremap(mmio_base+0x0c0000,1024); nvvga_mmio_base1=ioremap(mmio_base+0x601000,1024); nvvga_mmio_base2=ioremap(mmio_base+0x681000,1024); nvvga_video_port_reg=nvvga_mmio_base1+0x3d4; nvvga_video_port_val=nvvga_mmio_base1+0x3d5; seq_port_reg=nvvga_mmio_base0+0x3c4; seq_port_val=nvvga_mmio_base0+0x3c5; video_misc_wr=nvvga_mmio_base0+0x3c2; video_misc_rd=nvvga_mmio_base0+0x3cc; dac_reg=nvvga_mmio_base2+0x3c8; dac_val=nvvga_mmio_base2+0x3c9; attrib_port=nvvga_mmio_base1+0x3c0; } if (!dev) return 1; return 0; } #ifdef MODULE static const char *nvvgacon_startup(struct vt_struct *vt, int init) #else static const char __init *nvvgacon_startup(struct vt_struct *vt, int init) #endif { struct vc_data *vc = &nvvga_default; int i; if (!nvvgacon_detect()) { printk("nvvgacon: NVIDIA card not detected\n"); return NULL; } vt->default_mode = vc; for (i=0; i<16; i++) { readb(nvvga_mmio_base1+0x3da); writeb(i, attrib_port); writeb(i, attrib_port); } writeb(0x20, attrib_port); for (i=0; i<16; i++) { writeb (color_table[i], dac_reg) ; writeb (default_red[i], dac_val) ; writeb (default_grn[i], dac_val) ; writeb (default_blu[i], dac_val) ; } vc->vc_cols = 80; vc->vc_rows = 25; vc->vc_font.height = 16; MOD_INC_USE_COUNT; return "NVVGACON"; } static void nvvgacon_init(struct vc_data *vc) { vc->vc_can_do_color = 1; vc->vc_complement_mask = 0x7700; vc->vc_cols = vc->display_fg->default_mode->vc_cols; vc->vc_rows = vc->display_fg->default_mode->vc_rows; } static inline void nvvga_set_mem_top(struct vc_data *c) { write_vga(12, (c->vc_visible_origin)/2); } static void nvvgacon_deinit(struct vc_data *c) { /* MOD_DEC_USE_COUNT; */ } static u8 nvvgacon_build_attr(struct vc_data *c, u8 color, u8 intensity, u8 blink, u8 underline, u8 reverse) { u8 attr = color; if (underline) attr = (attr & 0xf0) | c->vc_ulcolor; else if (intensity == 0) attr = (attr & 0xf0) | c->vc_halfcolor; if (reverse) attr = ((attr) & 0x88) | ((((attr) >> 4) | ((attr) << 4)) & 0x77); if (blink) attr ^= 0x80; if (intensity == 2) attr ^= 0x08; return attr; } static void nvvgacon_invert_region(struct vc_data *c, u16 *p, int count) { while (count--) { u16 a = scr_readw(p); a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4); scr_writew(a, p); p++; } } static void nvvgacon_set_cursor_size(int xpos, int from, int to) { unsigned long flags; int curs, cure; static int lastfrom, lastto; if ((from == lastfrom) && (to == lastto)) return; lastfrom = from; lastto = to; spin_lock_irqsave(&nvvgacon_lock, flags); writeb(0x0a, nvvga_video_port_reg); /* Cursor start */ curs = readb(nvvga_video_port_val); writeb(0x0b, nvvga_video_port_reg); /* Cursor end */ cure = readb(nvvga_video_port_val); curs = (curs & 0xc0) | from; cure = (cure & 0xe0) | to; writeb(0x0a, nvvga_video_port_reg); /* Cursor start */ writeb(curs, nvvga_video_port_val); writeb(0x0b, nvvga_video_port_reg); /* Cursor end */ writeb(cure, nvvga_video_port_val); spin_unlock_irqrestore(&nvvgacon_lock, flags); } static void nvvgacon_cursor(struct vc_data *vc, int mode) { if (vc->vc_origin != vc->vc_visible_origin) nvvgacon_scrolldelta(vc, 0); switch (mode) { case CM_ERASE: write_vga(14, (64*1024 - 1)); break; case CM_MOVE: case CM_DRAW: write_vga(14, vc->vc_x + vc->vc_cols * vc->vc_y); switch (vc->vc_cursor_type & 0x0f) { case CUR_UNDERLINE: nvvgacon_set_cursor_size(vc->vc_x, vc->vc_font.height - (vc->vc_font.height < 10 ? 2 : 3), vc->vc_font.height - (vc->vc_font.height < 10 ? 1 : 2)); break; case CUR_TWO_THIRDS: nvvgacon_set_cursor_size(vc->vc_x, vc->vc_font.height/3, vc->vc_font.height - (vc->vc_font.height < 10 ? 1 : 2)); break; case CUR_LOWER_THIRD: nvvgacon_set_cursor_size(vc->vc_x, (vc->vc_font.height*2) / 3, vc->vc_font.height - (vc->vc_font.height < 10 ? 1 : 2)); break; case CUR_LOWER_HALF: nvvgacon_set_cursor_size(vc->vc_x,vc->vc_font.height/2, vc->vc_font.height - (vc->vc_font.height < 10 ? 1 : 2)); break; case CUR_NONE: nvvgacon_set_cursor_size(vc->vc_x, 31, 30); break; default: nvvgacon_set_cursor_size(vc->vc_x,1,vc->vc_font.height); break; } break; } } static int nvvgacon_switch(struct vc_data *vc) { /* * We need to save screen size here as it's the only way * we can spot the screen has been resized and we need to * set size of freshly allocated screens ourselves. */ return 1; } static void nvvga_set_palette(struct vc_data *vc, unsigned char *table) { int i, j ; for (i=j=0; i<16; i++) { writeb (table[i], dac_reg) ; writeb (vc->vc_palette[j++]>>2, dac_val) ; writeb (vc->vc_palette[j++]>>2, dac_val) ; writeb (vc->vc_palette[j++]>>2, dac_val) ; } } static int nvvgacon_set_palette(struct vc_data *vc, unsigned char *table) { if (nvvga_palette_blanked) return -EINVAL; nvvga_set_palette(vc, table); return 0; } /* structure holding original VGA register settings */ static struct { unsigned char SeqCtrlIndex; /* Sequencer Index reg. */ unsigned char CrtCtrlIndex; /* CRT-Contr. Index reg. */ unsigned char CrtMiscIO; /* Miscellaneous register */ unsigned char HorizontalTotal; /* CRT-Controller:00h */ unsigned char HorizDisplayEnd; /* CRT-Controller:01h */ unsigned char StartHorizRetrace; /* CRT-Controller:04h */ unsigned char EndHorizRetrace; /* CRT-Controller:05h */ unsigned char Overflow; /* CRT-Controller:07h */ unsigned char StartVertRetrace; /* CRT-Controller:10h */ unsigned char EndVertRetrace; /* CRT-Controller:11h */ unsigned char ModeControl; /* CRT-Controller:17h */ unsigned char ClockingMode; /* Seq-Controller:01h */ } nvvga_state; static void nvvga_vesa_blank(int mode) { /* save original values of VGA controller registers */ if(!nvvga_vesa_blanked) { spin_lock_irq(&nvvgacon_lock); nvvga_state.SeqCtrlIndex = readb(seq_port_reg); nvvga_state.CrtCtrlIndex = readb(nvvga_video_port_reg); nvvga_state.CrtMiscIO = readb(video_misc_rd); spin_unlock_irq(&nvvgacon_lock); writeb(0x00,nvvga_video_port_reg); /* HorizontalTotal */ nvvga_state.HorizontalTotal = readb(nvvga_video_port_val); writeb(0x01,nvvga_video_port_reg); /* HorizDisplayEnd */ nvvga_state.HorizDisplayEnd = readb(nvvga_video_port_val); writeb(0x04,nvvga_video_port_reg); /* StartHorizRetrace */ nvvga_state.StartHorizRetrace = readb(nvvga_video_port_val); writeb(0x05,nvvga_video_port_reg); /* EndHorizRetrace */ nvvga_state.EndHorizRetrace = readb(nvvga_video_port_val); writeb(0x07,nvvga_video_port_reg); /* Overflow */ nvvga_state.Overflow = readb(nvvga_video_port_val); writeb(0x10,nvvga_video_port_reg); /* StartVertRetrace */ nvvga_state.StartVertRetrace = readb(nvvga_video_port_val); writeb(0x11,nvvga_video_port_reg); /* EndVertRetrace */ nvvga_state.EndVertRetrace = readb(nvvga_video_port_val); writeb(0x17,nvvga_video_port_reg); /* ModeControl */ nvvga_state.ModeControl = readb(nvvga_video_port_val); writeb(0x01,seq_port_reg); /* ClockingMode */ nvvga_state.ClockingMode = readb(seq_port_val); } /* assure that video is enabled */ /* "0x20" is VIDEO_ENABLE_bit in register 01 of sequencer */ spin_lock_irq(&nvvgacon_lock); writeb(0x01,seq_port_reg); writeb(nvvga_state.ClockingMode | 0x20,seq_port_val); /* test for vertical retrace in process.... */ if ((nvvga_state.CrtMiscIO & 0x80) == 0x80) writeb(nvvga_state.CrtMiscIO & 0xef,video_misc_wr); /* * Set <End of vertical retrace> to minimum (0) and * <Start of vertical Retrace> to maximum (incl. overflow) * Result: turn off vertical sync (VSync) pulse. */ if (mode & VESA_VSYNC_SUSPEND) { writeb(0x10,nvvga_video_port_reg); /* StartVertRetrace */ writeb(0xff,nvvga_video_port_val); /* maximum value */ writeb(0x11,nvvga_video_port_reg); /* EndVertRetrace */ writeb(0x40,nvvga_video_port_val); /* minimum (bits 0..3) */ writeb(0x07,nvvga_video_port_reg); /* Overflow */ writeb(nvvga_state.Overflow | 0x84,nvvga_video_port_val); /* bits 9,10 of vert. retrace */ } if (mode & VESA_HSYNC_SUSPEND) { /* * Set <End of horizontal retrace> to minimum (0) and * <Start of horizontal Retrace> to maximum * Result: turn off horizontal sync (HSync) pulse. */ writeb(0x04,nvvga_video_port_reg); /* StartHorizRetrace */ writeb(0xff,nvvga_video_port_val); /* maximum */ writeb(0x05,nvvga_video_port_reg); /* EndHorizRetrace */ writeb(0x00,nvvga_video_port_val); /* minimum (0) */ } /* restore both index registers */ writeb(nvvga_state.SeqCtrlIndex,seq_port_reg); writeb(nvvga_state.CrtCtrlIndex,nvvga_video_port_reg); spin_unlock_irq(&nvvgacon); } static void nvvga_vesa_unblank(void) { /* restore original values of VGA controller registers */ spin_lock_irq(&nvvgacon_lock); writeb(nvvga_state.CrtMiscIO,video_misc_wr); writeb(0x00,nvvga_video_port_reg); /* HorizontalTotal */ writeb(nvvga_state.HorizontalTotal,nvvga_video_port_val); writeb(0x01,nvvga_video_port_reg); /* HorizDisplayEnd */ writeb(nvvga_state.HorizDisplayEnd,nvvga_video_port_val); writeb(0x04,nvvga_video_port_reg); /* StartHorizRetrace */ writeb(nvvga_state.StartHorizRetrace,nvvga_video_port_val); writeb(0x05,nvvga_video_port_reg); /* EndHorizRetrace */ writeb(nvvga_state.EndHorizRetrace,nvvga_video_port_val); writeb(0x07,nvvga_video_port_reg); /* Overflow */ writeb(nvvga_state.Overflow,nvvga_video_port_val); writeb(0x10,nvvga_video_port_reg); /* StartVertRetrace */ writeb(nvvga_state.StartVertRetrace,nvvga_video_port_val); writeb(0x11,nvvga_video_port_reg); /* EndVertRetrace */ writeb(nvvga_state.EndVertRetrace,nvvga_video_port_val); writeb(0x17,nvvga_video_port_reg); /* ModeControl */ writeb(nvvga_state.ModeControl,nvvga_video_port_val); writeb(0x01,seq_port_reg); /* ClockingMode */ writeb(nvvga_state.ClockingMode,seq_port_val); /* restore index/control registers */ writeb(nvvga_state.SeqCtrlIndex,seq_port_reg); writeb(nvvga_state.CrtCtrlIndex,nvvga_video_port_reg); spin_unlock_irq(&nvvgacon_lock); } static void nvvga_pal_blank(void) { int i; for (i=0; i<16; i++) { writeb (i, dac_reg) ; writeb (0, dac_val) ; writeb (0, dac_val) ; writeb (0, dac_val) ; } } static int nvvgacon_blank(struct vc_data *vc, int blank) { switch (blank) { case 0: /* Unblank */ if (nvvga_vesa_blanked) { nvvga_vesa_unblank(); nvvga_vesa_blanked = 0; } if (nvvga_palette_blanked) { nvvga_set_palette(vc, color_table); nvvga_palette_blanked = 0; return 0; } nvvga_is_gfx = 0; /* Tell console.c that it has to restore the screen itself */ return 1; case 1: /* Normal blanking */ nvvga_pal_blank(); nvvga_palette_blanked = 1; nvvgacon_set_origin(vc); scr_memsetw((void *)nvvga_vram_base, BLANK, vc->vc_screenbuf_size); return 1; case -1: /* Entering graphic mode */ scr_memsetw((void *)nvvga_vram_base, BLANK, vc->vc_screenbuf_size); nvvga_is_gfx = 1; return 1; default: /* VESA blanking */ nvvga_vesa_blank(blank-1); nvvga_vesa_blanked = blank; return 0; } } /* * PIO_FONT support. * * The font loading code goes back to the codepage package by * Joel Hoffman (jo...@wa...). (He reports that the original * reference is: "From: p. 307 of _Programmer's Guide to PC & PS/2 * Video Systems_ by Richard Wilton. 1987. Microsoft Press".) * * Change for certain monochrome monitors by Yury Shevchuck * (si...@bo...). */ #define cmapsz 8192 static int nvvgacon_do_font_op(char *arg, int set, int ch512) { int i; char *charmap; int beg; // char * video_port_status = nvvga_video_port_reg + 6; int font_select = 0x00; charmap = nvvga_vram_base+3; beg = 0x06; #ifdef BROKEN_GRAPHICS_PROGRAMS /* * All fonts are loaded in slot 0 (0:1 for 512 ch) */ if (!arg) return -EINVAL; /* Return to default font not supported */ nvvga_font_is_default = 0; font_select = ch512 ? 0x04 : 0x00; #else /* * The default font is kept in slot 0 and is never touched. * A custom font is loaded in slot 2 (256 ch) or 2:3 (512 ch) */ if (set) { nvvga_font_is_default = !arg; if (!arg) ch512 = 0; /* Default font is always 256 */ font_select = arg ? (ch512 ? 0x0e : 0x0a) : 0x00; } if ( !nvvga_font_is_default ) charmap += 4*cmapsz * 8; #endif if (arg) { if (set) for (i=0; i<cmapsz ; i++) writeb(arg[i], charmap + i * 8); else for (i=0; i<cmapsz ; i++) arg[i] = readb(charmap + i * 8); /* * In 512-character mode, the character map is not contiguous if * we want to remain EGA compatible -- which we do */ if (ch512) { charmap += 2*cmapsz * 8; arg += cmapsz; if (set) for (i=0; i<cmapsz ; i++) writeb(arg[i], charmap + i * 8); else for (i=0; i<cmapsz ; i++) arg[i] = readb(charmap + i * 8); } } spin_lock_irq(&nvvgacon_lock); writeb( 0x00, seq_port_reg ); /* First, the sequencer */ writeb( 0x01, seq_port_val ); /* Synchronous reset */ if (set) { writeb( 0x03, seq_port_reg ); /* Character Map Select */ writeb( font_select, seq_port_val ); } writeb( 0x00, seq_port_reg ); writeb( 0x03, seq_port_val ); /* clear synchronous reset */ spin_unlock_irq(&nvvgacon_lock); return 0; } /* * Adjust the screen to fit a font of a certain height */ static int nvvgacon_adjust_height(struct vc_data *vc, unsigned fontheight) { int rows, maxscan; unsigned char ovr, vde, fsr; if (fontheight == vc->vc_font.height) return 0; vc->vc_font.height = fontheight; rows = vc->vc_scan_lines/fontheight; /* Number of video rows we end up with */ maxscan = rows*fontheight - 1; /* Scan lines to actually display-1 */ /* Reprogram the CRTC for the new font size Note: the attempt to read the overflow register will fail on an EGA, but using 0xff for the previous value appears to be OK for EGA text modes in the range 257-512 scan lines, so I guess we don't need to worry about it. The same applies for the spill bits in the font size and cursor registers; they are write-only on EGA, but it appears that they are all don't care bits on EGA, so I guess it doesn't matter. */ spin_lock_irq(&nvvgacon_lock); writeb( 0x07, nvvga_video_port_reg ); /* CRTC overflow register */ ovr = readb(nvvga_video_port_val); writeb( 0x09, nvvga_video_port_reg ); /* Font size register */ fsr = readb(nvvga_video_port_val); spin_unlock_irq(&nvvgacon_lock); vde = maxscan & 0xff; /* Vertical display end reg */ ovr = (ovr & 0xbd) + /* Overflow register */ ((maxscan & 0x100) >> 7) + ((maxscan & 0x200) >> 3); fsr = (fsr & 0xe0) + (fontheight-1); /* Font size register */ spin_lock_irq(&nvvgacon_lock); writeb( 0x07, nvvga_video_port_reg ); /* CRTC overflow register */ writeb( ovr, nvvga_video_port_val ); writeb( 0x09, nvvga_video_port_reg ); /* Font size */ writeb( fsr, nvvga_video_port_val ); writeb( 0x12, nvvga_video_port_reg ); /* Vertical display limit */ writeb( vde, nvvga_video_port_val ); spin_unlock_irq(&nvvgacon_lock); vc_resize(vc, rows, 0); /* Adjust console size */ return 0; } static int nvvgacon_font_op(struct vc_data *vc, struct console_font_op *op) { int rc; if (op->op == KD_FONT_OP_SET) { if (op->width != 8 || (op->charcount != 256 && op->charcount != 512)) return -EINVAL; rc = nvvgacon_do_font_op(op->data, 1, op->charcount == 512); if (!rc && !(op->flags & KD_FONT_FLAG_DONT_RECALC)) rc = nvvgacon_adjust_height(vc, op->height); } else if (op->op == KD_FONT_OP_GET) { op->width = 8; op->height = vc->vc_font.height; op->charcount = nvvga_512_chars ? 512 : 256; if (!op->data) return 0; rc = nvvgacon_do_font_op(op->data, 0, 0); } else rc = -ENOSYS; return rc; } static int nvvgacon_set_origin(struct vc_data *vc) { if (nvvga_is_gfx /* We don't play origin tricks in graphic modes */ #if 0 || (console_blanked && !nvvga_palette_blanked) #endif ) /* Nor we write to blanked screens */ return 0; nvvga_set_mem_top(vc); return 1; } static int nvvgacon_scrolldelta(struct vc_data *vc, int lines) { return 0; } static int nvvgacon_scroll(struct vc_data *vc, int t, int b, int dir, int lines) { if (!lines) return 0; if (lines > vc->vc_rows) /* maximum realistic size */ lines = vc->vc_rows; switch (dir) { case SM_UP: nvvgacon_bmove(vc,lines, 0, 0, 0, vc->vc_rows-lines, vc->vc_cols); nvvgacon_clear(vc, vc->vc_rows - lines, 0, lines, vc->vc_cols); break; case SM_DOWN: nvvgacon_bmove(vc, 0, 0, lines, 0, vc->vc_rows - lines, vc->vc_cols); nvvgacon_clear(vc, 0, 0, lines, vc->vc_cols); break; } return 0; } #define NVVGA_ADDR(vc,x,y) ((u16 *) nvvga_vram_base + ((y)*vc->vc_cols + (x))*4) static void nvvgacon_putc(struct vc_data *vc, int ch, int y, int x) { scr_writew(ch, NVVGA_ADDR(vc, x, y)); } static void nvvgacon_putcs(struct vc_data *vc, const unsigned short *s, int count, int y, int x) { u16 *dest = NVVGA_ADDR(vc, x, y); for (; count > 0; count--) { scr_writew(readw(s), dest); s++; dest+=4; } } static void nvvgacon_clear(struct vc_data *vc, int y, int x, int height, int width) { u16 *dest = NVVGA_ADDR(vc, x, y); u16 eattr = vc->vc_video_erase_char; if (width <= 0 || height <= 0) return; for (; height > 0; height--, dest += vc->vc_cols*4) scr_memsetw(dest,eattr,width*2); } static void nvvgacon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, int height, int width) { u16 *src, *dest; int i; if (width <= 0 || height <= 0) { return; } else if (dy < sy || (dy == sy && dx < sx)) { src = NVVGA_ADDR(vc, sx, sy); dest = NVVGA_ADDR(vc, dx, dy); for (; height > 0; height--) { for(i=0;i<width;i++)scr_writew(scr_readw(src+4*i),dest+4*i); src += vc->vc_cols*4; dest += vc->vc_cols*4; } } else { src = NVVGA_ADDR(vc, sx, sy+height-1); dest = NVVGA_ADDR(vc, dx, dy+height-1); for (; height > 0; height--) { for(i=width-1;i>=0;i--)scr_writew(scr_readw(src+4*i),dest+4*i); src -= vc->vc_cols*4; dest -= vc->vc_cols*4; } } } /* * The console `switch' structure for the VGA based console */ const struct consw nvvga_con = { con_startup: nvvgacon_startup, con_init: nvvgacon_init, con_deinit: nvvgacon_deinit, con_clear: nvvgacon_clear, con_putc: nvvgacon_putc, con_putcs: nvvgacon_putcs, con_cursor: nvvgacon_cursor, con_scroll: nvvgacon_scroll, con_bmove: nvvgacon_bmove, con_switch: nvvgacon_switch, con_blank: nvvgacon_blank, con_font_op: nvvgacon_font_op, con_set_palette: nvvgacon_set_palette, con_scrolldelta: nvvgacon_scrolldelta, con_build_attr: nvvgacon_build_attr, con_invert_region: nvvgacon_invert_region, }; #ifndef MODULE void __init nvvgacon_setup(char *str, int *ints) { return; } #endif int __init nvvgacon_module_init(void) { const char *display_desc = NULL; struct vt_struct *vt; struct vc_data *vc; long q; /* Allocate the memory we need */ vt = (struct vt_struct *) kmalloc(sizeof(struct vt_struct),GFP_KERNEL); if (!vt) return; memset(vt, 0, sizeof(struct vt_struct)); vt->default_mode = (struct vc_data *) kmalloc(sizeof(struct vc_data), GFP_KERNEL); if (!vt->default_mode) { kfree(vt); return; } vc = (struct vc_data *) kmalloc(sizeof(struct vc_data), GFP_KERNEL); if (!vc) { kfree(vt->default_mode); kfree(vt); return; } vt->kmalloced = 1; vt->vt_sw = &nvvga_con; vt->vcs.vc_cons[0] = vc; #ifdef MODULE display_desc = vt_map_display(vt, 1); #else display_desc = vt_map_display(vt, 0); #endif q = (long) kmalloc(vc->vc_screenbuf_size, GFP_KERNEL); if (!display_desc || !q) { kfree(vt->vcs.vc_cons[0]); kfree(vt->default_mode); kfree(vt); if (q) kfree((char *) q); return; } vc->vc_screenbuf = (unsigned short *) q; vc_init(vc, 1); printk("Console: color %s %dx%d\n", display_desc, vc->vc_cols, vc->vc_rows); } void __exit nvvgacon_module_exit() { /* release_vt(&nvvga_vt); */ } module_init(nvvgacon_module_init); module_exit(nvvgacon_module_exit); MODULE_LICENSE("GPL"); --- NEW FILE: vgacon.c --- /* * linux/drivers/video/vgacon.c -- Low level VGA based console driver * * Created 28 Sep 1997 by Geert Uytterhoeven * * Rewritten by Martin Mares <mj...@uc...>, July 1998 * * This file is based on the old console.c, vga.c and vesa_blank.c drivers. * * Copyright (C) 1991, 1992 Linus Torvalds * 1995 Jay Estabrook * * User definable mapping table and font loading by Eugene G. Crosser, * <cr...@av...> * * Improved loadable font/UTF-8 support by H. Peter Anvin * Feb-Sep 1995 <pet...@li...> * * Colour palette handling, by Simon Tatham [...1026 lines suppressed...] .con_invert_region = vgacon_invert_region, }; int __init vga_console_init(void) { const char *display_desc = NULL; memset(&vga_vt, 0, sizeof(struct vt_struct)); vga_vt.kmalloced = 0; vga_vt.vt_sw = &vga_con; display_desc = vt_map_display(&vga_vt, 1); if (!display_desc) return -ENODEV; printk("Console: %s %s %dx%d\n", vga_vt.default_mode->vc_can_do_color ? "colour" : "mono", display_desc, vga_vt.default_mode->vc_cols, vga_vt.default_mode->vc_rows); return 0; } MODULE_LICENSE("GPL"); |
From: James S. <jsi...@us...> - 2002-11-01 23:48:21
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv12831 Removed Files: promcon.c Log Message: More files go byebye. --- promcon.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:46:11
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv12123 Modified Files: fbcmap.c Removed Files: Config.in dummycon.c fbcon.c fbcon.h mdacon.c newport_con.c nvvgacon.c pm3fb.c pm3fb.h sa1100fb.c sa1100fb.h skeletonfb.c tx3912fb.c tx3912fb.h vgacon.c Log Message: So long Index: fbcmap.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/fbcmap.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- fbcmap.c 15 Jun 2002 19:17:10 -0000 1.13 +++ fbcmap.c 1 Nov 2002 23:46:07 -0000 1.14 @@ -115,13 +115,12 @@ return 0; } - /** - * fb_dealloc_cmap - deallocate a colormap - * @cmap: frame buffer colormap structure - * - * Deallocates a colormap that was previously allocated with - * fb_alloc_cmap(). + * fb_dealloc_cmap - deallocate a colormap + * @cmap: frame buffer colormap structure + * + * Deallocates a colormap that was previously allocated with + * fb_alloc_cmap(). * */ @@ -140,7 +139,6 @@ cmap->len = 0; } - /** * fb_copy_cmap - copy a colormap * @from: frame buffer colormap structure @@ -197,58 +195,6 @@ } } - -/** - * fb_get_cmap - get a colormap - * @cmap: frame buffer colormap - * @kspc: boolean, 0 copy local, 1 put_user() function - * @getcolreg: pointer to a function to get a color register - * @info: frame buffer info structure - * - * Get a colormap @cmap for a screen of device @info. - * - * Returns negative errno on error, or zero on success. - * - */ - -int fb_get_cmap(struct fb_cmap *cmap, int kspc, struct fb_info *info) -{ - u16 *red, *green, *blue, *transp; - int i, start; - - red = cmap->red; - green = cmap->green; - blue = cmap->blue; - transp = cmap->transp; - start = cmap->start; - if (start < 0) - return -EINVAL; - for (i = 0; i < cmap->len; i++) { - if (!&info->cmap) - return 0; - if (kspc) { - *red = info->cmap.red[i]; - *green = info->cmap.green[i]; - *blue = info->cmap.blue[i]; - if (transp) - *transp = info->cmap.transp[i]; - } else { - put_user(info->cmap.red[i], red); - put_user(info->cmap.green[i], green); - put_user(info->cmap.blue[i], blue); - if (transp) - put_user(info->cmap.transp[i], transp); - } - red++; - green++; - blue++; - if (transp) - transp++; - } - return 0; -} - - /** * fb_set_cmap - set the colormap * @cmap: frame buffer colormap structure @@ -366,7 +312,6 @@ EXPORT_SYMBOL(fb_alloc_cmap); EXPORT_SYMBOL(fb_dealloc_cmap); EXPORT_SYMBOL(fb_copy_cmap); -EXPORT_SYMBOL(fb_get_cmap); EXPORT_SYMBOL(fb_set_cmap); EXPORT_SYMBOL(fb_default_cmap); EXPORT_SYMBOL(fb_invert_cmaps); --- Config.in DELETED --- --- dummycon.c DELETED --- --- fbcon.c DELETED --- --- fbcon.h DELETED --- --- mdacon.c DELETED --- --- newport_con.c DELETED --- --- nvvgacon.c DELETED --- --- pm3fb.c DELETED --- --- pm3fb.h DELETED --- --- sa1100fb.c DELETED --- --- sa1100fb.h DELETED --- --- skeletonfb.c DELETED --- --- tx3912fb.c DELETED --- --- tx3912fb.h DELETED --- --- vgacon.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:44:32
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/tdfx In directory usw-pr-cvs1:/tmp/cvs-serv11523 Removed Files: 3dfxfb.c Makefile sstfb.c Log Message: Bye Bye --- 3dfxfb.c DELETED --- --- Makefile DELETED --- --- sstfb.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:43:04
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv10968 Modified Files: Makefile Log Message: Synced up Makefile. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/Makefile,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- Makefile 22 Jun 2002 17:50:59 -0000 1.50 +++ Makefile 1 Nov 2002 23:43:02 -0000 1.51 @@ -2,33 +2,18 @@ # 5 Aug 1999, James Simmons, <mailto:jsi...@us...> # Rewritten to use lists instead of if-statements. -O_TARGET := video.o - -obj-y := - # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. -export-objs := fbmem.o fbgen.o fbcmap.o fbmon.o modedb.o vga.o cyber2000fb.o sa1100fb.o +export-objs := fbmem.o fbcmap.o fbgen.o fbmon.o modedb.o cfbfillrect.o \ + cfbcopyarea.o cfbimgblt.o cyber2000fb.o # Each configuration option enables a list of files. -obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o -obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o -obj-$(CONFIG_STI_CONSOLE) += sticon.o sticon-bmode.o sticore.o -obj-$(CONFIG_VGA_CONSOLE) += vgacon.o vga.o -obj-$(CONFIG_MDA_CONSOLE) += mdacon.o -obj-$(CONFIG_NVIDIA_CONSOLE) += nvvgacon.o -obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o -obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o - -subdir-$(CONFIG_FONTS) += fonts -ifeq ($(CONFIG_FONTS),y) -obj-y += fonts/fonts.o -endif +obj-$(CONFIG_VT) += console/ # Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x -obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbgen.o fbmon.o +obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbgen.o # Only include macmodes.o if we have FB support and are PPC ifeq ($(CONFIG_FB),y) obj-$(CONFIG_PPC) += macmodes.o @@ -37,33 +22,35 @@ obj-$(CONFIG_FB_ACORN) += acornfb.o obj-$(CONFIG_FB_AMIGA) += amifb.o obj-$(CONFIG_FB_PM2) += pm2fb.o -obj-$(CONFIG_FB_PM3) += pm3fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_PM3) += pm3fb.o +obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_Q40) += q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_ATARI) += atafb.o -obj-$(CONFIG_FB_ATY128) += aty128fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_RADEON) += radeonfb.o -obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_ATY128) += aty128fb.o +obj-$(CONFIG_FB_RADEON) += radeonfb.o +obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_IGA) += igafb.o obj-$(CONFIG_FB_CONTROL) += controlfb.o obj-$(CONFIG_FB_PLATINUM) += platinumfb.o obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o obj-$(CONFIG_FB_CT65550) += chipsfb.o -obj-$(CONFIG_FB_ANAKIN) += anakinfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_ANAKIN) += anakinfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_CYBER) += cyberfb.o +obj-$(CONFIG_FB_CYBER) += cyberfb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o -obj-$(CONFIG_FB_SGIVW) += sgivwfb.o -obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o +obj-$(CONFIG_FB_SGIVW) += sgivwfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_3DFX) += tdfxfb.o +obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblit.o cfbcopyarea.o obj-$(CONFIG_FB_IMSTT) += imsttfb.o obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o obj-$(CONFIG_FB_CLGEN) += clgenfb.o +obj-$(CONFIG_FB_TRIDENT) += tridentfb.o obj-$(CONFIG_FB_S3TRIO) += S3triofb.o obj-$(CONFIG_FB_TGA) += tgafb.o obj-$(CONFIG_FB_VESA) += vesafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_VGA16) += vga16fb.o vga.o +obj-$(CONFIG_FB_VGA16) += vga16fb.o fbcon-vga-planes.o obj-$(CONFIG_FB_VIRGE) += virgefb.o obj-$(CONFIG_FB_G364) += g364fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_FM2) += fm2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o @@ -75,7 +62,7 @@ obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o -obj-$(CONFIG_FB_STI) += stifb.o sticore.o +obj-$(CONFIG_FB_STI) += stifb.o console/sticore.o obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o @@ -84,30 +71,25 @@ obj-$(CONFIG_FB_MATROX) += matrox/ obj-$(CONFIG_FB_RIVA) += riva/ obj-$(CONFIG_FB_SIS) += sis/ -obj-$(CONFIG_FB_ATY) += aty/ -obj-$(CONFIG_FB_TDFX) += tdfx/ - +obj-$(CONFIG_FB_ATY) += aty/ cfbimgblt.o + obj-$(CONFIG_FB_SUN3) += sun3fb.o obj-$(CONFIG_FB_BWTWO) += bwtwofb.o obj-$(CONFIG_FB_HGA) += hgafb.o -obj-$(CONFIG_FB_SA1100) += sa1100fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_SA1100) += sa1100fb.o obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_HIT) += hitfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_E1355) += epson1355fb.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o -obj-$(CONFIG_FB_ANAKIN) += anakinfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_SIMPLE) += sfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_SED1345) += sed1345fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_R3912) += r3912fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_VR4181) += vr4181fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_VRC4171) += vrc4171fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o + +# Files generated that shall be removed upon make clean +clean-files := promcon_tbl.c include $(TOPDIR)/Rules.make -host-progs := ../char/conmakehash +$(obj)/promcon_tbl.c: $(src)/prom.uni + $(objtree)/scripts/conmakehash $< | \ + sed -e '/#include <[^>]*>/p' -e 's/types/init/' \ + -e 's/dfont\(_uni.*\]\)/promfont\1 __initdata/' > $@ -$(obj)/promcon_tbl.c: $(src)/prom.uni $(obj)/../char/conmakehash - $(obj)/../char/conmakehash $< | \ - sed -e '/#include <[^>]*>/p' -e 's/types/init/' \ - -e 's/dfont\(_uni.*\]\)/promfont\1 __initdata/' > $@ |
From: James S. <jsi...@us...> - 2002-11-01 23:38:36
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/console In directory usw-pr-cvs1:/tmp/cvs-serv9545/console Log Message: Directory /cvsroot/linuxconsole/ruby/linux/drivers/video/console added to the repository |
From: James S. <jsi...@us...> - 2002-11-01 23:38:04
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/tc In directory usw-pr-cvs1:/tmp/cvs-serv9319 Modified Files: Makefile Log Message: Synced up Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/tc/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 25 May 2002 20:32:03 -0000 1.2 +++ Makefile 1 Nov 2002 23:38:01 -0000 1.3 @@ -13,3 +13,4 @@ obj-$(CONFIG_ZS) += zs.o include $(TOPDIR)/Rules.make + |
From: James S. <jsi...@us...> - 2002-11-01 23:37:05
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce In directory usw-pr-cvs1:/tmp/cvs-serv8997 Removed Files: Config.in Makefile Log Message: Outdates?? --- Config.in DELETED --- --- Makefile DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:36:21
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/touchscreen In directory usw-pr-cvs1:/tmp/cvs-serv8735 Removed Files: Config.in Makefile h3600_ts_input.c Log Message: More useless files gone. --- Config.in DELETED --- --- Makefile DELETED --- --- h3600_ts_input.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:33:20
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio In directory usw-pr-cvs1:/tmp/cvs-serv7823 Removed Files: Config.in sun8042.c Log Message: More useless files gone. --- Config.in DELETED --- --- sun8042.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:32:22
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio In directory usw-pr-cvs1:/tmp/cvs-serv7509 Removed Files: parkbd.c q40kbd.c serport.c Log Message: Use proper driver in linus tree. --- parkbd.c DELETED --- --- q40kbd.c DELETED --- --- serport.c DELETED --- |
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv3286 Modified Files: consolemap.c decvte.c keyboard.c selection.c tty_io.c vc_screen.c vt.c vt_ioctl.c Log Message: Synced to console BK Index: consolemap.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/consolemap.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- consolemap.c 30 Oct 2002 17:50:40 -0000 1.13 +++ consolemap.c 1 Nov 2002 23:27:32 -0000 1.14 @@ -9,9 +9,6 @@ * Support for multiple unimaps by Jakub Jelinek <jj...@ul...>, July 1998 * * Fix bug in inverse translation. Stanislav Voronyi <st...@cn...>, Dec 1998 - * - * Adapted for selection in Unicode by <ed...@ra...>, January 1999 - * */ #include <linux/errno.h> @@ -23,282 +20,230 @@ #include <linux/vt_kern.h> [...1131 lines suppressed...] -void __init console_map_init(void) +void __init +console_map_init(void) { struct vt_struct *vt = vt_cons; int i; + + for (i = 0; i < MAX_NR_CONSOLES; i++) { + struct vc_data *vc = vt->vc_cons[i]; - while (vt) { - if (!vt->kmalloced && !*vt->vc_cons[0]->vc_uni_pagedir_loc) - con_set_default_unimap(vt->vc_cons[0]); - vt = vt->next; + if (vc && !*vc->vc_uni_pagedir_loc) + con_set_default_unimap(vc); } - for (i = 0; i < 4; i++) - set_inverse_translations(i); } Index: decvte.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/decvte.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- decvte.c 30 Oct 2002 17:45:06 -0000 1.21 +++ decvte.c 1 Nov 2002 23:27:32 -0000 1.22 @@ -96,10 +96,7 @@ * if below scrolling region */ if (y + 1 == bottom) - if (top == 0 && bottom == video_num_lines) - scroll_up(vc, 1); - else - scroll_region_up(vc, top, bottom, 1); + scroll_region_up(vc, top, bottom, 1); else if (y < video_num_lines - 1) { y++; pos += video_size_row; @@ -116,10 +113,7 @@ * if above scrolling region */ if (y == top) - if (top == 0 && bottom == video_num_lines) - scroll_down(vc, 1); - else - scroll_region_down(vc, top, bottom, 1); + scroll_region_down(vc, top, bottom, 1); else if (y > 0) { y--; pos -= video_size_row; @@ -225,7 +219,7 @@ clear_region(vc, 0, y, x + 1, 1); break; case 2: /* erase whole display */ - count = screensize; + count = video_num_columns * video_num_lines; start = (unsigned short *) origin; clear_region(vc, 0, 0, video_num_columns, video_num_lines); break; @@ -1029,7 +1023,6 @@ cursor_type = CUR_DEFAULT; complement_mask = s_complement_mask; - update_cursor_attr(vc); default_attr(vc); update_attr(vc); @@ -1549,7 +1542,6 @@ else cursor_type = CUR_DEFAULT; priv4 = 0; - update_cursor_attr(vc); return; } break; @@ -1956,7 +1948,7 @@ vte_ed(vc, 2); video_erase_char = (video_erase_char & 0xff00) | ' '; - do_update_region(vc, origin, screensize); + do_update_region(vc, origin, screenbuf_size / 2); } return; case ESgzd4: Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- keyboard.c 30 Oct 2002 18:17:20 -0000 1.78 +++ keyboard.c 1 Nov 2002 23:27:32 -0000 1.79 @@ -271,37 +271,6 @@ } /* - * A note on character conversion: - * - * A keymap maps keycodes to keysyms, which, at present, are 16-bit - * values. If a keysym is < 0xf000 then it specifies a 16-bit Unicode - * character to be queued. If a keysym is >= 0xf000, then 0xf000 is - * subtracted to give a pair of octets, extracted by KTYP and KVAL. - * The KTYP is used as an index into key_handler[] to give a function - * which handles the KVAL. The "normal" key_handler is k_self, which - * treats the KVAL as an 8-bit character to be queued. - * - * When a 16-bit Unicode character is queued it is converted to UTF-8 - * if the keyboard is in Unicode mode; otherwise it is converted to an - * 8-bit character using the current ACM (see consolemap.c). An 8-bit - * character is assumed to be in the character set defined by the - * current ACM, so it is queued unchanged if the keyboard is in 8-bit - * mode; otherwise it is converted using the inverse ACM. - * - * The handling of diacritics uses 8-bit characters, which are - * converted using the inverse ACM, when in Unicode mode. The strings - * bound to function keys are not converted, so they may already - * contain UTF-8. Codes entered using do_ascii() treated as 16-bit and - * converted to UTF-8 in Unicode mode; otherwise they are treated as - * 8-bit and queued unchanged. - * - * Since KTYP is not used in the case of Unicode keysyms, it is not - * possible to use KT_LETTER to implement CapsLock. Either use 8-bit - * keysyms with an appropriate ACM or use the work-around proposed in - * k_lock(). - */ - -/* * Many other routines do put_queue, but I think either * they produce ASCII, or they produce some user-assigned * string, and in both cases we might assume that it is @@ -325,29 +294,6 @@ } } -void put_unicode(struct vc_data *vc, u16 uc) -{ - if (vc->kbd_table.kbdmode == VC_UNICODE) - to_utf8(vc, uc); - else if ((uc & ~0x9f) == 0 || uc == 127) - /* Don't translate control chars */ - put_queue(vc, uc); - else { - unsigned char c; - c = inverse_translate(vc->display_fg->fg_console->vc_translate, uc); - if (c) put_queue(vc, c); - } -} - -static void put_8bit(struct vc_data *vc, u8 c) -{ - /* Don't translate control chars */ - if (vc->kbd_table.kbdmode != VC_UNICODE || c < 32 || c == 127) - put_queue(vc, c); - else - to_utf8(vc, get_acm(vc->display_fg->fg_console->vc_translate)[c]); -} - /* * Called after returning from RAW mode or when changing consoles - recompute * shift_down[] and shift_state from key_down[] maybe called when keymap is @@ -408,7 +354,7 @@ if (ch == ' ' || ch == d) return d; - put_8bit(vc, d); + put_queue(vc, d); return ch; } @@ -418,7 +364,7 @@ static void fn_enter(struct vc_data *vc) { if (diacr) { - put_8bit(vc, diacr); + put_queue(vc, diacr); diacr = 0; } put_queue(vc, 13); @@ -486,6 +432,7 @@ static void fn_lastcons(struct vc_data *vc) { + /* switch to the last used console, ChN */ set_console(vc->display_fg->last_console); } @@ -533,25 +480,12 @@ static void fn_scroll_forw(struct vc_data *vc) { - //scroll_down(vc, 0); - if (vc->vc_visible_origin < vc->vc_origin) { - vc->vc_visible_origin =+ vc->vc_screensize; - do_update_region(vc, vc->vc_visible_origin, vc->vc_screensize); -// scroll_down(vc, vc->vc_rows/2); - } + scroll_down(vc, 0); } static void fn_scroll_back(struct vc_data *vc) { - //scroll_up(vc, 0); - unsigned short *p = (unsigned short *) vc->vc_visible_origin - vc->vc_screensize; - unsigned long q = (unsigned long) p; - - if (q >= ((unsigned long) vc->vc_screenbuf)) { - vc->vc_visible_origin = q; - do_update_region(vc, vc->vc_visible_origin, vc->vc_screensize); -// scroll_up(vc, vc->vc_rows/2); - } + scroll_up(vc, 0); } static void fn_show_mem(struct vc_data *vc) @@ -637,7 +571,7 @@ diacr = value; return; } - put_8bit(vc, value); + put_queue(vc, value); } /* @@ -743,7 +677,7 @@ return; } - put_8bit(vc, pad_chars[value]); + put_queue(vc, pad_chars[value]); if (value == KVAL(K_PENTER) && get_kbd_mode(vc->kbd_table, VC_CRLF)) put_queue(vc, 10); } @@ -782,7 +716,7 @@ /* kludge */ if (up_flag && shift_state != old_state && npadch != -1) { if (vc->kbd_table.kbdmode == VC_UNICODE) - put_unicode(vc, npadch & 0xffff); + to_utf8(vc, npadch & 0xffff); else put_queue(vc, npadch & 0xff); npadch = -1; @@ -827,21 +761,6 @@ { if (up_flag || rep) return; -/* - if (value >= NR_LOCK) { - * - * Change the lock state and - * set the CapsLock LED to the new state - * - unsigned char mask; - - mask = 1 << (value -= NR_LOCK); - if ((vc->kbd_table.lockstate ^= mask) & mask) - set_kbd_led(&vc->kbd_table, VC_CAPSLOCK); - else - clr_kbd_led(&vc->kbd_table, VC_CAPSLOCK); - } else { - * Just change the lock state */ chg_kbd_lock(vc->kbd_table, value); } @@ -1152,17 +1071,17 @@ static void kbd_event(struct input_handle *handle, unsigned int event_type, unsigned int keycode, int down) { - struct vt_struct *vt = (struct vt_struct *) handle->private; + struct vt_struct *vt = vt_cons; - if ((event_type != EV_KEY) || !vt || !vt->fg_console->vc_kam) + if ((event_type != EV_KEY) || !vt) return; kbd_keycode(vt, keycode, down); tasklet_schedule(&keyboard_tasklet); + do_poke_blanked_console = 1; schedule_work(&vt->vt_work); } static char kbd_name[] = "kbd"; -static int first_time; /* * When a keyboard (or other input device) is found, the kbd_connect @@ -1196,25 +1115,10 @@ handle->dev = dev; handle->handler = handler; handle->name = kbd_name; - - if (!first_time) { - first_time = 1; - vt = admin_vt; - } - - while (vt) { - if (!vt->keyboard) { - vt->keyboard = handle; - handle->private = vt; - vt_map_input(vt); - /* enable receieving key events for each VC */ - for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { - vc = find_vc(vt->first_vc + i); - if (vc) vc->vc_kam = 1; - } - break; - } else - vt = vt->next; + if (!vt->keyboard) { + vt->keyboard = handle; + handle->private = vt; + vt_map_input(vt); } input_open_device(handle); return handle; @@ -1223,15 +1127,8 @@ static void kbd_disconnect(struct input_handle *handle) { struct vt_struct *vt = handle->private; - struct vc_data *vc; - int i; if (vt && vt->keyboard == handle) { - /* disable receieving key events for each VC */ - for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { - vc = find_vc(vt->first_vc + i); - if (vc) vc->vc_kam = 1; - } vt->keyboard = NULL; handle->private = NULL; } Index: selection.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/selection.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- selection.c 17 Oct 2001 17:00:13 -0000 1.14 +++ selection.c 1 Nov 2002 23:27:32 -0000 1.15 @@ -9,8 +9,6 @@ * 'int sel_loadlut(const unsigned long arg)' * * Now that /dev/vcs exists, most of this can disappear again. - * - * Adapted for selection in Unicode by <ed...@ra...>, January 1999 */ #include <linux/module.h> @@ -35,45 +33,49 @@ /* Variables for selection control. */ /* Use a dynamic buffer, instead of static (Dec 1994) */ -int sel_cons; /* must not be disallocated */ + int sel_cons; /* must not be disallocated */ static volatile int sel_start = -1; /* cleared by clear_selection */ static int sel_end; static int sel_buffer_lth; -static u16 *sel_buffer; +static char *sel_buffer; /* clear_selection, highlight and highlight_pointer can be called from interrupt (via scrollback/front) */ /* set reverse video on characters s-e of console with selection. */ -inline static void highlight(const int s, const int e) { - invert_screen(find_vc(sel_cons), s, e-s+2, 1); -} - -/* use complementary color to show the pointer */ -inline static void highlight_pointer(const int where) { - complement_pos(find_vc(sel_cons), where); +inline static void +highlight(const int s, const int e) { + invert_screen(vt_cons->vc_cons[sel_cons], s, e-s+2, 1); } -/* used by selection */ u16 screen_glyph(struct vc_data *vc, int offset) { - u16 w = scr_readw(screenpos(vc, offset, 1)); u16 c = w & 0xff; + u16 w = scr_readw(screenpos(vc, offset, 1)); + u16 c = w & 0xff; - if (w & vc->vc_hi_font_mask) - c |= 0x100; - return c; -} + if (w & vc->vc_hi_font_mask) + c |= 0x100; + return c; +} -static u16 sel_pos(int n) + +/* use complementary color to show the pointer */ +inline static void +highlight_pointer(const int where) { + complement_pos(vt_cons->vc_cons[sel_cons], where); +} + +static unsigned char sel_pos(int n) { - return inverse_convert(find_vc(sel_cons), screen_glyph(find_vc(sel_cons), n)); + return inverse_translate(vt_cons->vc_cons[sel_cons], screen_glyph(vt_cons->vc_cons[sel_cons], n)); } /* * remove the current selection highlight, if any, * from the console holding the selection. */ -void clear_selection(void) { +void clear_selection(void) +{ highlight_pointer(-1); /* hide the pointer */ if (sel_start != -1) { highlight(sel_start, sel_end); @@ -96,9 +98,8 @@ 0xFF7FFFFF /* latin-1 accented letters, not division sign */ }; -static inline int inword(const u16 c) { - /* Everything over 0xff is considered alphabetic! */ - return c >= 0x100 || ( inwordLut[c>>5] >> (c & 0x1F) ) & 1; +static inline int inword(const unsigned char c) { + return ( inwordLut[c>>5] >> (c & 0x1F) ) & 1; } /* set inwordLut contents. Invoked by ioctl(). */ @@ -124,10 +125,10 @@ { struct vc_data *vc = (struct vc_data *) tty->driver_data; int sel_mode, new_sel_start, new_sel_end, spc; - u16 *bp, *obp; + char *bp, *obp; int i, ps, pe; - u16 ucs; + unblank_screen(); poke_blanked_console(vc->display_fg); { unsigned short *args, xs, ys, xe, ye; @@ -162,8 +163,8 @@ return 0; } - if (mouse_reporting(tty) && (sel_mode & 16)) { - mouse_report(tty, sel_mode & 15, xs, ys); + if (mouse_reporting(vc) && (sel_mode & 16)) { + mouse_report(vc, sel_mode & 15, xs, ys); return 0; } } @@ -261,7 +262,7 @@ sel_end = new_sel_end; /* Allocate a new buffer before freeing the old one ... */ - bp = kmalloc(((sel_end-sel_start)/2+1) * sizeof(u16), GFP_KERNEL); + bp = kmalloc((sel_end-sel_start)/2+1, GFP_KERNEL); if (!bp) { printk(KERN_WARNING "selection: kmalloc() failed\n"); clear_selection(); @@ -273,9 +274,8 @@ obp = bp; for (i = sel_start; i <= sel_end; i += 2) { - ucs = sel_pos(i); - *bp++ = ucs; - if (!isspace(ucs)) + *bp = sel_pos(i); + if (!isspace(*bp++)) obp = bp; if (! ((i + 2) % vc->vc_size_row)) { /* strip trailing blanks from line and add newline, @@ -298,75 +298,24 @@ int paste_selection(struct tty_struct *tty) { struct vc_data *vc = (struct vc_data *) tty->driver_data; - unsigned char *paste_buffer, *bp, *p; + int pasted = 0, count; DECLARE_WAITQUEUE(wait, current); - int utf, count; - - if (!sel_buffer || !sel_buffer_lth) return 0; - - /* Paste UTF-8 iff the keyboard is in UTF-8 mode */ - utf = (vc->display_fg->fg_console->kbd_table.kbdmode == VC_UNICODE); - - /* Make a paste buffer containing an appropriate translation - of the selection buffer */ - paste_buffer = kmalloc(utf ? sel_buffer_lth*3 : sel_buffer_lth, GFP_KERNEL); - if (!paste_buffer) { - printk(KERN_WARNING "selection: kmalloc() failed\n"); - return -ENOMEM; - } - - bp = paste_buffer; - if (utf) { - /* convert to UTF-8 */ - int i, ucs; - - for (i = 0; i < sel_buffer_lth; i++) { - ucs = sel_buffer[i]; - /* The following code should at some point - be merged with to_utf8() in keyboard.c */ - if (!(ucs & ~0x7f)) /* 0?????? */ - *bp++ = ucs; - else if (!(ucs & ~0x7ff)) { /* 110????? 10?????? */ - *bp++ = 0xc0 | (ucs >> 6); - *bp++ = 0x80 | (ucs & 0x3f); - } - else { /* 1110???? 10?????? 10?????? */ - *bp++ = 0xe0 | (ucs >> 12); - *bp++ = 0x80 | ((ucs >> 6) & 0x3f); - *bp++ = 0x80 | (ucs & 0x3f); - } - /* UTF-8 is defined for words of up to 31 bits, - but we need only 16 bits here */ - } - } else { - /* convert to 8-bit */ - int inv_translate = vc->display_fg->fg_console->vc_translate; - int i; - unsigned char c; - - for (i = 0; i < sel_buffer_lth; i++) { - c = inverse_translate(inv_translate, sel_buffer[i]); - if (c) *bp++ = c; - } - } poke_blanked_console(vc->display_fg); add_wait_queue(&vc->paste_wait, &wait); - p = paste_buffer; - while (bp > p) { + while (sel_buffer && sel_buffer_lth > pasted) { set_current_state(TASK_INTERRUPTIBLE); if (test_bit(TTY_THROTTLED, &tty->flags)) { schedule(); continue; } - count = bp - p; + count = sel_buffer_lth - pasted; count = MIN(count, tty->ldisc.receive_room(tty)); - tty->ldisc.receive_buf(tty, p, 0, count); - p += count; + tty->ldisc.receive_buf(tty, sel_buffer + pasted, 0, count); + pasted += count; } remove_wait_queue(&vc->paste_wait, &wait); set_current_state(TASK_RUNNING); - kfree(paste_buffer); return 0; } Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/tty_io.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- tty_io.c 30 Oct 2002 17:29:35 -0000 1.53 +++ tty_io.c 1 Nov 2002 23:27:32 -0000 1.54 @@ -2079,15 +2079,7 @@ driver->put_char = tty_default_put_char; list_add(&driver->tty_drivers, &tty_drivers); - - //if (!(driver->flags & TTY_DRIVER_CONSOLE)) - - if (!driver->console) { - driver->tty_lock = kmalloc(sizeof(struct semaphore),GFP_KERNEL); - init_MUTEX(driver->tty_lock); - } else - driver->tty_lock = &driver->console->lock; - + if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) { for(i = 0; i < driver->num; i++) tty_register_devfs(driver, 0, driver->minor_start + i); Index: vc_screen.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vc_screen.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- vc_screen.c 23 Jan 2002 23:56:41 -0000 1.21 +++ vc_screen.c 1 Nov 2002 23:27:32 -0000 1.22 @@ -31,10 +31,10 @@ #include <linux/interrupt.h> #include <linux/mm.h> #include <linux/init.h> -#include <linux/console.h> #include <linux/vt_kern.h> #include <linux/selection.h> -#include <linux/kbd_kern.h> +#include <linux/console.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/byteorder.h> #include <asm/unaligned.h> @@ -43,9 +43,7 @@ #undef org #undef addr #define HEADER_SIZE 4 -#define CON_BUF_SIZE PAGE_SIZE -/* note the word offset */ unsigned short *screen_pos(struct vc_data *vc, int w_offset, int viewed) { return screenpos(vc, 2 * w_offset, viewed); @@ -76,29 +74,44 @@ if ((unsigned long)org == vc->vc_pos) { vc->display_fg->cursor_original = -1; add_softcursor(vc); - } + } } -static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) + +static int +vcs_size(struct inode *inode) { - struct vc_data *vc = (struct vc_data *) file->private_data; - struct inode *inode = file->f_dentry->d_inode; + int minor = minor(inode->i_rdev); + int currcons = minor & 127; + struct vc_data *vc; int size; - if (!vc) { - /* Impossible ? */ - if (!vt_cons->fg_console) - return -ENXIO; - vc = vt_cons->fg_console; - } + if (currcons == 0) + currcons = vt_cons->fg_console->vc_num; + else + currcons--; + + vc = vt_cons->vc_cons[currcons]; + + if (!vc) + return -ENXIO; - size = vc->vc_rows * vc->vc_cols; + size = vc->vc_rows * vc->vc_cols; - if (minor(inode->i_rdev) & 128) - size = 2*size + HEADER_SIZE; + if (minor & 128) + size = 2*size + HEADER_SIZE; + return size; +} + +static loff_t vcs_lseek(struct file *file, loff_t offset, int orig) +{ + int size; + lock_kernel(); + size = vcs_size(file->f_dentry->d_inode); switch (orig) { default: + unlock_kernel(); return -EINVAL; case 2: offset += size; @@ -108,41 +121,55 @@ case 0: break; } - if (offset < 0 || offset > size) + if (offset < 0 || offset > size) { + unlock_kernel(); return -EINVAL; + } file->f_pos = offset; + unlock_kernel(); return file->f_pos; } +/* We share this temporary buffer with the console write code + * so that we can easily avoid touching user space while holding the + * console spinlock. + */ +extern char con_buf[PAGE_SIZE]; +#define CON_BUF_SIZE PAGE_SIZE +extern struct semaphore con_buf_sem; + static ssize_t vcs_read(struct file *file, char *buf, size_t count, loff_t *ppos) { - struct vc_data *vc = (struct vc_data *) file->private_data; struct inode *inode = file->f_dentry->d_inode; unsigned int currcons = minor(inode->i_rdev); + struct vc_data *vc; long pos = *ppos; long viewed, attr, read; int col, maxcol; unsigned short *org = NULL; ssize_t ret; - down(&vc->display_fg->lock); + down(&con_buf_sem); /* Select the proper current console and verify * sanity of the situation under the console lock. */ - acquire_console_sem(vc->vc_tty->device); + acquire_console_sem(); attr = (currcons & 128); currcons = (currcons & 127); if (currcons == 0) { - vc = vt_cons->fg_console; + currcons = vt_cons->fg_console->vc_num; viewed = 1; } else { - vc = (struct vc_data *) file->private_data; + currcons--; viewed = 0; } ret = -ENXIO; + + vc = vt_cons->vc_cons[currcons]; + if (!vc) goto unlock_out; @@ -161,10 +188,7 @@ * as copy_to_user at the end of this loop * could sleep. */ - size = vc->vc_rows * vc->vc_cols; - if (minor(inode->i_rdev) & 128) - size = 2*size + HEADER_SIZE; - + size = vcs_size(inode); if (pos >= size) break; if (count > size - pos) @@ -174,12 +198,12 @@ if (this_round > CON_BUF_SIZE) this_round = CON_BUF_SIZE; - /* Perform the whole read into the current VC's con_buf. + /* Perform the whole read into the local con_buf. * Then we can drop the console spinlock and safely * attempt to move it to userspace. */ - con_buf_start = con_buf0 = vc->display_fg->con_buf; + con_buf_start = con_buf0 = con_buf; orig_count = this_round; maxcol = vc->vc_cols; if (!attr) { @@ -216,7 +240,7 @@ /* Advance state pointers and move on. */ this_round -= tmp_count; p = HEADER_SIZE; - con_buf0 = vc->display_fg->con_buf + HEADER_SIZE; + con_buf0 = con_buf + HEADER_SIZE; /* If this_round >= 0, then p is even... */ } else if (p & 1) { /* Skip first byte for output if start address is odd @@ -264,9 +288,9 @@ * the pagefault handling code may want to call printk(). */ - release_console_sem(vc->vc_tty->device); + release_console_sem(); ret = copy_to_user(buf, con_buf_start, orig_count); - acquire_console_sem(vc->vc_tty->device); + acquire_console_sem(); if (ret) { read += (orig_count - ret); @@ -282,17 +306,17 @@ if (read) ret = read; unlock_out: - release_console_sem(vc->vc_tty->device); - up(&vc->display_fg->lock); + release_console_sem(); + up(&con_buf_sem); return ret; } static ssize_t vcs_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { - struct vc_data *vc = (struct vc_data *) file->private_data; struct inode *inode = file->f_dentry->d_inode; unsigned int currcons = minor(inode->i_rdev); + struct vc_data *vc; long pos = *ppos; long viewed, attr, size, written; char *con_buf0; @@ -300,31 +324,31 @@ u16 *org0 = NULL, *org = NULL; size_t ret; - down(&vc->display_fg->lock); + down(&con_buf_sem); /* Select the proper current console and verify * sanity of the situation under the console lock. */ - acquire_console_sem(vc->vc_tty->device); + acquire_console_sem(); attr = (currcons & 128); currcons = (currcons & 127); if (currcons == 0) { - vc = vt_cons->fg_console; + currcons = vt_cons->fg_console->vc_num; viewed = 1; } else { - vc = (struct vc_data *) file->private_data; + currcons--; viewed = 0; } ret = -ENXIO; + + vc = vt_cons->vc_cons[currcons]; + if (!vc) goto unlock_out; - size = vc->vc_rows * vc->vc_cols; - if (minor(inode->i_rdev) & 128) - size = 2*size + HEADER_SIZE; - + size = vcs_size(inode); ret = -EINVAL; if (pos < 0 || pos > size) goto unlock_out; @@ -342,9 +366,9 @@ /* Temporarily drop the console lock so that we can read * in the write data from userspace safely. */ - release_console_sem(vc->vc_tty->device); - ret = copy_from_user(&vc->display_fg->con_buf, buf, this_round); - acquire_console_sem(vc->vc_tty->device); + release_console_sem(); + ret = copy_from_user(con_buf, buf, this_round); + acquire_console_sem(); if (ret) { this_round -= ret; @@ -363,10 +387,7 @@ * the user buffer, so recheck. * Return data written up to now on failure. */ - size = vc->vc_rows * vc->vc_cols; - if (minor(inode->i_rdev) & 128) - size = 2*size + HEADER_SIZE; - + size = vcs_size(inode); if (pos >= size) break; if (this_round > size - pos) @@ -376,7 +397,7 @@ * under the lock using the local kernel buffer. */ - con_buf0 = vc->display_fg->con_buf; + con_buf0 = con_buf; orig_count = this_round; maxcol = vc->vc_cols; p = pos; @@ -389,7 +410,8 @@ unsigned char c = *con_buf0++; this_round--; - vcs_scr_writew(vc, (vcs_scr_readw(vc, org) & 0xff00) | c, org); + vcs_scr_writew(vc, + (vcs_scr_readw(vc, org) & 0xff00) | c, org); org++; if (++col == maxcol) { org = screen_pos(vc, p, viewed); @@ -470,24 +492,20 @@ ret = written; unlock_out: - release_console_sem(vc->vc_tty->device); - up(&vc->display_fg->lock); + release_console_sem(); + + up(&con_buf_sem); + return ret; } static int vcs_open(struct inode *inode, struct file *filp) { - unsigned int currcons = (minor(inode->i_rdev) & 127); - struct vc_data *vc; + unsigned int currcons = minor(inode->i_rdev) & 127; - if (currcons) { - vc = find_vc(currcons-1); - if (vc) - filp->private_data = vc; - else - return -ENXIO; - } + if (currcons && !vt_cons->vc_cons[currcons-1]) + return -ENXIO; return 0; } @@ -508,10 +526,10 @@ sprintf (name, "a%u", index + 1); if (unregister) { - devfs_unregister ( devfs_find_handle (devfs_handle, name + 1, 0, 0, - DEVFS_SPECIAL_CHR, 0) ); - devfs_unregister ( devfs_find_handle (devfs_handle, name, 0, 0, - DEVFS_SPECIAL_CHR, 0) ); + devfs_find_and_unregister(devfs_handle, name + 1, 0, 0, + DEVFS_SPECIAL_CHR, 0); + devfs_find_and_unregister(devfs_handle, name, 0, 0, + DEVFS_SPECIAL_CHR, 0); } else { @@ -529,7 +547,7 @@ { int error; - error = devfs_register_chrdev(VCS_MAJOR, "vcs", &vcs_fops); + error = register_chrdev(VCS_MAJOR, "vcs", &vcs_fops); if (error) printk("unable to get major %d for vcs device", VCS_MAJOR); Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt.c,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- vt.c 27 Jul 2002 19:33:27 -0000 1.122 +++ vt.c 1 Nov 2002 23:27:32 -0000 1.123 @@ -1,11 +1,77 @@ /* - * vt.c - Built-in console device - * Copyright (C) 1991, 1992 Linus Torvalds - * Copyright (C) 1999, 2000 Dominik Kubla + * linux/drivers/char/vt.c * - * $Id$ + * Copyright (C) 1991, 1992 Linus Torvalds + */ + +/* [...2361 lines suppressed...] + vc->vc_can_do_color ? "colour" : "mono", + desc, vc->vc_cols, vc->vc_rows); } /* - * Visible symbols for modules + * Visible symbols for modules */ EXPORT_SYMBOL(color_table); EXPORT_SYMBOL(default_red); EXPORT_SYMBOL(default_grn); EXPORT_SYMBOL(default_blu); -EXPORT_SYMBOL(vt_map_display); -EXPORT_SYMBOL(release_vt); EXPORT_SYMBOL(vc_resize); -EXPORT_SYMBOL(vc_init); EXPORT_SYMBOL(console_blank_hook); +EXPORT_SYMBOL(vt_cons); EXPORT_SYMBOL(take_over_console); Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt_ioctl.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- vt_ioctl.c 2 Aug 2002 14:58:50 -0000 1.69 +++ vt_ioctl.c 1 Nov 2002 23:27:32 -0000 1.70 @@ -2,15 +2,13 @@ * linux/drivers/char/vt_ioctl.c * * Copyright (C) 1992 obz under the linux copyright - * Copyright (C) 2002 James Simmons <jsi...@us...> + * 2002 James Simmons <jsi...@us...> * * Dynamic diacritical handling - ae...@cw... - Dec 1993 * Dynamic keymap and string allocation - ae...@cw... - May 1994 * Restrict VT switching via ioctl() - gr...@cs... - Dec 1995 * Some code moved for less code duplication - Andi Kleen - Mar 1997 * Check put/get_user, cleanups - ac...@co... - Jun 2001 [...1976 lines suppressed...] - * server dies and the screen remains blanked due to - * KD_GRAPHICS! It would be nice to do this outside of - * VT_PROCESS but there is no single process to account - * and tracking tty count may be undesirable. - */ - if (old_vc_mode != new_vc->vc_mode) { - if (new_vc->vc_mode == KD_TEXT) - unblank_screen(new_vc->display_fg); - else - do_blank_screen(new_vc); - } - } - } - - /* - * Wake anyone waiting for their VT to activate - */ - wake_up(&vt_activate_queue); - return; -} |
From: James S. <jsi...@us...> - 2002-11-01 23:18:35
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv595 Added Files: Kconfig Log Message: Synced to 2.5.45 --- NEW FILE: Kconfig --- # # Character device configuration # menu "Character devices" config VT bool "Virtual terminal" depends on INPUT ---help--- If you say Y here, you will get support for terminal devices with display and keyboard devices. These are called "virtual" because you can run several virtual terminals (also called virtual consoles) on one physical terminal. This is rather useful, for example one virtual terminal can collect system messages and warnings, another one can be used for a text-mode user session, and a third could run an X session, all in parallel. Switching between virtual terminals is done with certain key combinations, usually Alt-<function key>. [...1240 lines suppressed...] a module, say M here and read Documentation/modules.txt. config SCx200_GPIO tristate "NatSemi SCx200 GPIO Support" depends on SCx200 help Give userspace access to the GPIO pins on the National Semiconductor SCx200 processors. If compiled as a module, it will be called scx200_gpio.o. config RAW_DRIVER tristate "RAW driver (/dev/raw/rawN)" help The raw driver permits block devices to be bound to /dev/raw/rawN. Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. See the raw(8) manpage for more details. endmenu |
From: James S. <jsi...@us...> - 2002-11-01 23:17:31
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv307 Removed Files: Config.in Log Message: Config.in no longer used. --- Config.in DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:16:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv32531 Modified Files: Makefile Log Message: SYnced to latest console BK tree. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/Makefile,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- Makefile 30 Oct 2002 17:45:58 -0000 1.48 +++ Makefile 1 Nov 2002 23:16:51 -0000 1.49 @@ -7,14 +7,14 @@ # FONTMAPFILE = cp437.uni -obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o +obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o eventpoll.o # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. export-objs := vt.o generic_serial.o ip2main.o \ ite_gpio.o keyboard.o misc.o nvram.o random.o rtc.o \ - selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o + selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o eventpoll.o obj-$(CONFIG_VT) += vt_ioctl.o decvte.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o @@ -103,7 +103,7 @@ obj-$(CONFIG_PCMCIA) += pcmcia/ # Files generated that shall be removed upon make clean -clean-files := consolemap_deftbl.c defkeymap.c +clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c include $(TOPDIR)/Rules.make |
From: James S. <jsi...@us...> - 2002-11-01 23:14:59
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv31360 Modified Files: sysrq.c Log Message: Synced to latest linus BK tree. Index: sysrq.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/sysrq.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- sysrq.c 30 Oct 2002 17:30:19 -0000 1.24 +++ sysrq.c 1 Nov 2002 23:14:55 -0000 1.25 @@ -35,6 +35,10 @@ #include <asm/ptrace.h> +#ifdef CONFIG_VOYAGER +#include <asm/voyager.h> +#endif + extern struct list_head super_blocks; /* Whether we react on sysrq keys or just ignore them */ @@ -59,13 +63,14 @@ action_msg: "Changing Loglevel", }; + /* SAK sysrq handler */ #ifdef CONFIG_VT static void sysrq_handle_SAK(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { struct vc_data *vc = (struct vc_data *) tty->driver_data; - + if (tty) do_SAK(tty); if ((tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) && vc) @@ -318,6 +323,14 @@ action_msg: "Terminate All Tasks", }; +#ifdef CONFIG_VOYAGER +static struct sysrq_key_op sysrq_voyager_dump_op = { + handler: voyager_dump, + help_msg: "voyager", + action_msg: "Dump Voyager Status\n", +}; +#endif + static void sysrq_handle_kill(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { @@ -351,7 +364,11 @@ it is handled specially on the sparc and will never arrive */ /* b */ &sysrq_reboot_op, +#ifdef CONFIG_VOYAGER +/* c */ &sysrq_voyager_dump_op, +#else /* c */ NULL, +#endif /* d */ NULL, /* e */ &sysrq_term_op, /* f */ NULL, |
From: James S. <jsi...@us...> - 2002-11-01 23:12:43
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel In directory usw-pr-cvs1:/tmp/cvs-serv30742 Modified Files: setup.c Log Message: Synced up to 2.5.45 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel/setup.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- setup.c 18 Jun 2002 18:51:54 -0000 1.10 +++ setup.c 1 Nov 2002 23:12:36 -0000 1.11 @@ -37,6 +37,11 @@ #include <linux/blk.h> #endif +#ifdef CONFIG_MAGIC_SYSRQ +#include <linux/sysrq.h> +#include <linux/reboot.h> +#endif + #include <linux/notifier.h> extern struct notifier_block *panic_notifier_list; static int alpha_panic_event(struct notifier_block *, unsigned long, void *); @@ -89,6 +94,8 @@ int alpha_using_srm; #endif +unsigned char aux_device_present = 0xaa; + #define N(a) (sizeof(a)/sizeof(a[0])) static struct alpha_machine_vector *get_sysvec(long, long, long); @@ -105,12 +112,12 @@ */ struct screen_info screen_info = { - orig_x: 0, - orig_y: 25, - orig_video_cols: 80, - orig_video_lines: 25, - orig_video_isVGA: 1, - orig_video_points: 16 + .orig_x = 0, + .orig_y = 25, + .orig_video_cols = 80, + .orig_video_lines = 25, + .orig_video_isVGA = 1, + .orig_video_points = 16 }; /* @@ -445,12 +452,12 @@ } static struct console srmcons = { - name: "srm0", - write: srm_console_write, - device: srm_console_device, - setup: srm_console_setup, - flags: CON_PRINTBUFFER | CON_ENABLED, /* fake it out */ - index: -1, + .name = "srm0", + .write = srm_console_write, + .device = srm_console_device, + .setup = srm_console_setup, + .flags = CON_PRINTBUFFER | CON_ENABLED, /* fake it out */ + .index = -1, }; #else @@ -537,6 +544,15 @@ register_srm_console(); } +#ifdef CONFIG_MAGIC_SYSRQ + /* If we're using SRM, make sysrq-b halt back to the prom, + not auto-reboot. */ + if (alpha_using_srm) { + struct sysrq_key_op *op = __sysrq_get_key_op('b'); + op->handler = (void *) machine_halt; + } +#endif + /* * Indentify and reconfigure for the current system. */ @@ -1094,7 +1110,7 @@ #ifdef CONFIG_SMP seq_printf(f, "cpus active\t\t: %d\n" "cpu active mask\t\t: %016lx\n", - smp_num_cpus, cpu_present_mask); + num_online_cpus(), cpu_present_mask); #endif return 0; @@ -1121,10 +1137,10 @@ } struct seq_operations cpuinfo_op = { - start: c_start, - next: c_next, - stop: c_stop, - show: show_cpuinfo, + .start = c_start, + .next = c_next, + .stop = c_stop, + .show = show_cpuinfo, }; |
From: James S. <jsi...@us...> - 2002-11-01 23:08:51
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/alpha In directory usw-pr-cvs1:/tmp/cvs-serv29490 Added Files: Kconfig Log Message: Syncing to 2.5.45 --- NEW FILE: Kconfig --- # # For a description of the syntax of this configuration file, # see Documentation/kbuild/config-language.txt. # config ALPHA bool default y help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, now Compaq. Alpha Linux dates from 1995-1996 and was the first non-x86 port. The Alpha Linux project has a home page at <http://www.alphalinux.org/>. config UID16 bool config RWSEM_GENERIC_SPINLOCK bool [...980 lines suppressed...] times it has tried to get the lock and issue an error message after too many attempts. If you suspect a rwlock problem or a kernel hacker asks for this option then say Y. Otherwise say N. config DEBUG_SEMAPHORE bool "Semaphore debugging" depends on DEBUG_KERNEL help If you say Y here then semaphore processing will issue lots of verbose debugging messages. If you suspect a semaphore problem or a kernel hacker asks for this option then say Y. Otherwise say N. endmenu source "security/Kconfig" source "crypto/Kconfig" source "lib/Kconfig" |
From: James S. <jsi...@us...> - 2002-11-01 23:06:13
|
Update of /cvsroot/linuxconsole/ruby/linux/Documentation/serial In directory usw-pr-cvs1:/tmp/cvs-serv28728 Removed Files: driver Log Message: No longer needed file. --- driver DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:05:19
|
Update of /cvsroot/linuxconsole/ruby/linux/include/asm-ppc In directory usw-pr-cvs1:/tmp/cvs-serv28468 Removed Files: machdep.h Log Message: No longer needed file. --- machdep.h DELETED --- |
From: James S. <jsi...@us...> - 2002-11-01 23:03:38
|
Update of /cvsroot/linuxconsole/ruby/linux In directory usw-pr-cvs1:/tmp/cvs-serv27921 Modified Files: Makefile Log Message: Use BK version Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- Makefile 29 Oct 2002 18:36:02 -0000 1.69 +++ Makefile 1 Nov 2002 23:03:35 -0000 1.70 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 44 +SUBLEVEL = 45 EXTRAVERSION = -ruby # *DOCUMENTATION* @@ -46,7 +46,9 @@ TOPDIR := $(CURDIR) HOSTCC = gcc +HOSTCXX = g++ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer +HOSTCXXFLAGS = -O2 CROSS_COMPILE = @@ -171,7 +173,8 @@ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ - CPP AR NM STRIP OBJCOPY OBJDUMP MAKE GENKSYMS PERL UTS_MACHINE + CPP AR NM STRIP OBJCOPY OBJDUMP MAKE GENKSYMS PERL UTS_MACHINE \ + HOSTCXX HOSTCXXFLAGS export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE @@ -211,7 +214,7 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -include-config := 1 +export include-config := 1 -include .config @@ -219,7 +222,7 @@ include arch/$(ARCH)/Makefile -core-y += kernel/ mm/ fs/ ipc/ security/ +core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ SUBDIRS += $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ @@ -247,21 +250,7 @@ # In this section, we need .config -# If .config doesn't exist - tough luck - -.config: arch/$(ARCH)/config.in # FIXME $(shell find . -name Config.in) - @echo '***' - @if [ -f $@ ]; then \ - echo '*** The tree was updated, so your .config may be'; \ - echo '*** out of date!'; \ - else \ - echo '*** You have not yet configured your kernel!'; \ - fi - @echo '***' - @echo '*** Please run some configurator (e.g. "make oldconfig" or' - @echo '*** "make menuconfig" or "make xconfig").' - @echo '***' - @exit 1 +-include ..config.cmd ifdef CONFIG_MODULES export EXPORT_FLAGS := -DEXPORT_SYMTAB @@ -429,11 +418,8 @@ # with it and forgot to run make oldconfig include/linux/autoconf.h: .config - @echo '***' - @echo '*** You changed .config w/o running make *config?' - @echo '*** Please run "make oldconfig"' - @echo '***' - @exit 1 + +@$(call descend,scripts/kconfig,scripts/kconfig/conf) + ./scripts/kconfig/conf -s arch/$(ARCH)/Kconfig # Generate some files # --------------------------------------------------------------------------- @@ -649,34 +635,36 @@ .PHONY: oldconfig xconfig menuconfig config \ make_with_config -xconfig: - $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts scripts/kconfig.tk - wish -f scripts/kconfig.tk +scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf: scripts/fixdep FORCE + +@$(call descend,scripts/kconfig,$@) -menuconfig: +xconfig: scripts/kconfig/qconf + ./scripts/kconfig/qconf arch/$(ARCH)/Kconfig + +menuconfig: scripts/kconfig/mconf $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts lxdialog - $(CONFIG_SHELL) $(src)/scripts/Menuconfig arch/$(ARCH)/config.in + ./scripts/kconfig/mconf arch/$(ARCH)/Kconfig -config: - $(CONFIG_SHELL) $(src)/scripts/Configure arch/$(ARCH)/config.in +config: scripts/kconfig/conf + ./scripts/kconfig/conf arch/$(ARCH)/Kconfig -oldconfig: - $(CONFIG_SHELL) $(src)/scripts/Configure -d arch/$(ARCH)/config.in +oldconfig: scripts/kconfig/conf + ./scripts/kconfig/conf -o arch/$(ARCH)/Kconfig -randconfig: - $(CONFIG_SHELL) $(src)/scripts/Configure -r arch/$(ARCH)/config.in +randconfig: scripts/kconfig/conf + ./scripts/kconfig/conf -r arch/$(ARCH)/Kconfig -allyesconfig: - $(CONFIG_SHELL) $(src)/scripts/Configure -y arch/$(ARCH)/config.in +allyesconfig: scripts/kconfig/conf + ./scripts/kconfig/conf -y arch/$(ARCH)/Kconfig -allnoconfig: - $(CONFIG_SHELL) $(src)/scripts/Configure -n arch/$(ARCH)/config.in +allnoconfig: scripts/kconfig/conf + ./scripts/kconfig/conf -n arch/$(ARCH)/Kconfig -allmodconfig: - $(CONFIG_SHELL) $(src)/scripts/Configure -m arch/$(ARCH)/config.in +allmodconfig: scripts/kconfig/conf + ./scripts/kconfig/conf -m arch/$(ARCH)/Kconfig -defconfig: - yes '' | $(CONFIG_SHELL) $(src)/scripts/Configure -d arch/$(ARCH)/config.in +defconfig: scripts/kconfig/conf + ./scripts/kconfig/conf -d arch/$(ARCH)/Kconfig ### # Cleaning is done on three levels. |
From: James S. <jsi...@us...> - 2002-11-01 23:01:36
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv27352 Modified Files: vt_kern.h Log Message: Use BK version Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/vt_kern.h,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- vt_kern.h 27 Jul 2002 19:33:27 -0000 1.66 +++ vt_kern.h 1 Nov 2002 23:01:31 -0000 1.67 @@ -2,20 +2,17 @@ #define _VT_KERN_H /* - * this really is an extension of the vc_cons structure in console.c, but - * with information needed by the vt package + * All the data structs defining the VT tty system. */ #include <linux/config.h> #include <linux/pm.h> #include <linux/vt.h> -#include <linux/kd.h> #include <linux/kbd_kern.h> -#include <linux/input.h> #define MIN_NR_CONSOLES 1 /* must be at least 1 */ #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ -#define MAX_NR_USER_CONSOLES 16 /* number of VCs per VT */ +#define MAX_NR_USER_CONSOLES 16 /* number of VCs per VT */ /* scroll */ #define SM_UP (1) @@ -42,8 +39,19 @@ /* * Low-Level Functions */ +#define IS_VISIBLE (vc == vc->display_fg->fg_console) -#define IS_VISIBLE (vc->vc_num == vc->display_fg->fg_console->vc_num) +/* + * Presently, a lot of graphics programs do not restore the contents of + * the higher font pages. Defining this flag will avoid use of them, but + * will lose support for PIO_FONTRESET. Note that many font operations are + * not likely to work with these programs anyway; they need to be + * fixed. The linux/Documentation directory includes a code snippet + * to save and restore the text font. + */ +#ifdef CONFIG_VGA_CONSOLE +#define BROKEN_GRAPHICS_PROGRAMS 1 +#endif extern unsigned char color_table[]; extern int default_red[]; @@ -51,34 +59,32 @@ extern int default_blu[]; /* - * Data structure describing single virtual console except for data - * used by vt.c. + * Data structure describing single virtual console * * Fields marked with [#] must be set by the low-level driver. * Fields marked with [!] can be changed by the low-level driver * to achieve effects such as fast scrolling by changing the origin. */ - #define NPAR 16 struct vc_data { - unsigned short vc_num; /* Console number */ - unsigned int vc_cols; /* [#] Console size */ + unsigned short vc_num; /* Console number */ + unsigned int vc_cols; /* [#] Console size */ unsigned int vc_rows; unsigned int vc_size_row; /* Bytes per row */ unsigned int vc_scan_lines; /* # of scan lines */ unsigned int vc_screensize; /* Size of screen */ - unsigned char vc_mode; /* KD_TEXT, ... */ + unsigned char vc_mode; /* KD_TEXT, ... */ unsigned long vc_origin; /* [!] Start of real screen */ unsigned long vc_scr_end; /* [!] End of real screen */ - unsigned long vc_visible_origin; /* [!] Top of visible window */ + unsigned long vc_visible_origin;/* [!] Top of visible window */ unsigned int vc_scrollback; /* [!] Scrollback size */ unsigned int vc_top, vc_bottom; /* Scrolling region */ unsigned short *vc_screenbuf; /* In-memory character/attribute buffer */ unsigned int vc_screenbuf_size; - unsigned char vc_attr; /* Current attributes */ + unsigned char vc_attr; /* Current attributes */ unsigned char vc_def_color; /* Default colors */ - unsigned char vc_color; /* Foreground & background */ + unsigned char vc_color; /* Foreground & background */ unsigned char vc_s_color; /* Saved foreground & background */ unsigned char vc_ulcolor; /* Color for underline mode */ unsigned char vc_halfcolor; /* Color for half intensity mode */ @@ -88,14 +94,15 @@ unsigned short vc_s_complement_mask; /* Saved mouse pointer mask */ unsigned short vc_video_erase_char; /* Background erase character */ unsigned int vc_x, vc_y; /* Cursor position */ - unsigned long vc_pos; /* Cursor address */ + unsigned long vc_pos; /* Cursor address */ unsigned int vc_saved_x; unsigned int vc_saved_y; - unsigned int vc_state; /* Escape sequence parser state */ + unsigned int vc_state; /* Escape sequence parser state */ unsigned int vc_npar, vc_par[NPAR]; /* Parameters of current escape sequence */ struct kbd_struct kbd_table; /* VC keyboard state */ unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */ struct console_font_op vc_font; /* VC current font set */ + struct vt_struct *display_fg; /* Ptr to display */ struct tty_struct *vc_tty; /* TTY we are attached to */ /* data for manual vt switching */ struct vt_mode vt_mode; @@ -110,7 +117,7 @@ unsigned int vc_decom:1; /* Origin Mode */ unsigned int vc_decawm:1; /* Autowrap Mode */ unsigned int vc_dectcem:1; /* Text Cursor Enable */ - unsigned int vc_irm:1; /* Insert/Replace Mode */ + unsigned int vc_irm:1; /* Insert/Replace Mode */ unsigned int vc_deccolm:1; /* 80/132 Column Mode */ /* attribute flags */ unsigned int vc_intensity:2; /* 0=half-bright, 1=normal, 2=bold */ @@ -133,25 +140,24 @@ unsigned int vc_need_wrap:1; unsigned int vc_can_do_color:1; unsigned int vc_report_mouse:2; - unsigned char vc_utf:1; /* Unicode UTF-8 encoding */ + unsigned char vc_utf:1; /* Unicode UTF-8 encoding */ unsigned char vc_utf_count; int vc_utf_char; unsigned int vc_tab_stop[8]; /* Tab stops. 256 columns. */ unsigned char vc_palette[16 * 3]; /* Colour palette for VGA+ */ - unsigned int vc_translate; /* Current ACM */ + unsigned short *vc_translate; unsigned char vc_G0_charset; unsigned char vc_G1_charset; unsigned char vc_saved_G0; unsigned char vc_saved_G1; unsigned int vc_bell_pitch; /* Console bell pitch */ unsigned int vc_bell_duration; /* Console bell duration */ - struct vt_struct *display_fg; /* Ptr to display */ unsigned long vc_uni_pagedir; - unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir var - iable for this console */ + unsigned long *vc_uni_pagedir_loc;/* [!] Location of uni_pagedir + variable for this console */ wait_queue_head_t paste_wait; /* For selections */ /* Internal flags */ - unsigned int vc_decscl; /* operating level */ + unsigned int vc_decscl; /* operating level */ unsigned int vc_c8bit:1; /* 8-bit controls */ unsigned int vc_d8bit:1; /* 8-bit data */ unsigned int vc_shift:1; /* single shift */ @@ -159,13 +165,12 @@ unsigned int vc_decckm:1; /* Cursor Keys */ unsigned int vc_decsclm:1; /* Scrolling */ unsigned int vc_decarm:1; /* Autorepeat */ - unsigned int vc_decnrcm:1; /* National Replacement Characte - r Set */ + unsigned int vc_decnrcm:1; /* National Replacement Character Set */ unsigned int vc_decnkm:1; /* Numeric Keypad */ /* ANSI / ISO mode flags */ - unsigned int vc_kam:1; /* Keyboard Action */ - unsigned int vc_crm:1; /* Console Representation */ - unsigned int vc_lnm:1; /* Line feed/New line */ + unsigned int vc_kam:1; /* Keyboard Action */ + unsigned int vc_crm:1; /* Console Representation */ + unsigned int vc_lnm:1; /* Line feed/New line */ /* Charset mappings */ unsigned char vc_GL_charset; unsigned char vc_GR_charset; @@ -178,59 +183,57 @@ }; struct consw { - const char *(*con_startup) (struct vt_struct *, int); - void (*con_init) (struct vc_data *); - void (*con_deinit) (struct vc_data *); - void (*con_clear) (struct vc_data *, int, int, int, int); - void (*con_putc) (struct vc_data *, int, int, int); - void (*con_putcs) (struct vc_data *, const unsigned short *, int, - int, int); - void (*con_cursor) (struct vc_data *, int); - int (*con_scroll_region) (struct vc_data *, int, int, int, int); - void (*con_bmove) (struct vc_data *, int, int, int, int, int, int); - int (*con_blank) (struct vc_data *, int); - int (*con_font_op) (struct vc_data *, struct console_font_op *); - int (*con_resize) (struct vc_data *, unsigned int, unsigned int); - int (*con_set_palette) (struct vc_data *, unsigned char *); - int (*con_scroll) (struct vc_data *, int); - int (*con_set_origin) (struct vc_data *); - u8(*con_build_attr) (struct vc_data *, u8, u8, u8, u8, u8); - void (*con_invert_region) (struct vc_data *, u16 *, int); + const char *(*con_startup)(struct vt_struct *, int); + void (*con_init)(struct vc_data *, int); + void (*con_deinit)(struct vc_data *); + void (*con_clear)(struct vc_data *, int, int, int, int); + void (*con_putc)(struct vc_data *, int, int, int); + void (*con_putcs)(struct vc_data *, const unsigned short *, int, int, int); + void (*con_cursor)(struct vc_data *, int); + int (*con_scroll_region)(struct vc_data *, int, int, int, int); + void (*con_bmove)(struct vc_data *, int, int, int, int, int, int); + int (*con_switch)(struct vc_data *); + int (*con_blank)(struct vc_data *, int); + int (*con_font_op)(struct vc_data *, struct console_font_op *); + int (*con_resize)(struct vc_data *, unsigned int, unsigned int); + int (*con_set_palette)(struct vc_data *, unsigned char *); + int (*con_scroll)(struct vc_data *, int); + int (*con_set_origin)(struct vc_data *); + void (*con_save_screen)(struct vc_data *); + u8 (*con_build_attr)(struct vc_data *, u8, u8, u8, u8, u8); + void (*con_invert_region)(struct vc_data *, u16 *, int); + u16* (*con_screen_pos)(struct vc_data *, int); + unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *); }; -extern const struct consw dummy_con; /* dummy console buffer */ -extern const struct consw newport_con; /* SGI Newport console */ -extern const struct consw prom_con; /* SPARC PROM console */ -extern const struct consw nvvga_con; /* NVIDIA text console */ - -void take_over_console(struct vt_struct *vt, const struct consw *sw); - struct vt_struct { struct vc_data *fg_console; /* VC being displayed */ struct vc_data *last_console; /* VC we last switched from */ struct vc_data *want_vc; /* VC we want to switch to */ int scrollback_delta; int cursor_original; - char kmalloced; + char kmalloced; /* Did we use kmalloced ? */ char vt_dont_switch; /* VC switching flag */ char vt_blanked; /* Is this display blanked */ int blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */ int blank_interval; /* How long before blanking */ int off_interval; struct timer_list timer; /* Timer for VT blanking */ - struct pm_dev *pm_con; /* power management */ - /* This is a temporary buffer used to prepare a tty console write - * so that we can easily avoid touching user space while holding the - * console spinlock. It is shared by with vc_screen read/write tty calls. - */ + struct timer_list beep; /* Timer for adjusting console beeping */ + struct pm_dev *pm_con; /* power management */ + /* + * This is a temporary buffer used to prepare a tty console write + * so that we can easily avoid touching user space while holding the + * console spinlock. It is shared by with vc_screen read/write tty + * calls. + */ + struct semaphore lock; /* Lock for con_buf */ char con_buf[PAGE_SIZE]; - struct semaphore lock; /* Lock for con_buf */ - void *data_hook; /* Hook for driver data */ const struct consw *vt_sw; /* Display driver for VT */ - const struct consw *cache_sw; /* Save consw when KD_GRAPHIC */ struct vc_data *default_mode; /* Default mode */ - struct tq_struct vt_tq; /* VT task queue */ - struct input_handle *keyboard; /* Keyboard attached */ + struct work_struct vt_work; /* VT work queue */ + struct input_handle *keyboard; /* Keyboard attached */ + void *data_hook; /* Hook for driver data */ unsigned int first_vc; struct vc_data *vc_cons[MAX_NR_USER_CONSOLES]; /* VT's VC pool */ struct vt_struct *next; @@ -239,12 +242,6 @@ extern struct vt_struct *vt_cons; extern struct vt_struct *admin_vt; -static inline void set_console(struct vc_data *vc) -{ - vc->display_fg->want_vc = vc; - schedule_task(&vc->display_fg->vt_tq); -} - /* universal VT emulation functions */ void vte_ris(struct vc_data *vc, int do_clear); inline void vte_cr(struct vc_data *vc); @@ -255,30 +252,25 @@ void terminal_emulation(struct tty_struct *tty, int c); /* vt.c */ -struct console_font_op; const char *vt_map_display(struct vt_struct *vt, int init); void vt_map_input(struct vt_struct *vt); -int release_vt(struct vt_struct *vt); struct vc_data *find_vc(int currcons); struct vc_data *vc_allocate(unsigned int console); +inline void set_console(struct vc_data *vc); int vc_resize(struct vc_data *vc, unsigned int lines, unsigned int cols); int vc_disallocate(struct vc_data *vc); -void vc_init(struct vc_data *vc, int do_clear); +void reset_vc(struct vc_data *vc); void add_softcursor(struct vc_data *vc); void set_cursor(struct vc_data *vc); void hide_cursor(struct vc_data *vc); -void update_cursor_attr(struct vc_data *vc); void gotoxy(struct vc_data *vc, int new_x, int new_y); inline void gotoxay(struct vc_data *vc, int new_x, int new_y); void reset_palette(struct vc_data *vc); void set_palette(struct vc_data *vc); -inline int resize_screen(struct vc_data *vc, int width, int height); void scroll_up(struct vc_data *vc, int); void scroll_down(struct vc_data *vc, int); -void scroll_region_up(struct vc_data *vc, unsigned int t, unsigned int b, - int nr); -void scroll_region_down(struct vc_data *vc, unsigned int t, unsigned int b, - int nr); +void scroll_region_up(struct vc_data *vc, unsigned int t, unsigned int b, int nr); +void scroll_region_down(struct vc_data *vc, unsigned int t, unsigned int b, int nr); void default_attr(struct vc_data *vc); void update_attr(struct vc_data *vc); void insert_char(struct vc_data *vc, unsigned int nr); @@ -286,29 +278,25 @@ void insert_line(struct vc_data *vc, unsigned int nr); void delete_line(struct vc_data *vc, unsigned int nr); void set_origin(struct vc_data *vc); -inline void clear_region(struct vc_data *vc, int x, int y, int width, - int height); +inline void clear_region(struct vc_data *vc, int x, int y, int width, int height); void do_update_region(struct vc_data *vc, unsigned long start, int count); void update_region(struct vc_data *vc, unsigned long start, int count); void update_screen(struct vc_data *vc); -inline unsigned short *screenpos(struct vc_data *vc, int offset, - int viewed); -void invert_screen(struct vc_data *vc, int offset, int count, int viewed); -void kd_mksound(struct vc_data *vc, unsigned int hz, unsigned int ticks); -void unblank_screen(struct vt_struct *vt); +inline int resize_screen(struct vc_data *vc, int width, int height); +inline unsigned short *screenpos(struct vc_data *vc, int offset, int viewed); +inline void save_screen(struct vc_data *vc); +void do_blank_screen(int gfx_mode); +void unblank_screen(void); void poke_blanked_console(struct vt_struct *vt); -int pm_con_request(struct pm_dev *dev, pm_request_t rqst, void *data); +int con_font_op(struct vc_data *vc, struct console_font_op *op); +void take_over_console(struct vt_struct *vt, const struct consw *sw); -struct tty_struct; -void respond_string(const char *p, struct tty_struct *tty); int tioclinux(struct tty_struct *tty, unsigned long arg); /* consolemap.c */ - struct unimapinit; struct unipair; -void console_map_init(void); int con_set_trans_old(struct vc_data *vc, unsigned char *table); int con_get_trans_old(struct vc_data *vc, unsigned char *table); int con_set_trans_new(struct vc_data *vc, unsigned short *table); @@ -320,12 +308,10 @@ int con_set_default_unimap(struct vc_data *vc); void con_free_unimap(struct vc_data *vc); void con_protect_unimap(struct vc_data *vc, int rdonly); -int con_copy_unimap(struct vc_data *dstcons, struct vc_data *srccons); +int con_copy_unimap(struct vc_data *dst, struct vc_data *src); /* vt_ioctl.c */ +void complete_change_console(struct vc_data *new_vc, struct vc_data *old_vc); void change_console(struct vc_data *new_vc, struct vc_data *old_vc); -void complete_change_console(struct vc_data *new_vc, - struct vc_data *old_vc); -void reset_vc(struct vc_data *vc); #endif /* _VT_KERN_H */ |