summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CREDITS3
-rw-r--r--arch/alpha/Kconfig31
-rw-r--r--arch/arm/Kconfig21
-rw-r--r--arch/i386/Kconfig55
-rw-r--r--arch/ia64/Kconfig25
-rw-r--r--arch/m68k/Kconfig7
-rw-r--r--arch/mips/Kconfig62
-rw-r--r--arch/mips64/Kconfig23
-rw-r--r--arch/parisc/Kconfig19
-rw-r--r--arch/ppc/Kconfig22
-rw-r--r--arch/ppc64/Kconfig7
-rw-r--r--arch/sh/Kconfig55
-rw-r--r--arch/sparc/Kconfig16
-rw-r--r--arch/sparc64/Kconfig11
-rw-r--r--arch/x86_64/Kconfig55
-rw-r--r--drivers/char/consolemap.c1
-rw-r--r--drivers/char/keyboard.c1
-rw-r--r--drivers/char/selection.c1
-rw-r--r--drivers/char/tty_io.c7
-rw-r--r--drivers/char/vc_screen.c1
-rw-r--r--drivers/char/vt.c179
-rw-r--r--drivers/char/vt_ioctl.c60
-rw-r--r--drivers/video/Kconfig338
-rw-r--r--drivers/video/S3triofb.c2
-rw-r--r--drivers/video/amifb.c2
-rw-r--r--drivers/video/atafb.c2
-rw-r--r--drivers/video/aty/atyfb_base.c2
-rw-r--r--drivers/video/aty128fb.c2
-rw-r--r--drivers/video/chipsfb.c2
-rw-r--r--drivers/video/console/Config.help111
-rw-r--r--drivers/video/console/Config.in153
-rw-r--r--drivers/video/console/Kconfig277
-rw-r--r--drivers/video/console/dummycon.c11
-rw-r--r--drivers/video/console/fbcon.c26
-rw-r--r--drivers/video/console/fbcon.h2
-rw-r--r--drivers/video/console/mdacon.c3
-rw-r--r--drivers/video/console/newport_con.c1
-rw-r--r--drivers/video/console/promcon.c3
-rw-r--r--drivers/video/console/sticon-bmode.c894
-rw-r--r--drivers/video/console/sticon.c3
-rw-r--r--drivers/video/console/vgacon.c8
-rw-r--r--drivers/video/controlfb.c2
-rw-r--r--drivers/video/cyberfb.c2
-rw-r--r--drivers/video/epson1355fb.c2
-rw-r--r--drivers/video/fbcmap.c35
-rw-r--r--drivers/video/fbmem.c38
-rw-r--r--drivers/video/fm2fb.c2
-rw-r--r--drivers/video/g364fb.c3
-rw-r--r--drivers/video/hgafb.c2
-rw-r--r--drivers/video/hitfb.c2
-rw-r--r--drivers/video/igafb.c2
-rw-r--r--drivers/video/imsttfb.c3
-rw-r--r--drivers/video/macfb.c2
-rw-r--r--drivers/video/matrox/i2c-matroxfb.c2
-rw-r--r--drivers/video/matrox/matroxfb_base.c4
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.c4
-rw-r--r--drivers/video/neofb.c2
-rw-r--r--drivers/video/offb.c2
-rw-r--r--drivers/video/platinumfb.c2
-rw-r--r--drivers/video/pm2fb.c2
-rw-r--r--drivers/video/pm3fb.c2
-rw-r--r--drivers/video/pvr2fb.c4
-rw-r--r--drivers/video/q40fb.c2
-rw-r--r--drivers/video/retz3fb.c2
-rw-r--r--drivers/video/sbusfb.c2
-rw-r--r--drivers/video/sgivwfb.c2
-rw-r--r--drivers/video/sis/sis_main.c2
-rw-r--r--drivers/video/skeletonfb.c2
-rw-r--r--drivers/video/sstfb.c2
-rw-r--r--drivers/video/stifb.c2
-rw-r--r--drivers/video/sun3fb.c2
-rw-r--r--drivers/video/tgafb.c2
-rw-r--r--drivers/video/tridentfb.c2
-rw-r--r--drivers/video/tx3912fb.c2
-rw-r--r--drivers/video/valkyriefb.c2
-rw-r--r--drivers/video/vesafb.c2
-rw-r--r--drivers/video/vfb.c2
-rw-r--r--drivers/video/vga16fb.c2
-rw-r--r--drivers/video/virgefb.c2
-rw-r--r--include/linux/console.h1
-rw-r--r--include/linux/fb.h59
-rw-r--r--include/linux/vt_kern.h8
-rw-r--r--include/video/fbcon-hga.h32
83 files changed, 547 insertions, 2210 deletions
diff --git a/CREDITS b/CREDITS
index e795064c1eec..9c59cbd94417 100644
--- a/CREDITS
+++ b/CREDITS
@@ -2800,9 +2800,6 @@ S: 115 Carmel Avenue
S: El Cerrito CA 94530
S: USA
-N: Chris Vance
-E: cvance@tislabs.com
-
N: Jaspreet Singh
E: jaspreet@sangoma.com
W: www.sangoma.com
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 1017184ca1ed..08292190bddc 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -887,39 +887,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
-config VGA_CONSOLE
- bool "VGA text console"
- 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
source "drivers/video/Kconfig"
-config PCI_CONSOLE
- bool
- depends on FB
- default y
-
-endmenu
-
-
menu "Sound"
config SOUND
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2e1937e02b8e..8b313bc0c81d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1044,29 +1044,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
-config VGA_CONSOLE
- bool "VGA text console"
- depends on !ARCH_ACORN && !ARCH_EBSA110
- 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.
-
source "drivers/video/Kconfig"
-endmenu
-
-
menu "Sound"
depends on ARCH_ACORN || ARCH_CLPS7500 || ARCH_TBOX || ARCH_SHARK || ARCH_SA1100 || PCI
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index a3f8ca29b8eb..e7bc2ee9f1c4 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -1414,63 +1414,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
-config VGA_CONSOLE
- bool "VGA text console"
- 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.
-
-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.
-
-if EXPERIMENTAL
-
-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.
-
source "drivers/video/Kconfig"
-endif
-
-endmenu
-
-
menu "Sound"
config SOUND
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 9d6bf7002cb2..ca30c5d5d760 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -787,33 +787,8 @@ source "fs/Kconfig"
if !IA64_HP_SIM
-
-menu "Console drivers"
- depends on VT
-
-config VGA_CONSOLE
- bool "VGA text console"
- 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.
-
source "drivers/video/Kconfig"
-config PCI_CONSOLE
- bool
- depends on FB
- default y
-
-endmenu
-
-
menu "Sound"
config SOUND
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index c5c4cf937b01..f05686959a03 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -2340,15 +2340,8 @@ endmenu
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
source "drivers/video/Kconfig"
-endmenu
-
-
menu "Kernel hacking"
config DEBUG_KERNEL
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8ed551227a2e..649a9ace1818 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1107,28 +1107,6 @@ config VT_CONSOLE
bool "Support for console on virtual terminal"
depends on VT
-config SGI_NEWPORT_CONSOLE
- tristate "SGI Newport Console support"
- depends on VT
- help
- Say Y here if you want the console on the Newport aka XL graphics
- card of your Indy. Most people say Y here.
-
-config DUMMY_CONSOLE
- bool
- depends on VT && SGI_NEWPORT_CONSOLE!=y
- default y
-
-config FONT_8x16
- bool
- depends on VT && SGI_NEWPORT_CONSOLE=y
- default y
- 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 PSMOUSE
bool "PS/2 mouse support (aka \"auxiliary device\")"
---help---
@@ -1184,48 +1162,8 @@ endmenu
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
-config VGA_CONSOLE
- bool "VGA text console"
- 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 EXPERIMENTAL
-
-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.
-
source "drivers/video/Kconfig"
-endif
-
-endmenu
-
-
menu "Sound"
depends on !DECSTATION
diff --git a/arch/mips64/Kconfig b/arch/mips64/Kconfig
index a479c59b51a5..9ecc503a056f 100644
--- a/arch/mips64/Kconfig
+++ b/arch/mips64/Kconfig
@@ -585,31 +585,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
source "drivers/video/Kconfig"
-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.
-
-config DUMMY_CONSOLE
- bool
- depends on SGI_IP22 && SGI_NEWPORT_CONSOLE!=y
- default y
-
-config FONT_8x16
- bool
- depends on SGI_IP22 && SGI_NEWPORT_CONSOLE=y
- default y
-
-endmenu
-
config KCORE_ELF
bool
depends on PROC_FS
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index f6957f4915f6..8a145b527e9b 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -714,27 +714,8 @@ source "sound/Kconfig"
endmenu
-
-menu "Console drivers"
- depends on VT
-
source "drivers/video/Kconfig"
-# bool 'IODC console' CONFIG_IODC_CONSOLE
-config STI_CONSOLE
- bool "STI console"
- 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 DUMMY_CONSOLE
- bool
- depends on STI_CONSOLE || !IODC_CONSOLE && GSC_PS2
- default y
-
-endmenu
-
# endmenu
menu "Kernel hacking"
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index c2febc140b8d..b7027107bf72 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1045,11 +1045,6 @@ config CMDLINE
some command-line options at build time by entering them here. In
most cases you will need to specify the root device here.
-config FB_CONSOLE
- bool
- depends on APUS
- default y
-
config AMIGA
bool
depends on APUS
@@ -1424,25 +1419,8 @@ source "net/irda/Kconfig"
source "drivers/isdn/Kconfig"
-
-menu "Console drivers"
-
-config VGA_CONSOLE
- bool "VGA text console"
- depends on !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. This can be
- useful on PReP systems and IBM RS/6000 or pSeries machines but is of
- limited usefulness on Apple machines.
-
- Say N here if you have an Apple machine.
-
source "drivers/video/Kconfig"
-endmenu
-
-
menu "iSeries device drivers"
depends on PPC_ISERIES
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
index bf6a0b8460ad..10bac42babb0 100644
--- a/arch/ppc64/Kconfig
+++ b/arch/ppc64/Kconfig
@@ -401,15 +401,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
source "drivers/video/Kconfig"
-endmenu
-
-
menu "Sound"
config SOUND
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 0abc99323d1f..55fe816f3628 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -1182,63 +1182,8 @@ source "fs/Kconfig"
source "drivers/media/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
-config VGA_CONSOLE
- bool "VGA text console"
- 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.
-
-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.
-
-if EXPERIMENTAL
-
-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.
-
source "drivers/video/Kconfig"
-endif
-
-endmenu
-
-
menu "Sound"
config SOUND
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index d43f73584a52..ce887858c916 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -409,24 +409,8 @@ config PRINTER
endmenu
-
-menu "Console drivers"
-
-config PROM_CONSOLE
- bool "PROM console"
- 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
- default y
-
source "drivers/video/Kconfig"
-endmenu
-
source "drivers/mtd/Kconfig"
source "drivers/serial/Kconfig"
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 70e19c4aa017..f6cea7e8bf4b 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -517,19 +517,8 @@ config WATCHDOG_RIO
endmenu
-
-menu "Console drivers"
-
-config PROM_CONSOLE
- bool "PROM console"
- help
- Say Y to build a console driver for Sun machines that uses the
- terminal emulation built into their console PROMS.
-
source "drivers/video/Kconfig"
-endmenu
-
source "drivers/serial/Kconfig"
source "drivers/sbus/char/Kconfig"
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index afb474402246..fdfca1cde822 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -580,63 +580,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig"
-
-menu "Console drivers"
- depends on VT
-
-config VGA_CONSOLE
- bool "VGA text console"
- 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.
-
-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.
-
-if EXPERIMENTAL
-
-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.
-
source "drivers/video/Kconfig"
-endif
-
-endmenu
-
-
menu "Sound"
config SOUND
diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c
index bf55df922e45..3719e5889149 100644
--- a/drivers/char/consolemap.c
+++ b/drivers/char/consolemap.c
@@ -19,7 +19,6 @@
#include <linux/tty.h>
#include <asm/uaccess.h>
#include <linux/consolemap.h>
-#include <linux/console_struct.h>
#include <linux/vt_kern.h>
static unsigned short translations[][256] = {
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 7ad9b8d0253b..20ca5f5b0f73 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -35,7 +35,6 @@
#include <linux/init.h>
#include <linux/slab.h>
-#include <linux/console_struct.h>
#include <linux/kbd_kern.h>
#include <linux/kbd_diacr.h>
#include <linux/vt_kern.h>
diff --git a/drivers/char/selection.c b/drivers/char/selection.c
index 3295c7d6e6d2..6aa4932e7c4a 100644
--- a/drivers/char/selection.c
+++ b/drivers/char/selection.c
@@ -22,7 +22,6 @@
#include <linux/vt_kern.h>
#include <linux/consolemap.h>
-#include <linux/console_struct.h>
#include <linux/selection.h>
#ifndef MIN
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index bb7e38bdf02e..9a7e9fb83301 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1504,6 +1504,13 @@ static int tiocswinsz(struct tty_struct *tty, struct tty_struct *real_tty,
return -EFAULT;
if (!memcmp(&tmp_ws, &tty->winsize, sizeof(*arg)))
return 0;
+#ifdef CONFIG_VT
+ if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) {
+ unsigned int currcons = minor(tty->device) - tty->driver.minor_start;
+ if (vc_resize(currcons, tmp_ws.ws_col, tmp_ws.ws_row))
+ return -ENXIO;
+ }
+#endif
if (tty->pgrp > 0)
kill_pg(tty->pgrp, SIGWINCH, 1);
if ((real_tty->pgrp != tty->pgrp) && (real_tty->pgrp > 0))
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index b74049de43c3..5667c82b8dd8 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -32,7 +32,6 @@
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/vt_kern.h>
-#include <linux/console_struct.h>
#include <linux/selection.h>
#include <linux/kbd_kern.h>
#include <linux/console.h>
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index b88de4fe13b6..8cdf6cb7d213 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -90,7 +90,6 @@
#include <linux/devfs_fs_kernel.h>
#include <linux/vt_kern.h>
#include <linux/selection.h>
-#include <linux/console_struct.h>
#include <linux/kbd_kern.h>
#include <linux/consolemap.h>
#include <linux/timer.h>
@@ -691,106 +690,106 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
return 0;
}
+inline int resize_screen(int currcons, int width, int height)
+{
+ /* Resizes the resolution of the display adapater */
+ int err = 0;
+
+ if (vcmode != KD_GRAPHICS && sw->con_resize)
+ err = sw->con_resize(vc_cons[currcons].d, width, height);
+ return err;
+}
+
/*
* Change # of rows and columns (0 means unchanged/the size of fg_console)
* [this is to be used together with some user program
* like resize that changes the hardware videomode]
*/
-int vc_resize(unsigned int lines, unsigned int cols,
- unsigned int first, unsigned int last)
-{
- unsigned int cc, ll, ss, sr, todo = 0;
- unsigned int currcons = fg_console, i;
- unsigned short *newscreens[MAX_NR_CONSOLES];
-
- cc = (cols ? cols : video_num_columns);
- ll = (lines ? lines : video_num_lines);
- sr = cc << 1;
- ss = sr * ll;
-
- for (currcons = first; currcons <= last; currcons++) {
- if (!vc_cons_allocated(currcons) ||
- (cc == video_num_columns && ll == video_num_lines))
- newscreens[currcons] = NULL;
- else {
- unsigned short *p = (unsigned short *) kmalloc(ss, GFP_USER);
- if (!p) {
- for (i = first; i < currcons; i++)
- if (newscreens[i])
- kfree(newscreens[i]);
- return -ENOMEM;
- }
- newscreens[currcons] = p;
- todo++;
- }
- }
- if (!todo)
+int vc_resize(int currcons, unsigned int cols, unsigned int lines)
+{
+ unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
+ unsigned int old_cols, old_rows, old_row_size, old_screen_size;
+ unsigned int new_cols, new_rows, new_row_size, new_screen_size;
+ unsigned short *newscreen;
+
+ if (!vc_cons_allocated(currcons))
+ return -ENXIO;
+
+ new_cols = (cols ? cols : video_num_columns);
+ new_rows = (lines ? lines : video_num_lines);
+ new_row_size = new_cols << 1;
+ new_screen_size = new_row_size * new_rows;
+
+ if (new_cols == video_num_columns && new_rows == video_num_lines)
return 0;
- for (currcons = first; currcons <= last; currcons++) {
- unsigned int occ, oll, oss, osr;
- unsigned long ol, nl, nlend, rlth, rrem;
- if (!newscreens[currcons] || !vc_cons_allocated(currcons))
- continue;
+ newscreen = (unsigned short *) kmalloc(new_screen_size, GFP_USER);
+ if (!newscreen)
+ return -ENOMEM;
- oll = video_num_lines;
- occ = video_num_columns;
- osr = video_size_row;
- oss = screenbuf_size;
-
- video_num_lines = ll;
- video_num_columns = cc;
- video_size_row = sr;
- screenbuf_size = ss;
-
- rlth = min(osr, sr);
- rrem = sr - rlth;
- ol = origin;
- nl = (long) newscreens[currcons];
- nlend = nl + ss;
- if (ll < oll)
- ol += (oll - ll) * osr;
-
- update_attr(currcons);
-
- while (ol < scr_end) {
- scr_memcpyw((unsigned short *) nl, (unsigned short *) ol, rlth);
- if (rrem)
- scr_memsetw((void *)(nl + rlth), video_erase_char, rrem);
- ol += osr;
- nl += sr;
- }
- if (nlend > nl)
- scr_memsetw((void *) nl, video_erase_char, nlend - nl);
- if (kmalloced)
- kfree(screenbuf);
- screenbuf = newscreens[currcons];
- kmalloced = 1;
- screenbuf_size = ss;
- set_origin(currcons);
+ old_rows = video_num_lines;
+ old_cols = video_num_columns;
+ old_row_size = video_size_row;
+ old_screen_size = screenbuf_size;
- /* do part of a reset_terminal() */
- top = 0;
- bottom = video_num_lines;
- gotoxy(currcons, x, y);
- save_cur(currcons);
-
- if (console_table[currcons]) {
- struct winsize ws, *cws = &console_table[currcons]->winsize;
- memset(&ws, 0, sizeof(ws));
- ws.ws_row = video_num_lines;
- ws.ws_col = video_num_columns;
- if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) &&
- console_table[currcons]->pgrp > 0)
- kill_pg(console_table[currcons]->pgrp, SIGWINCH, 1);
- *cws = ws;
- }
+ video_num_lines = new_rows;
+ video_num_columns = new_cols;
+ video_size_row = new_row_size;
+ screenbuf_size = new_screen_size;
- if (IS_VISIBLE)
- update_screen(currcons);
+ err = resize_screen(currcons, new_cols, new_rows);
+ if (err)
+ return err;
+
+ rlth = min(old_row_size, new_row_size);
+ rrem = new_row_size - rlth;
+ old_origin = origin;
+ new_origin = (long) newscreen;
+ new_scr_end = new_origin + new_screen_size;
+ if (new_rows < old_rows)
+ old_origin += (old_rows - new_rows) * old_row_size;
+
+ update_attr(currcons);
+
+ while (old_origin < scr_end) {
+ scr_memcpyw((unsigned short *) new_origin, (unsigned short *) old_origin, rlth);
+ if (rrem)
+ scr_memsetw((void *)(new_origin + rlth), video_erase_char, rrem);
+ old_origin += old_row_size;
+ new_origin += new_row_size;
}
+ if (new_scr_end > new_origin)
+ scr_memsetw((void *) new_origin, video_erase_char, new_scr_end - new_origin);
+ if (kmalloced)
+ kfree(screenbuf);
+ screenbuf = newscreen;
+ kmalloced = 1;
+ screenbuf_size = new_screen_size;
+ if (IS_VISIBLE)
+ err = resize_screen(currcons, new_cols, new_rows);
+ set_origin(currcons);
- return 0;
+ /* do part of a reset_terminal() */
+ top = 0;
+ bottom = video_num_lines;
+ gotoxy(currcons, x, y);
+ save_cur(currcons);
+
+ if (vc_cons[currcons].d->vc_tty) {
+ struct winsize ws, *cws = &vc_cons[currcons].d->vc_tty->winsize;
+
+ memset(&ws, 0, sizeof(ws));
+ ws.ws_row = video_num_lines;
+ ws.ws_col = video_num_columns;
+ if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) &&
+ vc_cons[currcons].d->vc_tty->pgrp > 0)
+ kill_pg(vc_cons[currcons].d->vc_tty->pgrp, SIGWINCH, 1);
+ *cws = ws;
+ }
+
+ if (IS_VISIBLE)
+ update_screen(currcons);
+ return err;
}
@@ -1200,7 +1199,7 @@ static void set_mode(int currcons, int on_off)
case 3: /* 80/132 mode switch unimplemented */
deccolm = on_off;
#if 0
- (void) vc_resize(video_num_lines, deccolm ? 132 : 80);
+ (void) vc_resize(deccolm ? 132 : 80, video_num_lines);
/* this alone does not suffice; some user mode
utility has to change the hardware regs */
#endif
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index fcdb5208acea..cda2f20d8308 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -810,7 +810,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
if (get_user(ll, &vtsizes->v_rows) ||
get_user(cc, &vtsizes->v_cols))
return -EFAULT;
- return vc_resize_all(ll, cc);
+ for (i = 0; i < MAX_NR_CONSOLES; i++)
+ vc_resize(i, cc, ll);
+ return 0;
}
case VT_RESIZEX:
@@ -829,37 +831,33 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
__get_user(vcol, &vtconsize->v_vcol);
__get_user(ccol, &vtconsize->v_ccol);
vlin = vlin ? vlin : video_scan_lines;
- if ( clin )
- {
- if ( ll )
- {
- if ( ll != vlin/clin )
- return -EINVAL; /* Parameters don't add up */
- }
- else
- ll = vlin/clin;
- }
- if ( vcol && ccol )
- {
- if ( cc )
- {
- if ( cc != vcol/ccol )
- return -EINVAL;
- }
- else
- cc = vcol/ccol;
- }
-
- if ( clin > 32 )
- return -EINVAL;
+ if (clin) {
+ if (ll) {
+ if (ll != vlin/clin)
+ return -EINVAL; /* Parameters don't add up */
+ } else
+ ll = vlin/clin;
+ }
+ if (vcol && ccol) {
+ if (cc) {
+ if (cc != vcol/ccol)
+ return -EINVAL;
+ } else
+ cc = vcol/ccol;
+ }
+
+ if (clin > 32)
+ return -EINVAL;
- if ( vlin )
- video_scan_lines = vlin;
- if ( clin )
- video_font_height = clin;
-
- return vc_resize_all(ll, cc);
- }
+ if (vlin)
+ video_scan_lines = vlin;
+ if (clin)
+ video_font_height = clin;
+
+ for (i = 0; i < MAX_NR_CONSOLES; i++)
+ vc_resize(i, cc, ll);
+ return 0;
+ }
case PIO_FONT: {
struct console_font_op op;
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index ec962ac3112e..0701b47fc330 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2,10 +2,10 @@
# Video configuration
#
-menu "Frame-buffer support"
+menu "Graphics support"
config FB
- bool "Support for frame buffer devices (EXPERIMENTAL)"
+ 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
@@ -38,14 +38,9 @@ config FB
(e.g. an accelerated X server) and that are not frame buffer
device-aware may cause unexpected results. If unsure, say N.
-config DUMMY_CONSOLE
- bool
- depends on FB
- default y
-
config FB_CLGEN
- tristate "Cirrus Logic support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && (AMIGA || PCI)
+ 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.
@@ -59,8 +54,8 @@ config FB_CLGEN
before you next recompile the kernel.
config FB_PM2
- tristate "Permedia2 support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && (AMIGA || PCI)
+ 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
@@ -206,8 +201,8 @@ config FB_CYBER
Cybervision 64 3D card, as they use incompatible video chips.
config FB_VIRGE
- bool "Amiga CyberVision3D support (EXPERIMENTAL)"
- depends on FB && ZORRO && EXPERIMENTAL
+ 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
@@ -217,16 +212,16 @@ config FB_VIRGE
Cybervision 64 card, as they use incompatible video chips.
config FB_RETINAZ3
- tristate "Amiga RetinaZ3 support (EXPERIMENTAL)"
- depends on FB && ZORRO && EXPERIMENTAL
+ 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 (EXPERIMENTAL)"
- depends on FB && ZORRO && EXPERIMENTAL
+ 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).
@@ -239,7 +234,7 @@ config FB_ATARI
chipset found in Ataris.
config FB_ATY
- tristate "ATI Mach64 display support (EXPERIMENTAL)" if EXPERIMENTAL && PCI
+ tristate "ATI Mach64 display support" if PCI
depends on FB
help
This driver supports graphics boards with the ATI Mach64 chips.
@@ -255,7 +250,7 @@ config FB_ATY
depends on FB && (SPARC64 && PCI && FB_PCI || ATARI)
config FB_ATY_GX
- bool "Mach64 GX support (EXPERIMENTAL)" if EXPERIMENTAL && PCI
+ bool "Mach64 GX support" if PCI
depends on FB_ATY
default y if ATARI
help
@@ -377,7 +372,7 @@ config FB_VESA
read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
config FB_HGA
- tristate "Hercules mono graphics console (EXPERIMENTAL)"
+ tristate "Hercules mono graphics console"
depends on FB && X86
help
Say Y here if you have a Hercules mono graphics card.
@@ -487,8 +482,8 @@ config E1355_FB_BASE
discussion.
config FB_RIVA
- tristate "nVidia Riva support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ tristate "nVidia Riva support"
+ depends on FB && PCI
help
This driver supports graphics boards with the nVidia Riva/Geforce
chips.
@@ -500,8 +495,8 @@ config FB_RIVA
module, say M here and read <file:Documentation/modules.txt>.
config FB_MATROX
- tristate "Matrox acceleration (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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
@@ -656,7 +651,7 @@ config FB_MATROX_MULTIHEAD
only one Matrox card in the box.
config FB_ATY_CT
- bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support" if EXPERIMENTAL
+ bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support"
depends on PCI && FB_ATY
default y if SPARC64 && FB_PCI
help
@@ -666,8 +661,8 @@ config FB_ATY_CT
is at <http://support.ati.com/products/pc/mach64/>.
config FB_RADEON
- tristate "ATI Radeon display support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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
@@ -676,8 +671,8 @@ config FB_RADEON
<http://www.ati.com/na/pages/products/pc/radeon32/index.html>.
config FB_ATY128
- tristate "ATI Rage128 display support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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
@@ -689,8 +684,8 @@ config FB_ATY128
module, say M here and read <file:Documentation/modules.txt>.
config FB_SIS
- tristate "SIS acceleration (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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/>.
@@ -711,8 +706,8 @@ config FB_SIS_315
card. Specs available at <http://www.sis.com.tw/>.
config FB_NEOMAGIC
- tristate "NeoMagic display support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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.
@@ -723,8 +718,8 @@ config FB_NEOMAGIC
module, say M here and read Documentation/modules.txt.
config FB_3DFX
- tristate "3Dfx Banshee/Voodoo3 display support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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.
@@ -735,8 +730,8 @@ config FB_3DFX
module, say M here and read <file:Documentation/modules.txt>.
config FB_VOODOO1
- tristate "3Dfx Voodoo Graphics (sst1) support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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.
@@ -752,8 +747,8 @@ config FB_VOODOO1
options and other important info support.
config FB_TRIDENT
- tristate "Trident support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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
@@ -768,8 +763,8 @@ config FB_TRIDENT
module, say M here and read <file:Documentation/modules.txt>.
config FB_PM3
- tristate "Permedia3 support (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL && PCI
+ 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 &
@@ -869,8 +864,8 @@ config FB_TX3912
Say Y here to enable kernel support for the on-board framebuffer.
config FB_VIRTUAL
- tristate "Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)"
- depends on FB && EXPERIMENTAL
+ 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
@@ -888,262 +883,7 @@ config FB_VIRTUAL
If unsure, say N.
-config FBCON_ADVANCED
- bool "Advanced low level driver options"
- depends on FB
- ---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_MFB
- tristate "Monochrome support" if FBCON_ADVANCED
- depends on FB
- default m if !FBCON_ADVANCED && !FB_ACORN && FB_AMIGA!=y && !FB_ATARI && FB_CYBER!=y && !FB_BWTWO && FB_RETINAZ3!=y && !FB_VIRGE && FB_CLGEN!=y && (FB_AMIGA=m || FB_CYBER=m || FB_RETINAZ3=m || FB_CLGEN=m)
- default y if !FBCON_ADVANCED && (FB_ACORN || FB_AMIGA=y || FB_ATARI || FB_CYBER=y || FB_BWTWO || FB_RETINAZ3=y || FB_VIRGE || FB_CLGEN=y)
- help
- This is the low level frame buffer console driver for monochrome
- (2 colors) packed pixels.
-
-config FBCON_CFB2
- tristate "2 bpp packed pixels support" if FBCON_ADVANCED
- depends on FB
- default y if !FBCON_ADVANCED && (FB_ACORN || FB_SA1100)
- help
- This is the low level frame buffer console driver for 2 bits per
- pixel (4 colors) packed pixels.
-
-config FBCON_CFB4
- tristate "4 bpp packed pixels support" if FBCON_ADVANCED
- depends on FB
- default y if !FBCON_ADVANCED && (FB_ACORN || FB_SA1100)
- help
- This is the low level frame buffer console driver for 4 bits per
- pixel (16 colors) packed pixels.
-
-config FBCON_CFB8
- tristate "8 bpp packed pixels support" if FBCON_ADVANCED
- depends on FB
- default m if !FBCON_ADVANCED && !FB_ACORN && !FB_ATARI && !FB_P9100 && FB_CYBER2000!=y && FB_RADEON!=y && FB_TGA!=y && FB_SIS!=y && FB_PM3!=y && !FB_TCX && !FB_CGTHREE && !FB_CONTROL && FB_CLGEN!=y && !FB_CGFOURTEEN && FB_TRIDENT!=y && !FB_VIRGE && FB_CYBER!=y && !FB_VALKYRIE && !FB_PLATINUM && !FB_IGA && FB_MATROX!=y && !FB_CT65550 && FB_PM2!=y && !FB_SA1100 && (FB_CYBER2000=m || FB_RADEON=m || FB_TGA=m || FB_SIS=m || FB_PM3=m || FB_CLGEN=m || FB_TRIDENT=m || FB_CYBER=m || FB_MATROX=m || FB_PM2=m)
- default y if !FBCON_ADVANCED && (FB_ACORN || FB_ATARI || FB_P9100 || FB_CYBER2000=y || FB_RADEON=y || FB_TGA=y || FB_SIS=y || FB_PM3=y || FB_TCX || FB_CGTHREE || FB_CONTROL || FB_CLGEN=y || FB_CGFOURTEEN || FB_TRIDENT=y || FB_VIRGE || FB_CYBER=y || FB_VALKYRIE || FB_PLATINUM || FB_IGA || FB_MATROX=y || FB_CT65550 || FB_PM2=y || FB_SA1100)
- help
- This is the low level frame buffer console driver for 8 bits per
- pixel (256 colors) packed pixels.
-
-config FBCON_CFB16
- tristate "16 bpp packed pixels support" if FBCON_ADVANCED
- depends on FB
- default m if !FBCON_ADVANCED && !FB_ATARI && FB_PM3!=y && FB_SIS!=y && FB_PVR2!=y && FB_TRIDENT!=y && !FB_TBOX && FB_VOODOO1!=y && FB_RADEON!=y && !FB_CONTROL && FB_CLGEN!=y && !FB_VIRGE && FB_CYBER!=y && !FB_VALKYRIE && !FB_PLATINUM && !FB_CT65550 && FB_MATROX!=y && FB_PM2!=y && FB_CYBER2000!=y && !FB_SA1100 && (FB_SIS=m || FB_RADEON=m || FB_PVR2=m || FB_TRIDENT=m || FB_VOODOO1=m || FB_PM3=m || FB_CLGEN=m || FB_CYBER=m || FB_MATROX=m || FB_PM2=m || FB_CYBER2000=m || FB_SA1100)
- default y if !FBCON_ADVANCED && (FB_ATARI || FB_PM3=y || FB_SIS=y || FB_PVR2=y || FB_TRIDENT=y || FB_TBOX || FB_VOODOO1=y || FB_RADEON=y || FB_CONTROL || FB_CLGEN=y || FB_VIRGE || FB_CYBER=y || FB_VALKYRIE || FB_PLATINUM || FB_CT65550 || FB_MATROX=y || FB_PM2=y || FB_CYBER2000=y || FB_SA1100)
- help
- This is the low level frame buffer console driver for 15 or 16 bits
- per pixel (32K or 64K colors, also known as `hicolor') packed
- pixels.
-
-config FBCON_CFB24
- tristate "24 bpp packed pixels support" if FBCON_ADVANCED
- depends on FB
- default m if !FBCON_ADVANCED && FB_ATY!=y && FB_VIRTUAL!=y && FB_CLGEN!=y && !FB_VESA && FB_MATROX!=y && FB_PM2!=y && FB_ATY128!=y && FB_RADEON!=y && FB_CYBER2000!=y && FB_PVR2!=y && FB_VOODOO1!=y && FB_NEOMAGIC!=y && (FB_ATY=m || FB_VIRTUAL=m || FB_CLGEN=m || FB_MATROX=m || FB_PM2=m || FB_ATY128=m || FB_RADEON=m || FB_CYBER2000=m || FB_PVR2=m || FB_VOODOO1=m || FB_NEOMAGIC=y)
- default y if !FBCON_ADVANCED && (FB_ATY=y || FB_VIRTUAL=y || FB_CLGEN=y || FB_VESA || FB_MATROX=y || FB_PM2=y || FB_ATY128=y || FB_RADEON=y || FB_CYBER2000=y || FB_PVR2=y || FB_VOODOO1=y || FB_NEOMAGIC=y)
- help
- This is the low level frame buffer console driver for 24 bits per
- pixel (16M colors, also known as `truecolor') packed pixels. It is
- NOT for `sparse' 32 bits per pixel mode.
-
-config FBCON_CFB32
- tristate "32 bpp packed pixels support" if FBCON_ADVANCED
- depends on FB
- default m if !FBCON_ADVANCED && !FB_ATARI && FB_RADEON!=y && FB_VOODOO1!=y && FB_TRIDENT!=y && !FB_CONTROL && FB_CLGEN!=y && FB_TGA!=y && !FB_PLATINUM && FB_MATROX!=y && FB_PM2!=y && FB_PVR2!=y && FB_PM3!=y && FB_SIS!=y && (FB_RADEON=m || FB_VOODOO1=m || FB_TRIDENT=m || FB_CLGEN=m || FB_TGA=m || FB_MATROX=m || FB_PM2=m || FB_SIS=m || FB_PVR2=m || FB_PM3=m)
- default y if !FBCON_ADVANCED && (FB_ATARI || FB_RADEON=y || FB_VOODOO1=y || FB_TRIDENT=y || FB_CONTROL || FB_CLGEN=y || FB_TGA=y || FB_PLATINUM || FB_MATROX=y || FB_PM2=y || FB_PVR2=y || FB_PM3=y || FB_SIS=y)
- help
- This is the low level frame buffer console driver for 32 bits per
- pixel (16M colors, also known as `truecolor') sparse packed pixels.
-
-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_OF && FB_SGIVW!=y && (FB_NEOMAGIC=m || FB_HIT=m || FB_VIRTUAL=m || FB_3DFX=m || FB_RIVA=m || FB_SGIVW=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)
-
-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.
-
-# tristate ' Atari interleaved bitplanes (16 planes) support' CONFIG_FBCON_IPLAN2P16
-config FBCON_VGA_PLANES
- tristate "VGA 16-color planar support" if FBCON_ADVANCED
- depends on FB
- default m if !FBCON_ADVANCED && FB_VGA16=m
- default y if !FBCON_ADVANCED && FB_VGA16=y
- help
- This low level frame buffer console driver enable the kernel to use
- the 16-color planar modes of the old VGA cards where the bits of
- each pixel are separated into 4 planes.
-
- Only answer Y here if you have a (very old) VGA card that isn't VESA
- 2 compatible.
-
-config FBCON_HGA
- tristate "HGA monochrome support (EXPERIMENTAL)" if FBCON_ADVANCED
- depends on FB
- default m if !FBCON_ADVANCED && FB_HGA=m
- default y if !FBCON_ADVANCED && FB_HGA=y
- help
- This is the low level frame buffer console driver for Hercules mono
- graphics cards.
-
-# 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
- 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
+source "drivers/video/console/Kconfig"
endmenu
diff --git a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c
index 0a7ea6ec1f79..07863a5ee58b 100644
--- a/drivers/video/S3triofb.c
+++ b/drivers/video/S3triofb.c
@@ -542,7 +542,7 @@ static void __init s3triofb_of_init(struct device_node *dp)
return;
printk("fb%d: S3 Trio frame buffer device on %s\n",
- GET_FB_IDX(fb_info.node), dp->full_name);
+ minor(fb_info.node), dp->full_name);
}
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index 357ce2571f66..a98aa38199b8 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -1771,7 +1771,7 @@ default_chipset:
}
printk("fb%d: %s frame buffer device, using %ldK of video memory\n",
- GET_FB_IDX(fb_info.node), fb_info.modename,
+ minor(fb_info.node), fb_info.modename,
videomemorysize>>10);
return 0;
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c
index 33ea709cefa1..fd55dbcabf6f 100644
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -2816,7 +2816,7 @@ int __init atafb_init(void)
printk(" virtual %dx%d\n",
disp.var.xres_virtual, disp.var.yres_virtual);
printk("fb%d: %s frame buffer device, using %dK of video memory\n",
- GET_FB_IDX(fb_info.node), fb_info.modename, screen_len>>10);
+ minor(fb_info.node), fb_info.modename, screen_len>>10);
/* TODO: This driver cannot be unloaded yet */
MOD_INC_USE_COUNT;
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 3a23db6eaab2..e4b93a3f9964 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -1951,7 +1951,7 @@ static int __init aty_init(struct fb_info *info, const char *name)
fb_list = info;
printk("fb%d: %s frame buffer device on %s\n",
- GET_FB_IDX(info->node), info->fix.id, name);
+ minor(info->node), info->fix.id, name);
return 1;
}
diff --git a/drivers/video/aty128fb.c b/drivers/video/aty128fb.c
index 052cf3fc9e49..afc04f6c3693 100644
--- a/drivers/video/aty128fb.c
+++ b/drivers/video/aty128fb.c
@@ -1605,7 +1605,7 @@ aty128_init(struct fb_info *info, const char *name)
#endif
printk(KERN_INFO "fb%d: %s frame buffer device on %s\n",
- GET_FB_IDX(info->node), info->fix.id, name);
+ minor(info->node), info->fix.id, name);
return 1; /* success! */
}
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c
index 4ad4e2e30ae5..ee43294488f1 100644
--- a/drivers/video/chipsfb.c
+++ b/drivers/video/chipsfb.c
@@ -562,7 +562,7 @@ static void __init init_chips(struct fb_info_chips *p)
}
printk("fb%d: Chips 65550 frame buffer (%dK RAM detected)\n",
- GET_FB_IDX(p->info.node), p->fix.smem_len / 1024);
+ minor(p->info.node), p->fix.smem_len / 1024);
chips_hw_init(p);
diff --git a/drivers/video/console/Config.help b/drivers/video/console/Config.help
deleted file mode 100644
index aba6605590c4..000000000000
--- a/drivers/video/console/Config.help
+++ /dev/null
@@ -1,111 +0,0 @@
-CONFIG_VIDEO_SELECT
- 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_FBCON_FONTS
- 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_FONT_8x16
- 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_FBCON_FONTWIDTH8_ONLY
- Answer Y here will make the kernel provide only the 8x8 fonts (these
- are the less readable).
-
- If unsure, say N.
-
-CONFIG_FONT_SUN8x16
- This is the high resolution console font for Sun machines. Say Y.
-
-CONFIG_FONT_SUN12x22
- 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_FONT_8x8
- 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_6x11
- Small console font with Macintosh-style high-half glyphs. Some Mac
- framebuffer drivers don't support this one at all.
-
-CONFIG_FONT_PEARL_8x8
- Small console font with PC-style control-character and high-half
- glyphs.
-
-CONFIG_FONT_ACORN_8x8
- Small console font with PC-style control characters and high-half
- glyphs.
-
-CONFIG_FBCON_ADVANCED
- 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_AFB
- This is the low level frame buffer console driver for 1 to 8
- bitplanes (2 to 256 colors) on Amiga.
-
-CONFIG_FBCON_ILBM
- This is the low level frame buffer console driver for 1 to 8
- interleaved bitplanes (2 to 256 colors) on Amiga.
-
-CONFIG_FBCON_IPLAN2P2
- This is the low level frame buffer console driver for 2 interleaved
- bitplanes (4 colors) on Atari.
-
-CONFIG_FBCON_IPLAN2P4
- This is the low level frame buffer console driver for 4 interleaved
- bitplanes (16 colors) on Atari.
-
-CONFIG_FBCON_IPLAN2P8
- This is the low level frame buffer console driver for 8 interleaved
- bitplanes (256 colors) on Atari.
-
-CONFIG_FBCON_HGA
- This is the low level frame buffer console driver for Hercules mono
- graphics cards.
-
diff --git a/drivers/video/console/Config.in b/drivers/video/console/Config.in
deleted file mode 100644
index 921873b8774d..000000000000
--- a/drivers/video/console/Config.in
+++ /dev/null
@@ -1,153 +0,0 @@
-#
-# Console Display configuration
-#
-
-if [ "$CONFIG_VT" != "n" ]; then
- mainmenu_option next_comment
- comment 'Console Display driver support'
-
- bool 'Video mode selection support' CONFIG_VIDEO_SELECT
- if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" -a \
- "$CONFIG_4xx" != "y" -a "$CONFIG_8xx" != "y" ]; then
- bool 'VGA text console' CONFIG_VGA_CONSOLE
-# 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
- fi
- tristate 'MDA text console ' CONFIG_MDA_CONSOLE
- if [ "$CONFIG_SGI_IP22" = "y" ]; then
- tristate 'SGI Newport Console support' CONFIG_SGI_NEWPORT_CONSOLE
- if [ "$CONFIG_SGI_NEWPORT_CONSOLE" != "y" ]; then
- define_bool CONFIG_DUMMY_CONSOLE y
- else
- define_bool CONFIG_FONT_8x16 y
- fi
- fi
- if [ "$CONFIG_PARISC" = "y" ]; then
-# bool 'IODC console' CONFIG_IODC_CONSOLE
- bool 'STI console' CONFIG_STI_CONSOLE
- if [ "$CONFIG_IODC_CONSOLE" = "n" ]; then
- if [ "$CONFIG_GSC_PS2" = "y" ]; then
- define_bool CONFIG_DUMMY_CONSOLE y
- fi
- fi
- if [ "$CONFIG_STI_CONSOLE" = "y" ]; then
- define_bool CONFIG_DUMMY_CONSOLE y
- fi
- fi
- if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
- bool 'PROM console' CONFIG_PROM_CONSOLE
- if [ "$CONFIG_PROM_CONSOLE" != "y" ]; then
- define_bool CONFIG_DUMMY_CONSOLE y
- fi
- fi
- if [ "$CONFIG_FB" = "y" ]; then
- bool 'Framebuffer Console support' CONFIG_FRAMEBUFFER_CONSOLE
- if [ "$CONFIG_FRAMEBUFFER_CONSOLE" = "y" ]; then
- define_bool CONFIG_DUMMY_CONSOLE y
- define_bool CONFIG_PCI_CONSOLE y
- bool ' Advanced low level driver options' CONFIG_FBCON_ADVANCED
- if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then
- tristate ' Hardware acceleration support' CONFIG_FBCON_ACCEL
- tristate ' Amiga bitplanes support' CONFIG_FBCON_AFB
- tristate ' Amiga interleaved bitplanes support' CONFIG_FBCON_ILBM
- tristate ' Atari interleaved bitplanes (2 planes) support' CONFIG_FBCON_IPLAN2P2
- tristate ' Atari interleaved bitplanes (4 planes) support' CONFIG_FBCON_IPLAN2P4
- tristate ' Atari interleaved bitplanes (8 planes) support' CONFIG_FBCON_IPLAN2P8
- tristate ' HGA monochrome support ' CONFIG_FBCON_HGA
- else
- if [ "$CONFIG_FB_NEOMAGIC" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
- "$CONFIG_FB_FM2" = "y" -o "$CONFIG_FB_HIT" = "y" -o \
- "$CONFIG_FB_HP300" = "y" -o "$CONFIG_FB_Q40" = "y" -o \
- "$CONFIG_FB_ANAKIN" = "y" -o "$CONFIG_FB_G364" = "y" -o \
- "$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_CLPS711X" = "y" -o \
- "$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \
- "$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \
- "$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_APOLLO" = "y" -o \
- "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_MAC" = "y" -o \
- "$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_OF" = "y" -o \
- "$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_SIS" = "y" ]; then
- define_tristate CONFIG_FBCON_ACCEL y
- else
- if [ "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_HIT" = "m" -o \
- "$CONFIG_FB_G364" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
- "$CONFIG_FB_CLPS711X" = "m" -o "$CONFIG_FB_3DFX" = "m" -o \
- "$CONFIG_FB_RIVA" = "m" -o "$CONFIG_FB_SGIVW" = "m" -o \
- "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_SIS" = "y" ]; then
- define_tristate CONFIG_FBCON_ACCEL m
- fi
- fi
- if [ "$CONFIG_FB_AMIGA" = "y" ]; then
- define_tristate CONFIG_FBCON_AFB y
- define_tristate CONFIG_FBCON_ILBM y
- else
- if [ "$CONFIG_FB_AMIGA" = "m" ]; then
- define_tristate CONFIG_FBCON_AFB m
- define_tristate CONFIG_FBCON_ILBM m
- fi
- fi
- if [ "$CONFIG_FB_ATARI" = "y" ]; then
- define_tristate CONFIG_FBCON_IPLAN2P2 y
- define_tristate CONFIG_FBCON_IPLAN2P4 y
- define_tristate CONFIG_FBCON_IPLAN2P8 y
- else
- if [ "$CONFIG_FB_ATARI" = "m" ]; then
- define_tristate CONFIG_FBCON_IPLAN2P2 m
- define_tristate CONFIG_FBCON_IPLAN2P4 m
- define_tristate CONFIG_FBCON_IPLAN2P8 m
- fi
- fi
- fi
- bool ' Support only 8 pixels wide fonts' CONFIG_FBCON_FONTWIDTH8_ONLY
- if [ "$CONFIG_SPARC32" = "y" -o "$CONFIG_SPARC64" = "y" ]; then
- bool ' Sparc console 8x16 font' CONFIG_FONT_SUN8x16
- if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
- bool ' Sparc console 12x22 font (not supported by all drivers)' CONFIG_FONT_SUN12x22
- fi
- bool ' Select other fonts' CONFIG_FBCON_FONTS
- if [ "$CONFIG_FBCON_FONTS" = "y" ]; then
- bool ' VGA 8x8 font' CONFIG_FONT_8x8
- bool ' VGA 8x16 font' CONFIG_FONT_8x16
- if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
- bool ' Mac console 6x11 font (not supported by all drivers)' CONFIG_FONT_6x11
- fi
- bool ' Pearl (old m68k) console 8x8 font' CONFIG_FONT_PEARL_8x8
- bool ' Acorn console 8x8 font' CONFIG_FONT_ACORN_8x8
- fi
- else
- bool ' Select compiled-in fonts' CONFIG_FBCON_FONTS
- if [ "$CONFIG_FBCON_FONTS" = "y" ]; then
- bool ' VGA 8x8 font' CONFIG_FONT_8x8
- bool ' VGA 8x16 font' CONFIG_FONT_8x16
- bool ' Sparc console 8x16 font' CONFIG_FONT_SUN8x16
- if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
- bool ' Sparc console 12x22 font (not supported by all drivers)' CONFIG_FONT_SUN12x22
- bool ' Mac console 6x11 font (not supported by all drivers)' CONFIG_FONT_6x11
- fi
- bool ' Pearl (old m68k) console 8x8 font' CONFIG_FONT_PEARL_8x8
- bool ' Acorn console 8x8 font' CONFIG_FONT_ACORN_8x8
- bool ' Mini 4x6 font' CONFIG_FONT_MINI_4x6
- else
- define_bool CONFIG_FONT_8x8 y
- define_bool CONFIG_FONT_8x16 y
- if [ "$CONFIG_MAC" = "y" ]; then
- if [ "$CONFIG_FBCON_FONTWIDTH8_ONLY" = "n" ]; then
- define_bool CONFIG_FONT_6x11 y
- fi
- fi
- if [ "$CONFIG_AMIGA" = "y" ]; then
- define_bool CONFIG_FONT_PEARL_8x8 y
- fi
- if [ "$CONFIG_ARM" = "y" -a "$CONFIG_ARCH_ACORN" = "y" ]; then
- define_bool CONFIG_FONT_ACORN_8x8 y
- fi
- fi
- fi
- fi
- fi
- endmenu
-fi
-
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
new file mode 100644
index 000000000000..141e82629db8
--- /dev/null
+++ b/drivers/video/console/Kconfig
@@ -0,0 +1,277 @@
+#
+# 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_OF && FB_SGIVW!=y && (FB_NEOMAGIC=m || FB_HIT=m || FB_VIRTUAL=m || FB_3DFX=m || FB_RIVA=m || FB_SGIVW=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)
+
+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.
+
+config FBCON_HGA
+ tristate "HGA monochrome support (EXPERIMENTAL)" if FBCON_ADVANCED
+ depends on FB
+ default m if !FBCON_ADVANCED && FB_HGA=m
+ default y if !FBCON_ADVANCED && FB_HGA=y
+ help
+ This is the low level frame buffer console driver for Hercules mono
+ graphics cards.
+
+# 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
+
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
index 82686f4b2633..ba38857c8e3e 100644
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -9,7 +9,6 @@
#include <linux/kdev_t.h>
#include <linux/tty.h>
#include <linux/console.h>
-#include <linux/console_struct.h>
#include <linux/vt_kern.h>
#include <linux/init.h>
@@ -33,14 +32,14 @@ static const char *dummycon_startup(void)
return "dummy device";
}
-static void dummycon_init(struct vc_data *conp, int init)
+static void dummycon_init(struct vc_data *vc, int init)
{
- conp->vc_can_do_color = 1;
+ vc->vc_can_do_color = 1;
if (init) {
- conp->vc_cols = DUMMY_COLUMNS;
- conp->vc_rows = DUMMY_ROWS;
+ vc->vc_cols = DUMMY_COLUMNS;
+ vc->vc_rows = DUMMY_ROWS;
} else
- vc_resize_con(DUMMY_ROWS, DUMMY_COLUMNS, conp->vc_num);
+ vc_resize(vc->vc_num, DUMMY_COLUMNS, DUMMY_ROWS);
}
static int dummycon_dummy(void)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index fc344d249293..85b9505b9702 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -201,7 +201,7 @@ static int fbcon_scrolldelta(struct vc_data *conp, int lines);
* Internal routines
*/
-static void fbcon_setup(int con, int init, int logo);
+static void fbcon_set_display(int con, int init, int logo);
static __inline__ int real_y(struct display *p, int ypos);
static void fbcon_vbl_handler(int irq, void *dummy, struct pt_regs *fp);
static __inline__ void updatescrollmode(struct display *p);
@@ -315,7 +315,7 @@ void gen_set_disp(int con, struct fb_info *info)
int unit;
for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
- if (fb_display[unit].conp && con2fb_map[unit] == GET_FB_IDX(info->node))
+ if (fb_display[unit].conp && con2fb_map[unit] == minor(info->node))
fb_display[unit].var = info->var;
}
*/
@@ -541,8 +541,8 @@ static void fbcon_init(struct vc_data *conp, int init)
fb_display[unit].conp = conp;
fb_display[unit].fb_info = info;
/* clear out the cmap so we don't have dangling pointers */
- fbcon_setup(unit, init, !init);
- /* Must be done after fbcon_setup to prevent excess updates */
+ fbcon_set_display(unit, init, !init);
+ /* Must be done after fbcon_set_display to prevent excess updates */
conp->vc_display_fg = &info->display_fg;
if (!info->display_fg)
info->display_fg = conp;
@@ -563,7 +563,7 @@ static void fbcon_deinit(struct vc_data *conp)
static int fbcon_changevar(int con)
{
if (fb_display[con].conp)
- fbcon_setup(con, 0, 0);
+ fbcon_set_display(con, 0, 0);
return 0;
}
@@ -604,7 +604,7 @@ static void fbcon_font_widths(struct display *p)
#define fontwidthvalid(p,w) ((p)->dispsw->fontwidthmask & FONTWIDTH(w))
-static void fbcon_setup(int con, int init, int logo)
+static void fbcon_set_display(int con, int init, int logo)
{
struct display *p = &fb_display[con];
struct fb_info *info = p->fb_info;
@@ -680,7 +680,7 @@ static void fbcon_setup(int con, int init, int logo)
if (!fontwidthvalid(p,fontwidth(p))) {
/* ++Geert: changed from panic() to `correct and continue' */
- printk(KERN_ERR "fbcon_setup: No support for fontwidth %d\n", fontwidth(p));
+ printk(KERN_ERR "fbcon_set_display: No support for fontwidth %d\n", fontwidth(p));
p->dispsw = &fbcon_dummy;
}
if (p->dispsw->set_font)
@@ -762,7 +762,7 @@ static void fbcon_setup(int con, int init, int logo)
}
if (p->dispsw == &fbcon_dummy)
- printk(KERN_WARNING "fbcon_setup: type %d (aux %d, depth %d) not "
+ printk(KERN_WARNING "fbcon_set_display: type %d (aux %d, depth %d) not "
"supported\n", info->fix.type, info->fix.type_aux,
info->var.bits_per_pixel);
p->dispsw->setup(p);
@@ -772,7 +772,7 @@ static void fbcon_setup(int con, int init, int logo)
if (!init) {
if (conp->vc_cols != nr_cols || conp->vc_rows != nr_rows)
- vc_resize_con(nr_rows, nr_cols, con);
+ vc_resize(con, nr_cols, nr_rows);
else if (CON_IS_VISIBLE(conp) &&
vt_cons[conp->vc_num]->vc_mode == KD_TEXT) {
if (p->dispsw->clear_margins)
@@ -1825,7 +1825,7 @@ static int fbcon_do_set_font(int unit, struct console_font_op *op, u8 *data, int
if ((info->var.yres % h) && (info->var.yres_virtual % h < info->var.yres % h))
p->vrows--;
updatescrollmode(p);
- vc_resize_con( info->var.yres/h, info->var.xres/w, unit );
+ vc_resize(unit, info->var.xres/w, info->var.yres/h);
if (CON_IS_VISIBLE(conp) && softback_buf) {
int l = fbcon_softback_size / conp->vc_size_row;
if (l > 5)
@@ -2289,9 +2289,6 @@ static int __init fbcon_show_logo( void )
}
#endif
- if (info->fbops->fb_rasterimg)
- info->fbops->fb_rasterimg(info, 1);
-
for (x = 0; x < num_online_cpus() * (LOGO_W + 8) &&
x < info->var.xres - (LOGO_W + 8); x += (LOGO_W + 8)) {
#if defined (CONFIG_FBCON_ACCEL)
@@ -2410,9 +2407,6 @@ static int __init fbcon_show_logo( void )
#endif
}
- if (info->fbops->fb_rasterimg)
- info->fbops->fb_rasterimg(info, 0);
-
#if defined (CONFIG_FBCON_ACCEL)
if (palette != NULL)
kfree(palette);
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
index e23020944c11..4bba5156e0cd 100644
--- a/drivers/video/console/fbcon.h
+++ b/drivers/video/console/fbcon.h
@@ -13,8 +13,8 @@
#include <linux/config.h>
#include <linux/types.h>
-#include <linux/console_struct.h>
#include <linux/vt_buffer.h>
+#include <linux/vt_kern.h>
#include <asm/io.h>
diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c
index f1c47bfaa270..9e88eeb9f479 100644
--- a/drivers/video/console/mdacon.c
+++ b/drivers/video/console/mdacon.c
@@ -33,7 +33,6 @@
#include <linux/module.h>
#include <linux/tty.h>
#include <linux/console.h>
-#include <linux/console_struct.h>
#include <linux/string.h>
#include <linux/kd.h>
#include <linux/slab.h>
@@ -364,7 +363,7 @@ static void mdacon_init(struct vc_data *c, int init)
c->vc_cols = mda_num_columns;
c->vc_rows = mda_num_lines;
} else {
- vc_resize_con(mda_num_lines, mda_num_columns, c->vc_num);
+ vc_resize(c->vc_num, mda_num_columns, mda_num_lines);
}
/* make the first MDA console visible */
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c
index e22a619f02ae..54e886e9b931 100644
--- a/drivers/video/console/newport_con.c
+++ b/drivers/video/console/newport_con.c
@@ -16,7 +16,6 @@
#include <linux/kd.h>
#include <linux/selection.h>
#include <linux/console.h>
-#include <linux/console_struct.h>
#include <linux/vt_kern.h>
#include <linux/mm.h>
#include <linux/module.h>
diff --git a/drivers/video/console/promcon.c b/drivers/video/console/promcon.c
index d72ce48cb3f1..c2a3deca898f 100644
--- a/drivers/video/console/promcon.c
+++ b/drivers/video/console/promcon.c
@@ -15,7 +15,6 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/console.h>
-#include <linux/console_struct.h>
#include <linux/vt_kern.h>
#include <linux/selection.h>
#include <linux/fb.h>
@@ -184,7 +183,7 @@ promcon_init(struct vc_data *conp, int init)
}
if (!init) {
if (conp->vc_cols != pw + 1 || conp->vc_rows != ph + 1)
- vc_resize_con(ph + 1, pw + 1, conp->vc_num);
+ vc_resize(conp->unit, pw + 1, ph + 1);
}
}
diff --git a/drivers/video/console/sticon-bmode.c b/drivers/video/console/sticon-bmode.c
deleted file mode 100644
index c6d962e00191..000000000000
--- a/drivers/video/console/sticon-bmode.c
+++ /dev/null
@@ -1,894 +0,0 @@
-/*
-TPG CVS users: please don't commit changes to this file directly, send
-them to prumpf@tux.org and wait for a new version instead. Otherwise,
-your changes will get lost when prumpf releases the next version, as
-this file *will* be replaced with it. You have been warned.
-
-2000-05-30, <deller@gmx.de>
-*/
-#if 1
-#define DPRINTK(x) printk x
-#else
-#define DPRINTK(x)
-#endif
-
-/*
- * linux/drivers/video/sticon.c - console driver using HP's STI firmware
- *
- * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
- *
- * Based on linux/drivers/video/vgacon.c and linux/drivers/video/fbcon.c,
- * which were
- *
- * Created 28 Sep 1997 by Geert Uytterhoeven
- * Rewritten by Martin Mares <mj@ucw.cz>, July 1998
- * Copyright (C) 1991, 1992 Linus Torvalds
- * 1995 Jay Estabrook
- * Copyright (C) 1995 Geert Uytterhoeven
- * Copyright (C) 1993 Bjoern Brauel
- * Roman Hodek
- * Copyright (C) 1993 Hamish Macdonald
- * Greg Harp
- * Copyright (C) 1994 David Carter [carter@compsci.bristol.ac.uk]
- *
- * with work by William Rucklidge (wjr@cs.cornell.edu)
- * Geert Uytterhoeven
- * Jes Sorensen (jds@kom.auc.dk)
- * Martin Apel
- * with work by Guenther Kelleter
- * Martin Schaller
- * Andreas Schwab
- * Emmanuel Marty (core@ggi-project.org)
- * Jakub Jelinek (jj@ultra.linux.cz)
- * Martin Mares <mj@ucw.cz>
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive for
- * more details.
- */
-/*
- * TODO:
- * - call STI in virtual mode rather than in real mode
- * - support for PCI-only STI ROMs (which don't have a traditional region
- * list)
- * - safe detection (i.e. verify there is a graphics device at a given
- * address first, not just read a random device's io space)
- * - support for multiple STI devices in one machine
- * - support for byte-mode STI ROMs
- * - support for just using STI to switch to a colour fb (stifb ?)
- * - try to make it work on m68k hp workstations ;)
- */
-
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/tty.h>
-#include <linux/console.h>
-#include <linux/string.h>
-#include <linux/kd.h>
-#include <linux/slab.h>
-#include <linux/vt_kern.h>
-#include <linux/selection.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-
-#include <asm/io.h>
-#include <asm/real.h>
-
-#include <linux/module.h>
-#include <linux/fb.h>
-#include <linux/smp.h>
-
-#include <asm/irq.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include "fbcon.h"
-#include "font.h"
-#include "sti-bmode.h"
-
-/* The latency of the STI functions cannot really be reduced by setting
- * this to 0; STI doesn't seem to be designed to allow calling a different
- * function (or the same function with different arguments) after a
- * function exited with 1 as return value.
- *
- * As all of the functions below could be called from interrupt context,
- * we have to spin_lock_irqsave around the do { ret = bla(); } while(ret==1)
- * block. Really bad latency there.
- *
- * Probably the best solution to all this is have the generic code manage
- * the screen buffer and a kernel thread to call STI occasionally.
- *
- * Luckily, the frame buffer guys have the same problem so we can just wait
- * for them to fix it and steal their solution. prumpf
- *
- * Actually, another long-term viable solution is to completely do STI
- * support in userspace - that way we avoid the potential license issues
- * of using proprietary fonts, too. */
-
-#define STI_WAIT 1
-#define STI_PTR(p) ( (typeof(p)) virt_to_phys(p))
-#define PTR_STI(p) ( (typeof(p)) phys_to_virt((unsigned long)p) )
-
-static struct sti_struct default_sti = {
- SPIN_LOCK_UNLOCKED,
-};
-
-static struct sti_font_flags default_font_flags = {
- STI_WAIT, 0, 0, NULL
-};
-
-/* The colour indices used by STI are
- * 0 - Black
- * 1 - White
- * 2 - Red
- * 3 - Yellow/Brown
- * 4 - Green
- * 5 - Cyan
- * 6 - Blue
- * 7 - Magenta
- *
- * So we have the same colours as VGA (basically one bit each for R, G, B),
- * but have to translate them, anyway. */
-
-static u8 col_trans[8] = {
- 0, 6, 4, 5,
- 2, 7, 3, 1
-};
-
-#define c_fg(sti, c) col_trans[((c>> 8) & 7)]
-#define c_bg(sti, c) col_trans[((c>>11) & 7)]
-#define c_index(sti, c) (c&0xff)
-
-#define sti_onscreen_x(sti) (PTR_STI(sti->glob_cfg)->onscreen_x)
-#define sti_onscreen_y(sti) (PTR_STI(sti->glob_cfg)->onscreen_y)
-#define sti_font_x(sti) (STI_U8(PTR_STI(sti->font)->width))
-#define sti_font_y(sti) (STI_U8(PTR_STI(sti->font)->height))
-
-static struct sti_init_flags default_init_flags = {
- STI_WAIT, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, NULL
-};
-
-static void sti_init_graph(struct sti_struct *sti)
-{
- struct sti_init_inptr_ext inptr_ext = {
- 0, { 0 }, 0, NULL
- };
- struct sti_init_inptr inptr = {
- 3, STI_PTR(&inptr_ext)
- };
- struct sti_init_outptr outptr = { 0 };
- unsigned long flags;
- s32 ret;
-
- spin_lock_irqsave(&sti->lock, flags);
-
- ret = STI_CALL(sti->init_graph, &default_init_flags, &inptr,
- &outptr, sti->glob_cfg);
-
- spin_unlock_irqrestore(&sti->lock, flags);
-
- sti->text_planes = outptr.text_planes;
-}
-
-#if 0
-static struct sti_conf_flags default_conf_flags = {
- STI_WAIT, 0, NULL
-};
-
-static void sti_inq_conf(struct sti_struct *sti)
-{
- struct sti_conf_inptr inptr = { NULL };
- struct sti_conf_outptr_ext outptr_ext = { .future_ptr = NULL };
- struct sti_conf_outptr outptr = {
- .ext_ptr = STI_PTR(&outptr_ext)
- };
- unsigned long flags;
- s32 ret;
-
- do {
- spin_lock_irqsave(&sti->lock, flags);
- ret = STI_CALL(sti->inq_conf, &default_conf_flags,
- &inptr, &outptr, sti->glob_cfg);
- spin_unlock_irqrestore(&sti->lock, flags);
- } while(ret == 1);
-}
-#endif
-
-static void sti_putc(struct sti_struct *sti, int c, int y, int x)
-{
- struct sti_font_inptr inptr = {
- (u32) sti->font, c_index(sti, c), c_fg(sti, c), c_bg(sti, c),
- x * sti_font_x(sti), y * sti_font_y(sti), NULL
- };
- struct sti_font_outptr outptr = {
- 0, NULL
- };
- s32 ret;
- unsigned long flags;
-
- do {
- spin_lock_irqsave(&sti->lock, flags);
- ret = STI_CALL(sti->font_unpmv, &default_font_flags,
- &inptr, &outptr, sti->glob_cfg);
- spin_unlock_irqrestore(&sti->lock, flags);
- } while(ret == 1);
-}
-
-static struct sti_blkmv_flags clear_blkmv_flags = {
- STI_WAIT, 1, 1, 0, 0, NULL
-};
-
-static void sti_set(struct sti_struct *sti, int src_y, int src_x,
- int height, int width, u8 color)
-{
- struct sti_blkmv_inptr inptr = {
- color, color,
- src_x, src_y ,
- src_x, src_y ,
- width, height,
- NULL
- };
- struct sti_blkmv_outptr outptr = { 0, NULL };
- s32 ret = 0;
- unsigned long flags;
-
- do {
- spin_lock_irqsave(&sti->lock, flags);
- ret = STI_CALL(sti->block_move, &clear_blkmv_flags,
- &inptr, &outptr, sti->glob_cfg);
- spin_unlock_irqrestore(&sti->lock, flags);
- } while(ret == 1);
-}
-
-static void sti_clear(struct sti_struct *sti, int src_y, int src_x,
- int height, int width)
-{
- struct sti_blkmv_inptr inptr = {
- 0, 0,
- src_x * sti_font_x(sti), src_y * sti_font_y(sti),
- src_x * sti_font_x(sti), src_y * sti_font_y(sti),
- width * sti_font_x(sti), height* sti_font_y(sti),
- NULL
- };
- struct sti_blkmv_outptr outptr = { 0, NULL };
- s32 ret = 0;
- unsigned long flags;
-
- do {
- spin_lock_irqsave(&sti->lock, flags);
- ret = STI_CALL(sti->block_move, &clear_blkmv_flags,
- &inptr, &outptr, sti->glob_cfg);
- spin_unlock_irqrestore(&sti->lock, flags);
- } while(ret == 1);
-}
-
-static struct sti_blkmv_flags default_blkmv_flags = {
- STI_WAIT, 0, 0, 0, 0, NULL
-};
-
-static void sti_bmove(struct sti_struct *sti, int src_y, int src_x,
- int dst_y, int dst_x, int height, int width)
-{
- struct sti_blkmv_inptr inptr = {
- 0, 0,
- src_x * sti_font_x(sti), src_y * sti_font_y(sti),
- dst_x * sti_font_x(sti), dst_y * sti_font_y(sti),
- width * sti_font_x(sti), height* sti_font_y(sti),
- NULL
- };
- struct sti_blkmv_outptr outptr = { 0, NULL };
- s32 ret = 0;
- unsigned long flags;
-
- do {
- spin_lock_irqsave(&sti->lock, flags);
- ret = STI_CALL(sti->block_move, &default_blkmv_flags,
- &inptr, &outptr, sti->glob_cfg);
- spin_unlock_irqrestore(&sti->lock, flags);
- } while(ret == 1);
-}
-
-
-/* STICON */
-
-static const char __init *sticon_startup(void)
-{
- return "STI console";
-}
-
-static int sticon_set_palette(struct vc_data *c, unsigned char *table)
-{
- return -EINVAL;
-}
-static int sticon_font_op(struct vc_data *c, struct console_font_op *op)
-{
- return -ENOSYS;
-}
-
-static void sticon_putc(struct vc_data *conp, int c, int ypos, int xpos)
-{
- sti_putc(&default_sti, c, ypos, xpos);
-}
-
-static void sticon_putcs(struct vc_data *conp, const unsigned short *s,
- int count, int ypos, int xpos)
-{
- while(count--) {
- sti_putc(&default_sti, scr_readw(s++), ypos, xpos++);
- }
-}
-
-static void sticon_cursor(struct vc_data *conp, int mode)
-{
-}
-
-static int sticon_scroll(struct vc_data *conp, int t, int b, int dir,
- int count)
-{
- struct sti_struct *sti = &default_sti;
-
- if(console_blanked)
- return 0;
-
- sticon_cursor(conp, CM_ERASE);
-
- switch(dir) {
- case SM_UP:
- sti_bmove(sti, t+count, 0, t, 0, b-t-count, conp->vc_cols);
- sti_clear(sti, b-count, 0, count, conp->vc_cols);
-
- break;
-
- case SM_DOWN:
- sti_bmove(sti, t, 0, t+count, 0, b-t-count, conp->vc_cols);
- sti_clear(sti, t, 0, count, conp->vc_cols);
-
- break;
- }
-
- return 0;
-}
-
-static void sticon_bmove(struct vc_data *conp, int sy, int sx, int dy, int dx,
- int height, int width)
-{
- sti_bmove(&default_sti, sy, sx, dy, dx, height, width);
-}
-
-static void sticon_init(struct vc_data *c, int init)
-{
- struct sti_struct *sti = &default_sti;
- int vc_cols, vc_rows;
-
- sti_set(sti, 0, 0, sti_onscreen_y(sti), sti_onscreen_x(sti), 0);
- c->vc_can_do_color = 1;
- vc_cols = PTR_STI(sti->glob_cfg)->onscreen_x / sti_font_x(sti);
- vc_rows = PTR_STI(sti->glob_cfg)->onscreen_y / sti_font_y(sti);
-
- vc_resize_con(vc_rows, vc_cols, c->vc_num);
-}
-
-static void sticon_deinit(struct vc_data *c)
-{
-}
-
-static void sticon_clear(struct vc_data *conp, int sy, int sx, int height,
- int width)
-{
- sti_clear(&default_sti, sy, sx, height, width);
-}
-
-static int sticon_switch(struct vc_data *conp)
-{
- return 0;
-}
-
-static int sticon_blank(struct vc_data *conp, int blank)
-{
- return 0;
-}
-
-static int sticon_scrolldelta(struct vc_data *conp, int lines)
-{
- return 0;
-}
-
-static int sticon_set_origin(struct vc_data *conp)
-{
- return 0;
-}
-
-static u8 sticon_build_attr(struct vc_data *conp, u8 color, u8 intens, u8 blink, u8 underline, u8 reverse)
-{
- u8 attr = ((color & 0x70) >> 1) | ((color & 7));
-
- if(reverse) {
- color = ((color>>3)&0x7) | ((color &0x7)<<3);
- }
-
-
- return attr;
-}
-
-static struct consw sti_con = {
- .con_startup = sticon_startup,
- .con_init = sticon_init,
- .con_deinit = sticon_deinit,
- .con_clear = sticon_clear,
- .con_putc = sticon_putc,
- .con_putcs = sticon_putcs,
- .con_cursor = sticon_cursor,
- .con_scroll = sticon_scroll,
- .con_bmove = sticon_bmove,
- .con_switch = sticon_switch,
- .con_blank = sticon_blank,
- .con_font_op = sticon_font_op,
- .con_set_palette = sticon_set_palette,
- .con_scrolldelta = sticon_scrolldelta,
- .con_set_origin = sticon_set_origin,
- .con_build_attr = sticon_build_attr,
-};
-
-#include <asm/pgalloc.h> /* need cache flush routines */
-static void __init sti_rom_copy(unsigned long base, unsigned long offset,
- unsigned long count, void *dest)
-{
- void *savedest = dest;
- int savecount = count;
-
- while(count >= 4) {
- count -= 4;
- *(u32 *)dest = gsc_readl(base + offset);
-#if 0
- DPRINTK(("%08x\n", *(u32 *)dest));
- if(*(u32 *)dest == 0x64646464) {
- DPRINTK(("!!!!\n"));
- { u32 foo = 0; while(foo += 0x100); }
- }
-#endif
- offset += 4;
- dest += 4;
- }
- while(count) {
- count--;
- *(u8 *)dest = gsc_readb(base + offset);
- offset++;
- dest++;
- }
-
- flush_kernel_dcache_range((unsigned long)dest, count);
- flush_icache_range((unsigned long)dest, dest + count);
-}
-
-static void dump_sti_rom(struct sti_rom *rom)
-{
- printk("STI byte mode ROM type %d\n", STI_U8(rom->type));
- printk(" supports %d monitors\n", STI_U8(rom->num_mons));
- printk(" conforms to STI ROM spec revision %d.%02x\n",
- STI_U8(rom->revno[0]) >> 4, STI_U8(rom->revno[0]) & 0x0f);
- printk(__FUNCTION__ ": %d\n", __LINE__);
- printk(" graphics id %02x%02x%02x%02x%02x%02x%02x%02x\n",
- (unsigned int) STI_U8(rom->graphics_id[0]),
- (unsigned int) STI_U8(rom->graphics_id[1]),
- (unsigned int) STI_U8(rom->graphics_id[2]),
- (unsigned int) STI_U8(rom->graphics_id[3]),
- (unsigned int) STI_U8(rom->graphics_id[4]),
- (unsigned int) STI_U8(rom->graphics_id[5]),
- (unsigned int) STI_U8(rom->graphics_id[6]),
- (unsigned int) STI_U8(rom->graphics_id[7]));
- printk(__FUNCTION__ ": %d\n", __LINE__);
- printk(" font start %08x\n", STI_U32(rom->font_start));
- printk(__FUNCTION__ ": %d\n", __LINE__);
- printk(" region list %08x\n", STI_U32(rom->region_list));
- printk(__FUNCTION__ ": %d\n", __LINE__);
- printk(" init_graph %08x\n", STI_U32(rom->init_graph));
- printk(__FUNCTION__ ": %d\n", __LINE__);
- printk(" alternate code type %d\n", STI_U8(rom->alt_code_type));
- printk(__FUNCTION__ ": %d\n", __LINE__);
-}
-
-static void __init sti_cook_fonts(struct sti_cooked_rom *cooked_rom,
- struct sti_rom *raw_rom)
-{
- struct sti_rom_font *raw_font;
- struct sti_cooked_font *cooked_font;
- struct sti_rom_font *font_start;
-
- cooked_font =
- kmalloc(sizeof *cooked_font, GFP_KERNEL);
- if(!cooked_font)
- return;
-
- cooked_rom->font_start = cooked_font;
-
-#if 0
- DPRINTK(("%p = %p + %08x\n",
- ((void *)raw_rom) + (STI_U32(raw_rom->font_start)),
- ((void *)raw_rom), (STI_U32(raw_rom->font_start))));
-#endif
- raw_font = ((void *)raw_rom) + STI_U32(raw_rom->font_start) - 3;
-
- font_start = raw_font;
- cooked_font->raw = raw_font;
-
- DPRINTK(("next font %08x\n", STI_U32(raw_font->next_font)));
-
- while(0 && STI_U32(raw_font->next_font)) {
- raw_font = ((void *)font_start) + STI_U32(raw_font->next_font);
-
- cooked_font->next_font =
- kmalloc(sizeof *cooked_font, GFP_KERNEL);
- if(!cooked_font->next_font)
- return;
-
- cooked_font = cooked_font->next_font;
-
-// cooked_font->raw = raw_font;
-
- DPRINTK(("raw_font %p\n",
- raw_font));
- DPRINTK(("next_font %08x %p\n",
- STI_U32(raw_font->next_font),
- ((void *)font_start) + STI_U32(raw_font->next_font)));
- }
-
- cooked_font->next_font = NULL;
-}
-
-static unsigned long __init sti_cook_function(void *function,
- u32 size)
-{
- sti_u32 *func = (sti_u32 *)function;
- u32 *ret;
- int i;
-
- ret = kmalloc(size, GFP_KERNEL);
- if(!ret) {
- printk(KERN_ERR __FILE__ ": could not get memory.\n");
- return 0;
- }
-
- for(i=0; i<(size/4); i++)
- ret[i] = STI_U32(func[i]);
-
- flush_all_caches();
-
- return virt_to_phys(ret);
-}
-
-static int font_index, font_height, font_width;
-
-static int __init sti_search_font(struct sti_cooked_rom *rom,
- int height, int width)
-{
- struct sti_cooked_font *font;
- int i = 0;
-
- for(font = rom->font_start; font; font = font->next_font, i++) {
- if((STI_U8(font->raw->width) == width) &&
- (STI_U8(font->raw->height) == height))
- return i;
- }
-
- return 0;
-}
-
-static struct sti_cooked_font * __init
-sti_select_font(struct sti_cooked_rom *rom)
-{
- struct sti_cooked_font *font;
- int i;
-
- if(font_width && font_height)
- font_index = sti_search_font(rom, font_height, font_width);
-
- for(font = rom->font_start, i = font_index;
- font && (i > 0);
- font = font->next_font, i--);
-
- if(font)
- return font;
- else
- return rom->font_start;
-}
-
-/* address is a pointer to a word mode or pci rom */
-static struct sti_struct * __init sti_read_rom(unsigned long address)
-{
- struct sti_struct *ret = NULL;
- struct sti_cooked_rom *cooked = NULL;
- struct sti_rom *raw = NULL;
- unsigned long size;
-
- ret = &default_sti;
-
- if(!ret)
- goto out_err;
-
- cooked = kmalloc(sizeof *cooked, GFP_KERNEL);
- raw = kmalloc(sizeof *raw, GFP_KERNEL);
-
- if(!(raw && cooked))
- goto out_err;
-
- /* reallocate raw */
- sti_rom_copy(address, 0, sizeof *raw, raw);
-
- dump_sti_rom(raw);
-
- size = STI_U32(raw->last_addr) + 1;
- size = 128*1024;
-// DPRINTK(("size %08lx\n", size));
-// DPRINTK(("font_start %08x\n", STI_U32(raw->font_start)));
-// kfree(raw);
- raw = kmalloc(size, GFP_KERNEL);
- if(!raw)
- goto out_err;
- sti_rom_copy(address, 0, size-1, raw);
-
- sti_cook_fonts(cooked, raw);
-// sti_cook_regions(cooked, raw);
-// sti_cook_functions(cooked, raw);
-
- if(STI_U32(raw->region_list)) {
- struct sti_rom_region *region =
- ((void *)raw) + STI_U32(raw->region_list) - 3;
-
-// DPRINTK(("region_list %08x\n", STI_U32(raw->region_list)));
-
- ret->regions = kmalloc(32, GFP_KERNEL); /* FIXME!! */
-
- ret->regions[0] = STI_U32(region[0].region);
- ret->regions[1] = STI_U32(region[1].region);
- ret->regions[2] = STI_U32(region[2].region);
- ret->regions[3] = STI_U32(region[3].region);
- ret->regions[4] = STI_U32(region[4].region);
- ret->regions[5] = STI_U32(region[5].region);
- ret->regions[6] = STI_U32(region[6].region);
- ret->regions[7] = STI_U32(region[7].region);
- }
-
- address = virt_to_phys(raw);
-
-#if 0
- DPRINTK(("init_graph %08x %08x\n"
- "state_mgmt %08x %08x\n"
- "font_unpmv %08x %08x\n"
- "block_move %08x %08x\n"
- "self_test %08x %08x\n"
- "excep_hdlr %08x %08x\n"
- "irq_conf %08x %08x\n"
- "set_cm_e %08x %08x\n"
- "dma_ctrl %08x %08x\n"
- "flow_ctrl %08x %08x\n"
- "user_timin %08x %08x\n"
- "process_m %08x %08x\n"
- "sti_util %08x %08x\n"
- "end_addr %08x %08x\n",
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->state_mgmt), STI_U32(raw->state_mgmt_m68k),
- STI_U32(raw->font_unpmv), STI_U32(raw->font_unpmv_m68k),
- STI_U32(raw->block_move), STI_U32(raw->block_move_m68k),
- STI_U32(raw->self_test), STI_U32(raw->self_test_m68k),
- STI_U32(raw->excep_hdlr), STI_U32(raw->excep_hdlr_m68k),
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->init_graph), STI_U32(raw->init_graph_m68k),
- STI_U32(raw->end_addr), STI_U32(raw->end_addr_m68k) ) );
-#endif
-
- ret->init_graph = sti_cook_function(((void *)raw)+STI_U32(raw->init_graph)-3,
- (STI_U32(raw->state_mgmt) -
- STI_U32(raw->init_graph))/4);
-
-
- ret->font_unpmv = sti_cook_function(((void *)raw)+STI_U32(raw->font_unpmv)-3,
- (STI_U32(raw->block_move) -
- STI_U32(raw->font_unpmv))/4);
-
- ret->block_move = sti_cook_function(((void *)raw)+STI_U32(raw->block_move)-3,
- (STI_U32(raw->self_test) -
- STI_U32(raw->block_move))/4);
-
- ret->inq_conf = sti_cook_function(((void *)raw)+STI_U32(raw->inq_conf),
- STI_U32(raw->set_cm_entry) -
- STI_U32(raw->inq_conf));
-
- ret->rom = cooked;
- ret->rom->raw = raw;
-
- ret->font = (struct sti_rom_font *) virt_to_phys(sti_select_font(ret->rom)->raw);
-
- return ret;
-
-out_err:
- if(raw)
- kfree(raw);
- if(cooked)
- kfree(cooked);
-
- return NULL;
-}
-
-#if 0
-static void dump_globcfg_ext(struct sti_glob_cfg_ext *cfg)
-{
- DPRINTK(("monitor %d\n"
- "in friendly mode: %d\n"
- "power consumption %d watts\n"
- "freq ref %d\n"
- "sti_mem_addr %p\n",
- cfg->curr_mon,
- cfg->friendly_boot,
- cfg->power,
- cfg->freq_ref,
- cfg->sti_mem_addr));
-}
-
-static void dump_globcfg(struct sti_glob_cfg *glob_cfg)
-{
- DPRINTK(("%d text planes\n"
- "%4d x %4d screen resolution\n"
- "%4d x %4d offscreen\n"
- "%4d x %4d layout\n"
- "regions at %08x %08x %08x %08x\n"
- "regions at %08x %08x %08x %08x\n"
- "reent_lvl %d\n"
- "save_addr %p\n",
- glob_cfg->text_planes,
- glob_cfg->onscreen_x, glob_cfg->onscreen_y,
- glob_cfg->offscreen_x, glob_cfg->offscreen_y,
- glob_cfg->total_x, glob_cfg->total_y,
- glob_cfg->region_ptrs[0], glob_cfg->region_ptrs[1],
- glob_cfg->region_ptrs[2], glob_cfg->region_ptrs[3],
- glob_cfg->region_ptrs[4], glob_cfg->region_ptrs[5],
- glob_cfg->region_ptrs[6], glob_cfg->region_ptrs[7],
- glob_cfg->reent_lvl,
- glob_cfg->save_addr));
- dump_globcfg_ext(PTR_STI(glob_cfg->ext_ptr));
-}
-#endif
-
-static void __init sti_init_glob_cfg(struct sti_struct *sti, unsigned long hpa,
- unsigned long rom_address)
-{
- struct sti_glob_cfg *glob_cfg;
- struct sti_glob_cfg_ext *glob_cfg_ext;
- void *save_addr;
- void *sti_mem_addr;
-
- glob_cfg = kmalloc(sizeof *sti->glob_cfg, GFP_KERNEL);
- glob_cfg_ext = kmalloc(sizeof *glob_cfg_ext, GFP_KERNEL);
- save_addr = kmalloc(1024 /*XXX*/, GFP_KERNEL);
- sti_mem_addr = kmalloc(1024, GFP_KERNEL);
-
- if((!glob_cfg) || (!glob_cfg_ext) || (!save_addr) || (!sti_mem_addr))
- return;
-
- memset(glob_cfg, 0, sizeof *glob_cfg);
- memset(glob_cfg_ext, 0, sizeof *glob_cfg_ext);
- memset(save_addr, 0, 1024);
- memset(sti_mem_addr, 0, 1024);
-
- glob_cfg->ext_ptr = STI_PTR(glob_cfg_ext);
- glob_cfg->save_addr = STI_PTR(save_addr);
- glob_cfg->region_ptrs[0] = ((sti->regions[0]>>18)<<12) + rom_address;
- glob_cfg->region_ptrs[1] = ((sti->regions[1]>>18)<<12) + hpa;
- glob_cfg->region_ptrs[2] = ((sti->regions[2]>>18)<<12) + hpa;
- glob_cfg->region_ptrs[3] = ((sti->regions[3]>>18)<<12) + hpa;
- glob_cfg->region_ptrs[4] = ((sti->regions[4]>>18)<<12) + hpa;
- glob_cfg->region_ptrs[5] = ((sti->regions[5]>>18)<<12) + hpa;
- glob_cfg->region_ptrs[6] = ((sti->regions[6]>>18)<<12) + hpa;
- glob_cfg->region_ptrs[7] = ((sti->regions[7]>>18)<<12) + hpa;
-
- glob_cfg_ext->sti_mem_addr = STI_PTR(sti_mem_addr);
-
- sti->glob_cfg = STI_PTR(glob_cfg);
-}
-
-static void __init sti_try_rom(unsigned long address, unsigned long hpa)
-{
- struct sti_struct *sti = NULL;
- u16 sig;
-
- /* if we can't read the ROM, bail out early. Not being able
- * to read the hpa is okay, for romless sti */
- if(pdc_add_valid((void*)address))
- return;
-
- printk("found potential STI ROM at %08lx\n", address);
-
- sig = le16_to_cpu(gsc_readw(address));
-
- if((sig&0xff) == 0x01) {
- sti = sti_read_rom(address);
- }
-
- if(sig == 0x0303) {
- printk("STI word mode ROM at %08lx, ignored\n",
- address);
-
- sti = NULL;
- }
-
- if(!sti)
- return;
-
- /* this is hacked. We need a better way to find out the HPA for
- * romless STI (eg search for the graphics devices we know about
- * by sversion) */
- if (!pdc_add_valid((void *)0xf5000000)) DPRINTK(("f4000000 b\n"));
- if (!pdc_add_valid((void *)0xf7000000)) DPRINTK(("f6000000 b\n"));
- if (!pdc_add_valid((void *)0xf9000000)) DPRINTK(("f8000000 b\n"));
- if (!pdc_add_valid((void *)0xfb000000)) DPRINTK(("fa000000 b\n"));
- sti_init_glob_cfg(sti, hpa, address);
-
- sti_init_graph(sti);
-
- //sti_inq_conf(sti);
-#if !defined(SERIAL_CONSOLE)
- {
- extern void pdc_console_die(void);
- pdc_console_die();
- }
-#endif
-
- take_over_console(&sti_con, 0, MAX_NR_CONSOLES-1, 1);
-
- /* sti_inq_conf(sti); */
-}
-
-static unsigned long sti_address;
-static unsigned long sti_hpa;
-
-static void __init sti_init_roms(void)
-{
- /* handle the command line */
- if(sti_address && sti_hpa) {
- sti_try_rom(sti_address, sti_hpa);
-
- return;
- }
-
- /* 712, 715, some other boxes don't have a separate STI ROM,
- * but use part of the regular flash */
- if(PAGE0->proc_sti) {
- printk("STI ROM from PDC at %08x\n", PAGE0->proc_sti);
- if(!pdc_add_valid((void *)0xf9000000))
- sti_try_rom(PAGE0->proc_sti, 0xf8000000);
- else if(!pdc_add_valid((void *)0xf5000000))
- sti_try_rom(PAGE0->proc_sti, 0xf4000000);
- else if(!pdc_add_valid((void *)0xf7000000))
- sti_try_rom(PAGE0->proc_sti, 0xf6000000);
- else if(!pdc_add_valid((void *)0xfb000000))
- sti_try_rom(PAGE0->proc_sti, 0xfa000000);
- }
-
- /* standard locations for GSC graphic devices */
- if(!pdc_add_valid((void *)0xf4000000))
- sti_try_rom(0xf4000000, 0xf4000000);
- if(!pdc_add_valid((void *)0xf6000000))
- sti_try_rom(0xf6000000, 0xf6000000);
- if(!pdc_add_valid((void *)0xf8000000))
- sti_try_rom(0xf8000000, 0xf8000000);
- if(!pdc_add_valid((void *)0xfa000000))
- sti_try_rom(0xfa000000, 0xfa000000);
-}
-
-static int __init sti_init(void)
-{
- printk("searching for byte mode STI ROMs\n");
- sti_init_roms();
- return 0;
-}
-
-module_init(sti_init)
-
-MODULE_LICENSE("GPL");
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index 7dddbe42d40a..634b0289dea7 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -49,7 +49,6 @@
#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/console.h>
-#include <linux/console_struct.h>
#include <linux/errno.h>
#include <linux/vt_kern.h>
#include <linux/selection.h>
@@ -137,7 +136,7 @@ static void sticon_init(struct vc_data *c, int init)
vc_cols = PTR_STI(sti->glob_cfg)->onscreen_x / sti_font_x(sti);
vc_rows = PTR_STI(sti->glob_cfg)->onscreen_y / sti_font_y(sti);
- vc_resize_con(vc_rows, vc_cols, c->vc_num);
+ vc_resize(c->vc_num, vc_cols, vc_rows);
}
static void sticon_deinit(struct vc_data *c)
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index b798756cef74..ea08555e6b45 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -41,7 +41,6 @@
#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/console.h>
-#include <linux/console_struct.h>
#include <linux/string.h>
#include <linux/kd.h>
#include <linux/slab.h>
@@ -888,7 +887,12 @@ vgacon_adjust_height(unsigned fontheight)
outb_p( vde, vga_video_port_val );
spin_unlock_irq(&vga_lock);
- vc_resize_all(rows, 0); /* Adjust console size */
+ for (i = 0; i < MAX_NR_CONSOLES; i++) {
+ struct vc_data *c = vc_cons[i].d;
+
+ if (c && c->vc_sw == &vga_con)
+ vc_resize(c->vc_num, 0, rows); /* Adjust console size */
+ }
return 0;
}
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index 87b44e7865da..be491c941df0 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -646,7 +646,7 @@ try_again:
if (register_framebuffer(&p->info) < 0)
return -ENXIO;
- printk(KERN_INFO "fb%d: control display adapter\n", GET_FB_IDX(p->info.node));
+ printk(KERN_INFO "fb%d: control display adapter\n", minor(p->info.node));
return 0;
}
diff --git a/drivers/video/cyberfb.c b/drivers/video/cyberfb.c
index 54c9214b9806..79c11de10abf 100644
--- a/drivers/video/cyberfb.c
+++ b/drivers/video/cyberfb.c
@@ -1063,7 +1063,7 @@ int __init cyberfb_init(void)
}
printk("fb%d: %s frame buffer device, using %ldK of video memory\n",
- GET_FB_IDX(fb_info.node), fb_info.modename, CyberSize>>10);
+ minor(fb_info.node), fb_info.modename, CyberSize>>10);
/* TODO: This driver cannot be unloaded yet */
MOD_INC_USE_COUNT;
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
index d581cb7faf1b..8fa3c2b6e88d 100644
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -517,7 +517,7 @@ int __init e1355fb_init(void)
do_install_cmap(0, &fb_info.gen);
if (register_framebuffer(&fb_info.gen.info) < 0)
return -EINVAL;
- printk(KERN_INFO "fb%d: %s frame buffer device\n", GET_FB_IDX(fb_info.gen.info.node),
+ printk(KERN_INFO "fb%d: %s frame buffer device\n", minor(fb_info.gen.info.node),
fb_info.gen.info.modename);
return 0;
diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
index a916cf5fdfcd..3b70c0585b48 100644
--- a/drivers/video/fbcmap.c
+++ b/drivers/video/fbcmap.c
@@ -94,16 +94,7 @@ int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
int size = len*sizeof(u16);
if (cmap->len != len) {
- if (cmap->red)
- kfree(cmap->red);
- if (cmap->green)
- kfree(cmap->green);
- if (cmap->blue)
- kfree(cmap->blue);
- if (cmap->transp)
- kfree(cmap->transp);
- cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
- cmap->len = 0;
+ fb_dealloc_cmap(cmap);
if (!len)
return 0;
if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
@@ -124,6 +115,29 @@ int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
return 0;
}
+/**
+ * fb_dealloc_cmap - deallocate a colormap
+ * @cmap: frame buffer colormap structure
+ *
+ * Deallocates a colormap that was previously allocated with
+ * fb_alloc_cmap().
+ *
+ */
+
+void fb_dealloc_cmap(struct fb_cmap *cmap)
+{
+ if (cmap->red)
+ kfree(cmap->red);
+ if (cmap->green)
+ kfree(cmap->green);
+ if (cmap->blue)
+ kfree(cmap->blue);
+ if (cmap->transp)
+ kfree(cmap->transp);
+
+ cmap->red = cmap->green = cmap->blue = cmap->transp = NULL;
+ cmap->len = 0;
+}
/**
* fb_copy_cmap - copy a colormap
@@ -296,6 +310,7 @@ void fb_invert_cmaps(void)
*/
EXPORT_SYMBOL(fb_alloc_cmap);
+EXPORT_SYMBOL(fb_dealloc_cmap);
EXPORT_SYMBOL(fb_copy_cmap);
EXPORT_SYMBOL(fb_set_cmap);
EXPORT_SYMBOL(fb_default_cmap);
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index c1ff461070a1..489e246a4408 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -381,7 +381,7 @@ static int fbmem_read_proc(char *buf, char **start, off_t offset,
for (fi = registered_fb; fi < &registered_fb[FB_MAX] && len < 4000; fi++)
if (*fi)
clen += sprintf(buf + clen, "%d %s\n",
- GET_FB_IDX((*fi)->node),
+ minor((*fi)->node),
(*fi)->fix.id);
*start = buf + offset;
if (clen > offset)
@@ -396,7 +396,7 @@ fb_read(struct file *file, char *buf, size_t count, loff_t *ppos)
{
unsigned long p = *ppos;
struct inode *inode = file->f_dentry->d_inode;
- int fbidx = GET_FB_IDX(inode->i_rdev);
+ int fbidx = minor(inode->i_rdev);
struct fb_info *info = registered_fb[fbidx];
if (!info || ! info->screen_base)
@@ -425,7 +425,7 @@ fb_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
{
unsigned long p = *ppos;
struct inode *inode = file->f_dentry->d_inode;
- int fbidx = GET_FB_IDX(inode->i_rdev);
+ int fbidx = minor(inode->i_rdev);
struct fb_info *info = registered_fb[fbidx];
int err;
@@ -468,7 +468,7 @@ static int
fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
- int fbidx = GET_FB_IDX(inode->i_rdev);
+ int fbidx = minor(inode->i_rdev);
struct fb_info *info = registered_fb[fbidx];
struct fb_ops *fb = info->fbops;
struct fb_var_screeninfo var;
@@ -562,7 +562,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
static int
fb_mmap(struct file *file, struct vm_area_struct * vma)
{
- int fbidx = GET_FB_IDX(file->f_dentry->d_inode->i_rdev);
+ int fbidx = minor(file->f_dentry->d_inode->i_rdev);
struct fb_info *info = registered_fb[fbidx];
struct fb_ops *fb = info->fbops;
unsigned long off;
@@ -658,28 +658,10 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
#endif /* !sparc32 */
}
-#if 1 /* to go away in 2.5.0 */
-int GET_FB_IDX(kdev_t rdev)
-{
- int fbidx = minor(rdev);
- if (fbidx >= 32) {
- int newfbidx = fbidx >> 5;
- static int warned;
- if (!(warned & (1<<newfbidx))) {
- warned |= 1<<newfbidx;
- printk("Warning: Remapping obsolete /dev/fb* minor %d to %d\n",
- fbidx, newfbidx);
- }
- fbidx = newfbidx;
- }
- return fbidx;
-}
-#endif
-
static int
fb_open(struct inode *inode, struct file *file)
{
- int fbidx = GET_FB_IDX(inode->i_rdev);
+ int fbidx = minor(inode->i_rdev);
struct fb_info *info;
int res = 0;
@@ -702,7 +684,7 @@ fb_open(struct inode *inode, struct file *file)
static int
fb_release(struct inode *inode, struct file *file)
{
- int fbidx = GET_FB_IDX(inode->i_rdev);
+ int fbidx = minor(inode->i_rdev);
struct fb_info *info;
lock_kernel();
@@ -800,7 +782,6 @@ register_framebuffer(struct fb_info *fb_info)
devfs_register (devfs_handle, name_buf, DEVFS_FL_DEFAULT,
FB_MAJOR, i, S_IFCHR | S_IRUGO | S_IWUGO,
&fb_fops, NULL);
-
return 0;
}
@@ -820,7 +801,7 @@ unregister_framebuffer(struct fb_info *fb_info)
{
int i, j;
- i = GET_FB_IDX(fb_info->node);
+ i = minor(fb_info->node);
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
for (j = 0; j < MAX_NR_CONSOLES; j++)
if (con2fb_map[j] == i)
@@ -982,8 +963,5 @@ EXPORT_SYMBOL(register_framebuffer);
EXPORT_SYMBOL(unregister_framebuffer);
EXPORT_SYMBOL(registered_fb);
EXPORT_SYMBOL(num_registered_fb);
-#if 1 /* to go away in 2.5.0 */
-EXPORT_SYMBOL(GET_FB_IDX);
-#endif
MODULE_LICENSE("GPL");
diff --git a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c
index a5a064b8ccc4..cc666d43caf6 100644
--- a/drivers/video/fm2fb.c
+++ b/drivers/video/fm2fb.c
@@ -273,7 +273,7 @@ int __init fm2fb_init(void)
if (register_framebuffer(&fb_info) < 0)
return -EINVAL;
- printk("fb%d: %s frame buffer device\n", GET_FB_IDX(fb_info.node), fb_fix.id);
+ printk("fb%d: %s frame buffer device\n", minor(fb_info.node), fb_fix.id);
return 0;
}
return -ENXIO;
diff --git a/drivers/video/g364fb.c b/drivers/video/g364fb.c
index 91ee36eed020..4e7e6a78cad7 100644
--- a/drivers/video/g364fb.c
+++ b/drivers/video/g364fb.c
@@ -248,9 +248,6 @@ int __init g364fb_init(void)
if (register_framebuffer(&fb_info) < 0)
return -EINVAL;
-
- printk("fb%d: %s frame buffer device\n", GET_FB_IDX(fb_info.node),
- fb_info.fix.id);
return 0;
}
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index 280e49d24f66..0492fe99a9e0 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -526,7 +526,7 @@ int __init hgafb_init(void)
return -EINVAL;
printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(fb_info.node), fb_info.modename);
+ minor(fb_info.node), fb_info.modename);
return 0;
}
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index 7d7e78e02b12..e7767ec3aa85 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -171,7 +171,7 @@ int __init hitfb_init(void)
return -EINVAL;
printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(fb_info.node), fb_info.fix.id);
+ minor(fb_info.node), fb_info.fix.id);
return 0;
}
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index a906dcbee668..6f2ada3e7551 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -541,7 +541,7 @@ static int __init iga_init(struct fb_info_iga *info)
return 0;
printk("fb%d: %s frame buffer device at 0x%08lx [%dMB VRAM]\n",
- GET_FB_IDX(info->fb_info.node), igafb_name,
+ minor(info->fb_info.node), igafb_name,
info->frame_buffer_phys, info->total_vram >> 20);
iga_blank_border(info);
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index ac64a23248a2..b5c459742152 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -1814,10 +1814,9 @@ init_imstt(struct fb_info_imstt *p)
return;
}
- i = GET_FB_IDX(p->info.node);
tmp = (in_le32(&p->dc_regs[SSTATUS]) & 0x0f00) >> 8;
printk("fb%u: %s frame buffer; %uMB vram; chip version %u\n",
- i, p->fix.id, p->total_vram >> 20, tmp);
+ minor(p->info.node), p->fix.id, p->total_vram >> 20, tmp);
}
static int __devinit
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c
index 676f4d5b8b2e..31a282691930 100644
--- a/drivers/video/macfb.c
+++ b/drivers/video/macfb.c
@@ -956,7 +956,7 @@ void __init macfb_init(void)
return;
printk("fb%d: %s frame buffer device\n",
- GET_FB_IDX(fb_info.node), fb_info.fix.id);
+ minor(fb_info.node), fb_info.fix.id);
}
MODULE_LICENSE("GPL");
diff --git a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c
index 63d70448e783..f984722caa89 100644
--- a/drivers/video/matrox/i2c-matroxfb.c
+++ b/drivers/video/matrox/i2c-matroxfb.c
@@ -120,7 +120,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo,
b->mask.data = data;
b->mask.clock = clock;
b->adapter = matrox_i2c_adapter_template;
- sprintf(b->adapter.name, name, GET_FB_IDX(minfo->fbcon.node));
+ sprintf(b->adapter.name, name, minor(minfo->fbcon.node));
b->adapter.data = b;
b->adapter.algo_data = &b->bac;
b->bac = matrox_i2c_algo_template;
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 477039b3fb8b..3a988123e654 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -1872,12 +1872,12 @@ static int initMatrox2(WPMINFO struct display* d, struct board* b){
goto failVideoIO;
}
printk("fb%d: %s frame buffer device\n",
- GET_FB_IDX(ACCESS_FBINFO(fbcon.node)), ACCESS_FBINFO(fbcon.modename));
+ minor(ACCESS_FBINFO(fbcon.node)), ACCESS_FBINFO(fbcon.modename));
if (ACCESS_FBINFO(fbcon.currcon) < 0) {
/* there is no console on this fb... but we have to initialize hardware
* until someone tells me what is proper thing to do */
printk(KERN_INFO "fb%d: initializing hardware\n",
- GET_FB_IDX(ACCESS_FBINFO(fbcon.node)));
+ minor(ACCESS_FBINFO(fbcon.node)));
matroxfb_set_var(&vesafb_defined, -1, &ACCESS_FBINFO(fbcon));
}
return 0;
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index 56c7c7a02583..70a63cb5f097 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -816,7 +816,7 @@ static int matroxfb_dh_registerfb(struct matroxfb_dh_fb_info* m2info) {
return -1;
}
printk(KERN_INFO "matroxfb_crtc2: secondary head of fb%u was registered as fb%u\n",
- GET_FB_IDX(ACCESS_FBINFO(fbcon.node)), GET_FB_IDX(m2info->fbcon.node));
+ minor(ACCESS_FBINFO(fbcon.node)), minor(m2info->fbcon.node));
m2info->fbcon_registered = 1;
return 0;
#undef minfo
@@ -839,7 +839,7 @@ static void matroxfb_dh_deregisterfb(struct matroxfb_dh_fb_info* m2info) {
printk(KERN_ERR "matroxfb_crtc2: Expect kernel crash after module unload.\n");
return;
}
- id = GET_FB_IDX(m2info->fbcon.node);
+ id = minor(m2info->fbcon.node);
unregister_framebuffer(&m2info->fbcon);
kfree(m2info->fbcon.disp);
/* return memory back to primary head */
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index 4961bd8f15f7..4c525d764471 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -1896,7 +1896,7 @@ static int __devinit neofb_probe(struct pci_dev *dev,
goto failed;
printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(info->node), info->modename);
+ minor(info->node), info->modename);
/*
* Our driver data
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index e321871abd72..b1cf61eeb9cf 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -540,7 +540,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
}
printk(KERN_INFO "fb%d: Open Firmware frame buffer device on %s\n",
- GET_FB_IDX(info->node), full_name);
+ minor(info->node), full_name);
}
MODULE_LICENSE("GPL");
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index 3aea0686edee..1879fabe3d9f 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -575,7 +575,7 @@ static int __init init_platinum(struct fb_info_platinum *info)
return 0;
printk(KERN_INFO "fb%d: platinum frame buffer device\n",
- GET_FB_IDX(info->fb_info.node));
+ minor(info->fb_info.node));
return 1;
}
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
index 168f4ec92505..2141b8d8a65a 100644
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -2289,7 +2289,7 @@ int __init pm2fb_init(void) {
return -EINVAL;
}
printk(KERN_INFO "fb%d: %s (%s), using %uK of video memory.\n",
- GET_FB_IDX(fb_info.gen.info.node),
+ minor(fb_info.gen.info.node),
board_table[fb_info.board].name,
permedia2_name,
(u32 )(fb_info.regions.fb_size>>10));
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 0653a9650718..7bdc0abe61df 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -1647,7 +1647,7 @@ static void pm3fb_common_init(struct pm3fb_info *l_fb_info)
pm3fb_write_mode(l_fb_info);
printk("fb%d: %s, using %uK of video memory (%s)\n",
- GET_FB_IDX(l_fb_info->gen.info.node),
+ minor(l_fb_info->gen.info.node),
permedia3_name, (u32) (l_fb_info->fb_size >> 10),
cardbase[l_fb_info->board_type].cardname);
}
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index 1b0725a11cbc..0790fbf9db7d 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -1059,10 +1059,10 @@ int __init pvr2fb_init(void)
modememused = get_line_length(var.xres_virtual, var.bits_per_pixel);
modememused *= var.yres_virtual;
printk("fb%d: %s frame buffer device, using %ldk/%ldk of video memory\n",
- GET_FB_IDX(fb_info.node), fb_info.modename, modememused>>10,
+ minor(fb_info.node), fb_info.modename, modememused>>10,
videomemorysize>>10);
printk("fb%d: Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n",
- GET_FB_IDX(fb_info.node), var.xres, var.yres, var.bits_per_pixel,
+ minor(fb_info.node), var.xres, var.yres, var.bits_per_pixel,
get_line_length(var.xres, var.bits_per_pixel),
(char *)pvr2_get_param(cables, NULL, cable_type, 3),
(char *)pvr2_get_param(outputs, NULL, video_output, 3));
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c
index 2ebec969fe70..d4ad2f4e8156 100644
--- a/drivers/video/q40fb.c
+++ b/drivers/video/q40fb.c
@@ -122,7 +122,7 @@ int q40fb_init(void)
}
printk(KERN_INFO "fb%d: Q40 frame buffer alive and kicking !\n",
- GET_FB_IDX(fb_info.node));
+ minor(fb_info.node));
return 0;
}
diff --git a/drivers/video/retz3fb.c b/drivers/video/retz3fb.c
index 52ac100708bd..fb5e1020908c 100644
--- a/drivers/video/retz3fb.c
+++ b/drivers/video/retz3fb.c
@@ -1430,7 +1430,7 @@ int __init retz3fb_init(void)
return -EINVAL;
printk(KERN_INFO "fb%d: %s frame buffer device, using %ldK of "
- "video memory\n", GET_FB_IDX(fb_info->node),
+ "video memory\n", minor(fb_info->node),
fb_info->modename, zinfo->fbsize>>10);
/* FIXME: This driver cannot be unloaded yet */
diff --git a/drivers/video/sbusfb.c b/drivers/video/sbusfb.c
index 35c12a2da743..dd152737110f 100644
--- a/drivers/video/sbusfb.c
+++ b/drivers/video/sbusfb.c
@@ -1066,7 +1066,7 @@ sizechange:
kfree(fb);
return;
}
- printk(KERN_INFO "fb%d: %s\n", GET_FB_IDX(fb->info.node), p);
+ printk(KERN_INFO "fb%d: %s\n", minor(fb->info.node), p);
}
static inline int known_card(char *name)
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index ef8abece1876..da9eaa6a9de9 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -739,7 +739,7 @@ int __init sgivwfb_init(void)
printk(KERN_INFO
"fb%d: Virtual frame buffer device, using %ldK of video memory\n",
- GET_FB_IDX(fb_info.node), sgivwfb_mem_size >> 10);
+ minor(fb_info.node), sgivwfb_mem_size >> 10);
return 0;
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index 83b4f07c6652..a6cb38550bc7 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -3391,7 +3391,7 @@ int __init sisfb_init(void)
return -EINVAL;
printk(KERN_INFO "fb%d: %s frame buffer device, Version %d.%d.%02d\n",
- GET_FB_IDX(fb_info.node), fb_info.modename, VER_MAJOR, VER_MINOR,
+ minor(fb_info.node), fb_info.modename, VER_MAJOR, VER_MINOR,
VER_LEVEL);
printk(KERN_INFO "sisfb: Added SISFB_GET_INFO ioctl = %x\n", SISFB_GET_INFO);
diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c
index ff8b4cd4cf45..fd6aba8342d7 100644
--- a/drivers/video/skeletonfb.c
+++ b/drivers/video/skeletonfb.c
@@ -447,7 +447,7 @@ int __init xxxfb_init(void)
if (register_framebuffer(&info) < 0)
return -EINVAL;
- printk(KERN_INFO "fb%d: %s frame buffer device\n", GET_FB_IDX(info.node),
+ printk(KERN_INFO "fb%d: %s frame buffer device\n", minor(info.node),
info.fix.id);
return 0;
}
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index cb78eeb93607..024a4fb2e963 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -1906,7 +1906,7 @@ static int __devinit sstfb_probe(struct pci_dev *pdev, const struct pci_device_i
goto fail;
}
printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(sst_info->info.node),sst_info->info.modename);
+ minor(sst_info->info.node),sst_info->info.modename);
return 0;
fail:
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
index 8ea6e631c864..27bf51f207bd 100644
--- a/drivers/video/stifb.c
+++ b/drivers/video/stifb.c
@@ -1299,7 +1299,7 @@ stifb_init_fb(struct sti_struct *sti, int force_bpp)
printk(KERN_INFO
"fb%d: %s %dx%d-%d frame buffer device, id: %04x, mmio: 0x%04lx\n",
- GET_FB_IDX(fb->info.node),
+ minor(fb->info.node),
fb->info.modename,
disp->var.xres,
disp->var.yres,
diff --git a/drivers/video/sun3fb.c b/drivers/video/sun3fb.c
index a278639af752..57b37fa4084b 100644
--- a/drivers/video/sun3fb.c
+++ b/drivers/video/sun3fb.c
@@ -646,7 +646,7 @@ sizechange:
kfree(fb);
return -EINVAL;
}
- printk("fb%d: %s\n", GET_FB_IDX(fb->info.node), p);
+ printk("fb%d: %s\n", minor(fb->info.node), p);
return 0;
}
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
index 3fcbcc1de024..427ce6364e7d 100644
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -982,7 +982,7 @@ int __init tgafb_init(void)
if (register_framebuffer(&fb_info.gen.info) < 0)
return -EINVAL;
printk(KERN_INFO "fb%d: %s frame buffer device at 0x%lx\n",
- GET_FB_IDX(fb_info.gen.info.node), fb_info.gen.info.modename,
+ minor(fb_info.gen.info.node), fb_info.gen.info.modename,
pdev->resource[0].start);
return 0;
}
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index 2e53e6d53287..6ed9c651892b 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -1235,7 +1235,7 @@ int __init tridentfb_init(void)
}
output("fb%d: %s frame buffer device %dx%d-%dbpp\n",
- GET_FB_IDX(fb_info.gen.info.node), fb_info.gen.info.modename,default_var.xres,
+ minor(fb_info.gen.info.node), fb_info.gen.info.modename,default_var.xres,
default_var.yres,default_var.bits_per_pixel);
return 0;
}
diff --git a/drivers/video/tx3912fb.c b/drivers/video/tx3912fb.c
index a83df9e936bb..19e0b44654f8 100644
--- a/drivers/video/tx3912fb.c
+++ b/drivers/video/tx3912fb.c
@@ -309,7 +309,7 @@ int __init tx3912fb_init(void)
return -1;
printk(KERN_INFO "fb%d: TX3912 frame buffer using %uKB.\n",
- GET_FB_IDX(fb_info.node), (u_int) (fb_info.fix.smem_len >> 10));
+ minor(fb_info.node), (u_int) (fb_info.fix.smem_len >> 10));
return 0;
}
diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c
index a6e4e367a1b2..5bcc8e324048 100644
--- a/drivers/video/valkyriefb.c
+++ b/drivers/video/valkyriefb.c
@@ -471,7 +471,7 @@ static void __init init_valkyrie(struct fb_info_valkyrie *p)
return;
}
- printk(KERN_INFO "fb%d: valkyrie frame buffer device\n", GET_FB_IDX(p->info.node));
+ printk(KERN_INFO "fb%d: valkyrie frame buffer device\n", minor(p->info.node));
}
static void valkyrie_set_par(const struct fb_par_valkyrie *par,
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
index c06a40a2d5a4..fd6ac92c3780 100644
--- a/drivers/video/vesafb.c
+++ b/drivers/video/vesafb.c
@@ -353,7 +353,7 @@ int __init vesafb_init(void)
return -EINVAL;
printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(fb_info.node), fb_info.fix.id);
+ minor(fb_info.node), fb_info.fix.id);
return 0;
}
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index c0a0c958f23d..a5dd7d32fe34 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -448,7 +448,7 @@ int __init vfb_init(void)
printk(KERN_INFO
"fb%d: Virtual frame buffer device, using %ldK of video memory\n",
- GET_FB_IDX(fb_info.node), videomemorysize >> 10);
+ minor(fb_info.node), videomemorysize >> 10);
return 0;
}
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 1e56fd3f8e4a..b7a0218c97ad 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -1236,7 +1236,7 @@ int __init vga16fb_init(void)
}
printk(KERN_INFO "fb%d: %s frame buffer device\n",
- GET_FB_IDX(vga16fb.node), vga16fb.modename);
+ minor(vga16fb.node), vga16fb.modename);
return 0;
}
diff --git a/drivers/video/virgefb.c b/drivers/video/virgefb.c
index 72039504e9e7..e9a54e973e04 100644
--- a/drivers/video/virgefb.c
+++ b/drivers/video/virgefb.c
@@ -1806,7 +1806,7 @@ int __init virgefb_init(void)
}
printk(KERN_INFO "fb%d: %s frame buffer device, using %ldK of video memory\n",
- GET_FB_IDX(fb_info.node), fb_info.modename, v_ram_size>>10);
+ minor(fb_info.node), fb_info.modename, v_ram_size>>10);
/* TODO: This driver cannot be unloaded yet */
diff --git a/include/linux/console.h b/include/linux/console.h
index 646e0eaa9fb3..37b441e6dfd8 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -40,6 +40,7 @@ struct consw {
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_scrolldelta)(struct vc_data *, int);
int (*con_set_origin)(struct vc_data *);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index e7a049eca95d..0b216c7bb1fe 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -331,12 +331,6 @@ struct fb_image {
#ifdef __KERNEL__
-#if 1 /* to go away in 2.5.0 */
-extern int GET_FB_IDX(kdev_t rdev);
-#else
-#define GET_FB_IDX(node) (minor(node))
-#endif
-
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/init.h>
@@ -386,8 +380,6 @@ struct fb_ops {
unsigned long arg, struct fb_info *info);
/* perform fb specific mmap */
int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
- /* switch to/from raster image mode */
- int (*fb_rasterimg)(struct fb_info *info, int start);
};
struct fb_info {
@@ -481,6 +473,7 @@ extern int fbmon_dpms(const struct fb_info *fb_info);
/* drivers/video/fbcmap.c */
extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
+extern void fb_dealloc_cmap(struct fb_cmap *cmap);
extern void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to,
int fsfromto);
extern int fb_set_cmap(struct fb_cmap *cmap, int kspc, struct fb_info *fb_info);
@@ -541,54 +534,4 @@ extern int __init fb_find_mode(struct fb_var_screeninfo *var,
#endif /* __KERNEL__ */
-#if 1
-
-#define FBCMD_GET_CURRENTPAR 0xDEAD0005
-#define FBCMD_SET_CURRENTPAR 0xDEAD8005
-
-#endif
-
-
-#if 1 /* Preliminary */
-
- /*
- * Hardware Cursor
- */
-
-#define FBIOGET_FCURSORINFO 0x4607
-#define FBIOGET_VCURSORINFO 0x4608
-#define FBIOPUT_VCURSORINFO 0x4609
-#define FBIOGET_CURSORSTATE 0x460A
-#define FBIOPUT_CURSORSTATE 0x460B
-
-
-struct fb_fix_cursorinfo {
- __u16 crsr_width; /* width and height of the cursor in */
- __u16 crsr_height; /* pixels (zero if no cursor) */
- __u16 crsr_xsize; /* cursor size in display pixels */
- __u16 crsr_ysize;
- __u16 crsr_color1; /* colormap entry for cursor color1 */
- __u16 crsr_color2; /* colormap entry for cursor color2 */
-};
-
-struct fb_var_cursorinfo {
- __u16 width;
- __u16 height;
- __u16 xspot;
- __u16 yspot;
- __u8 data[1]; /* field with [height][width] */
-};
-
-struct fb_cursorstate {
- __s16 xoffset;
- __s16 yoffset;
- __u16 mode;
-};
-
-#define FB_CURSOR_OFF 0
-#define FB_CURSOR_ON 1
-#define FB_CURSOR_FLASH 2
-
-#endif /* Preliminary */
-
#endif /* _LINUX_FB_H */
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 6d0b234f5a61..ec172b0bd5f7 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -9,6 +9,7 @@
#include <linux/config.h>
#include <linux/vt.h>
#include <linux/kd.h>
+#include <linux/console_struct.h>
#include <linux/tty.h>
/*
@@ -37,14 +38,9 @@ extern int kbd_rate(struct kbd_repeat *rep);
/* console.c */
-struct console_font_op;
-
int vc_allocate(unsigned int console);
int vc_cons_allocated(unsigned int console);
-int vc_resize(unsigned int lines, unsigned int cols,
- unsigned int first, unsigned int last);
-#define vc_resize_all(l, c) vc_resize(l, c, 0, MAX_NR_CONSOLES-1)
-#define vc_resize_con(l, c, x) vc_resize(l, c, x, x)
+int vc_resize(int currcons, unsigned int cols, unsigned int lines);
void vc_disallocate(unsigned int console);
void reset_palette(int currcons);
void set_palette(int currcons);
diff --git a/include/video/fbcon-hga.h b/include/video/fbcon-hga.h
deleted file mode 100644
index 695ab443f2a4..000000000000
--- a/include/video/fbcon-hga.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * FBcon low-level driver for Hercules Graphics Adaptor (hga)
- */
-
-#ifndef _VIDEO_FBCON_HGA_H
-#define _VIDEO_FBCON_HGA_H
-
-#include <linux/config.h>
-
-#ifdef MODULE
-#if defined(CONFIG_FBCON_HGA) || defined(CONFIG_FBCON_HGA_MODULE)
-#define FBCON_HAS_HGA
-#endif
-#else
-#if defined(CONFIG_FBCON_HGA)
-#define FBCON_HAS_HGA
-#endif
-#endif
-
-extern struct display_switch fbcon_hga;
-extern void fbcon_hga_setup(struct display *p);
-extern void fbcon_hga_bmove(struct display *p, int sy, int sx, int dy, int dx,
- int height, int width);
-extern void fbcon_hga_clear(struct vc_data *conp, struct display *p, int sy,
- int sx, int height, int width);
-extern void fbcon_hga_putc(struct vc_data *conp, struct display *p, int c,
- int yy, int xx);
-extern void fbcon_hga_putcs(struct vc_data *conp, struct display *p,
- const unsigned short *s, int count, int yy, int xx);
-extern void fbcon_hga_revc(struct display *p, int xx, int yy);
-
-#endif /* _VIDEO_FBCON_HGA_H */