diff options
author | Knut Petersen <Knut_Petersen@t-online.de> | 2006-01-07 04:22:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-07 13:39:34 -0500 |
commit | d354d9afe923eb08f7ee89128b38ddb6415de01d (patch) | |
tree | b4ce49dd4ad6963bff6b69ba413f074b11114837 /drivers/video/console/fbcon.c | |
parent | f9a204e1de73a7007de66fb289e1d64a7665c9b4 (diff) |
[PATCH] fbcon: donīt call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS
Nothing prevents a user to modprobe a framebuffer driver from e.g. the
xterm prompt. As a result, the set_par() function of the driver will be
called from fbcon_init().
This is fatal as a lot of X / framebuffer combinations are unable to
recover from set_par() reprogramming the graphics controller in
KD_GRAPHICS mode.
It is also unnecessary as the set_par() function will be called during a
switch to KD_TEXT anyway. Because of this no side effects are possible.
Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/console/fbcon.c')
-rw-r--r-- | drivers/video/console/fbcon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 3660e51b2612..50e4c4eb491f 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -1110,7 +1110,7 @@ static void fbcon_init(struct vc_data *vc, int init) | |||
1110 | * | 1110 | * |
1111 | * We need to do it in fbcon_init() to prevent screen corruption. | 1111 | * We need to do it in fbcon_init() to prevent screen corruption. |
1112 | */ | 1112 | */ |
1113 | if (CON_IS_VISIBLE(vc)) { | 1113 | if (CON_IS_VISIBLE(vc) && vc->vc_mode == KD_TEXT) { |
1114 | if (info->fbops->fb_set_par && | 1114 | if (info->fbops->fb_set_par && |
1115 | !(ops->flags & FBCON_FLAGS_INIT)) | 1115 | !(ops->flags & FBCON_FLAGS_INIT)) |
1116 | info->fbops->fb_set_par(info); | 1116 | info->fbops->fb_set_par(info); |