All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yannick Heneault <yannick_heneault@matrox.com>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>,
	akpm@linux-foundation.org
Cc: airlied@redhat.com, hpa@zytor.com
Subject: [PATCH] vgacon: checking for efi machine
Date: Thu, 06 Jan 2011 11:10:58 -0500	[thread overview]
Message-ID: <4D25E992.3070006@matrox.com> (raw)

It seems there is a small problem of VGA palette corruption on EFI machine. When the kernel initializes the architecture, it checks if themachine is a EFI machine and assumes that a VGA console can exist. When it initialize the console in vgacon_startup it checks if itcan really use the VGA console. I think this is where a check ismissing. Currently, the function can fail if a VESA boot mode isdetected but not if a EFI boot mode was used. Thus, the function vgacon_startup doesn't fail and initialize thevideo card for a real VGA mode. This function change the first 16entries of the VGA palette. When the efifb driver kick-in, the paletteis not restored to default ramp value, thus the 16 first entry remain ina modified state. The following patch prevent this corruption.

Signed-off-by: Yannick Heneault<yheneaul@matrox.com>
---
diff -Nur linux-2.6.37-ori/drivers/video/console/vgacon.c linux-2.6.37/drivers/video/console/vgacon.c
--- linux-2.6.37-ori/drivers/video/console/vgacon.c	2011-01-04 19:50:19.000000000 -0500
+++ linux-2.6.37/drivers/video/console/vgacon.c	2011-01-06 10:38:24.713590593 -0500
@@ -375,7 +375,8 @@
  	u16 saved1, saved2;
  	volatile u16 *p;

-	if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB) {
+	if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB ||
+	    screen_info.orig_video_isVGA == VIDEO_TYPE_EFI) {
  	      no_vga:
  #ifdef CONFIG_DUMMY_CONSOLE
  		conswitchp =&dummy_con;




                 reply	other threads:[~2011-01-06 16:39 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=4D25E992.3070006@matrox.com \
    --to=yannick_heneault@matrox.com \
    --cc=airlied@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.