Commit 143b8e9d authored by James Simmons's avatar James Simmons

Cleaned up and moved all the graphics related code inf drivers/video and move...

Cleaned up and moved all the graphics related code inf drivers/video and move the console display related stuff into lower directory called console.
parent 007376bd
......@@ -365,7 +365,7 @@ KAO -->
!Edrivers/video/fbmem.c
</sect1>
<sect1><title>Frame Buffer Console</title>
!Edrivers/video/fbcon.c
!Edrivers/video/console/fbcon.c
</sect1>
<sect1><title>Frame Buffer Colormap</title>
!Edrivers/video/fbcmap.c
......@@ -385,7 +385,7 @@ KAO -->
!Idrivers/video/macmodes.c
</sect1>
<sect1><title>Frame Buffer Fonts</title>
!Idrivers/video/fonts.c
!Idrivers/video/console/fonts.c
</sect1>
</chapter>
<!-- Needs ksyms to list additional exported symbols, but no specific doc.
......
......@@ -668,7 +668,7 @@ defconfig:
CLEAN_FILES += \
include/linux/compile.h \
vmlinux System.map \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/consolemap_deftbl.c drivers/video/console/promcon_tbl.c \
drivers/char/conmakehash \
drivers/char/drm/*-mod.c \
drivers/char/defkeymap.c drivers/char/qtronixmap.c \
......
......@@ -348,22 +348,7 @@ source drivers/media/Config.in
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
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
source drivers/video/Config.in
if [ "$CONFIG_FB" = "y" ]; then
define_bool CONFIG_PCI_CONSOLE y
fi
endmenu
fi
source drivers/video/Config.in
mainmenu_option next_comment
comment 'Sound'
......
......@@ -498,15 +498,7 @@ source drivers/media/Config.in
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
if [ "$CONFIG_ARCH_ACORN" != "y" -a "$CONFIG_ARCH_EBSA110" != "y" ]; then
bool 'VGA text console' CONFIG_VGA_CONSOLE
fi
source drivers/video/Config.in
endmenu
fi
source drivers/video/Config.in
if [ "$CONFIG_ARCH_ACORN" = "y" -o \
"$CONFIG_ARCH_CLPS7500" = "y" -o \
......
......@@ -417,17 +417,7 @@ source drivers/media/Config.in
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
bool 'VGA text console' CONFIG_VGA_CONSOLE
bool 'Video mode selection support' CONFIG_VIDEO_SELECT
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
source drivers/video/Config.in
fi
endmenu
fi
source drivers/video/Config.in
mainmenu_option next_comment
comment 'Sound'
......
......@@ -229,16 +229,7 @@ fi # HP_SIM
source fs/Config.in
if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
bool 'VGA text console' CONFIG_VGA_CONSOLE
source drivers/video/Config.in
if [ "$CONFIG_FB" = "y" ]; then
define_bool CONFIG_PCI_CONSOLE y
fi
endmenu
fi
mainmenu_option next_comment
comment 'Sound'
......
......@@ -527,12 +527,7 @@ endmenu
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
source drivers/video/Config.in
endmenu
fi
source drivers/video/Config.in
mainmenu_option next_comment
comment 'Kernel hacking'
......
......@@ -449,16 +449,7 @@ fi
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
bool 'VGA text console' CONFIG_VGA_CONSOLE
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
source drivers/video/Config.in
fi
endmenu
fi
source drivers/video/Config.in
if [ "$CONFIG_DECSTATION" != "y" ]; then
mainmenu_option next_comment
......
......@@ -199,20 +199,7 @@ source drivers/media/Config.in
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
source drivers/video/Config.in
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
endmenu
fi
source drivers/video/Config.in
if [ "$CONFIG_PROC_FS" = "y" ]; then
define_bool CONFIG_KCORE_ELF y
......
......@@ -168,24 +168,7 @@ if [ "$CONFIG_SOUND" != "n" ]; then
fi
endmenu
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
source drivers/video/Config.in
# 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
endmenu
fi
# endmenu
source drivers/video/Config.in
mainmenu_option next_comment
comment 'Kernel hacking'
......
......@@ -459,14 +459,7 @@ source net/irda/Config.in
source drivers/isdn/Config.in
mainmenu_option next_comment
comment 'Console drivers'
if [ "$CONFIG_4xx" != "y" -a "$CONFIG_8xx" != "y" ]; then
bool 'VGA text console' CONFIG_VGA_CONSOLE
fi
source drivers/video/Config.in
endmenu
if [ "$CONFIG_PPC_ISERIES" = "y" ]; then
mainmenu_option next_comment
......
......@@ -151,12 +151,7 @@ source drivers/media/Config.in
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
source drivers/video/Config.in
endmenu
fi
source drivers/video/Config.in
mainmenu_option next_comment
comment 'Sound'
......
......@@ -336,18 +336,7 @@ source fs/Config.in
source drivers/media/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
bool 'VGA text console' CONFIG_VGA_CONSOLE
bool 'Video mode selection support' CONFIG_VIDEO_SELECT
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
source drivers/video/Config.in
fi
endmenu
fi
source drivers/video/Config.in
mainmenu_option next_comment
comment 'Sound'
......
......@@ -60,14 +60,7 @@ source drivers/parport/Config.in
dep_tristate ' Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT
endmenu
mainmenu_option next_comment
comment 'Console drivers'
bool 'PROM console' CONFIG_PROM_CONSOLE
if [ "$CONFIG_PROM_CONSOLE" != "y" ]; then
define_bool CONFIG_DUMMY_CONSOLE y
fi
source drivers/video/Config.in
endmenu
source drivers/mtd/Config.in
......
......@@ -74,11 +74,7 @@ if [ "$CONFIG_PCI" = "y" ]; then
fi
endmenu
mainmenu_option next_comment
comment 'Console drivers'
bool 'PROM console' CONFIG_PROM_CONSOLE
source drivers/video/Config.in
endmenu
source drivers/serial/Config.in
source drivers/sbus/char/Config.in
......
......@@ -188,17 +188,7 @@ source drivers/media/Config.in
source fs/Config.in
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
bool 'VGA text console' CONFIG_VGA_CONSOLE
bool 'Video mode selection support' CONFIG_VIDEO_SELECT
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
source drivers/video/Config.in
fi
endmenu
fi
source drivers/video/Config.in
mainmenu_option next_comment
comment 'Sound'
......
......@@ -17,7 +17,7 @@ obj-$(CONFIG_FC4) += fc4/
obj-$(CONFIG_SCSI) += scsi/
obj-$(CONFIG_FUSION) += message/
obj-$(CONFIG_IEEE1394) += ieee1394/
obj-y += cdrom/
obj-y += cdrom/ video/
obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_PCMCIA) += pcmcia/
obj-$(CONFIG_DIO) += dio/
......@@ -27,7 +27,6 @@ obj-$(CONFIG_ALL_PPC) += macintosh/
obj-$(CONFIG_MAC) += macintosh/
obj-$(CONFIG_PNP) += pnp/
obj-$(CONFIG_SGI) += sgi/
obj-$(CONFIG_VT) += video/
obj-$(CONFIG_PARIDE) += block/paride/
obj-$(CONFIG_TC) += tc/
obj-$(CONFIG_USB) += usb/
......
CONFIG_FB_SGIVW
SGI Visual Workstation support for framebuffer graphics.
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_FB
The frame buffer device provides an abstraction for the graphics
hardware. It represents the frame buffer of some video hardware and
......@@ -242,14 +229,6 @@ CONFIG_FB_VESA
You will get a boot time penguin logo at no additional cost. Please
read <file:Documentation/fb/vesafb.txt>. If unsure, say Y.
CONFIG_FBCON_VGA_PLANES
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_FB_VGA16
This is the frame buffer device driver for VGA 16 color graphic
cards. Say Y if you have such a card.
......@@ -280,58 +259,6 @@ CONFIG_FB_STI
Really old HP boxes may not have STI, and must use the PDC BIOS
console or the IODC BIOS.
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_FB_HGA
Say Y here if you have a Hercules mono graphics card.
......@@ -646,53 +573,3 @@ CONFIG_FB_SA1100
If you plan to use the LCD display with your SA-1100 system, say
Y here.
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_MFB
This is the low level frame buffer console driver for monochrome
(2 colors) packed pixels.
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.
......@@ -3,12 +3,11 @@
#
mainmenu_option next_comment
comment 'Frame-buffer support'
comment 'Graphics support'
bool 'Support for frame buffer devices ' CONFIG_FB
if [ "$CONFIG_FB" = "y" ]; then
define_bool CONFIG_DUMMY_CONSOLE y
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_PCI" = "y" ]; then
tristate ' Cirrus Logic support (EXPERIMENTAL)' CONFIG_FB_CLGEN
......@@ -78,7 +77,7 @@ if [ "$CONFIG_FB" = "y" ]; then
bool ' Chips 65550 display support' CONFIG_FB_CT65550
bool ' IMS Twin Turbo display support' CONFIG_FB_IMSTT
bool ' S3 Trio display support' CONFIG_FB_S3TRIO
tristate ' VGA 16-color graphics console' CONFIG_FB_VGA16
tristate ' VGA 16-color graphics support' CONFIG_FB_VGA16
fi
if [ "$CONFIG_PARISC" = "y" ]; then
bool ' Generic STI frame buffer device support' CONFIG_FB_STI
......@@ -95,9 +94,9 @@ if [ "$CONFIG_FB" = "y" ]; then
tristate ' TGA framebuffer support' CONFIG_FB_TGA
fi
if [ "$CONFIG_X86" = "y" ]; then
bool ' VESA VGA graphics console' CONFIG_FB_VESA
tristate ' VGA 16-color graphics console' CONFIG_FB_VGA16
tristate ' Hercules mono graphics console ' CONFIG_FB_HGA
bool ' VESA VGA graphics support' CONFIG_FB_VESA
tristate ' VGA 16-color graphics support' CONFIG_FB_VGA16
tristate ' Hercules mono graphics support ' CONFIG_FB_HGA
define_bool CONFIG_VIDEO_SELECT y
fi
if [ "$CONFIG_VISWS" = "y" ]; then
......@@ -214,138 +213,8 @@ if [ "$CONFIG_FB" = "y" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate ' Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)' CONFIG_FB_VIRTUAL
fi
bool ' Advanced low level driver options' CONFIG_FBCON_ADVANCED
if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then
tristate ' Monochrome support' CONFIG_FBCON_MFB
tristate ' 24 bpp packed pixels support' CONFIG_FBCON_CFB24
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 ' Atari interleaved bitplanes (16 planes) support' CONFIG_FBCON_IPLAN2P16
tristate ' VGA 16-color planar support' CONFIG_FBCON_VGA_PLANES
tristate ' HGA monochrome support ' CONFIG_FBCON_HGA
else
if [ "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_VOODOO1" = "y" -o \
"$CONFIG_FB_CLGEN" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \
"$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
"$CONFIG_FB_ATY128" = "y" -o "$CONFIG_FB_RADEON" = "y" ]; then
define_tristate CONFIG_FBCON_CFB24 y
else
if [ "$CONFIG_FB_CLGEN" = "m" -o "$CONFIG_FB_VOODOO1" = "m" -o \
"$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
"$CONFIG_FB_ATY128" = "m" -o "$CONFIG_FB_RADEON" = "m" -o \
"$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_PVR2" = "m" ]; then
define_tristate CONFIG_FBCON_CFB24 m
fi
fi
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" ]; 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" ]; 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
if [ "$CONFIG_FB_VGA16" = "y" ]; then
define_tristate CONFIG_FBCON_VGA_PLANES y
else
if [ "$CONFIG_FB_VGA16" = "m" ]; then
define_tristate CONFIG_FBCON_VGA_PLANES m
fi
fi
if [ "$CONFIG_FB_HGA" = "y" ]; then
define_tristate CONFIG_FBCON_HGA y
else
if [ "$CONFIG_FB_HGA" = "m" ]; then
define_tristate CONFIG_FBCON_HGA m
fi
fi
if [ "$CONFIG_FB_STI" = "y" ]; then
define_tristate CONFIG_FBCON_STI y
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
source drivers/video/console/Config.in
endmenu
......@@ -5,31 +5,12 @@
# 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 fbmon.o modedb.o fbgen.o \
fbcon-afb.o fbcon-ilbm.o fbcon-accel.o cyber2000fb.o \
fbcon-iplan2p2.o fbcon-iplan2p4.o fbcon-iplan2p8.o \
fbcon-vga-planes.o fbcon-vga8-planes.o fbcon-hga.o
export-objs := fbmem.o fbcmap.o fbmon.o modedb.o fbgen.o cyber2000fb.o
# Each configuration option enables a list of files.
obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o
obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o
obj-$(CONFIG_STI_CONSOLE) += sticon.o sticon-bmode.o sticore.o
obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
obj-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o
obj-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o
obj-$(CONFIG_FONT_8x8) += font_8x8.o
obj-$(CONFIG_FONT_8x16) += font_8x16.o
obj-$(CONFIG_FONT_6x11) += font_6x11.o
obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
obj-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
# Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbcon.o fonts.o fbgen.o
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbgen.o
# Only include macmodes.o if we have FB support and are PPC
ifeq ($(CONFIG_FB),y)
obj-$(CONFIG_PPC) += macmodes.o
......@@ -86,7 +67,7 @@ obj-$(CONFIG_FB_TX3912) += tx3912fb.o cfbfillrect.o cfbcopyarea.o cfbi
obj-$(CONFIG_FB_MATROX) += matrox/
obj-$(CONFIG_FB_RIVA) += riva/
obj-$(CONFIG_FB_SIS) += sis/
obj-$(CONFIG_FB_SIS) += sis/ cfbimgblt.o
obj-$(CONFIG_FB_ATY) += aty/ cfbimgblt.o
obj-$(CONFIG_FB_SUN3) += sun3fb.o
......@@ -99,21 +80,7 @@ obj-$(CONFIG_FB_E1355) += epson1355fb.o
obj-$(CONFIG_FB_PVR2) += pvr2fb.o
obj-$(CONFIG_FB_VOODOO1) += sstfb.o
# Generic Low Level Drivers
obj-$(CONFIG_FBCON_AFB) += fbcon-afb.o
obj-$(CONFIG_FBCON_ILBM) += fbcon-ilbm.o
obj-$(CONFIG_FBCON_IPLAN2P2) += fbcon-iplan2p2.o
obj-$(CONFIG_FBCON_IPLAN2P4) += fbcon-iplan2p4.o
obj-$(CONFIG_FBCON_IPLAN2P8) += fbcon-iplan2p8.o
obj-$(CONFIG_FBCON_HGA) += fbcon-hga.o
obj-$(CONFIG_FBCON_STI) += fbcon-sti.o
obj-$(CONFIG_FBCON_ACCEL) += fbcon-accel.o
obj-$(CONFIG_VT) += console/
include $(TOPDIR)/Rules.make
$(obj)/promcon_tbl.c: $(src)/prom.uni
$(objtree)/scripts/conmakehash $< | \
sed -e '/#include <[^>]*>/p' -e 's/types/init/' \
-e 's/dfont\(_uni.*\]\)/promfont\1 __initdata/' > $@
This diff is collapsed.
......@@ -38,9 +38,11 @@
void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
{
int x2, y2, lineincr, shift, shift_right, shift_left, old_dx, old_dy;
int x2, y2, lineincr, shift, shift_right, shift_left, old_dx,
old_dy;
int j, linesize = p->fix.line_length, bpl = sizeof(unsigned long);
unsigned long start_index, end_index, start_mask, end_mask, last, tmp;
unsigned long start_index, end_index, start_mask, end_mask, last,
tmp;
unsigned long *dst = NULL, *src = NULL;
char *src1, *dst1;
int height;
......@@ -84,10 +86,16 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
lineincr = linesize;
} else {
/* start at the bottom */
src1 = p->screen_base + (area->sy + area->height-1) * linesize
+ (((area->sx + area->width - 1) * p->var.bits_per_pixel) >> 3);
dst1 = p->screen_base + (area->dy + area->height-1) * linesize
+ (((area->dx + area->width - 1) * p->var.bits_per_pixel) >> 3);
src1 =
p->screen_base + (area->sy + area->height -
1) * linesize +
(((area->sx + area->width -
1) * p->var.bits_per_pixel) >> 3);
dst1 =
p->screen_base + (area->dy + area->height -
1) * linesize +
(((area->dx + area->width -
1) * p->var.bits_per_pixel) >> 3);
lineincr = -linesize;
}
......@@ -111,7 +119,6 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
n -= end_index;
}
n /= bpl;
if (n <= 0) {
if (start_mask) {
if (end_mask)
......@@ -148,16 +155,25 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
last = (FB_READ(src) & start_mask);
if (shift > 0)
FB_WRITE(FB_READ(dst) | (last >> shift_right), dst);
FB_WRITE(FB_READ(dst) |
(last >>
shift_right),
dst);
for (j = 0; j < n; j++) {
dst++;
tmp = FB_READ(src);
src++;
FB_WRITE((last << shift_left) | (tmp >> shift_right), dst);
FB_WRITE((last <<
shift_left) |
(tmp >>
shift_right),
dst);
last = tmp;
src++;
}
FB_WRITE(FB_READ(dst) | (last << shift_left), dst);
FB_WRITE(FB_READ(dst) |
(last << shift_left),
dst);
src1 += lineincr;
dst1 += lineincr;
} while (--height);
......@@ -172,16 +188,25 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
last = (FB_READ(src) & end_mask);
if (shift < 0)
FB_WRITE(FB_READ(dst) | (last >> shift_right), dst);
FB_WRITE(FB_READ(dst) |
(last >>
shift_right),
dst);
for (j = 0; j < n; j++) {
dst--;
tmp = FB_READ(src);
src--;
FB_WRITE((tmp << shift_left) | (last >> shift_right), dst);
FB_WRITE((tmp <<
shift_left) |
(last >>
shift_right),
dst);
last = tmp;
src--;
}
FB_WRITE(FB_READ(dst) | (last >> shift_right), dst);
FB_WRITE(FB_READ(dst) |
(last >> shift_right),
dst);
src1 += lineincr;
dst1 += lineincr;
} while (--height);
......@@ -191,20 +216,27 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
if (lineincr > 0) {
/* positive increment */
do {
dst = (unsigned long *) (dst1 - start_index);
src = (unsigned long *) (src1 - start_index);
dst =
(unsigned long *) (dst1 -
start_index);
src =
(unsigned long *) (src1 -
start_index);
if (start_mask)
FB_WRITE(FB_READ(src) | start_mask, dst);
FB_WRITE(FB_READ(src) |
start_mask, dst);
for (j = 0; j < n; j++) {
FB_WRITE(FB_READ(src), dst);
FB_WRITE(FB_READ(src),
dst);
dst++;
src++;
}
if (end_mask)
FB_WRITE(FB_READ(src) | end_mask, dst);
FB_WRITE(FB_READ(src) |
end_mask, dst);
src1 += lineincr;
dst1 += lineincr;
} while (--height);
......@@ -215,9 +247,11 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
src = (unsigned long *) src1;
if (start_mask)
FB_WRITE(FB_READ(src) | start_mask, dst);
FB_WRITE(FB_READ(src) |
start_mask, dst);
for (j = 0; j < n; j++) {
FB_WRITE(FB_READ(src), dst);
FB_WRITE(FB_READ(src),
dst);
dst--;
src--;
}
......@@ -226,5 +260,33 @@ void cfb_copyarea(struct fb_info *p, struct fb_copyarea *area)
} while (--height);
}
}
} else {
int n = ((area->width * p->var.bits_per_pixel) >> 3);
int n16 = (n >> 4) << 4;
int n_fract = n - n16;
int rows;
if (area->dy < area->sy
|| (area->dy == area->sy && area->dx < area->sx)) {
for (rows = height; rows--;) {
if (n16)
fast_memmove(dst1, src1, n16);
if (n_fract)
fb_memmove(dst1 + n16, src1 + n16,
n_fract);
dst1 += linesize;
src1 += linesize;
}
} else {
for (rows = height; rows--;) {
if (n16)
fast_memmove(dst1, src1, n16);
if (n_fract)
fb_memmove(dst1 + n16, src1 + n16,
n_fract);
dst1 -= linesize;
src1 -= linesize;
}
}
}
}
......@@ -35,7 +35,7 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
unsigned long height, ppw, fg, fgcolor;
int i, n, x2, y2, linesize = p->fix.line_length;
int bpl = sizeof(unsigned long);
unsigned long *dst;
unsigned long *dst = NULL;
char *dst1;
if (!rect->width || !rect->height)
......@@ -97,7 +97,8 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
case ROP_COPY:
do {
/* Word align to increases performace :-) */
dst = (unsigned long *) (dst1 - start_index);
dst =
(unsigned long *) (dst1 - start_index);
if (start_mask) {
FB_WRITE(FB_READ(dst) |
......@@ -118,7 +119,8 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
break;
case ROP_XOR:
do {
dst = (unsigned long *) (dst1 - start_index);
dst =
(unsigned long *) (dst1 - start_index);
if (start_mask) {
FB_WRITE(FB_READ(dst) ^
......@@ -140,49 +142,85 @@ void cfb_fillrect(struct fb_info *p, struct fb_fillrect *rect)
break;
}
} else {
/* Odd modes like 24 or 80 bits per pixel */
start_mask = fg >> (start_index * p->var.bits_per_pixel);
end_mask = fg << (end_index * p->var.bits_per_pixel);
/* start_mask =& PFILL24(x1,fg);
end_mask_or = end_mask & PFILL24(x1+width-1,fg); */
/*
* Slow Method: The aim is to find the number of pixels to
* pack in order to write doubleword multiple data.
* For 24 bpp, 4 pixels are packed which are written as
* 3 dwords.
*/
char *dst2, *dst3;
int bytes = (p->var.bits_per_pixel + 7) >> 3;
int read, write, total, pack_size;
u32 pixarray[BITS_PER_LONG >> 3], m;
fg = fgcolor;
read = (bytes + (bpl - 1)) & ~(bpl - 1);
write = bytes;
total = (rect->width * bytes);
pack_size = bpl * write;
n = (rect->width - start_index - end_index) / ppw;
dst3 = (char *) pixarray;
for (n = read; n--;) {
*(u32 *) dst3 = fg;
dst3 += bytes;
}
switch (rect->rop) {
case ROP_COPY:
do {
dst = (unsigned long *) dst1;
if (start_mask)
*dst |= start_mask;
if ((start_index + rect->width) > ppw)
dst++;
/* XXX: slow */
for (i = 0; i < n; i++) {
*dst++ = fg;
dst2 = dst1;
n = total;
while (n >= pack_size) {
for (m = 0; m < write; m++) {
fb_writel(pixarray[m],
(u32 *) dst2);
dst2 += 4;
}
n -= pack_size;
}
if (n) {
m = 0;
while (n--)
fb_writeb(((u8 *)
pixarray)[m++],
dst2++);
}
if (end_mask)
*dst |= end_mask;
dst1 += linesize;
} while (--height);
break;
case ROP_XOR:
do {
dst = (unsigned long *) dst1;
if (start_mask)
*dst ^= start_mask;
if ((start_mask + rect->width) > ppw)
dst++;
for (i = 0; i < n; i++) {
*dst++ ^= fg; /* PFILL24(fg,x1+i); */
dst2 = dst1;
n = total;
while (n >= pack_size) {
for (m = 0; m < write; m++) {
fb_writel(fb_readl
((u32 *) dst2) ^
pixarray[m],
(u32 *) dst2);
dst2 += 4;
}
n -= pack_size;
}
if (n) {
m = 0;
while (n--) {
fb_writeb(fb_readb(dst2) ^
((u8 *)
pixarray)[m++],
dst2);
dst2++;
}
}
if (end_mask)
*dst ^= end_mask;
dst1 += linesize;
} while (--height);
break;
}
}
return;
}
......@@ -23,6 +23,13 @@
* The code for 24 bit is horrible. It copies byte by byte size instead of
* longs like the other sizes. Needs to be optimized.
*
* Tony:
* Incorporate mask tables similar to fbcon-cfb*.c in 2.4 API. This speeds
* up the code significantly.
*
* Code for depths not multiples of BITS_PER_LONG is still kludgy, which is
* still processed a bit at a time.
*
* Also need to add code to deal with cards endians that are different than
* the native cpu endians. I also need to deal with MSB position in the word.
*
......@@ -39,48 +46,191 @@
#define DPRINTK(fmt, args...)
#endif
void cfb_imageblit(struct fb_info *p, struct fb_image *image)
static u32 cfb_tab8[] = {
#if defined(__BIG_ENDIAN)
0x00000000, 0x000000ff, 0x0000ff00, 0x0000ffff,
0x00ff0000, 0x00ff00ff, 0x00ffff00, 0x00ffffff,
0xff000000, 0xff0000ff, 0xff00ff00, 0xff00ffff,
0xffff0000, 0xffff00ff, 0xffffff00, 0xffffffff
#elif defined(__LITTLE_ENDIAN)
0x00000000, 0xff000000, 0x00ff0000, 0xffff0000,
0x0000ff00, 0xff00ff00, 0x00ffff00, 0xffffff00,
0x000000ff, 0xff0000ff, 0x00ff00ff, 0xffff00ff,
0x0000ffff, 0xff00ffff, 0x00ffffff, 0xffffffff
#else
#error FIXME: No endianness??
#endif
};
static u32 cfb_tab16[] = {
#if defined(__BIG_ENDIAN)
0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff
#elif defined(__LITTLE_ENDIAN)
0x00000000, 0xffff0000, 0x0000ffff, 0xffffffff
#else
#error FIXME: No endianness??
#endif
};
static u32 cfb_tab32[] = {
0x00000000, 0xffffffff
};
static u32 cfb_pixarray[4];
static u32 cfb_tabdef[2];
static inline void fast_imageblit(struct fb_image *image,
struct fb_info *p, char *dst1,
int fgcolor, int bgcolor)
{
int pad, ppw;
int x2, y2, n, i, j, k, l = 7;
int i, j, k, l = 8, n;
int bit_mask, end_mask, eorx;
unsigned long fgx = fgcolor, bgx = bgcolor, pad;
unsigned long tmp = ~0 << (BITS_PER_LONG - p->var.bits_per_pixel);
unsigned long fgx, bgx, fgcolor, bgcolor, eorx;
unsigned long end_mask;
unsigned long *dst = NULL;
u8 *dst1;
u8 *src;
unsigned long ppw = BITS_PER_LONG / p->var.bits_per_pixel;
unsigned long *dst;
u32 *tab = NULL;
char *src = image->data;
/*
* We could use hardware clipping but on many cards you get around hardware
* clipping by writing to framebuffer directly like we are doing here.
*/
x2 = image->dx + image->width;
y2 = image->dy + image->height;
image->dx = image->dx > 0 ? image->dx : 0;
image->dy = image->dy > 0 ? image->dy : 0;
x2 = x2 < p->var.xres_virtual ? x2 : p->var.xres_virtual;
y2 = y2 < p->var.yres_virtual ? y2 : p->var.yres_virtual;
image->width = x2 - image->dx;
image->height = y2 - image->dy;
switch (ppw) {
case 4:
tab = cfb_tab8;
break;
case 2:
tab = cfb_tab16;
break;
case 1:
tab = cfb_tab32;
break;
}
dst1 = p->screen_base + image->dy * p->fix.line_length +
((image->dx * p->var.bits_per_pixel) >> 3);
for (i = ppw - 1; i--;) {
fgx <<= p->var.bits_per_pixel;
bgx <<= p->var.bits_per_pixel;
fgx |= fgcolor;
bgx |= bgcolor;
}
ppw = BITS_PER_LONG/p->var.bits_per_pixel;
n = ((image->width + 7) >> 3);
pad = (n << 3) - image->width;
n = image->width % ppw;
src = image->data;
bit_mask = (1 << ppw) - 1;
eorx = fgx ^ bgx;
if (image->depth == 1) {
k = image->width / ppw;
if (p->fix.visual == FB_VISUAL_TRUECOLOR) {
fgx = fgcolor = ((u32 *)(p->pseudo_palette))[image->fg_color];
bgx = bgcolor = ((u32 *)(p->pseudo_palette))[image->bg_color];
} else {
fgx = fgcolor = image->fg_color;
bgx = bgcolor = image->bg_color;
for (i = image->height; i--;) {
dst = (unsigned long *) dst1;
for (j = k; j--;) {
l -= ppw;
end_mask = tab[(*src >> l) & bit_mask];
fb_writel((end_mask & eorx) ^ bgx, dst++);
if (!l) {
l = 8;
src++;
}
}
if (n) {
end_mask = 0;
for (j = n; j > 0; j--) {
l--;
if (test_bit(l, (unsigned long *) src))
end_mask |=
(tmp >>
(p->var.bits_per_pixel *
(j - 1)));
if (!l) {
l = 8;
src++;
}
}
fb_writel((end_mask & eorx) ^ bgx, dst++);
}
l -= pad;
dst1 += p->fix.line_length;
}
}
/*
* Slow method: The idea is to find the number of pixels necessary to form
* dword-sized multiples that will be written to the framebuffer. For BPP24,
* 4 pixels has to be read which are then packed into 3 double words that
* are then written to the framebuffer.
*
* With this method, processing is done 1 pixel at a time.
*/
static inline void slow_imageblit(struct fb_image *image,
struct fb_info *p, char *dst1,
int fgcolor, int bgcolor)
{
int bytes = (p->var.bits_per_pixel + 7) >> 3;
int tmp = ~0UL >> (BITS_PER_LONG - p->var.bits_per_pixel);
int i, j, k, l = 8, m, end_mask, eorx;
int read, write, total, pack_size, bpl = sizeof(unsigned long);
unsigned long *dst;
char *dst2 = (char *) cfb_pixarray, *src = image->data;
cfb_tabdef[0] = 0;
cfb_tabdef[1] = tmp;
eorx = fgcolor ^ bgcolor;
read = (bytes + (bpl - 1)) & ~(bpl - 1);
write = bytes;
total = image->width * bytes;
pack_size = bpl * write;
for (i = image->height; i--;) {
dst = (unsigned long *) dst1;
j = total;
m = read;
while (j >= pack_size) {
l--;
m--;
end_mask = cfb_tabdef[(*src >> l) & 1];
*(unsigned long *) dst2 =
(end_mask & eorx) ^ bgcolor;
dst2 += bytes;
if (!m) {
for (k = 0; k < write; k++)
fb_writel(cfb_pixarray[k], dst++);
dst2 = (char *) cfb_pixarray;
j -= pack_size;
m = read;
}
if (!l) {
l = 8;
src++;
}
}
/* write residual pixels */
if (j) {
k = 0;
while (j--)
fb_writeb(((u8 *) cfb_pixarray)[k++],
dst++);
}
dst1 += p->fix.line_length;
}
}
static inline void bitwise_blit(struct fb_image *image, struct fb_info *p,
char *dst1, int fgcolor, int bgcolor)
{
int i, j, k, l = 8, n, pad, ppw;
unsigned long tmp = ~0 << (BITS_PER_LONG - p->var.bits_per_pixel);
unsigned long fgx = fgcolor, bgx = bgcolor, eorx;
unsigned long end_mask;
unsigned long *dst = NULL;
char *src = image->data;
ppw = BITS_PER_LONG / p->var.bits_per_pixel;
for (i = 0; i < ppw-1; i++) {
for (i = 0; i < ppw - 1; i++) {
fgx <<= p->var.bits_per_pixel;
bgx <<= p->var.bits_per_pixel;
fgx |= fgcolor;
......@@ -94,34 +244,95 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
for (i = 0; i < image->height; i++) {
dst = (unsigned long *) dst1;
for (j = image->width/ppw; j > 0; j--) {
for (j = image->width / ppw; j > 0; j--) {
end_mask = 0;
for (k = ppw; k > 0; k--) {
if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(k-1)));
l--;
if (l < 0) { l = 7; src++; }
if (test_bit(l, (unsigned long *) src))
end_mask |=
(tmp >>
(p->var.bits_per_pixel *
(k - 1)));
if (!l) {
l = 8;
src++;
}
fb_writel((end_mask & eorx)^bgx, dst);
}
fb_writel((end_mask & eorx) ^ bgx, dst);
dst++;
}
if (n) {
end_mask = 0;
for (j = n; j > 0; j--) {
if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(j-1)));
l--;
if (l < 0) { l = 7; src++; }
if (test_bit(l, (unsigned long *) src))
end_mask |=
(tmp >>
(p->var.bits_per_pixel *
(j - 1)));
if (!l) {
l = 8;
src++;
}
}
fb_writel((end_mask & eorx)^bgx, dst);
fb_writel((end_mask & eorx) ^ bgx, dst);
dst++;
}
l -= pad;
dst1 += p->fix.line_length;
}
}
void cfb_imageblit(struct fb_info *p, struct fb_image *image)
{
int x2, y2, n;
unsigned long fgcolor, bgcolor;
unsigned long end_mask;
u8 *dst1;
/*
* We could use hardware clipping but on many cards you get around hardware
* clipping by writing to framebuffer directly like we are doing here.
*/
x2 = image->dx + image->width;
y2 = image->dy + image->height;
image->dx = image->dx > 0 ? image->dx : 0;
image->dy = image->dy > 0 ? image->dy : 0;
x2 = x2 < p->var.xres_virtual ? x2 : p->var.xres_virtual;
y2 = y2 < p->var.yres_virtual ? y2 : p->var.yres_virtual;
image->width = x2 - image->dx;
image->height = y2 - image->dy;
dst1 = p->screen_base + image->dy * p->fix.line_length +
((image->dx * p->var.bits_per_pixel) >> 3);
if (image->depth == 1) {
if (p->fix.visual == FB_VISUAL_TRUECOLOR) {
fgcolor =
((u32 *) (p->pseudo_palette))[image->fg_color];
bgcolor =
((u32 *) (p->pseudo_palette))[image->bg_color];
} else {
fgcolor = image->fg_color;
bgcolor = image->bg_color;
}
if (p->var.bits_per_pixel >= 8) {
if (BITS_PER_LONG % p->var.bits_per_pixel == 0)
fast_imageblit(image, p, dst1, fgcolor,
bgcolor);
else
slow_imageblit(image, p, dst1, fgcolor,
bgcolor);
} else
/* Is there such a thing as 3 or 5 bits per pixel? */
slow_imageblit(image, p, dst1, fgcolor, bgcolor);
}
else {
/* Draw the penguin */
n = ((image->width * p->var.bits_per_pixel) >> 3);
end_mask = 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_VGA_PLANES
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_FB_VGA16
This is the frame buffer device driver for VGA 16 color graphic
cards. Say Y if you have such a card.
This code is also available as a module. If you want to compile it
as a module ( = code which can be inserted in and removed from the
running kernel whenever you want), say M here and read
<file:Documentation/modules.txt>. The module will be called
vga16fb.o.
CONFIG_FB_STI
STI refers to the HP "Standard Text Interface" which is a set of
BIOS routines contained in a ROM chip in HP PA-RISC based machines.
Enabling this option will implement the linux framebuffer device and
an fbcon color text console using calls to the STI BIOS routines.
The HP framebuffer device is usually planar, uses a strange memory
layout, and changing the plane mask to create colored pixels
requires a call to the STI routines, so do not expect /dev/fb to
actually be useful. However, it is the best we have as far as
graphics on the HP chipsets due to lack of hardware level
documentation for the various on-board HP chipsets used in these
systems. It is sufficient for basic text console functions,
including fonts.
You should probably enable this option, unless you are having
trouble getting video when booting the kernel (make sure it isn't
just that you are running the console on the serial port, though).
Really old HP boxes may not have STI, and must use the PDC BIOS
console or the IODC BIOS.
CONFIG_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.
#
# 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 (dual-headed) ' CONFIG_MDA_CONSOLE
if [ "$CONFIG_FB" = "y" ]; then
define_bool CONFIG_PCI_CONSOLE y
fi
#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
if [ "$CONFIG_ARCH_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
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 ' VGA 16-color planar support' CONFIG_FBCON_VGA_PLANES
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
if [ "$CONFIG_FB_VGA16" = "y" ]; then
define_tristate CONFIG_FBCON_VGA_PLANES y
else
if [ "$CONFIG_FB_VGA16" = "m" ]; then
define_tristate CONFIG_FBCON_VGA_PLANES 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
# Makefile for the Linux graphics to console drivers.
# 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net>
# Rewritten to use lists instead of if-statements.
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs := fbcon.o fbcon-accel.o fbcon-afb.o fbcon-ilbm.o \
fbcon-iplan2p2.o fbcon-iplan2p4.o fbcon-iplan2p8.o \
fbcon-vga-planes.o fbcon-vga8-planes.o fbcon-hga.o
# Each configuration option enables a list of files.
obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o
obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o
obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o
obj-$(CONFIG_STI_CONSOLE) += sticon.o sticon-bmode.o ../sticore.o
obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
obj-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o
obj-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o
obj-$(CONFIG_FONT_8x8) += font_8x8.o
obj-$(CONFIG_FONT_8x16) += font_8x16.o
obj-$(CONFIG_FONT_6x11) += font_6x11.o
obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
obj-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o fonts.o
# Generic Low Level Drivers
obj-$(CONFIG_FBCON_AFB) += fbcon-afb.o
obj-$(CONFIG_FBCON_ILBM) += fbcon-ilbm.o
obj-$(CONFIG_FBCON_IPLAN2P2) += fbcon-iplan2p2.o
obj-$(CONFIG_FBCON_IPLAN2P4) += fbcon-iplan2p4.o
obj-$(CONFIG_FBCON_IPLAN2P8) += fbcon-iplan2p8.o
obj-$(CONFIG_FBCON_HGA) += fbcon-hga.o
obj-$(CONFIG_FBCON_STI) += fbcon-sti.o
obj-$(CONFIG_FBCON_ACCEL) += fbcon-accel.o
include $(TOPDIR)/Rules.make
$(obj)/promcon_tbl.c: $(src)/prom.uni
$(objtree)/scripts/conmakehash $< | \
sed -e '/#include <[^>]*>/p' -e 's/types/init/' \
-e 's/dfont\(_uni.*\]\)/promfont\1 __initdata/' > $@
......@@ -335,14 +335,15 @@ int set_all_vcs(int fbidx, struct fb_ops *fb, struct fb_var_screeninfo *var,
int unit, err;
var->activate |= FB_ACTIVATE_TEST;
err = gen_set_var(var, PROC_CONSOLE(info), info);
err = fb_set_var(var, info);
var->activate &= ~FB_ACTIVATE_TEST;
gen_set_disp(PROC_CONSOLE(info), info);
if (err)
return err;
for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
if (fb_display[unit].conp && con2fb_map[unit] == fbidx) {
gen_set_var(var, unit, info);
if (CON_IS_VISIBLE(fb_display[unit].conp))
fb_set_var(var, info);
gen_set_disp(unit, info);
}
return 0;
......@@ -983,6 +984,19 @@ static int scrollback_phys_max = 0;
static int scrollback_max = 0;
static int scrollback_current = 0;
int update_var(int con, struct fb_info *info)
{
int err;
if (con == info->currcon) {
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(&info->var, info)))
return err;
}
}
return 0;
}
static __inline__ void ywrap_up(int unit, struct vc_data *conp,
struct display *p, int count)
{
......@@ -994,7 +1008,7 @@ static __inline__ void ywrap_up(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode |= FB_VMODE_YWRAP;
gen_update_var(unit, info);
update_var(unit, info);
scrollback_max += count;
if (scrollback_max > scrollback_phys_max)
scrollback_max = scrollback_phys_max;
......@@ -1012,7 +1026,7 @@ static __inline__ void ywrap_down(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode |= FB_VMODE_YWRAP;
gen_update_var(unit, info);
update_var(unit, info);
scrollback_max -= count;
if (scrollback_max < 0)
scrollback_max = 0;
......@@ -1033,7 +1047,7 @@ static __inline__ void ypan_up(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode &= ~FB_VMODE_YWRAP;
gen_update_var(unit, info);
update_var(unit, info);
if (p->dispsw->clear_margins)
p->dispsw->clear_margins(conp, p, 1);
scrollback_max += count;
......@@ -1057,7 +1071,7 @@ static __inline__ void ypan_down(int unit, struct vc_data *conp,
info->var.xoffset = 0;
info->var.yoffset = p->yscroll*fontheight(p);
info->var.vmode &= ~FB_VMODE_YWRAP;
gen_update_var(unit, info);
update_var(unit, info);
if (p->dispsw->clear_margins)
p->dispsw->clear_margins(conp, p, 1);
scrollback_max -= count;
......@@ -2148,7 +2162,7 @@ static int fbcon_scrolldelta(struct vc_data *conp, int lines)
offset -= limit;
info->var.xoffset = 0;
info->var.yoffset = offset*fontheight(p);
gen_update_var(unit, info);
update_var(unit, info);
if (!scrollback_current)
fbcon_cursor(conp, CM_DRAW);
return 0;
......
......@@ -181,62 +181,6 @@ void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto)
}
}
/**
* fb_get_cmap - get a colormap
* @cmap: frame buffer colormap
* @kspc: boolean, 0 copy local, 1 put_user() function
* @getcolreg: pointer to a function to get a color register
* @info: frame buffer info structure
*
* Get a colormap @cmap for a screen of device @info.
*
* Returns negative errno on error, or zero on success.
*
*/
int fb_get_cmap(struct fb_cmap *cmap, int kspc,
int (*getcolreg)(u_int, u_int *, u_int *, u_int *, u_int *,
struct fb_info *),
struct fb_info *info)
{
int i, start;
u16 *red, *green, *blue, *transp;
u_int hred, hgreen, hblue, htransp;
red = cmap->red;
green = cmap->green;
blue = cmap->blue;
transp = cmap->transp;
start = cmap->start;
if (start < 0)
return -EINVAL;
for (i = 0; i < cmap->len; i++) {
if (getcolreg(start++, &hred, &hgreen, &hblue, &htransp, info))
return 0;
if (kspc) {
*red = hred;
*green = hgreen;
*blue = hblue;
if (transp)
*transp = htransp;
} else {
put_user(hred, red);
put_user(hgreen, green);
put_user(hblue, blue);
if (transp)
put_user(htransp, transp);
}
red++;
green++;
blue++;
if (transp)
transp++;
}
return 0;
}
/**
* fb_set_cmap - set the colormap
* @cmap: frame buffer colormap structure
......@@ -353,7 +297,6 @@ void fb_invert_cmaps(void)
EXPORT_SYMBOL(fb_alloc_cmap);
EXPORT_SYMBOL(fb_copy_cmap);
EXPORT_SYMBOL(fb_get_cmap);
EXPORT_SYMBOL(fb_set_cmap);
EXPORT_SYMBOL(fb_default_cmap);
EXPORT_SYMBOL(fb_invert_cmaps);
......@@ -20,13 +20,11 @@
#include <asm/uaccess.h>
#include <asm/io.h>
#include <video/fbcon.h>
int gen_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
int fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info)
{
int err;
if (con < 0 || (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo)))) {
if (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) {
if (!info->fbops->fb_check_var) {
*var = info->var;
return 0;
......@@ -38,7 +36,6 @@ int gen_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
info->var = *var;
if (con == info->currcon) {
if (info->fbops->fb_set_par)
info->fbops->fb_set_par(info);
......@@ -47,11 +44,10 @@ int gen_set_var(struct fb_var_screeninfo *var, int con, struct fb_info *info)
fb_set_cmap(&info->cmap, 1, info);
}
}
}
return 0;
}
int fbgen_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
int fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
{
int xoffset = var->xoffset;
int yoffset = var->yoffset;
......@@ -79,21 +75,8 @@ int fbgen_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
/* ---- Helper functions --------------------------------------------------- */
int gen_update_var(int con, struct fb_info *info)
{
int err;
if (con == info->currcon) {
if (info->fbops->fb_pan_display) {
if ((err = info->fbops->fb_pan_display(&info->var, info)))
return err;
}
}
return 0;
}
/**
* fbgen_blank - blank the screen
* fb_blank - blank the screen
* @blank: boolean, 0 unblank, 1 blank
* @info: frame buffer info structure
*
......@@ -101,7 +84,7 @@ int gen_update_var(int con, struct fb_info *info)
*
*/
int fbgen_blank(int blank, struct fb_info *info)
int fb_blank(int blank, struct fb_info *info)
{
struct fb_cmap cmap;
u16 black[16];
......@@ -129,10 +112,8 @@ int fbgen_blank(int blank, struct fb_info *info)
}
/* generic frame buffer operations */
EXPORT_SYMBOL(gen_set_var);
EXPORT_SYMBOL(fbgen_pan_display);
/* helper functions */
EXPORT_SYMBOL(gen_update_var);
EXPORT_SYMBOL(fbgen_blank);
EXPORT_SYMBOL(fb_set_var);
EXPORT_SYMBOL(fb_pan_display);
EXPORT_SYMBOL(fb_blank);
MODULE_LICENSE("GPL");
......@@ -466,10 +466,10 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
int fbidx = GET_FB_IDX(inode->i_rdev);
struct fb_info *info = registered_fb[fbidx];
struct fb_ops *fb = info->fbops;
struct fb_cmap cmap;
struct fb_var_screeninfo var;
struct fb_fix_screeninfo fix;
struct fb_con2fbmap con2fb;
struct fb_cmap cmap;
int i;
if (! fb)
......@@ -485,9 +485,8 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
i = set_all_vcs(fbidx, fb, &var, info);
if (i) return i;
} else {
i = gen_set_var(&var, PROC_CONSOLE(info), info);
i = fb_set_var(&var, info);
if (i) return i;
gen_set_disp(PROC_CONSOLE(info), info);
}
if (copy_to_user((void *) arg, &var, sizeof(var)))
return -EFAULT;
......@@ -512,6 +511,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
if (copy_to_user((void *) arg, &var, sizeof(var)))
return -EFAULT;
return i;
#ifdef CONFIG_VT
case FBIOGET_CON2FBMAP:
if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb)))
return -EFAULT;
......@@ -540,6 +540,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
for (i = 0; i < MAX_NR_CONSOLES; i++)
set_con2fb_map(i, con2fb.framebuffer);
return 0;
#endif
case FBIOBLANK:
if (fb->fb_blank == NULL)
return -EINVAL;
......
......@@ -1870,8 +1870,6 @@ static int __devinit neofb_probe(struct pci_dev *dev,
if (err)
goto failed;
gen_set_var(neofb_var, -1, info);
/*
* Calculate the hsync and vsync frequencies. Note that
* we split the 1e12 constant up so that we can preserve
......
......@@ -99,7 +99,6 @@ static int sgivwfb_mmap(struct fb_info *info, struct file *file,
static struct fb_ops sgivwfb_ops = {
.owner = THIS_MODULE,
.fb_set_var = gen_set_var,
.fb_check_var = sgivwfb_check_var,
.fb_set_par = sgivwfb_set_par,
.fb_setcolreg = sgivwfb_setcolreg,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment