From: Andrew Morton <akpm@linux-foundation.org>
To: Yannick Heneault <yannick_heneault@matrox.com>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>,
airlied@redhat.com, hpa@zytor.com
Subject: Re: [BUG] VGA palette corruption in vgacon.c for EFI machine
Date: Tue, 4 Jan 2011 17:05:33 -0800 [thread overview]
Message-ID: <20110104170533.ce207a46.akpm@linux-foundation.org> (raw)
In-Reply-To: <4CEFC7E3.4060402@matrox.com>
On Fri, 26 Nov 2010 09:44:51 -0500
Yannick Heneault <yannick_heneault@matrox.com> wrote:
> Hi,
>
> It seems there is a small problem of VGA palette corruption on EFI
> machine. When the kernel initializes the architecture, it checks if the
> machine is a EFI machine and if the memory at 0xa0000 is not tagged as
> conventional memory, which should not be the case because this is VGA
> memory. In that case, the kernel assumes that a VGA console can exist. I
> would think that this assumption is correct.
>
> When the kernel initialize the console in vgacon_startup it checks if it
> can really use the VGA console. I think this is where a check is
> missing. Currently, the function can fail if a VESA boot mode is
> detected but not if a EFI boot mode was used. I think the code should be
> modified like this :
>
> --- a/drivers/video/console/vgacon.c
> +++ b/drivers/video/console/vgacon.c
> @@ -377,7 +377,8 @@ static const char *vgacon_startup(void)
> 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;
>
>
> In that case, the VGA console will fail and a dummy console will be
> temporary used until the EFI driver get loaded. At that point the
> console will be mapped to the EFI driver and graphics (splash screen and
> penguins) will appear correctly.
>
> Currently, the function vgacon_startup doesn't fail and initialize the
> video card for a real VGA mode. This function change the first 16
> entries of the VGA palette. When the efifb driver kick-in, the palette
> is not restored to default ramp value, thus the 16 first entry remain in
> a modified state.
>
If that fix worked for you then please send it as a formal, tested,
signed-off kernel patch and we'll put it in the pipeline and see what
emerges from the other end.
next prev parent reply other threads:[~2011-01-05 1:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-26 14:44 [BUG] VGA palette corruption in vgacon.c for EFI machine Yannick Heneault
2011-01-05 1:05 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-11-23 21:39 Yannick Heneault
2010-11-23 21:25 Yannick Heneault
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=20110104170533.ce207a46.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=airlied@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yannick_heneault@matrox.com \
/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.