* [PATCH 1/1: 2.6.15] fbcon: don´t call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS
@ 2006-01-07 9:22 Knut Petersen
0 siblings, 0 replies; only message in thread
From: Knut Petersen @ 2006-01-07 9:22 UTC (permalink / raw)
To: Linus Torvalds
Cc: Andrew Morton, Antonino A. Daplas, linux-fbdev-devel,
linux-kernel
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>
diff -uprN -X linux/Documentation/dontdiff -x '*.bak' -x '*.ctx'
linuxorig/drivers/video/console/fbcon.c linux/drivers/video/console/fbcon.c
--- linuxorig/drivers/video/console/fbcon.c 2006-01-07 09:18:25.000000000 +0100
+++ linux/drivers/video/console/fbcon.c 2006-01-07 07:31:08.000000000 +0100
@@ -1110,7 +1110,7 @@ static void fbcon_init(struct vc_data *v
*
* 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-07 9:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-07 9:22 [PATCH 1/1: 2.6.15] fbcon: don´t call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS Knut Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).