+ vt-binding-fbcon-update-documentation.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     VT binding: fbcon: Update documentation

has been added to the -mm tree.  Its filename is

     vt-binding-fbcon-update-documentation.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: VT binding: fbcon: Update documentation
From: "Antonino A. Daplas" <adaplas@xxxxxxxxx>


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@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 Documentation/fb/fbcon.txt |   75 +++++++++++++++++++++++------------
 1 file changed, 51 insertions(+), 24 deletions(-)

diff -puN Documentation/fb/fbcon.txt~vt-binding-fbcon-update-documentation Documentation/fb/fbcon.txt
--- devel/Documentation/fb/fbcon.txt~vt-binding-fbcon-update-documentation	2006-06-09 01:56:19.000000000 -0700
+++ devel-akpm/Documentation/fb/fbcon.txt	2006-06-09 01:56:19.000000000 -0700
@@ -150,14 +150,42 @@ C. Boot options
 
 C. Attaching, Detaching and Unloading
 
-It's possible to detach/attach the framebuffer console from the vt layer by
-echoing anything to the following sysfs attributes found
-/sys/class/graphics/fbcon.
+Before going on on how to attach, detach and unload the framebuffer console, an
+illustration of the dependencies may help.
 
-	   attach - attach framebuffer console to vt layer
-	   detach - detach framebuffer console to vt layer
+The console layer, as with most subsystems, needs a driver that interfaces with
+the hardware. Thus, in a VGA console:
 
-If fbcon is detached from the vt layer, your boot console driver (which is
+console ---> VGA driver ---> hardware.
+
+Assuming the VGA driver can be unloaded, one must first unbind the VGA driver
+from the console layer before unloading the driver.  The VGA driver cannot be
+unloaded if it is still bound to the console layer. (See
+Documentation/console/console.txt for more information).
+
+This is more complicated in the case of the the framebuffer console (fbcon),
+because fbcon is an intermediate layer between the console and the drivers:
+
+console ---> fbcon ---> fbdev drivers ---> hardware
+
+The fbdev drivers cannot be unloaded if it's bound to fbcon, and fbcon cannot
+be unloaded if it's bound to the console layer.
+
+So to unload the fbdev drivers, one must first unbind fbcon from the console,
+then unbind the fbdev drivers from fbcon.  Fortunately, unbinding fbcon from
+the console layer will automatically unbind framebuffer drivers from
+fbcon. Thus, there is no need to explicitly unbind the fbdev drivers from
+fbcon.
+
+So, how do we unbind fbcon from the console? Part of the answer is in
+Documentation/console/console.txt. To summarize:
+
+Echo the ID number of the 'frame buffer driver' to:
+
+sys/class/tty/console/bind - attach framebuffer console to console layer
+sys/class/tty/console/unbind - detach framebuffer console from console layer
+
+If fbcon is detached from the console layer, your boot console driver (which is
 usually VGA text mode) will take over.  A few drivers (rivafb and i810fb) will
 restore VGA text mode for you.  With the rest, before detaching fbcon, you
 must take a few additional steps to make sure that your VGA text mode is
@@ -183,27 +211,26 @@ restored properly. The following is one 
 
 5. Now to detach fbcon:
 
-       vbetool vbestate restore < <vga state file> && \
-       echo 1 > /sys/class/graphics/fbcon/detach
+       'cat /sys/class/tty/console/backend' and take note of the ID
 
-6. That's it, you're back to VGA mode. And if you compiled your drivers as
-   modules, you can unload them at will.  So if you want to change your driver
-   from xxxfb to yyyfb, you can do this:
-
-	detach fbcon
-	rmmod xxxfb
-	modprobe yyyfb
+The above is probably needed only once. Then:
 
-	Of course, con2fbmap can do the same thing but will not work if xxxfb
-	and yyyfb are not compatible (ie, cannot be loaded at the same time).
+       vbetool vbestate restore < <vga state file> && \
+       echo <ID> > /sys/class/tty/console/unbind
+
+6. That's it, you're back to VGA mode. And if you compiled fbcon as a module,
+   you can unload it by 'rmmod fbcon'
 
 7. To reattach fbcon:
 
-       echo 1 > /sys/class/graphics/fbcon/attach
+       echo <ID> > /sys/class/tty/console/bind
 
-8. Once the framebuffer console is detached, and if it is compiled as a module,
-the module can be unloaded with 'rmmod fbcon'.  This feature is great for
-developers.
+8. Once fbcon is unbound, all drivers registered to the system will also
+become unbound.  This means that fbcon and individual framebuffer drivers
+can be unloaded or reloaded at will. Reloading the drivers or fbcon will
+automatically bind the console, fbcon and the drivers together. Unloading
+all the drivers without unloading fbcon will make it impossible for the
+console to bind fbcon.
 
 Notes for vesafb users:
 =======================
@@ -227,11 +254,11 @@ Variation 1:
     c. Attach fbcon
 
         vbetool vbestate restore < <vesa state file> && \
-	echo 1 > /sys/class/graphics/fbcon/attach
-
 Variation 2:
 
     a. Before detaching fbcon, do:
+	echo <ID> > /sys/class/tty/console/bind
+
 
        vbetool vbemode get
 
@@ -242,7 +269,7 @@ Variation 2:
     c. Attach fbcon:
 
        vbetool vbemode set <mode number> && \
-       echo 1 > /sys/class/graphics/fbcon/attach
+	echo <ID> > /sys/class/tty/console/bind
 
 --
 Antonino Daplas <adaplas@xxxxxxx>
_

Patches currently in -mm which might be from adaplas@xxxxxxxxx are

git-intelfb.patch
savagefb-allocate-space-for-current-and-saved-register.patch
savagefb-add-state-save-and_restore-hooks.patch
savagefb-add-state-save-and_restore-hooks-fix.patch
fbdev-more-accurate-sync-range-extrapolation.patch
nvidiafb-revise-pci_device_id-table.patch
atyfb-fix-hardware-cursor-handling.patch
atyfb-remove-unneeded-calls-to-wait_for_idle.patch
atyfb-set-correct-acceleration-flags.patch
epson1355fb-update-platform-code.patch
vesafb-update-platform-code.patch
vfb-update-platform-code.patch
vga16fb-update-platform-code.patch
fbdev-static-pseudocolor-with-depth-less-than-4-does.patch
savagefb-whitespace-cleanup.patch
fbdev-firmware-edid-fixes.patch
nvidiafb-add-support-for-geforce-6100-and-related-chipsets.patch
vesafb-fix-return-code-of-vesafb_setcolreg.patch
vesafb-prefer-vga-registers-over-pmi.patch
atyfb-fix-dead-code.patch
fbdev-coverity-bug-85.patch
fbdev-coverity-bug-90.patch
backlight-fix-kconfig-dependency.patch
detaching-fbcon-fix-vgacon-to-allow-retaking-of-the.patch
detaching-fbcon-fix-give_up_console.patch
detaching-fbcon-remove-calls-to-pci_disable_device.patch
detaching-fbcon-add-sysfs-class-device-entry-for-fbcon.patch
detaching-fbcon-clean-up-exit-code.patch
detaching-fbcon-add-capability-to-attach-detach-fbcon.patch
detaching-fbcon-update-documentation.patch
vt-binding-add-binding-unbinding-support-for-the-vt.patch
vt-binding-add-sysfs-support.patch
vt-binding-update-fbcon-to-support-binding.patch
vt-binding-fbcon-update-documentation.patch
vt-binding-add-new-doc-file-describing-the-feature.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux