diff options
author | Jesse Barnes <jesse.barnes@intel.com> | 2007-07-17 04:05:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 10:23:11 -0700 |
commit | cfafca8067c6defbaeb28cb898b7b3f8abdfe20d (patch) | |
tree | 93c5bae1e14a4d9bec3e9396c5dd9ef0fecfaf1d /include | |
parent | afd1db1632c3f8f95cbc2786bfa122cead79db58 (diff) | |
download | kernel_samsung_smdk4412-cfafca8067c6defbaeb28cb898b7b3f8abdfe20d.zip kernel_samsung_smdk4412-cfafca8067c6defbaeb28cb898b7b3f8abdfe20d.tar.gz kernel_samsung_smdk4412-cfafca8067c6defbaeb28cb898b7b3f8abdfe20d.tar.bz2 |
fbdev: fbcon: console unregistration from unregister_framebuffer
This allows for proper console unregistration via the VT layer, and updates
the FB layer to use it. This makes debugging new console drivers much easier,
since you can properly clean them up before unloading.
[adaplas]
unregister_framebuffer() is typically called as part of the driver's
module_exit(). Doing so otherwise will freeze the machine as the VT layer is
holding reference counts on fbcon, and fbcon on the driver. With this change,
it allows unregister_framebuffer() to be called safely anywhere as needed.
Additions from the original: If multiple drivers are used by fbcon, and if
one of them unregisters, a driver will take over the consoles vacated by the
outgoing one (via set_con2fb_map). Once only the outgoing driver remains,
then fbcon will unbind from the VT layer (if CONFIG_HW_CONSOLE_UNBINDING is
set to y).
It is important that these drivers implement fb_open() and fb_release()
just to ensure that no other process is using the driver. Likewise, these
drivers _must_ check the return value of unregister_framebuffer().
[akpm@linux-foundation.org: make fbcon_unbind() stub inline]
Signed-off-by: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 6622682..8628423 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -529,6 +529,8 @@ struct fb_cursor_user { #define FB_EVENT_CONBLANK 0x0C /* Get drawing requirements */ #define FB_EVENT_GET_REQ 0x0D +/* Unbind from the console if possible */ +#define FB_EVENT_FB_UNBIND 0x0E struct fb_event { struct fb_info *info; |