diff options
author | Knut Petersen <Knut_Petersen@t-online.de> | 2005-12-13 01:17:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-13 01:31:17 -0500 |
commit | 39942fd8ff57c8623451bbfaffe8a184cc8b463a (patch) | |
tree | cc40ada654e14d496dbc4db9d9d42b81c1c8f2f7 /include/linux/fb.h | |
parent | 4e1567d3aad9bae0ecc5bb047179cd026bfb035c (diff) |
[PATCH] fbdev: fix switch to KD_TEXT, enhanced version
Every framebuffer driver relies on the assumption that the set_par()
function of the driver is called before drawing functions and other
functions dependent on the hardware state are executed.
Whenever you switch from X to a framebuffer console for the very first
time, there is a chance that a broken X system has _not_ set the mode to
KD_GRAPHICS, thus the vt and framebuffer code executes a screen redraw and
several other functions before a set_par() is executed. This is believed
to be not a bug of linux but a bug of X/xdm. At least some X releases used
by SuSE and Debian show this behaviour.
There was a 2nd case, but that has been fixed by Antonino Daplas on
10-dec-2005.
This patch allows drivers to set a flag to inform fbcon_switch() that they
prefer a set_par() call on every console switch, working around the
problems caused by the broken X releases.
The flag will be used by the next release of cyblafb and might help other
drivers that assume a hardware state different to the one used by X.
As the default behaviour does not change, this patch should be acceptable
to everybody.
Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Acked-by: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r-- | include/linux/fb.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 55ccaf3706c1..dab3a4decb44 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -732,6 +732,18 @@ struct fb_tile_ops { | |||
732 | from userspace */ | 732 | from userspace */ |
733 | #define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ | 733 | #define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ |
734 | 734 | ||
735 | /* A driver may set this flag to indicate that it does want a set_par to be | ||
736 | * called every time when fbcon_switch is executed. The advantage is that with | ||
737 | * this flag set you can really be shure that set_par is always called before | ||
738 | * any of the functions dependant on the correct hardware state or altering | ||
739 | * that state, even if you are using some broken X releases. The disadvantage | ||
740 | * is that it introduces unwanted delays to every console switch if set_par | ||
741 | * is slow. It is a good idea to try this flag in the drivers initialization | ||
742 | * code whenever there is a bug report related to switching between X and the | ||
743 | * framebuffer console. | ||
744 | */ | ||
745 | #define FBINFO_MISC_ALWAYS_SETPAR 0x40000 | ||
746 | |||
735 | struct fb_info { | 747 | struct fb_info { |
736 | int node; | 748 | int node; |
737 | int flags; | 749 | int flags; |