aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/fb/fbcon.txt
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2006-06-26 03:27:10 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:33 -0400
commit418d1ce61839251004fee6525f58a4581a75239e (patch)
tree53193cc45088997a7a233b2d6e9648ee59e1b3be /Documentation/fb/fbcon.txt
parente614b18dcedb247ce6f848e623cdf2336df2b476 (diff)
[PATCH] VT binding: fbcon: Update documentation
Update Documentation/fb/fbcon.txt to reflect the following changes: 1. Simple illustration of the binding of the console down to individual framebuffer drivers 2. Usage of userspace tools to help with recovery of text console 3. How to use the attributes in /sys/class/tty/console to unload fbcon and the framebuffer drivers Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/fb/fbcon.txt')
-rw-r--r--Documentation/fb/fbcon.txt73
1 files changed, 50 insertions, 23 deletions
diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt
index f3a3be087707..b91aea57a98e 100644
--- a/Documentation/fb/fbcon.txt
+++ b/Documentation/fb/fbcon.txt
@@ -150,14 +150,42 @@ C. Boot options
150 150
151C. Attaching, Detaching and Unloading 151C. Attaching, Detaching and Unloading
152 152
153It's possible to detach/attach the framebuffer console from the vt layer by 153Before going on on how to attach, detach and unload the framebuffer console, an
154echoing anything to the following sysfs attributes found 154illustration of the dependencies may help.
155/sys/class/graphics/fbcon.
156 155
157 attach - attach framebuffer console to vt layer 156The console layer, as with most subsystems, needs a driver that interfaces with
158 detach - detach framebuffer console to vt layer 157the hardware. Thus, in a VGA console:
159 158
160If fbcon is detached from the vt layer, your boot console driver (which is 159console ---> VGA driver ---> hardware.
160
161Assuming the VGA driver can be unloaded, one must first unbind the VGA driver
162from the console layer before unloading the driver. The VGA driver cannot be
163unloaded if it is still bound to the console layer. (See
164Documentation/console/console.txt for more information).
165
166This is more complicated in the case of the the framebuffer console (fbcon),
167because fbcon is an intermediate layer between the console and the drivers:
168
169console ---> fbcon ---> fbdev drivers ---> hardware
170
171The fbdev drivers cannot be unloaded if it's bound to fbcon, and fbcon cannot
172be unloaded if it's bound to the console layer.
173
174So to unload the fbdev drivers, one must first unbind fbcon from the console,
175then unbind the fbdev drivers from fbcon. Fortunately, unbinding fbcon from
176the console layer will automatically unbind framebuffer drivers from
177fbcon. Thus, there is no need to explicitly unbind the fbdev drivers from
178fbcon.
179
180So, how do we unbind fbcon from the console? Part of the answer is in
181Documentation/console/console.txt. To summarize:
182
183Echo the ID number of the 'frame buffer driver' to:
184
185sys/class/tty/console/bind - attach framebuffer console to console layer
186sys/class/tty/console/unbind - detach framebuffer console from console layer
187
188If fbcon is detached from the console layer, your boot console driver (which is
161usually VGA text mode) will take over. A few drivers (rivafb and i810fb) will 189usually VGA text mode) will take over. A few drivers (rivafb and i810fb) will
162restore VGA text mode for you. With the rest, before detaching fbcon, you 190restore VGA text mode for you. With the rest, before detaching fbcon, you
163must take a few additional steps to make sure that your VGA text mode is 191must take a few additional steps to make sure that your VGA text mode is
@@ -183,27 +211,26 @@ restored properly. The following is one of the several methods that you can do:
183 211
1845. Now to detach fbcon: 2125. Now to detach fbcon:
185 213
186 vbetool vbestate restore < <vga state file> && \ 214 'cat /sys/class/tty/console/backend' and take note of the ID
187 echo 1 > /sys/class/graphics/fbcon/detach
188 215
1896. That's it, you're back to VGA mode. And if you compiled your drivers as 216The above is probably needed only once. Then:
190 modules, you can unload them at will. So if you want to change your driver
191 from xxxfb to yyyfb, you can do this:
192 217
193 detach fbcon 218 vbetool vbestate restore < <vga state file> && \
194 rmmod xxxfb 219 echo <ID> > /sys/class/tty/console/unbind
195 modprobe yyyfb
196 220
197 Of course, con2fbmap can do the same thing but will not work if xxxfb 2216. That's it, you're back to VGA mode. And if you compiled fbcon as a module,
198 and yyyfb are not compatible (ie, cannot be loaded at the same time). 222 you can unload it by 'rmmod fbcon'
199 223
2007. To reattach fbcon: 2247. To reattach fbcon:
201 225
202 echo 1 > /sys/class/graphics/fbcon/attach 226 echo <ID> > /sys/class/tty/console/bind
203 227
2048. Once the framebuffer console is detached, and if it is compiled as a module, 2288. Once fbcon is unbound, all drivers registered to the system will also
205the module can be unloaded with 'rmmod fbcon'. This feature is great for 229become unbound. This means that fbcon and individual framebuffer drivers
206developers. 230can be unloaded or reloaded at will. Reloading the drivers or fbcon will
231automatically bind the console, fbcon and the drivers together. Unloading
232all the drivers without unloading fbcon will make it impossible for the
233console to bind fbcon.
207 234
208Notes for vesafb users: 235Notes for vesafb users:
209======================= 236=======================
@@ -227,11 +254,11 @@ Variation 1:
227 c. Attach fbcon 254 c. Attach fbcon
228 255
229 vbetool vbestate restore < <vesa state file> && \ 256 vbetool vbestate restore < <vesa state file> && \
230 echo 1 > /sys/class/graphics/fbcon/attach
231
232Variation 2: 257Variation 2:
233 258
234 a. Before detaching fbcon, do: 259 a. Before detaching fbcon, do:
260 echo <ID> > /sys/class/tty/console/bind
261
235 262
236 vbetool vbemode get 263 vbetool vbemode get
237 264
@@ -242,7 +269,7 @@ Variation 2:
242 c. Attach fbcon: 269 c. Attach fbcon:
243 270
244 vbetool vbemode set <mode number> && \ 271 vbetool vbemode set <mode number> && \
245 echo 1 > /sys/class/graphics/fbcon/attach 272 echo <ID> > /sys/class/tty/console/bind
246 273
247-- 274--
248Antonino Daplas <adaplas@pol.net> 275Antonino Daplas <adaplas@pol.net>