[PATCH 1/1: 2.6.15] fbcon: don´t call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux