summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
commit33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch)
tree2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /drivers/video
parent216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff)
Merge with Linux 2.3.32.
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Config.in15
-rw-r--r--drivers/video/Makefile658
-rw-r--r--drivers/video/acornfb.c54
-rw-r--r--drivers/video/atafb.c1
-rw-r--r--drivers/video/aty128fb.c2
-rw-r--r--drivers/video/cyber2000fb.c203
-rw-r--r--drivers/video/cyber2000fb.h245
-rw-r--r--drivers/video/dnfb.c1
-rw-r--r--drivers/video/fbcon.c81
-rw-r--r--drivers/video/fbgen.c1
-rw-r--r--drivers/video/fbmem.c122
-rw-r--r--drivers/video/fbmon.c74
-rw-r--r--drivers/video/hpfb.c1
-rw-r--r--drivers/video/matroxfb.c10
-rw-r--r--drivers/video/rivafb.c1
-rw-r--r--drivers/video/tgafb.c2
16 files changed, 739 insertions, 732 deletions
diff --git a/drivers/video/Config.in b/drivers/video/Config.in
index e9ab31ccb..d8591ef17 100644
--- a/drivers/video/Config.in
+++ b/drivers/video/Config.in
@@ -14,7 +14,7 @@ if [ "$CONFIG_FB" = "y" ]; then
bool ' nVidia Riva support (EXPERIMENTAL)' CONFIG_FB_RIVA
fi
if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_PCI" = "y" ]; then
- tristate ' Cirrus Logic suport (EXPERIMENTAL)' CONFIG_FB_CLGEN
+ tristate ' Cirrus Logic support (EXPERIMENTAL)' CONFIG_FB_CLGEN
tristate ' Permedia2 support (EXPERIMENTAL)' CONFIG_FB_PM2
if [ "$CONFIG_FB_PM2" = "y" ]; then
if [ "$CONFIG_PCI" = "y" ]; then
@@ -197,7 +197,7 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_IGA" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
"$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
- "$CONFIG_FB_P9100" = "y" -o \
+ "$CONFIG_FB_P9100" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_RIVA" = "y" -o \
"$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \
"$CONFIG_FB_3DFX" = "y" ]; then
@@ -214,7 +214,7 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
"$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
- "$CONFIG_FB_P9100" = "m" -o \
+ "$CONFIG_FB_P9100" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_CYBER2000" = "m" ]; then
define_tristate CONFIG_FBCON_CFB8 m
fi
@@ -228,14 +228,14 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
"$CONFIG_FB_PM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \
- "$CONFIG_FB_RIVA" = "y" -o \
+ "$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_3DFX" = "y" ]; then
define_tristate CONFIG_FBCON_CFB16 y
else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
"$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_VESA" = "m" -o \
"$CONFIG_FB_VIRTUAL" = "m" -o "$CONFIG_FB_TBOX" = "m" -o \
- "$CONFIG_FB_Q40" = "m" -o \
+ "$CONFIG_FB_Q40" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
"$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
@@ -248,12 +248,14 @@ if [ "$CONFIG_FB" = "y" ]; then
if [ "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \
"$CONFIG_FB_CLGEN" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
"$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
+ "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_CYBER2000" = "y" ]; then
define_tristate CONFIG_FBCON_CFB24 y
else
if [ "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
"$CONFIG_FB_CLGEN" = "m" -o "$CONFIG_FB_VESA" = "m" -o \
"$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
+ "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_CYBER2000" = "m" ]; then
define_tristate CONFIG_FBCON_CFB24 m
fi
@@ -263,7 +265,7 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
- "$CONFIG_FB_RIVA" = "y" -o \
+ "$CONFIG_FB_RIVA" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_FM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \
"$CONFIG_FB_3DFX" = "y" ]; then
define_tristate CONFIG_FBCON_CFB32 y
@@ -273,6 +275,7 @@ if [ "$CONFIG_FB" = "y" ]; then
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
+ "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_SGIVW" = "m" ]; then
define_tristate CONFIG_FBCON_CFB32 m
fi
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 9551de6bb..a9a66455d 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -1,560 +1,136 @@
-#
-# Makefile for the kernel video drivers.
-#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now inherited from the
-# parent makes..
-#
+# Makefile for the Linux video drivers.
+# 5 Aug 1999, James Simmons, <mailto:jsimmons@edgeglobal.com>
+# Rewritten to use lists instead of if-statements.
-L_TARGET := video.a
-L_OBJS :=
-M_OBJS :=
-LX_OBJS :=
-MX_OBJS :=
-MOD_LIST_NAME := VIDEO_MODULES
-
-CONFIG_FBGEN_BUILTIN :=
-CONFIG_FBGEN_MODULE :=
-
-# Frame Buffer Console
-
-ifeq ($(CONFIG_FB),y)
- # Nasty trick to make sure all wanted stuff is linked in
- O_TARGET = fbdev.o
- L_OBJS += fbdev.o
-endif
-
-ifeq ($(CONFIG_DUMMY_CONSOLE),y)
- L_OBJS += dummycon.o
-endif
-
-ifeq ($(CONFIG_PROM_CONSOLE),y)
- L_OBJS += promcon.o promcon_tbl.o
-endif
-
-ifeq ($(CONFIG_FB),y)
- L_OBJS += fonts.o
- OX_OBJS += fbcon.o fbcmap.o fbmem.o modedb.o
- ifeq ($(CONFIG_FONT_8x8),y)
- L_OBJS += font_8x8.o
- endif
- ifeq ($(CONFIG_FONT_8x16),y)
- L_OBJS += font_8x16.o
- endif
- ifeq ($(CONFIG_FONT_SUN8x16),y)
- L_OBJS += font_sun8x16.o
- endif
- ifeq ($(CONFIG_FONT_SUN12x22),y)
- L_OBJS += font_sun12x22.o
- endif
- ifeq ($(CONFIG_FONT_6x11),y)
- L_OBJS += font_6x11.o
- endif
- ifeq ($(CONFIG_FONT_ACORN_8x8),y)
- L_OBJS += font_acorn_8x8.o
- endif
- ifeq ($(CONFIG_FONT_PEARL_8x8),y)
- L_OBJS += font_pearl_8x8.o
- endif
-endif
-
-# Frame Buffer Devices
-
-ifeq ($(CONFIG_FB_ACORN),y)
-L_OBJS += acornfb.o
-else
- ifeq ($(CONFIG_FB_ACORN),m)
- M_OBJS += acornfb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_AMIGA),y)
-L_OBJS += amifb.o
-else
- ifeq ($(CONFIG_FB_AMIGA),m)
- M_OBJS += amifb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_PM2),y)
-L_OBJS += pm2fb.o
-CONFIG_FBGEN_BUILTIN = y
-else
- ifeq ($(CONFIG_FB_PM2),m)
- M_OBJS += pm2fb.o
- CONFIG_FBGEN_MODULE = y
- endif
-endif
-
-ifeq ($(CONFIG_FB_APOLLO),y)
-L_OBJS += dnfb.o
-endif
-
-ifeq ($(CONFIG_FB_Q40),y)
-L_OBJS += q40fb.o
-endif
-
-ifeq ($(CONFIG_FB_ATARI),y)
-L_OBJS += atafb.o
-else
- ifeq ($(CONFIG_FB_ATARI),m)
- M_OBJS += atafb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_ATY),y)
-L_OBJS += atyfb.o
-else
- ifeq ($(CONFIG_FB_ATY),m)
- M_OBJS += atyfb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_ATY128),y)
-L_OBJS += aty128fb.o
-endif
-
-ifeq ($(CONFIG_FB_IGA),y)
-L_OBJS += igafb.o
-endif
-
-ifeq ($(CONFIG_FB_CONTROL),y)
-L_OBJS += controlfb.o
-endif
-
-ifeq ($(CONFIG_FB_PLATINUM),y)
-L_OBJS += platinumfb.o
-endif
-
-ifeq ($(CONFIG_FB_VALKYRIE),y)
-L_OBJS += valkyriefb.o
-endif
-
-ifeq ($(CONFIG_FB_CT65550),y)
-L_OBJS += chipsfb.o
-endif
-
-ifeq ($(CONFIG_FB_CYBER),y)
-L_OBJS += cyberfb.o
-else
- ifeq ($(CONFIG_FB_CYBER),m)
- M_OBJS += cyberfb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_CYBER2000),y)
-L_OBJS += cyber2000fb.o
-else
- ifeq ($(CONFIG_FB_CYBER2000),m)
- M_OBJS += cyber2000fb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_SGIVW),y)
-LX_OBJS += sgivwfb.o
-else
- ifeq ($(CONFIG_FB_SGIVW),m)
- MX_OBJS += sgivwfb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_RIVA),y)
-L_OBJS += rivafb.o riva_hw.o
-endif
-
-ifeq ($(CONFIG_FB_3DFX),y)
-L_OBJS += tdfxfb.o
-endif
-
-ifeq ($(CONFIG_FB_MAC),y)
-L_OBJS += macfb.o
-endif
-
-ifeq ($(CONFIG_FB_HP300),y)
-L_OBJS += hpfb.o
-endif
-
-ifeq ($(CONFIG_FB_OF),y)
-L_OBJS += offb.o macmodes.o
-endif
+SUB_DIRS :=
+MOD_SUB_DIRS :=
+MOD_IN_SUB_DIRS :=
+ALL_SUB_DIRS :=
-ifeq ($(CONFIG_FB_IMSTT),y)
-L_OBJS += imsttfb.o
-endif
-
-ifeq ($(CONFIG_FB_RETINAZ3),y)
-L_OBJS += retz3fb.o
-else
- ifeq ($(CONFIG_FB_RETINAZ3),m)
- M_OBJS += retz3fb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_CLGEN),y)
-L_OBJS += clgenfb.o
-CONFIG_FBGEN_BUILTIN = y
-else
- ifeq ($(CONFIG_FB_CLGEN),m)
- M_OBJS += clgenfb.o
- CONFIG_FBGEN_MODULE = y
- endif
-endif
-
-ifeq ($(CONFIG_FB_S3TRIO),y)
-L_OBJS += S3triofb.o
-else
- ifeq ($(CONFIG_FB_S3TRIO),m)
- M_OBJS += S3triofb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_TGA),y)
-L_OBJS += tgafb.o
-CONFIG_FBGEN_BUILTIN = y
-else
- ifeq ($(CONFIG_FB_TGA),m)
- M_OBJS += tgafb.o
- CONFIG_FBGEN_MODULE = y
- endif
-endif
-
-ifeq ($(CONFIG_FB_VESA),y)
-L_OBJS += vesafb.o
-endif
-
-ifeq ($(CONFIG_FB_VGA16),y)
-L_OBJS += vga16fb.o
-else
- ifeq ($(CONFIG_FB_VGA16),m)
- M_OBJS += vga16fb.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_VIRGE),y)
-L_OBJS += virgefb.o
-else
- ifeq ($(CONFIG_FB_VIRGE),m)
- M_OBJS += virgefb.o
- endif
-endif
-
-ifdef CONFIG_FB_G364
-L_OBJS := $(L_OBJS) g364fb.o
-endif
-
-ifdef CONFIG_FB_G364
-L_OBJS := $(L_OBJS) g364fb.o
-endif
-
-ifdef CONFIG_FB_FM2
-L_OBJS := $(L_OBJS) fm2fb.o
-endif
-
-ifeq ($(CONFIG_FB_SBUS),y)
-L_OBJS += sbusfb.o
- ifeq ($(CONFIG_FB_CREATOR),y)
- L_OBJS += creatorfb.o
- else
- ifeq ($(CONFIG_FB_CREATOR),m)
- M_OBJS += creatorfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_CGSIX),y)
- L_OBJS += cgsixfb.o
- else
- ifeq ($(CONFIG_FB_CGSIX),m)
- M_OBJS += cgsixfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_BWTWO),y)
- L_OBJS += bwtwofb.o
- else
- ifeq ($(CONFIG_FB_BWTWO),m)
- M_OBJS += bwtwofb.o
- endif
- endif
- ifeq ($(CONFIG_FB_CGTHREE),y)
- L_OBJS += cgthreefb.o
- else
- ifeq ($(CONFIG_FB_CGTHREE),m)
- M_OBJS += cgthreefb.o
- endif
- endif
- ifeq ($(CONFIG_FB_TCX),y)
- L_OBJS += tcxfb.o
- else
- ifeq ($(CONFIG_FB_TCX),m)
- M_OBJS += tcxfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_CGFOURTEEN),y)
- L_OBJS += cgfourteenfb.o
- else
- ifeq ($(CONFIG_FB_CGFOURTEEN),m)
- M_OBJS += cgfourteenfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_P9100),y)
- L_OBJS += p9100fb.o
- else
- ifeq ($(CONFIG_FB_P9100),m)
- M_OBJS += p9100fb.o
- endif
- endif
- ifeq ($(CONFIG_FB_LEO),y)
- L_OBJS += leofb.o
- else
- ifeq ($(CONFIG_FB_LEO),m)
- M_OBJS += leofb.o
- endif
- endif
-else
- ifeq ($(CONFIG_FB_SBUS),m)
- M_OBJS += sbusfb.o
- ifeq ($(CONFIG_FB_CREATOR),y)
- M_OBJS += creatorfb.o
- else
- ifeq ($(CONFIG_FB_CREATOR),m)
- M_OBJS += creatorfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_CGSIX),y)
- M_OBJS += cgsixfb.o
- else
- ifeq ($(CONFIG_FB_CGSIX),m)
- M_OBJS += cgsixfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_BWTWO),y)
- M_OBJS += bwtwofb.o
- else
- ifeq ($(CONFIG_FB_BWTWO),m)
- M_OBJS += bwtwofb.o
- endif
- endif
- ifeq ($(CONFIG_FB_CGTHREE),y)
- M_OBJS += cgthreefb.o
- else
- ifeq ($(CONFIG_FB_CGTHREE),m)
- M_OBJS += cgthreefb.o
- endif
- endif
- ifeq ($(CONFIG_FB_TCX),y)
- M_OBJS += tcxfb.o
- else
- ifeq ($(CONFIG_FB_TCX),m)
- M_OBJS += tcxfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_CGFOURTEEN),y)
- M_OBJS += cgfourteenfb.o
- else
- ifeq ($(CONFIG_FB_CGFOURTEEN),m)
- M_OBJS += cgfourteenfb.o
- endif
- endif
- ifeq ($(CONFIG_FB_P9100),y)
- M_OBJS += p9100fb.o
- else
- ifeq ($(CONFIG_FB_P9100),m)
- M_OBJS += p9100fb.o
- endif
- endif
- ifeq ($(CONFIG_FB_LEO),y)
- M_OBJS += leofb.o
- else
- ifeq ($(CONFIG_FB_LEO),m)
- M_OBJS += leofb.o
- endif
- endif
- endif
-endif
-
-ifeq ($(CONFIG_FB_VIRTUAL),y)
-L_OBJS += vfb.o
-else
- ifeq ($(CONFIG_FB_VIRTUAL),m)
- M_OBJS += vfb.o
- endif
-endif
-
-ifdef CONFIG_FBGEN_BUILTIN
-OX_OBJS += fbgen.o
-else
- ifdef CONFIG_FBGEN_MODULE
- MX_OBJS += fbgen.o
- endif
-endif
-
-ifeq ($(CONFIG_FB_MATROX),y)
-L_OBJS += matroxfb.o
-else
- ifeq ($(CONFIG_FB_MATROX),m)
- M_OBJS += matroxfb.o
- endif
-endif
+O_TARGET := video.o
+O_OBJS :=
+M_OBJS :=
+# This is a nice idea but needs depmod altering
+# MOD_LIST_NAME := VIDEO_MODULES
+
+# All of the (potential) objects that export symbols.
+# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
+
+export-objs := fbmem.o fbcmap.o fbcon.o fbcon-afb.o fbcon-ilbm.o fbcon-vga.o fbcon-iplan2p2.o fbcon-iplan2p4.o fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o fbcon-cfb8.o fbcon-mac.o fbcon-mfb.o fbcon-vga.o
+
+# Object file lists.
+obj-y :=
+obj-m :=
+obj-n :=
+obj- :=
+
+# Each configuration option enables a list of files.
+
+obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o
+obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o vga_font.o
+obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o
+obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
+obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
+
+obj-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o
+obj-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o
+obj-$(CONFIG_FONT_8x8) += font_8x8.o
+obj-$(CONFIG_FONT_8x16) += font_8x16.o
+obj-$(CONFIG_FONT_6x11) += font_6x11.o
+obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
+obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
+
+obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbcon.o fonts.o fbmon.o
+
+obj-$(CONFIG_FB_ACORN) += acornfb.o
+obj-$(CONFIG_FB_AMIGA) += amifb.o
+obj-$(CONFIG_FB_PM2) += pm2fb.o fbgen.o
+obj-$(CONFIG_FB_APOLLO) += dnfb.o
+obj-$(CONFIG_FB_Q40) += q40fb.o
+obj-$(CONFIG_FB_ATARI) += atafb.o
+obj-$(CONFIG_FB_ATY) += atyfb.o
+obj-$(CONFIG_FB_ATY128) += aty128fb.o
+obj-$(CONFIG_FB_IGA) += igafb.o
+obj-$(CONFIG_FB_CONTROL) += controlfb.o
+obj-$(CONFIG_FB_PLATINUM) += platinumfb.o
+obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o
+obj-$(CONFIG_FB_CT65550) += chipsfb.o
+obj-$(CONFIG_FB_CYBER) += cyberfb.o
+obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o
+obj-$(CONFIG_FB_SGIVW) += sgivwfb.o
+obj-$(CONFIG_FB_RIVA) += rivafb.o riva_hw.o
+obj-$(CONFIG_FB_3DFX) += tdfxfb.o
+obj-$(CONFIG_FB_MAC) += macfb.o
+obj-$(CONFIG_FB_HP300) += hpfb.o
+obj-$(CONFIG_FB_OF) += offb.o macmodes.o
+obj-$(CONFIG_FB_IMSTT) += imsttfb.o
+obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o
+obj-$(CONFIG_FB_CLGEN) += clgenfb.o fbgen.o
+obj-$(CONFIG_FB_S3TRIO) += S3triofb.o
+obj-$(CONFIG_FB_TGA) += tgafb.o fbgen.o
+obj-$(CONFIG_FB_VESA) += vesafb.o
+obj-$(CONFIG_FB_VGA16) += vga16fb.o fbcon-vga-planes.o
+obj-$(CONFIG_FB_VIRGE) += virgefb.o
+obj-$(CONFIG_FB_G364) += g364fb.o
+obj-$(CONFIG_FB_FM2) += fm2fb.o
+obj-$(CONFIG_FB_CREATOR) += creatorfb.o sbusfb.o
+obj-$(CONFIG_FB_CGSIX) += cgsixfb.o sbusfb.o
+obj-$(CONFIG_FB_BWTWO) += bwtwofb.o sbusfb.o
+obj-$(CONFIG_FB_CGTHREE) += cgthreefb.o sbusfb.o
+obj-$(CONFIG_FB_TCX) += tcxfb.o sbusfb.o
+obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o
+obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o
+obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o
+obj-$(CONFIG_FB_MATROX) += matroxfb.o
+obj-$(CONFIG_FB_VIRTUAL) += vfb.o
# Generic Low Level Drivers
-ifeq ($(CONFIG_FBCON_AFB),y)
-OX_OBJS += fbcon-afb.o
-else
- ifeq ($(CONFIG_FBCON_AFB),m)
- MX_OBJS += fbcon-afb.o
- endif
-endif
+obj-$(CONFIG_FBCON_AFB) += fbcon-afb.o
+obj-$(CONFIG_FBCON_CFB2) += fbcon-cfb2.o
+obj-$(CONFIG_FBCON_CFB4) += fbcon-cfb4.o
+obj-$(CONFIG_FBCON_CFB8) += fbcon-cfb8.o
+obj-$(CONFIG_FBCON_CFB16) += fbcon-cfb16.o
+obj-$(CONFIG_FBCON_CFB24) += fbcon-cfb24.o
+obj-$(CONFIG_FBCON_CFB32) += fbcon-cfb32.o
+obj-$(CONFIG_FBCON_ILBM) += fbcon-ilbm.o
+obj-$(CONFIG_FBCON_IPLAN2P2) += fbcon-iplan2p2.o
+obj-$(CONFIG_FBCON_IPLAN2P4) += fbcon-iplan2p4.o
+obj-$(CONFIG_FBCON_IPLAN2P8) += fbcon-iplan2p8.o
+obj-$(CONFIG_FBCON_IPLAN2P16) += fbcon-iplan2p16.o
+obj-$(CONFIG_FBCON_MAC) += fbcon-mac.o
+obj-$(CONFIG_FBCON_MFB) += fbcon-mfb.o
+obj-$(CONFIG_FBCON_VGA) += fbcon-vga.o
-ifeq ($(CONFIG_FBCON_CFB2),y)
-OX_OBJS += fbcon-cfb2.o
-else
- ifeq ($(CONFIG_FBCON_CFB2),m)
- MX_OBJS += fbcon-cfb2.o
- endif
-endif
+# Extract lists of the multi-part drivers.
+# The 'int-*' lists are the intermediate files used to build the multi's.
-ifeq ($(CONFIG_FBCON_CFB4),y)
-OX_OBJS += fbcon-cfb4.o
-else
- ifeq ($(CONFIG_FBCON_CFB4),m)
- MX_OBJS += fbcon-cfb4.o
- endif
-endif
+multi-y := $(filter $(list-multi), $(obj-y))
+multi-m := $(filter $(list-multi), $(obj-m))
+int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
+int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
-ifeq ($(CONFIG_FBCON_CFB8),y)
-OX_OBJS += fbcon-cfb8.o
-else
- ifeq ($(CONFIG_FBCON_CFB8),m)
- MX_OBJS += fbcon-cfb8.o
- endif
-endif
+# Files that are both resident and modular: remove from modular.
-ifeq ($(CONFIG_FBCON_CFB16),y)
-OX_OBJS += fbcon-cfb16.o
-else
- ifeq ($(CONFIG_FBCON_CFB16),m)
- MX_OBJS += fbcon-cfb16.o
- endif
-endif
+obj-m := $(filter-out $(obj-y), $(obj-m))
+int-m := $(filter-out $(int-y), $(int-m))
-ifeq ($(CONFIG_FBCON_CFB24),y)
-OX_OBJS += fbcon-cfb24.o
-else
- ifeq ($(CONFIG_FBCON_CFB24),m)
- MX_OBJS += fbcon-cfb24.o
- endif
-endif
+# Take multi-part drivers out of obj-y and put components in.
-ifeq ($(CONFIG_FBCON_CFB32),y)
-OX_OBJS += fbcon-cfb32.o
-else
- ifeq ($(CONFIG_FBCON_CFB32),m)
- MX_OBJS += fbcon-cfb32.o
- endif
-endif
+obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y)
-ifeq ($(CONFIG_FBCON_ILBM),y)
-OX_OBJS += fbcon-ilbm.o
-else
- ifeq ($(CONFIG_FBCON_ILBM),m)
- MX_OBJS += fbcon-ilbm.o
- endif
-endif
+# Translate to Rules.make lists.
-ifeq ($(CONFIG_FBCON_IPLAN2P2),y)
-OX_OBJS += fbcon-iplan2p2.o
-else
- ifeq ($(CONFIG_FBCON_IPLAN2P2),m)
- MX_OBJS += fbcon-iplan2p2.o
- endif
-endif
-
-ifeq ($(CONFIG_FBCON_IPLAN2P4),y)
-OX_OBJS += fbcon-iplan2p4.o
-else
- ifeq ($(CONFIG_FBCON_IPLAN2P4),m)
- MX_OBJS += fbcon-iplan2p4.o
- endif
-endif
-
-ifeq ($(CONFIG_FBCON_IPLAN2P8),y)
-OX_OBJS += fbcon-iplan2p8.o
-else
- ifeq ($(CONFIG_FBCON_IPLAN2P8),m)
- MX_OBJS += fbcon-iplan2p8.o
- endif
-endif
-
-ifeq ($(CONFIG_FBCON_IPLAN2P16),y)
-OX_OBJS += fbcon-iplan2p16.o
-else
- ifeq ($(CONFIG_FBCON_IPLAN2P16),m)
- MX_OBJS += fbcon-iplan2p16.o
- endif
-endif
-
-ifeq ($(CONFIG_FBCON_MAC),y)
-OX_OBJS += fbcon-mac.o
-else
- ifeq ($(CONFIG_FBCON_MAC),m)
- MX_OBJS += fbcon-mac.o
- endif
-endif
-
-ifeq ($(CONFIG_FBCON_MFB),y)
-OX_OBJS += fbcon-mfb.o
-else
- ifeq ($(CONFIG_FBCON_MFB),m)
- MX_OBJS += fbcon-mfb.o
- endif
-endif
-
-ifeq ($(CONFIG_FBCON_VGA_PLANES),y)
-OX_OBJS += fbcon-vga-planes.o
-else
- ifeq ($(CONFIG_FBCON_VGA_PLANES),m)
- MX_OBJS += fbcon-vga-planes.o
- endif
-endif
-
-ifeq ($(CONFIG_FBCON_VGA),y)
-OX_OBJS += fbcon-vga.o
-else
- ifeq ($(CONFIG_FBCON_VGA),m)
- MX_OBJS += fbcon-vga.o
- endif
-endif
-
-# VGA Text Console
-
-ifdef CONFIG_VGA_CONSOLE
-L_OBJS += vgacon.o
-endif
-
-# MDA Text Console
-
-ifeq ($(CONFIG_MDA_CONSOLE),y)
-L_OBJS += mdacon.o
-else
- ifeq ($(CONFIG_MDA_CONSOLE),m)
- M_OBJS += mdacon.o
- endif
-endif
-
-# Newport Text Console
-
-ifeq ($(CONFIG_SGI_NEWPORT_CONSOLE),y)
-L_OBJS += newport_con.o font_8x16.o
-else
- ifeq ($(CONFIG_SGI_NEWPORT_CONSOLE),m)
- M_OBJS += newport_con.o font_8x16.o
- endif
-endif
+O_OBJS := $(filter-out $(export-objs), $(obj-y))
+OX_OBJS := $(filter $(export-objs), $(obj-y))
+M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
+MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
include $(TOPDIR)/Rules.make
+clean:
+ rm -f core *.o *.a *.s
+
promcon_tbl.c: prom.uni ../char/conmakehash
../char/conmakehash prom.uni | \
sed -e '/#include <[^>]*>/p' -e 's/types/init/' \
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index eec19a285..304efa31d 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -418,15 +418,19 @@ acornfb_set_timing(struct fb_var_screeninfo *var)
ext_ctl = acornfb_default_econtrol();
- if (var->sync & FB_SYNC_HOR_HIGH_ACT)
- ext_ctl |= VIDC20_ECTL_HS_HSYNC;
- else
- ext_ctl |= VIDC20_ECTL_HS_NHSYNC;
+ if (var->sync & FB_SYNC_COMP_HIGH_ACT) /* should be FB_SYNC_COMP */
+ ext_ctl |= VIDC20_ECTL_HS_NCSYNC | VIDC20_ECTL_VS_NCSYNC;
+ else {
+ if (var->sync & FB_SYNC_HOR_HIGH_ACT)
+ ext_ctl |= VIDC20_ECTL_HS_HSYNC;
+ else
+ ext_ctl |= VIDC20_ECTL_HS_NHSYNC;
- if (var->sync & FB_SYNC_VERT_HIGH_ACT)
- ext_ctl |= VIDC20_ECTL_VS_VSYNC;
- else
- ext_ctl |= VIDC20_ECTL_VS_NVSYNC;
+ if (var->sync & FB_SYNC_VERT_HIGH_ACT)
+ ext_ctl |= VIDC20_ECTL_VS_VSYNC;
+ else
+ ext_ctl |= VIDC20_ECTL_VS_NVSYNC;
+ }
outl(VIDC20_ECTL | ext_ctl, IO_VIDC_BASE);
@@ -1211,43 +1215,55 @@ acornfb_blank(int blank, struct fb_info *info)
* Everything after here is initialisation!!!
*/
static struct fb_videomode modedb[] __initdata = {
- { /* 640x250 @ 50Hz, 15.6 kHz hsync */
- NULL, 50, 640, 250, 62500, 185, 123, 38, 21, 76, 3,
+ { /* 320x256 @ 50Hz */
+ NULL, 50, 320, 256, 125000, 92, 62, 35, 19, 38, 2,
+ FB_SYNC_COMP_HIGH_ACT,
+ FB_VMODE_NONINTERLACED
+ }, { /* 640x250 @ 50Hz, 15.6 kHz hsync */
+ NULL, 50, 640, 250, 62500, 185, 123, 38, 21, 76, 3,
0,
FB_VMODE_NONINTERLACED
}, { /* 640x256 @ 50Hz, 15.6 kHz hsync */
- NULL, 50, 640, 256, 62500, 185, 123, 35, 18, 76, 3,
+ NULL, 50, 640, 256, 62500, 185, 123, 35, 18, 76, 3,
0,
FB_VMODE_NONINTERLACED
}, { /* 640x512 @ 50Hz, 26.8 kHz hsync */
- NULL, 50, 640, 512, 41667, 113, 87, 18, 1, 56, 3,
+ NULL, 50, 640, 512, 41667, 113, 87, 18, 1, 56, 3,
0,
FB_VMODE_NONINTERLACED
}, { /* 640x250 @ 70Hz, 31.5 kHz hsync */
- NULL, 70, 640, 250, 39722, 48, 16, 109, 88, 96, 2,
+ NULL, 70, 640, 250, 39722, 48, 16, 109, 88, 96, 2,
0,
FB_VMODE_NONINTERLACED
}, { /* 640x256 @ 70Hz, 31.5 kHz hsync */
- NULL, 70, 640, 256, 39722, 48, 16, 106, 85, 96, 2,
+ NULL, 70, 640, 256, 39722, 48, 16, 106, 85, 96, 2,
0,
FB_VMODE_NONINTERLACED
}, { /* 640x352 @ 70Hz, 31.5 kHz hsync */
- NULL, 70, 640, 352, 39722, 48, 16, 58, 37, 96, 2,
+ NULL, 70, 640, 352, 39722, 48, 16, 58, 37, 96, 2,
0,
FB_VMODE_NONINTERLACED
}, { /* 640x480 @ 60Hz, 31.5 kHz hsync */
- NULL, 60, 640, 480, 39722, 48, 16, 32, 11, 96, 2,
+ NULL, 60, 640, 480, 39722, 48, 16, 32, 11, 96, 2,
0,
FB_VMODE_NONINTERLACED
}, { /* 800x600 @ 56Hz, 35.2 kHz hsync */
- NULL, 56, 800, 600, 27778, 101, 23, 22, 1, 100, 2,
+ NULL, 56, 800, 600, 27778, 101, 23, 22, 1, 100, 2,
0,
FB_VMODE_NONINTERLACED
}, { /* 896x352 @ 60Hz, 21.8 kHz hsync */
- NULL, 60, 896, 352, 41667, 59, 27, 9, 0, 118, 3,
+ NULL, 60, 896, 352, 41667, 59, 27, 9, 0, 118, 3,
+ 0,
+ FB_VMODE_NONINTERLACED
+ }, { /* 1024x 768 @ 60Hz, 48.4 kHz hsync */
+ NULL, 60, 1024, 768, 15385, 160, 24, 29, 3, 136, 6,
0,
FB_VMODE_NONINTERLACED
- },
+ }, { /* 1280x1024 @ 60Hz, 63.8 kHz hsync */
+ NULL, 60, 1280, 1024, 9090, 186, 96, 38, 1, 160, 3,
+ 0,
+ FB_VMODE_NONINTERLACED
+ }
};
static struct fb_videomode __initdata
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c
index 51d1cb05e..905e8524a 100644
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -71,6 +71,7 @@
#include <linux/fb.h>
#include <asm/atarikb.h>
+#include <video/fbcon.h>
#include <video/fbcon-cfb8.h>
#include <video/fbcon-cfb16.h>
#include <video/fbcon-iplan2p2.h>
diff --git a/drivers/video/aty128fb.c b/drivers/video/aty128fb.c
index 09ad29c30..baf41e9ec 100644
--- a/drivers/video/aty128fb.c
+++ b/drivers/video/aty128fb.c
@@ -24,7 +24,7 @@
* example code and hardware. Thanks Nitya. -atong
*/
-
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index 5568355a7..4748fc8b9 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -5,6 +5,7 @@
*
* Based on cyberfb.c
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -343,6 +344,7 @@ struct par_info {
unsigned char crtc[19];
unsigned int width;
unsigned int pitch;
+ unsigned int fetch;
/*
* Other
@@ -358,7 +360,7 @@ static const char crtc_idx[] = {
static void cyber2000fb_set_timing(struct par_info *hw)
{
- unsigned int fetchrow, i;
+ unsigned int i;
/*
* Blank palette
@@ -411,6 +413,7 @@ static void cyber2000fb_set_timing(struct par_info *hw)
/* PLL registers */
cyber2000_grphw(0xb0, hw->clock_mult);
cyber2000_grphw(0xb1, hw->clock_div);
+
cyber2000_grphw(0xb2, 0xdb);
cyber2000_grphw(0xb3, 0x54); /* MCLK: 75MHz */
cyber2000_grphw(0x90, 0x01);
@@ -426,12 +429,10 @@ static void cyber2000fb_set_timing(struct par_info *hw)
cyber2000_outb(0x20, 0x3c0);
cyber2000_outb(0xff, 0x3c6);
- fetchrow = hw->pitch + 1;
- cyber2000_grphw(0x14, fetchrow);
- /* FIXME: is this the right way round? */
- cyber2000_grphw(0x15, ((fetchrow >> 4) & 0xf0) | ((hw->pitch >> 8) & 0x0f));
+ cyber2000_grphw(0x14, hw->fetch);
+ cyber2000_grphw(0x15, ((hw->fetch >> 8) & 0x03) | ((hw->pitch >> 4) & 0x30));
cyber2000_grphw(0x77, hw->visualid);
- cyber2000_grphw(0x33, 0x1c);
+ cyber2000_grphw(0x33, 0x0c);
/*
* Set up accelerator registers
@@ -615,24 +616,38 @@ static int cyber2000fb_decode_crtc(struct par_info *hw, struct fb_var_screeninfo
* mult = reg0xb0.7:0
* div1 = (reg0xb1.5:0 + 1)
* div2 = 2^(reg0xb1.7:6)
- * fpll should be between 150 and 220 MHz
- * (6667ps and 4545ps)
+ * fpll should be between 115 and 257 MHz
+ * (8696ps and 3891ps)
*/
static int
cyber2000fb_decode_clock(struct par_info *hw, struct fb_var_screeninfo *var)
{
+ static unsigned int divisors_2000[] = { 1, 2, 4, 8 };
+ static unsigned int divisors_2010[] = { 1, 2, 4, 6 };
unsigned long pll_ps = var->pixclock;
unsigned long ref_ps = 69842;
+ unsigned int *divisors;
int div2, div1, mult;
/*
* Step 1:
- * find div2 such that 150MHz < fpll < 220MHz
+ * find div2 such that 115MHz < fpll < 257MHz
* and 0 <= div2 < 4
*/
- for (div2 = 0; div2 < 4; div2++, pll_ps >>= 1)
- if (6667 > pll_ps && pll_ps > 4545)
+ if (current_par.dev_id == PCI_DEVICE_ID_INTERG_2010)
+ divisors = divisors_2010;
+ else
+ divisors = divisors_2000;
+
+ for (div2 = 0; div2 < 4; div2++) {
+ unsigned long new_pll;
+
+ new_pll = pll_ps / divisors[div2];
+ if (8696 > new_pll && new_pll > 3891) {
+ pll_ps = new_pll;
break;
+ }
+ }
if (div2 == 4)
return -EINVAL;
@@ -655,23 +670,95 @@ cyber2000fb_decode_clock(struct par_info *hw, struct fb_var_screeninfo *var)
break;
}
#else
- if (pll_ps == 4630) { /* 216.0, 108.0, 54.00, 27.000 */
- mult = 181; /* 4630 9260 18520 37040 */
- div1 = 12;
- } else if (pll_ps == 4965) { /* 201.0, 100.5, 50.25, 25.125 */
- mult = 211; /* 4965 9930 19860 39720 */
- div1 = 15;
- } else if (pll_ps == 5050) { /* 198.0, 99.0, 49.50, 24.750 */
- mult = 83; /* 5050 10100 20200 40400 */
- div1 = 6;
- } else if (pll_ps == 6349) { /* 158.0, 79.0, 39.50, 19.750 */
- mult = 209; /* 6349 12698 25396 50792 */
- div1 = 19;
- } else if (pll_ps == 6422) { /* 156.0, 78.0, 39.00, 19.500 */
- mult = 190; /* 6422 12844 25688 51376 */
- div1 = 17;
+ /*
+ * 1600x1200 1280x1024 1152x864 1024x768 800x600 640x480
+ * 5051 5051 yes 76*
+ * 5814 5814 no 66
+ * 6411 6411 no 60
+ * 7408 7408 yes 75*
+ * 74*
+ * 7937 7937 yes 70*
+ * 9091 4545 yes 80*
+ * 75* 100*
+ * 9260 4630 yes 60*
+ * 10000 5000 no 70 90
+ * 12500 6250 yes 47-lace* 60*
+ * 43-lace*
+ * 12699 6349 yes 75*
+ * 13334 6667 no 72
+ * 70
+ * 14815 7407 yes 100*
+ * 15385 7692 yes 47-lace* 60*
+ * 43-lace*
+ * 17656 4414 no 90
+ * 20000 5000 no 72
+ * 20203 5050 yes 75*
+ * 22272 5568 yes 43-lace* 70* 100*
+ * 25000 6250 yes 60*
+ * 25057 6264 no 90
+ * 27778 6944 yes 56*
+ * 48-lace*
+ * 31747 7936 yes 75*
+ * 32052 8013 no 72
+ * 39722 /6 6620 no
+ * 39722 /8 4965 yes 60*
+ */
+ /* /1 /2 /4 /6 /8 */
+ /* (2010) (2000) */
+ if (pll_ps >= 4543 && pll_ps <= 4549) {
+ mult = 169; /*u220.0 110.0 54.99 36.663 27.497 */
+ div1 = 11; /* 4546 9092 18184 27276 36367 */
+ } else if (pll_ps >= 4596 && pll_ps <= 4602) {
+ mult = 243; /* 217.5 108.7 54.36 36.243 27.181 */
+ div1 = 16; /* 4599 9197 18395 27592 36789 */
+ } else if (pll_ps >= 4627 && pll_ps <= 4633) {
+ mult = 181; /*u216.0, 108.0, 54.00, 36.000 27.000 */
+ div1 = 12; /* 4630 9260 18520 27780 37040 */
+ } else if (pll_ps >= 4962 && pll_ps <= 4968) {
+ mult = 211; /*u201.0, 100.5, 50.25, 33.500 25.125 */
+ div1 = 15; /* 4965 9930 19860 29790 39720 */
+ } else if (pll_ps >= 5005 && pll_ps <= 5011) {
+ mult = 251; /* 200.0 99.8 49.92 33.280 24.960 */
+ div1 = 18; /* 5008 10016 20032 30048 40064 */
+ } else if (pll_ps >= 5047 && pll_ps <= 5053) {
+ mult = 83; /*u198.0, 99.0, 49.50, 33.000 24.750 */
+ div1 = 6; /* 5050 10100 20200 30300 40400 */
+ } else if (pll_ps >= 5490 && pll_ps <= 5496) {
+ mult = 89; /* 182.0 91.0 45.51 30.342 22.756 */
+ div1 = 7; /* 5493 10986 21972 32958 43944 */
+ } else if (pll_ps >= 5567 && pll_ps <= 5573) {
+ mult = 163; /*u179.5 89.8 44.88 29.921 22.441 */
+ div1 = 13; /* 5570 11140 22281 33421 44562 */
+ } else if (pll_ps >= 6246 && pll_ps <= 6252) {
+ mult = 190; /*u160.0, 80.0, 40.00, 26.671 20.003 */
+ div1 = 17; /* 6249 12498 24996 37494 49992 */
+ } else if (pll_ps >= 6346 && pll_ps <= 6352) {
+ mult = 209; /*u158.0, 79.0, 39.50, 26.333 19.750 */
+ div1 = 19; /* 6349 12698 25396 38094 50792 */
+ } else if (pll_ps >= 6648 && pll_ps <= 6655) {
+ mult = 210; /*u150.3 75.2 37.58 25.057 18.792 */
+ div1 = 20; /* 6652 13303 26606 39909 53213 */
+ } else if (pll_ps >= 6943 && pll_ps <= 6949) {
+ mult = 181; /*u144.0 72.0 36.00 23.996 17.997 */
+ div1 = 18; /* 6946 13891 27782 41674 55565 */
+ } else if (pll_ps >= 7404 && pll_ps <= 7410) {
+ mult = 198; /*u134.0 67.5 33.75 22.500 16.875 */
+ div1 = 21; /* 7407 14815 29630 44445 59260 */
+ } else if (pll_ps >= 7689 && pll_ps <= 7695) {
+ mult = 227; /*u130.0 65.0 32.50 21.667 16.251 */
+ div1 = 25; /* 7692 15384 30768 46152 61536 */
+ } else if (pll_ps >= 7808 && pll_ps <= 7814) {
+ mult = 152; /* 128.0 64.0 32.00 21.337 16.003 */
+ div1 = 17; /* 7811 15623 31245 46868 62490 */
+ } else if (pll_ps >= 7934 && pll_ps <= 7940) {
+ mult = 44; /*u126.0 63.0 31.498 20.999 15.749 */
+ div1 = 5; /* 7937 15874 31748 47622 63494 */
} else
return -EINVAL;
+ /* 187 13 -> 4855 */
+ /* 181 18 -> 6946 */
+ /* 163 13 -> 5570 */
+ /* 169 11 -> 4545 */
#endif
/*
* Step 3:
@@ -751,7 +838,11 @@ cyber2000fb_decode_var(struct fb_var_screeninfo *var, int con, struct par_info *
debug_printf("%02X ", hw->crtc[i]);
debug_printf("%02X\n", hw->crtc_ofl);
}
- hw->width -= 1;
+ hw->width -= 1;
+ hw->fetch = hw->pitch;
+ if (current_par.bus_64bit == 0)
+ hw->fetch <<= 1;
+ hw->fetch += 1;
return 0;
}
@@ -1042,6 +1133,29 @@ static struct fb_ops cyber2000fb_ops =
cyber2000fb_ioctl
};
+int cyber2000fb_attach(struct cyberpro_info *info)
+{
+ if (current_par.initialised) {
+ info->regs = CyberRegs;
+ info->fb = current_par.screen_base;
+ info->fb_size = current_par.screen_size;
+
+ strncpy(info->dev_name, current_par.dev_name, sizeof(info->dev_name));
+
+ MOD_INC_USE_COUNT;
+ }
+
+ return current_par.initialised;
+}
+
+void cyber2000fb_detach(void)
+{
+ MOD_DEC_USE_COUNT;
+}
+
+EXPORT_SYMBOL(cyber2000fb_attach);
+EXPORT_SYMBOL(cyber2000fb_detach);
+
/*
* These parameters give
* 640x480, hsync 31.5kHz, vsync 60Hz
@@ -1203,12 +1317,12 @@ cyber2000fb_setup(char *options)
static char igs_regs[] __initdata = {
0x10, 0x10, 0x12, 0x00, 0x13, 0x00,
-/* 0x30, 0x21,*/ 0x31, 0x00, 0x32, 0x00, 0x33, 0x01,
+ 0x31, 0x00, 0x32, 0x00, 0x33, 0x01,
0x50, 0x00, 0x51, 0x00, 0x52, 0x00, 0x53, 0x00,
0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x01,
0x58, 0x00, 0x59, 0x00, 0x5a, 0x00,
- 0x70, 0x0b,/* 0x71, 0x10, 0x72, 0x45,*/ 0x73, 0x30,
- 0x74, 0x1b, 0x75, 0x1e, 0x76, 0x00, 0x7a, 0xc8
+ 0x70, 0x0b, 0x73, 0x30,
+ 0x74, 0x0b, 0x75, 0x17, 0x76, 0x00, 0x7a, 0xc8
};
static void __init cyber2000fb_hw_init(void)
@@ -1219,6 +1333,12 @@ static void __init cyber2000fb_hw_init(void)
cyber2000_grphw(igs_regs[i], igs_regs[i+1]);
}
+static unsigned short device_ids[] __initdata = {
+ PCI_DEVICE_ID_INTERG_2000,
+ PCI_DEVICE_ID_INTERG_2010,
+ PCI_DEVICE_ID_INTERG_5000
+};
+
/*
* Initialization
*/
@@ -1227,14 +1347,14 @@ int __init cyber2000fb_init(void)
struct pci_dev *dev;
u_int h_sync, v_sync;
u_long mmio_base, smem_base, smem_size;
- int err = 0;
+ int err = 0, i;
- dev = pci_find_device(PCI_VENDOR_ID_INTERG,
- PCI_DEVICE_ID_INTERG_2000, NULL);
-
- if (!dev)
+ for (i = 0; i < sizeof(device_ids) / sizeof(device_ids[0]); i++) {
dev = pci_find_device(PCI_VENDOR_ID_INTERG,
- PCI_DEVICE_ID_INTERG_2010, NULL);
+ device_ids[i], NULL);
+ if (dev)
+ break;
+ }
if (!dev)
return -ENXIO;
@@ -1243,6 +1363,7 @@ int __init cyber2000fb_init(void)
smem_base = dev->resource[0].start;
mmio_base = dev->resource[0].start + 0x00800000;
+ current_par.dev_id = dev->device;
/*
* Map in the registers
@@ -1266,12 +1387,15 @@ int __init cyber2000fb_init(void)
cyber2000_outb(0x08, 0x46e8);
/*
- * get the video RAM size from the VGA register.
+ * get the video RAM size and width from the VGA register.
* This should have been already initialised by the BIOS,
* but if it's garbage, claim default 1MB VRAM (woody)
*/
cyber2000_outb(0x72, 0x3ce);
- switch (cyber2000_inb(0x3cf) & 3) {
+ i = cyber2000_inb(0x3cf);
+ current_par.bus_64bit = i & 4;
+
+ switch (i & 3) {
case 2: smem_size = 0x00400000; break;
case 1: smem_size = 0x00200000; break;
default: smem_size = 0x00100000; break;
@@ -1294,7 +1418,7 @@ int __init cyber2000fb_init(void)
err = -ENOMEM;
goto release_smem_resource;
}
-current_par.screen_base += IO_FUDGE_FACTOR;
+
current_par.screen_size = smem_size;
current_par.screen_base_p = smem_base + 0x80000000;
current_par.regs_base_p = mmio_base + 0x80000000;
@@ -1369,7 +1493,6 @@ void cleanup_module(void)
/* Not reached because the usecount will never be
decremented to zero */
unregister_framebuffer(&fb_info);
- /* TODO: clean up ... */
iounmap(current_par.screen_base);
iounmap(CyberRegs);
diff --git a/drivers/video/cyber2000fb.h b/drivers/video/cyber2000fb.h
index 0fb1f596c..a0825f4a8 100644
--- a/drivers/video/cyber2000fb.h
+++ b/drivers/video/cyber2000fb.h
@@ -51,6 +51,8 @@ struct cyber2000fb_par {
signed int currcon;
char dev_name[32];
unsigned int initialised;
+ unsigned int dev_id;
+ unsigned int bus_64bit:1;
/*
* palette
@@ -82,6 +84,234 @@ struct cyber2000fb_par {
#define VISUALID_16M 4
#define VISUALID_32K 6
+#define K_CAP_X2_CTL1 0x49
+
+#define CAP_X_START 0x60
+#define CAP_X_END 0x62
+#define CAP_Y_START 0x64
+#define CAP_Y_END 0x66
+#define CAP_DDA_X_INIT 0x68
+#define CAP_DDA_X_INC 0x6a
+#define CAP_DDA_Y_INIT 0x6c
+#define CAP_DDA_Y_INC 0x6e
+
+#define EXT_FIFO_CTL 0x74
+
+#define CAP_PIP_X_START 0x80
+#define CAP_PIP_X_END 0x82
+#define CAP_PIP_Y_START 0x84
+#define CAP_PIP_Y_END 0x86
+
+#define CAP_NEW_CTL1 0x88
+
+#define CAP_NEW_CTL2 0x89
+
+#define CAP_MODE1 0xa4
+#define CAP_MODE1_8BIT 0x01 /* enable 8bit capture mode */
+#define CAP_MODE1_CCIR656 0x02 /* CCIR656 mode */
+#define CAP_MODE1_IGNOREVGT 0x04 /* ignore VGT */
+#define CAP_MODE1_ALTFIFO 0x10 /* use alternate FIFO for capture */
+#define CAP_MODE1_SWAPUV 0x20 /* swap UV bytes */
+#define CAP_MODE1_MIRRORY 0x40 /* mirror vertically */
+#define CAP_MODE1_MIRRORX 0x80 /* mirror horizontally */
+
+#define CAP_MODE2 0xa5
+
+#define Y_TV_CTL 0xae
+
+#define EXT_MEM_START 0xc0 /* ext start address 21 bits */
+#define HOR_PHASE_SHIFT 0xc2 /* high 3 bits */
+#define EXT_SRC_WIDTH 0xc3 /* ext offset phase 10 bits */
+#define EXT_SRC_HEIGHT 0xc4 /* high 6 bits */
+#define EXT_X_START 0xc5 /* ext->screen, 16 bits */
+#define EXT_X_END 0xc7 /* ext->screen, 16 bits */
+#define EXT_Y_START 0xc9 /* ext->screen, 16 bits */
+#define EXT_Y_END 0xcb /* ext->screen, 16 bits */
+#define EXT_SRC_WIN_WIDTH 0xcd /* 8 bits */
+#define EXT_COLOUR_COMPARE 0xce /* 24 bits */
+#define EXT_DDA_X_INIT 0xd1 /* ext->screen 16 bits */
+#define EXT_DDA_X_INC 0xd3 /* ext->screen 16 bits */
+#define EXT_DDA_Y_INIT 0xd5 /* ext->screen 16 bits */
+#define EXT_DDA_Y_INC 0xd7 /* ext->screen 16 bits */
+
+#define VID_FIFO_CTL 0xd9
+
+#define VID_CAP_VFC 0xdb
+#define VID_CAP_VFC_YUV422 0x00 /* formats - does this cause conversion? */
+#define VID_CAP_VFC_RGB555 0x01
+#define VID_CAP_VFC_RGB565 0x02
+#define VID_CAP_VFC_RGB888_24 0x03
+#define VID_CAP_VFC_RGB888_32 0x04
+#define VID_CAP_VFC_DUP_PIX_ZOON 0x08 /* duplicate pixel zoom */
+#define VID_CAP_VFC_MOD_3RD_PIX 0x20 /* modify 3rd duplicated pixel */
+#define VID_CAP_VFC_DBL_H_PIX 0x40 /* double horiz pixels */
+#define VID_CAP_VFC_UV128 0x80 /* UV data offset by 128 */
+
+#define VID_DISP_CTL1 0xdc
+#define VID_DISP_CTL1_INTRAM 0x01 /* video pixels go to internal RAM */
+#define VID_DISP_CTL1_IGNORE_CCOMP 0x02 /* ignore colour compare registers */
+#define VID_DISP_CTL1_NOCLIP 0x04 /* do not clip to 16235,16240 */
+#define VID_DISP_CTL1_UV_AVG 0x08 /* U/V data is averaged */
+#define VID_DISP_CTL1_Y128 0x10 /* Y data offset by 128 */
+#define VID_DISP_CTL1_VINTERPOL_OFF 0x20 /* vertical interpolation off */
+#define VID_DISP_CTL1_VID_OUT_WIN_FULL 0x40 /* video out window full */
+#define VID_DISP_CTL1_ENABLE_VID_WINDOW 0x80 /* enable video window */
+
+#define VID_FIFO_CTL1 0xdd
+
+#define VFAC_CTL1 0xe8
+#define VFAC_CTL1_CAPTURE 0x01 /* capture enable */
+#define VFAC_CTL1_VFAC_ENABLE 0x02 /* vfac enable */
+#define VFAC_CTL1_FREEZE_CAPTURE 0x04 /* freeze capture */
+#define VFAC_CTL1_FREEZE_CAPTURE_SYNC 0x08 /* sync freeze capture */
+#define VFAC_CTL1_VALIDFRAME_SRC 0x10 /* select valid frame source */
+#define VFAC_CTL1_PHILIPS 0x40 /* select Philips mode */
+#define VFAC_CTL1_MODVINTERPOLCLK 0x80 /* modify vertical interpolation clocl */
+
+#define VFAC_CTL2 0xe9
+#define VFAC_CTL2_INVERT_VIDDATAVALID 0x01 /* invert video data valid */
+#define VFAC_CTL2_INVERT_GRAPHREADY 0x02 /* invert graphic ready output sig */
+#define VFAC_CTL2_INVERT_DATACLK 0x04 /* invert data clock signal */
+#define VFAC_CTL2_INVERT_HSYNC 0x08 /* invert hsync input */
+#define VFAC_CTL2_INVERT_VSYNC 0x10 /* invert vsync input */
+#define VFAC_CTL2_INVERT_FRAME 0x20 /* invert frame odd/even input */
+#define VFAC_CTL2_INVERT_BLANK 0x40 /* invert blank output */
+#define VFAC_CTL2_INVERT_OVSYNC 0x80 /* invert other vsync input */
+
+#define VFAC_CTL3 0xea
+#define VFAC_CTL3_CAP_IRQ 0x40 /* enable capture interrupt */
+
+#define CAP_MEM_START 0xeb /* 18 bits */
+#define CAP_MAP_WIDTH 0xed /* high 6 bits */
+#define CAP_PITCH 0xee /* 8 bits */
+
+#define CAP_CTL_MISC 0xef
+#define CAP_CTL_MISC_HDIV 0x01
+#define CAP_CTL_MISC_HDIV4 0x02
+#define CAP_CTL_MISC_ODDEVEN 0x04
+#define CAP_CTL_MISC_HSYNCDIV2 0x08
+#define CAP_CTL_MISC_SYNCTZHIGH 0x10
+#define CAP_CTL_MISC_SYNCTZOR 0x20
+#define CAP_CTL_MISC_DISPUSED 0x80
+
+#define REG_BANK 0xfa
+#define REG_BANK_Y 0x01
+#define REG_BANK_K 0x05
+
+#define K_CAP_X2_CTL1 0x49
+
+#define CAP_X_START 0x60
+#define CAP_X_END 0x62
+#define CAP_Y_START 0x64
+#define CAP_Y_END 0x66
+#define CAP_DDA_X_INIT 0x68
+#define CAP_DDA_X_INC 0x6a
+#define CAP_DDA_Y_INIT 0x6c
+#define CAP_DDA_Y_INC 0x6e
+
+#define EXT_FIFO_CTL 0x74
+
+#define CAP_PIP_X_START 0x80
+#define CAP_PIP_X_END 0x82
+#define CAP_PIP_Y_START 0x84
+#define CAP_PIP_Y_END 0x86
+
+#define CAP_NEW_CTL1 0x88
+
+#define CAP_NEW_CTL2 0x89
+
+#define CAP_MODE1 0xa4
+#define CAP_MODE1_8BIT 0x01 /* enable 8bit capture mode */
+#define CAP_MODE1_CCIR656 0x02 /* CCIR656 mode */
+#define CAP_MODE1_IGNOREVGT 0x04 /* ignore VGT */
+#define CAP_MODE1_ALTFIFO 0x10 /* use alternate FIFO for capture */
+#define CAP_MODE1_SWAPUV 0x20 /* swap UV bytes */
+#define CAP_MODE1_MIRRORY 0x40 /* mirror vertically */
+#define CAP_MODE1_MIRRORX 0x80 /* mirror horizontally */
+
+#define CAP_MODE2 0xa5
+
+#define Y_TV_CTL 0xae
+
+#define EXT_MEM_START 0xc0 /* ext start address 21 bits */
+#define HOR_PHASE_SHIFT 0xc2 /* high 3 bits */
+#define EXT_SRC_WIDTH 0xc3 /* ext offset phase 10 bits */
+#define EXT_SRC_HEIGHT 0xc4 /* high 6 bits */
+#define EXT_X_START 0xc5 /* ext->screen, 16 bits */
+#define EXT_X_END 0xc7 /* ext->screen, 16 bits */
+#define EXT_Y_START 0xc9 /* ext->screen, 16 bits */
+#define EXT_Y_END 0xcb /* ext->screen, 16 bits */
+#define EXT_SRC_WIN_WIDTH 0xcd /* 8 bits */
+#define EXT_COLOUR_COMPARE 0xce /* 24 bits */
+#define EXT_DDA_X_INIT 0xd1 /* ext->screen 16 bits */
+#define EXT_DDA_X_INC 0xd3 /* ext->screen 16 bits */
+#define EXT_DDA_Y_INIT 0xd5 /* ext->screen 16 bits */
+#define EXT_DDA_Y_INC 0xd7 /* ext->screen 16 bits */
+
+#define VID_FIFO_CTL 0xd9
+
+#define VID_CAP_VFC 0xdb
+#define VID_CAP_VFC_YUV422 0x00 /* formats - does this cause conversion? */
+#define VID_CAP_VFC_RGB555 0x01
+#define VID_CAP_VFC_RGB565 0x02
+#define VID_CAP_VFC_RGB888_24 0x03
+#define VID_CAP_VFC_RGB888_32 0x04
+#define VID_CAP_VFC_DUP_PIX_ZOON 0x08 /* duplicate pixel zoom */
+#define VID_CAP_VFC_MOD_3RD_PIX 0x20 /* modify 3rd duplicated pixel */
+#define VID_CAP_VFC_DBL_H_PIX 0x40 /* double horiz pixels */
+#define VID_CAP_VFC_UV128 0x80 /* UV data offset by 128 */
+
+#define VID_DISP_CTL1 0xdc
+#define VID_DISP_CTL1_INTRAM 0x01 /* video pixels go to internal RAM */
+#define VID_DISP_CTL1_IGNORE_CCOMP 0x02 /* ignore colour compare registers */
+#define VID_DISP_CTL1_NOCLIP 0x04 /* do not clip to 16235,16240 */
+#define VID_DISP_CTL1_UV_AVG 0x08 /* U/V data is averaged */
+#define VID_DISP_CTL1_Y128 0x10 /* Y data offset by 128 */
+#define VID_DISP_CTL1_VINTERPOL_OFF 0x20 /* vertical interpolation off */
+#define VID_DISP_CTL1_VID_OUT_WIN_FULL 0x40 /* video out window full */
+#define VID_DISP_CTL1_ENABLE_VID_WINDOW 0x80 /* enable video window */
+
+#define VID_FIFO_CTL1 0xdd
+
+#define VFAC_CTL1 0xe8
+#define VFAC_CTL1_CAPTURE 0x01 /* capture enable */
+#define VFAC_CTL1_VFAC_ENABLE 0x02 /* vfac enable */
+#define VFAC_CTL1_FREEZE_CAPTURE 0x04 /* freeze capture */
+#define VFAC_CTL1_FREEZE_CAPTURE_SYNC 0x08 /* sync freeze capture */
+#define VFAC_CTL1_VALIDFRAME_SRC 0x10 /* select valid frame source */
+#define VFAC_CTL1_PHILIPS 0x40 /* select Philips mode */
+#define VFAC_CTL1_MODVINTERPOLCLK 0x80 /* modify vertical interpolation clocl */
+
+#define VFAC_CTL2 0xe9
+#define VFAC_CTL2_INVERT_VIDDATAVALID 0x01 /* invert video data valid */
+#define VFAC_CTL2_INVERT_GRAPHREADY 0x02 /* invert graphic ready output sig */
+#define VFAC_CTL2_INVERT_DATACLK 0x04 /* invert data clock signal */
+#define VFAC_CTL2_INVERT_HSYNC 0x08 /* invert hsync input */
+#define VFAC_CTL2_INVERT_VSYNC 0x10 /* invert vsync input */
+#define VFAC_CTL2_INVERT_FRAME 0x20 /* invert frame odd/even input */
+#define VFAC_CTL2_INVERT_BLANK 0x40 /* invert blank output */
+#define VFAC_CTL2_INVERT_OVSYNC 0x80 /* invert other vsync input */
+
+#define VFAC_CTL3 0xea
+
+#define CAP_MEM_START 0xeb /* 18 bits */
+#define CAP_MAP_WIDTH 0xed /* high 6 bits */
+#define CAP_PITCH 0xee /* 8 bits */
+
+#define CAP_CTL_MISC 0xef
+#define CAP_CTL_MISC_HDIV 0x01
+#define CAP_CTL_MISC_HDIV4 0x02
+#define CAP_CTL_MISC_ODDEVEN 0x04
+#define CAP_CTL_MISC_HSYNCDIV2 0x08
+#define CAP_CTL_MISC_SYNCTZHIGH 0x10
+#define CAP_CTL_MISC_SYNCTZOR 0x20
+#define CAP_CTL_MISC_DISPUSED 0x80
+
+#define REG_BANK 0xfa
+#define REG_BANK_Y 0x01
+#define REG_BANK_K 0x05
+
+
#define CO_CMD_L_PATTERN_FGCOL 0x8000
#define CO_CMD_L_INC_LEFT 0x0004
#define CO_CMD_L_INC_UP 0x0002
@@ -102,3 +332,18 @@ struct cyber2000fb_par {
#define CO_REG_SRC_PTR 0xbf170
#define CO_REG_DEST_PTR 0xbf178
#define CO_REG_DEST_WIDTH 0xbf218
+
+struct cyberpro_info {
+ unsigned char *regs;
+ char *fb;
+ char dev_name[32];
+ unsigned int fb_size;
+};
+
+/*
+ * Note! Writing to the Cyber20x0 registers from an interrupt
+ * routine is definitely a bad idea atm.
+ */
+int cyber2000fb_attach(struct cyberpro_info *info);
+void cyber2000fb_detach(void);
+
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c
index c8a550eb8..3730695dd 100644
--- a/drivers/video/dnfb.c
+++ b/drivers/video/dnfb.c
@@ -14,6 +14,7 @@
#include <linux/fb.h>
#include <linux/module.h>
+#include <video/fbcon.h>
#include <video/fbcon-mfb.h>
diff --git a/drivers/video/fbcon.c b/drivers/video/fbcon.c
index 77336e223..dfb019fdd 100644
--- a/drivers/video/fbcon.c
+++ b/drivers/video/fbcon.c
@@ -112,10 +112,11 @@
#define LOGO_LINE (LOGO_W/8)
struct display fb_display[MAX_NR_CONSOLES];
+char con2fb_map[MAX_NR_CONSOLES];
static int logo_lines;
static int logo_shown = -1;
/* Software scrollback */
-extern int fbcon_softback_size;
+int fbcon_softback_size = 32768;
static unsigned long softback_buf, softback_curr;
static unsigned long softback_in;
static unsigned long softback_top, softback_end;
@@ -240,6 +241,84 @@ static void cursor_timer_handler(unsigned long dev_addr)
add_timer(&cursor_timer);
}
+int PROC_CONSOLE(const struct fb_info *info)
+{
+ int fgc;
+
+ if (info->display_fg != NULL)
+ fgc = info->display_fg->vc_num;
+ else
+ return -1;
+
+ if (!current->tty)
+ return fgc;
+
+ if (current->tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
+ /* XXX Should report error here? */
+ return fgc;
+
+ if (MINOR(current->tty->device) < 1)
+ return fgc;
+
+ return MINOR(current->tty->device) - 1;
+}
+
+int set_all_vcs(int fbidx, struct fb_ops *fb, struct fb_var_screeninfo *var,
+ struct fb_info *info)
+{
+ int unit, err;
+
+ var->activate |= FB_ACTIVATE_TEST;
+ err = fb->fb_set_var(var, PROC_CONSOLE(info), info);
+ var->activate &= ~FB_ACTIVATE_TEST;
+ if (err)
+ return err;
+ for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
+ if (fb_display[unit].conp && con2fb_map[unit] == fbidx)
+ fb->fb_set_var(var, unit, info);
+ return 0;
+}
+
+void set_con2fb_map(int unit, int newidx)
+{
+ int oldidx = con2fb_map[unit];
+ struct fb_info *oldfb, *newfb;
+ struct vc_data *conp;
+ char *fontdata;
+ unsigned short fontwidth, fontheight, fontwidthlog, fontheightlog;
+ int userfont;
+
+ if (newidx != con2fb_map[unit]) {
+ oldfb = registered_fb[oldidx];
+ newfb = registered_fb[newidx];
+ if (newfb->fbops->fb_open(newfb,0))
+ return;
+ oldfb->fbops->fb_release(oldfb,0);
+ conp = fb_display[unit].conp;
+ fontdata = fb_display[unit].fontdata;
+ fontwidth = fb_display[unit]._fontwidth;
+ fontheight = fb_display[unit]._fontheight;
+ fontwidthlog = fb_display[unit]._fontwidthlog;
+ fontheightlog = fb_display[unit]._fontheightlog;
+ userfont = fb_display[unit].userfont;
+ con2fb_map[unit] = newidx;
+ fb_display[unit] = *(newfb->disp);
+ fb_display[unit].conp = conp;
+ fb_display[unit].fontdata = fontdata;
+ fb_display[unit]._fontwidth = fontwidth;
+ fb_display[unit]._fontheight = fontheight;
+ fb_display[unit]._fontwidthlog = fontwidthlog;
+ fb_display[unit]._fontheightlog = fontheightlog;
+ fb_display[unit].userfont = userfont;
+ fb_display[unit].fb_info = newfb;
+ if (!newfb->changevar)
+ newfb->changevar = oldfb->changevar;
+ /* tell console var has changed */
+ if (newfb->changevar)
+ newfb->changevar(unit);
+ }
+}
+
/*
* Low Level Operations
*/
diff --git a/drivers/video/fbgen.c b/drivers/video/fbgen.c
index ff14807a0..7cf44a5ec 100644
--- a/drivers/video/fbgen.c
+++ b/drivers/video/fbgen.c
@@ -17,6 +17,7 @@
#include <asm/uaccess.h>
#include <asm/io.h>
+#include <video/fbcon.h>
static int currcon = 0;
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 4bd6e8f7b..152115043 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -20,7 +20,6 @@
#include <linux/mman.h>
#include <linux/tty.h>
#include <linux/console.h>
-#include <linux/console_struct.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#ifdef CONFIG_KMOD
@@ -30,15 +29,14 @@
#if defined(__mc68000__) || defined(CONFIG_APUS)
#include <asm/setup.h>
#endif
-#ifdef __powerpc__
+
#include <asm/io.h>
-#endif
#include <asm/uaccess.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <linux/fb.h>
-
+#include <video/fbcon.h>
/*
* Frame buffer device initialization and setup routines
@@ -228,36 +226,12 @@ static int num_pref_init_funcs __initdata = 0;
struct fb_info *registered_fb[FB_MAX];
int num_registered_fb = 0;
-int fbcon_softback_size = 32768;
-
-char con2fb_map[MAX_NR_CONSOLES];
+extern int fbcon_softback_size;
static int first_fb_vc = 0;
static int last_fb_vc = MAX_NR_CONSOLES-1;
static int fbcon_is_default = 1;
-static int PROC_CONSOLE(const struct fb_info *info)
-{
- int fgc;
-
- if (info->display_fg != NULL)
- fgc = info->display_fg->vc_num;
- else
- return -1;
-
- if (!current->tty)
- return fgc;
-
- if (current->tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
- /* XXX Should report error here? */
- return fgc;
-
- if (MINOR(current->tty->device) < 1)
- return fgc;
-
- return MINOR(current->tty->device) - 1;
-}
-
static int fbmem_read_proc(char *buf, char **start, off_t offset,
int len, int *eof, void *private)
{
@@ -321,63 +295,6 @@ fb_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
return copy_size;
}
-
-static int set_all_vcs(int fbidx, struct fb_ops *fb,
- struct fb_var_screeninfo *var, struct fb_info *info)
-{
- int unit, err;
-
- var->activate |= FB_ACTIVATE_TEST;
- err = fb->fb_set_var(var, PROC_CONSOLE(info), info);
- var->activate &= ~FB_ACTIVATE_TEST;
- if (err)
- return err;
- for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
- if (fb_display[unit].conp && con2fb_map[unit] == fbidx)
- fb->fb_set_var(var, unit, info);
- return 0;
-}
-
-static void set_con2fb_map(int unit, int newidx)
-{
- int oldidx = con2fb_map[unit];
- struct fb_info *oldfb, *newfb;
- struct vc_data *conp;
- char *fontdata;
- unsigned short fontwidth, fontheight, fontwidthlog, fontheightlog;
- int userfont;
-
- if (newidx != con2fb_map[unit]) {
- oldfb = registered_fb[oldidx];
- newfb = registered_fb[newidx];
- if (newfb->fbops->fb_open(newfb,0))
- return;
- oldfb->fbops->fb_release(oldfb,0);
- conp = fb_display[unit].conp;
- fontdata = fb_display[unit].fontdata;
- fontwidth = fb_display[unit]._fontwidth;
- fontheight = fb_display[unit]._fontheight;
- fontwidthlog = fb_display[unit]._fontwidthlog;
- fontheightlog = fb_display[unit]._fontheightlog;
- userfont = fb_display[unit].userfont;
- con2fb_map[unit] = newidx;
- fb_display[unit] = *(newfb->disp);
- fb_display[unit].conp = conp;
- fb_display[unit].fontdata = fontdata;
- fb_display[unit]._fontwidth = fontwidth;
- fb_display[unit]._fontheight = fontheight;
- fb_display[unit]._fontwidthlog = fontwidthlog;
- fb_display[unit]._fontheightlog = fontheightlog;
- fb_display[unit].userfont = userfont;
- fb_display[unit].fb_info = newfb;
- if (!newfb->changevar)
- newfb->changevar = oldfb->changevar;
- /* tell console var has changed */
- if (newfb->changevar)
- newfb->changevar(unit);
- }
-}
-
#ifdef CONFIG_KMOD
static void try_to_load(int fb)
{
@@ -674,39 +591,6 @@ fbmem_init(void)
fb_drivers[i].init();
}
-
-int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal,
- const struct fb_info *fb_info)
-{
-#if 0
- /*
- * long long divisions .... $#%%#$
- */
- unsigned long long hpicos, vpicos;
- const unsigned long long _1e12 = 1000000000000ULL;
- const struct fb_monspecs *monspecs = &fb_info->monspecs;
-
- hpicos = (unsigned long long)htotal*(unsigned long long)pixclock;
- vpicos = (unsigned long long)vtotal*(unsigned long long)hpicos;
- if (!vpicos)
- return 0;
-
- if (monspecs->hfmin == 0)
- return 1;
-
- if (hpicos*monspecs->hfmin > _1e12 || hpicos*monspecs->hfmax < _1e12 ||
- vpicos*monspecs->vfmin > _1e12 || vpicos*monspecs->vfmax < _1e12)
- return 0;
-#endif
- return 1;
-}
-
-int fbmon_dpms(const struct fb_info *fb_info)
-{
- return fb_info->monspecs.dpms;
-}
-
-
/*
* Command line options
*/
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
new file mode 100644
index 000000000..38fb6adc9
--- /dev/null
+++ b/drivers/video/fbmon.c
@@ -0,0 +1,74 @@
+/*
+ * linux/drivers/video/fbmon.c
+ *
+ * Copyright (C) 1999 James Simmons
+ *
+ * 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.
+ *
+ * Notes:
+ * This code handles the different types of monitors that are out their.
+ * Most video cards for example can support a mode like 800x600 but fix
+ * frequency monitors can't. So the code here checks if the monitor can
+ * support the mode as well as the card can. Fbmonospecs takes on
+ * different meaning with different types of monitors. For multifrequency
+ * monitors fbmonospecs represents the range of frequencies the monitor
+ * can support. Only one fbmonospec needs to be allocated. The fbmonospecs
+ * pointer in fb_info points to this one. If you specific a mode that has
+ * timing greater than the allowed range then setting the video mode will
+ * fail. With multifrequency monitors you can set any mode you like as long
+ * as you have a programmable clock on the video card.
+ * With fixed frequency monitors you have only a SET of very narrow
+ * allowed frequency ranges. So for a fixed fequency monitor you have a
+ * array of fbmonospecs. The fbmonospecs in fb_info represents the
+ * monitor frequency for the CURRENT mode. If you change the mode and ask
+ * for fbmonospecs you will NOT get the same values as before. Note this
+ * is not true for multifrequency monitors where you do get the same
+ * fbmonospecs each time. Also the values in each fbmonospecs represent the
+ * very narrow frequency band for range. Well you can't have exactly the
+ * same frequencies from fixed monitor. So some tolerance is excepted.
+ * By DEFAULT all monitors are assumed fixed frequency since they are so
+ * easy to fry or screw up a mode with. Just try setting a 800x600 mode on
+ * one. After you boot you can run a simple program the tells what kind of
+ * monitor you have. If you have a multifrequency monitor then you can set
+ * any mode size you like as long as your video card has a programmable clock.
+ * By default also besides assuming you have a fixed frequency monitor it
+ * assumes the monitor only supports lower modes. This way for example you
+ * can't set a 1280x1024 mode on a fixed frequency monitor that can only
+ * support up to 1024x768.
+ *
+ */
+#include <linux/tty.h>
+#include <linux/fb.h>
+
+int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal,
+ const struct fb_info *fb_info)
+{
+#if 0
+ /*
+ * long long divisions .... $#%%#$
+ */
+ unsigned long long hpicos, vpicos;
+ const unsigned long long _1e12 = 1000000000000ULL;
+ const struct fb_monspecs *monspecs = &fb_info->monspecs;
+
+ hpicos = (unsigned long long)htotal*(unsigned long long)pixclock;
+ vpicos = (unsigned long long)vtotal*(unsigned long long)hpicos;
+ if (!vpicos)
+ return 0;
+
+ if (monspecs->hfmin == 0)
+ return 1;
+
+ if (hpicos*monspecs->hfmin > _1e12 || hpicos*monspecs->hfmax < _1e12 ||
+ vpicos*monspecs->vfmin > _1e12 || vpicos*monspecs->vfmax < _1e12)
+ return 0;
+#endif
+ return 1;
+}
+
+int fbmon_dpms(const struct fb_info *fb_info)
+{
+ return fb_info->monspecs.dpms;
+}
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c
index 27a383ece..5314ece8b 100644
--- a/drivers/video/hpfb.c
+++ b/drivers/video/hpfb.c
@@ -22,6 +22,7 @@
#include <asm/blinken.h>
#include <asm/hwtest.h>
+#include <video/fbcon.h>
#include <video/fbcon-mfb.h>
#include <video/fbcon-cfb2.h>
#include <video/fbcon-cfb4.h>
diff --git a/drivers/video/matroxfb.c b/drivers/video/matroxfb.c
index 4b0ffb0ad..bb2863b5d 100644
--- a/drivers/video/matroxfb.c
+++ b/drivers/video/matroxfb.c
@@ -587,7 +587,6 @@ struct matrox_fb_info {
int text_type_aux;
int video64bits;
unsigned int vgastep;
- unsigned int vgastepdisp;
unsigned int textmode;
unsigned int textstep;
unsigned int textvram; /* character cells */
@@ -5490,10 +5489,11 @@ static struct video_board vbG400 __initdata = {0x2000000, 0x1000000, FB_ACCEL
#define DEVF_DMA 0x80
#define DEVF_SUPPORT32MB 0x100
#define DEVF_ANY_VXRES 0x200
+#define DEVF_TEXT16B 0x400
#define DEVF_G100 (DEVF_VIDEO64BIT | DEVF_SWAPS | DEVF_CROSS4MB | DEVF_DDC_8_2) /* no doc, no vxres... */
#define DEVF_G200 (DEVF_VIDEO64BIT | DEVF_SWAPS | DEVF_CROSS4MB | DEVF_DDC_8_2 | DEVF_ANY_VXRES)
-#define DEVF_G400 (DEVF_VIDEO64BIT | DEVF_SWAPS | DEVF_CROSS4MB | DEVF_DDC_8_2 | DEVF_ANY_VXRES | DEVF_SUPPORT32MB)
+#define DEVF_G400 (DEVF_VIDEO64BIT | DEVF_SWAPS | DEVF_CROSS4MB | DEVF_DDC_8_2 | DEVF_ANY_VXRES | DEVF_SUPPORT32MB | DEVF_TEXT16B)
static struct board {
unsigned short vendor, device, rev, svid, sid;
@@ -5666,12 +5666,14 @@ static int __init initMatrox2(WPMINFO struct display* d, struct board* b){
if (b->flags & DEVF_TEXT4B) {
ACCESS_FBINFO(devflags.vgastep) = 4;
ACCESS_FBINFO(devflags.textmode) = 4;
- ACCESS_FBINFO(devflags.vgastepdisp) = 16;
+ ACCESS_FBINFO(devflags.text_type_aux) = FB_AUX_TEXT_MGA_STEP16;
+ } else if (b->flags & DEVF_TEXT16B) {
+ ACCESS_FBINFO(devflags.vgastep) = 16;
+ ACCESS_FBINFO(devflags.textmode) = 1;
ACCESS_FBINFO(devflags.text_type_aux) = FB_AUX_TEXT_MGA_STEP16;
} else {
ACCESS_FBINFO(devflags.vgastep) = 8;
ACCESS_FBINFO(devflags.textmode) = 1;
- ACCESS_FBINFO(devflags.vgastepdisp) = 64;
ACCESS_FBINFO(devflags.text_type_aux) = FB_AUX_TEXT_MGA_STEP8;
}
#ifdef CONFIG_FB_MATROX_32MB
diff --git a/drivers/video/rivafb.c b/drivers/video/rivafb.c
index 134d85d17..8650c64db 100644
--- a/drivers/video/rivafb.c
+++ b/drivers/video/rivafb.c
@@ -20,6 +20,7 @@
/* version number of this driver */
#define RIVAFB_VERSION "0.6.5"
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
index a8c985035..4ee617666 100644
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -937,7 +937,7 @@ static int tgafb_blank(int blank, struct fb_info_gen *info)
static void tgafb_set_disp(const void *fb_par, struct display *disp,
struct fb_info_gen *info)
{
- disp->screen_base = ioremap(fb_info.tga_fb_base);
+ disp->screen_base = ioremap(fb_info.tga_fb_base, 0);
switch (fb_info.tga_type) {
#ifdef FBCON_HAS_CFB8
case 0: /* 8-plane */