Skip to content

Commit

Permalink
[PATCH] fbcon: don´t call set_par() in fbcon_init() if vc_mode == KD_…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Knut Petersen authored and Linus Torvalds committed Jan 7, 2006
1 parent f9a204e commit d354d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ static void fbcon_init(struct vc_data *vc, int init)
*
* We need to do it in fbcon_init() to prevent screen corruption.
*/
if (CON_IS_VISIBLE(vc)) {
if (CON_IS_VISIBLE(vc) && vc->vc_mode == KD_TEXT) {
if (info->fbops->fb_set_par &&
!(ops->flags & FBCON_FLAGS_INIT))
info->fbops->fb_set_par(info);
Expand Down

0 comments on commit d354d9a

Please sign in to comment.