aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/svga.txt146
1 files changed, 80 insertions, 66 deletions
diff --git a/Documentation/svga.txt b/Documentation/svga.txt
index cd66ec836e4f..119f1515b1ac 100644
--- a/Documentation/svga.txt
+++ b/Documentation/svga.txt
@@ -1,24 +1,31 @@
1 Video Mode Selection Support 2.13 1.. include:: <isonum.txt>
2 (c) 1995--1999 Martin Mares, <mj@ucw.cz>
3--------------------------------------------------------------------------------
4 2
51. Intro 3=================================
6~~~~~~~~ 4Video Mode Selection Support 2.13
7 This small document describes the "Video Mode Selection" feature which 5=================================
6
7:Copyright: |copy| 1995--1999 Martin Mares, <mj@ucw.cz>
8
9Intro
10~~~~~
11
12This small document describes the "Video Mode Selection" feature which
8allows the use of various special video modes supported by the video BIOS. Due 13allows the use of various special video modes supported by the video BIOS. Due
9to usage of the BIOS, the selection is limited to boot time (before the 14to usage of the BIOS, the selection is limited to boot time (before the
10kernel decompression starts) and works only on 80X86 machines. 15kernel decompression starts) and works only on 80X86 machines.
11 16
12 ** Short intro for the impatient: Just use vga=ask for the first time, 17.. note::
13 ** enter `scan' on the video mode prompt, pick the mode you want to use,
14 ** remember its mode ID (the four-digit hexadecimal number) and then
15 ** set the vga parameter to this number (converted to decimal first).
16 18
17 The video mode to be used is selected by a kernel parameter which can be 19 Short intro for the impatient: Just use vga=ask for the first time,
20 enter ``scan`` on the video mode prompt, pick the mode you want to use,
21 remember its mode ID (the four-digit hexadecimal number) and then
22 set the vga parameter to this number (converted to decimal first).
23
24The video mode to be used is selected by a kernel parameter which can be
18specified in the kernel Makefile (the SVGA_MODE=... line) or by the "vga=..." 25specified in the kernel Makefile (the SVGA_MODE=... line) or by the "vga=..."
19option of LILO (or some other boot loader you use) or by the "vidmode" utility 26option of LILO (or some other boot loader you use) or by the "vidmode" utility
20(present in standard Linux utility packages). You can use the following values 27(present in standard Linux utility packages). You can use the following values
21of this parameter: 28of this parameter::
22 29
23 NORMAL_VGA - Standard 80x25 mode available on all display adapters. 30 NORMAL_VGA - Standard 80x25 mode available on all display adapters.
24 31
@@ -37,77 +44,79 @@ of this parameter:
37 for exact meaning of the ID). Warning: rdev and LILO don't support 44 for exact meaning of the ID). Warning: rdev and LILO don't support
38 hexadecimal numbers -- you have to convert it to decimal manually. 45 hexadecimal numbers -- you have to convert it to decimal manually.
39 46
402. Menu 47Menu
41~~~~~~~ 48~~~~
42 The ASK_VGA mode causes the kernel to offer a video mode menu upon 49
50The ASK_VGA mode causes the kernel to offer a video mode menu upon
43bootup. It displays a "Press <RETURN> to see video modes available, <SPACE> 51bootup. It displays a "Press <RETURN> to see video modes available, <SPACE>
44to continue or wait 30 secs" message. If you press <RETURN>, you enter the 52to continue or wait 30 secs" message. If you press <RETURN>, you enter the
45menu, if you press <SPACE> or wait 30 seconds, the kernel will boot up in 53menu, if you press <SPACE> or wait 30 seconds, the kernel will boot up in
46the standard 80x25 mode. 54the standard 80x25 mode.
47 55
48 The menu looks like: 56The menu looks like::
49 57
50Video adapter: <name-of-detected-video-adapter> 58 Video adapter: <name-of-detected-video-adapter>
51Mode: COLSxROWS: 59 Mode: COLSxROWS:
520 0F00 80x25 60 0 0F00 80x25
531 0F01 80x50 61 1 0F01 80x50
542 0F02 80x43 62 2 0F02 80x43
553 0F03 80x26 63 3 0F03 80x26
56.... 64 ....
57Enter mode number or `scan': <flashing-cursor-here> 65 Enter mode number or ``scan``: <flashing-cursor-here>
58 66
59 <name-of-detected-video-adapter> tells what video adapter did Linux detect 67<name-of-detected-video-adapter> tells what video adapter did Linux detect
60-- it's either a generic adapter name (MDA, CGA, HGC, EGA, VGA, VESA VGA [a VGA 68-- it's either a generic adapter name (MDA, CGA, HGC, EGA, VGA, VESA VGA [a VGA
61with VESA-compliant BIOS]) or a chipset name (e.g., Trident). Direct detection 69with VESA-compliant BIOS]) or a chipset name (e.g., Trident). Direct detection
62of chipsets is turned off by default (see CONFIG_VIDEO_SVGA in chapter 4 to see 70of chipsets is turned off by default (see CONFIG_VIDEO_SVGA in chapter 4 to see
63how to enable it if you really want) as it's inherently unreliable due to 71how to enable it if you really want) as it's inherently unreliable due to
64absolutely insane PC design. 72absolutely insane PC design.
65 73
66 "0 0F00 80x25" means that the first menu item (the menu items are numbered 74"0 0F00 80x25" means that the first menu item (the menu items are numbered
67from "0" to "9" and from "a" to "z") is a 80x25 mode with ID=0x0f00 (see the 75from "0" to "9" and from "a" to "z") is a 80x25 mode with ID=0x0f00 (see the
68next section for a description of mode IDs). 76next section for a description of mode IDs).
69 77
70 <flashing-cursor-here> encourages you to enter the item number or mode ID 78<flashing-cursor-here> encourages you to enter the item number or mode ID
71you wish to set and press <RETURN>. If the computer complains something about 79you wish to set and press <RETURN>. If the computer complains something about
72"Unknown mode ID", it is trying to tell you that it isn't possible to set such 80"Unknown mode ID", it is trying to tell you that it isn't possible to set such
73a mode. It's also possible to press only <RETURN> which leaves the current mode. 81a mode. It's also possible to press only <RETURN> which leaves the current mode.
74 82
75 The mode list usually contains a few basic modes and some VESA modes. In 83The mode list usually contains a few basic modes and some VESA modes. In
76case your chipset has been detected, some chipset-specific modes are shown as 84case your chipset has been detected, some chipset-specific modes are shown as
77well (some of these might be missing or unusable on your machine as different 85well (some of these might be missing or unusable on your machine as different
78BIOSes are often shipped with the same card and the mode numbers depend purely 86BIOSes are often shipped with the same card and the mode numbers depend purely
79on the VGA BIOS). 87on the VGA BIOS).
80 88
81 The modes displayed on the menu are partially sorted: The list starts with 89The modes displayed on the menu are partially sorted: The list starts with
82the standard modes (80x25 and 80x50) followed by "special" modes (80x28 and 90the standard modes (80x25 and 80x50) followed by "special" modes (80x28 and
8380x43), local modes (if the local modes feature is enabled), VESA modes and 9180x43), local modes (if the local modes feature is enabled), VESA modes and
84finally SVGA modes for the auto-detected adapter. 92finally SVGA modes for the auto-detected adapter.
85 93
86 If you are not happy with the mode list offered (e.g., if you think your card 94If you are not happy with the mode list offered (e.g., if you think your card
87is able to do more), you can enter "scan" instead of item number / mode ID. The 95is able to do more), you can enter "scan" instead of item number / mode ID. The
88program will try to ask the BIOS for all possible video mode numbers and test 96program will try to ask the BIOS for all possible video mode numbers and test
89what happens then. The screen will be probably flashing wildly for some time and 97what happens then. The screen will be probably flashing wildly for some time and
90strange noises will be heard from inside the monitor and so on and then, really 98strange noises will be heard from inside the monitor and so on and then, really
91all consistent video modes supported by your BIOS will appear (plus maybe some 99all consistent video modes supported by your BIOS will appear (plus maybe some
92`ghost modes'). If you are afraid this could damage your monitor, don't use this 100``ghost modes``). If you are afraid this could damage your monitor, don't use
93function. 101this function.
94 102
95 After scanning, the mode ordering is a bit different: the auto-detected SVGA 103After scanning, the mode ordering is a bit different: the auto-detected SVGA
96modes are not listed at all and the modes revealed by `scan' are shown before 104modes are not listed at all and the modes revealed by ``scan`` are shown before
97all VESA modes. 105all VESA modes.
98 106
993. Mode IDs 107Mode IDs
100~~~~~~~~~~~ 108~~~~~~~~
101 Because of the complexity of all the video stuff, the video mode IDs 109
110Because of the complexity of all the video stuff, the video mode IDs
102used here are also a bit complex. A video mode ID is a 16-bit number usually 111used here are also a bit complex. A video mode ID is a 16-bit number usually
103expressed in a hexadecimal notation (starting with "0x"). You can set a mode 112expressed in a hexadecimal notation (starting with "0x"). You can set a mode
104by entering its mode directly if you know it even if it isn't shown on the menu. 113by entering its mode directly if you know it even if it isn't shown on the menu.
105 114
106The ID numbers can be divided to three regions: 115The ID numbers can be divided to those regions::
107 116
108 0x0000 to 0x00ff - menu item references. 0x0000 is the first item. Don't use 117 0x0000 to 0x00ff - menu item references. 0x0000 is the first item. Don't use
109 outside the menu as this can change from boot to boot (especially if you 118 outside the menu as this can change from boot to boot (especially if you
110 have used the `scan' feature). 119 have used the ``scan`` feature).
111 120
112 0x0100 to 0x017f - standard BIOS modes. The ID is a BIOS video mode number 121 0x0100 to 0x017f - standard BIOS modes. The ID is a BIOS video mode number
113 (as presented to INT 10, function 00) increased by 0x0100. 122 (as presented to INT 10, function 00) increased by 0x0100.
@@ -142,53 +151,54 @@ The ID numbers can be divided to three regions:
142 0xffff equivalent to 0x0f00 (standard 80x25) 151 0xffff equivalent to 0x0f00 (standard 80x25)
143 0xfffe equivalent to 0x0f01 (EGA 80x43 or VGA 80x50) 152 0xfffe equivalent to 0x0f01 (EGA 80x43 or VGA 80x50)
144 153
145 If you add 0x8000 to the mode ID, the program will try to recalculate 154If you add 0x8000 to the mode ID, the program will try to recalculate
146vertical display timing according to mode parameters, which can be used to 155vertical display timing according to mode parameters, which can be used to
147eliminate some annoying bugs of certain VGA BIOSes (usually those used for 156eliminate some annoying bugs of certain VGA BIOSes (usually those used for
148cards with S3 chipsets and old Cirrus Logic BIOSes) -- mainly extra lines at the 157cards with S3 chipsets and old Cirrus Logic BIOSes) -- mainly extra lines at the
149end of the display. 158end of the display.
150 159
1514. Options 160Options
152~~~~~~~~~~ 161~~~~~~~
153 Some options can be set in the source text (in arch/i386/boot/video.S). 162
163Some options can be set in the source text (in arch/i386/boot/video.S).
154All of them are simple #define's -- change them to #undef's when you want to 164All of them are simple #define's -- change them to #undef's when you want to
155switch them off. Currently supported: 165switch them off. Currently supported:
156 166
157 CONFIG_VIDEO_SVGA - enables autodetection of SVGA cards. This is switched 167CONFIG_VIDEO_SVGA - enables autodetection of SVGA cards. This is switched
158off by default as it's a bit unreliable due to terribly bad PC design. If you 168off by default as it's a bit unreliable due to terribly bad PC design. If you
159really want to have the adapter autodetected (maybe in case the `scan' feature 169really want to have the adapter autodetected (maybe in case the ``scan`` feature
160doesn't work on your machine), switch this on and don't cry if the results 170doesn't work on your machine), switch this on and don't cry if the results
161are not completely sane. In case you really need this feature, please drop me 171are not completely sane. In case you really need this feature, please drop me
162a mail as I think of removing it some day. 172a mail as I think of removing it some day.
163 173
164 CONFIG_VIDEO_VESA - enables autodetection of VESA modes. If it doesn't work 174CONFIG_VIDEO_VESA - enables autodetection of VESA modes. If it doesn't work
165on your machine (or displays a "Error: Scanning of VESA modes failed" message), 175on your machine (or displays a "Error: Scanning of VESA modes failed" message),
166you can switch it off and report as a bug. 176you can switch it off and report as a bug.
167 177
168 CONFIG_VIDEO_COMPACT - enables compacting of the video mode list. If there 178CONFIG_VIDEO_COMPACT - enables compacting of the video mode list. If there
169are more modes with the same screen size, only the first one is kept (see above 179are more modes with the same screen size, only the first one is kept (see above
170for more info on mode ordering). However, in very strange cases it's possible 180for more info on mode ordering). However, in very strange cases it's possible
171that the first "version" of the mode doesn't work although some of the others 181that the first "version" of the mode doesn't work although some of the others
172do -- in this case turn this switch off to see the rest. 182do -- in this case turn this switch off to see the rest.
173 183
174 CONFIG_VIDEO_RETAIN - enables retaining of screen contents when switching 184CONFIG_VIDEO_RETAIN - enables retaining of screen contents when switching
175video modes. Works only with some boot loaders which leave enough room for the 185video modes. Works only with some boot loaders which leave enough room for the
176buffer. (If you have old LILO, you can adjust heap_end_ptr and loadflags 186buffer. (If you have old LILO, you can adjust heap_end_ptr and loadflags
177in setup.S, but it's better to upgrade the boot loader...) 187in setup.S, but it's better to upgrade the boot loader...)
178 188
179 CONFIG_VIDEO_LOCAL - enables inclusion of "local modes" in the list. The 189CONFIG_VIDEO_LOCAL - enables inclusion of "local modes" in the list. The
180local modes are added automatically to the beginning of the list not depending 190local modes are added automatically to the beginning of the list not depending
181on hardware configuration. The local modes are listed in the source text after 191on hardware configuration. The local modes are listed in the source text after
182the "local_mode_table:" line. The comment before this line describes the format 192the "local_mode_table:" line. The comment before this line describes the format
183of the table (which also includes a video card name to be displayed on the 193of the table (which also includes a video card name to be displayed on the
184top of the menu). 194top of the menu).
185 195
186 CONFIG_VIDEO_400_HACK - force setting of 400 scan lines for standard VGA 196CONFIG_VIDEO_400_HACK - force setting of 400 scan lines for standard VGA
187modes. This option is intended to be used on certain buggy BIOSes which draw 197modes. This option is intended to be used on certain buggy BIOSes which draw
188some useless logo using font download and then fail to reset the correct mode. 198some useless logo using font download and then fail to reset the correct mode.
189Don't use unless needed as it forces resetting the video card. 199Don't use unless needed as it forces resetting the video card.
190 200
191 CONFIG_VIDEO_GFX_HACK - includes special hack for setting of graphics modes 201CONFIG_VIDEO_GFX_HACK - includes special hack for setting of graphics modes
192to be used later by special drivers (e.g., 800x600 on IBM ThinkPad -- see 202to be used later by special drivers (e.g., 800x600 on IBM ThinkPad -- see
193ftp://ftp.phys.keio.ac.jp/pub/XFree86/800x600/XF86Configs/XF86Config.IBM_TP560). 203ftp://ftp.phys.keio.ac.jp/pub/XFree86/800x600/XF86Configs/XF86Config.IBM_TP560).
194Allows to set _any_ BIOS mode including graphic ones and forcing specific 204Allows to set _any_ BIOS mode including graphic ones and forcing specific
@@ -196,33 +206,36 @@ text screen resolution instead of peeking it from BIOS variables. Don't use
196unless you think you know what you're doing. To activate this setup, use 206unless you think you know what you're doing. To activate this setup, use
197mode number 0x0f08 (see section 3). 207mode number 0x0f08 (see section 3).
198 208
1995. Still doesn't work? 209Still doesn't work?
200~~~~~~~~~~~~~~~~~~~~~~ 210~~~~~~~~~~~~~~~~~~~
201 When the mode detection doesn't work (e.g., the mode list is incorrect or 211
212When the mode detection doesn't work (e.g., the mode list is incorrect or
202the machine hangs instead of displaying the menu), try to switch off some of 213the machine hangs instead of displaying the menu), try to switch off some of
203the configuration options listed in section 4. If it fails, you can still use 214the configuration options listed in section 4. If it fails, you can still use
204your kernel with the video mode set directly via the kernel parameter. 215your kernel with the video mode set directly via the kernel parameter.
205 216
206 In either case, please send me a bug report containing what _exactly_ 217In either case, please send me a bug report containing what _exactly_
207happens and how do the configuration switches affect the behaviour of the bug. 218happens and how do the configuration switches affect the behaviour of the bug.
208 219
209 If you start Linux from M$-DOS, you might also use some DOS tools for 220If you start Linux from M$-DOS, you might also use some DOS tools for
210video mode setting. In this case, you must specify the 0x0f04 mode ("leave 221video mode setting. In this case, you must specify the 0x0f04 mode ("leave
211current settings") to Linux, because if you don't and you use any non-standard 222current settings") to Linux, because if you don't and you use any non-standard
212mode, Linux will switch to 80x25 automatically. 223mode, Linux will switch to 80x25 automatically.
213 224
214 If you set some extended mode and there's one or more extra lines on the 225If you set some extended mode and there's one or more extra lines on the
215bottom of the display containing already scrolled-out text, your VGA BIOS 226bottom of the display containing already scrolled-out text, your VGA BIOS
216contains the most common video BIOS bug called "incorrect vertical display 227contains the most common video BIOS bug called "incorrect vertical display
217end setting". Adding 0x8000 to the mode ID might fix the problem. Unfortunately, 228end setting". Adding 0x8000 to the mode ID might fix the problem. Unfortunately,
218this must be done manually -- no autodetection mechanisms are available. 229this must be done manually -- no autodetection mechanisms are available.
219 230
220 If you have a VGA card and your display still looks as on EGA, your BIOS 231If you have a VGA card and your display still looks as on EGA, your BIOS
221is probably broken and you need to set the CONFIG_VIDEO_400_HACK switch to 232is probably broken and you need to set the CONFIG_VIDEO_400_HACK switch to
222force setting of the correct mode. 233force setting of the correct mode.
223 234
2246. History 235History
225~~~~~~~~~~ 236~~~~~~~
237
238=============== ================================================================
2261.0 (??-Nov-95) First version supporting all adapters supported by the old 2391.0 (??-Nov-95) First version supporting all adapters supported by the old
227 setup.S + Cirrus Logic 54XX. Present in some 1.3.4? kernels 240 setup.S + Cirrus Logic 54XX. Present in some 1.3.4? kernels
228 and then removed due to instability on some machines. 241 and then removed due to instability on some machines.
@@ -260,17 +273,18 @@ force setting of the correct mode.
260 original version written by hhanemaa@cs.ruu.nl, patched by 273 original version written by hhanemaa@cs.ruu.nl, patched by
261 Jeff Chua, rewritten by me). 274 Jeff Chua, rewritten by me).
262 - Screen store/restore fixed. 275 - Screen store/restore fixed.
2632.8 (14-Apr-96) - Previous release was not compilable without CONFIG_VIDEO_SVGA. 2762.8 (14-Apr-96) - Previous release was not compilable without CONFIG_VIDEO_SVGA.
264 - Better recognition of text modes during mode scan. 277 - Better recognition of text modes during mode scan.
2652.9 (12-May-96) - Ignored VESA modes 0x80 - 0xff (more VESA BIOS bugs!) 2782.9 (12-May-96) - Ignored VESA modes 0x80 - 0xff (more VESA BIOS bugs!)
2662.10 (11-Nov-96)- The whole thing made optional. 2792.10(11-Nov-96) - The whole thing made optional.
267 - Added the CONFIG_VIDEO_400_HACK switch. 280 - Added the CONFIG_VIDEO_400_HACK switch.
268 - Added the CONFIG_VIDEO_GFX_HACK switch. 281 - Added the CONFIG_VIDEO_GFX_HACK switch.
269 - Code cleanup. 282 - Code cleanup.
2702.11 (03-May-97)- Yet another cleanup, now including also the documentation. 2832.11(03-May-97) - Yet another cleanup, now including also the documentation.
271 - Direct testing of SVGA adapters turned off by default, `scan' 284 - Direct testing of SVGA adapters turned off by default, ``scan``
272 offered explicitly on the prompt line. 285 offered explicitly on the prompt line.
273 - Removed the doc section describing adding of new probing 286 - Removed the doc section describing adding of new probing
274 functions as I try to get rid of _all_ hardware probing here. 287 functions as I try to get rid of _all_ hardware probing here.
2752.12 (25-May-98)- Added support for VESA frame buffer graphics. 2882.12(25-May-98) Added support for VESA frame buffer graphics.
2762.13 (14-May-99)- Minor documentation fixes. 2892.13(14-May-99) Minor documentation fixes.
290=============== ================================================================