linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Knut Petersen <Knut_Petersen@t-online.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
	"Antonino A. Daplas" <adaplas@gmail.com>,
	linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/1: 2.6.15] fbcon: don´t call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS
Date: Sat, 07 Jan 2006 10:22:04 +0100	[thread overview]
Message-ID: <43BF883C.5030708@t-online.de> (raw)

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

                 reply	other threads:[~2006-01-07  9:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43BF883C.5030708@t-online.de \
    --to=knut_petersen@t-online.de \
    --cc=adaplas@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).