mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>, Andi Kleen <ak@suse.de>,
	Alan <alan@lxorguk.ukuu.org.uk>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch] Refine SCREEN_INFO sanity check for vgacon initialization.
Date: Fri, 11 May 2007 18:48:47 -0600	[thread overview]
Message-ID: <m1veeyrhn4.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <46444F3F.6010308@redhat.com> (Gerd Hoffmann's message of "Fri, 11 May 2007 13:10:55 +0200")

Gerd Hoffmann <kraxel@redhat.com> writes:

>   Hi,
>
> Checking video mode field only to see whenever SCREEN_INFO is
> initialized is not enougth, in some cases it is zero although
> a vga card is present.  Lets additionally check cols and lines.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>

>
> Updates f82af20e1a028e16b9bb11da081fa1148d40fa6a, should go
> into 2.6.22.
>
> please apply,
>   Gerd
>
> Refine SCREEN_INFO sanity check for vgacon initialization.
>
> Checking video mode field only to see whenever SCREEN_INFO is
> initialized is not enougth, in some cases it is zero although
> a vga card is present.  Lets additionally check cols and lines.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Andi Kleen <ak@suse.de>
> Cc: Alan <alan@lxorguk.ukuu.org.uk>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Eric W. Biederman <ebiederm@xmission.com>
> ---
>  drivers/video/console/vgacon.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> Index: vanilla-2.6.21-git11/drivers/video/console/vgacon.c
> ===================================================================
> --- vanilla-2.6.21-git11.orig/drivers/video/console/vgacon.c
> +++ vanilla-2.6.21-git11/drivers/video/console/vgacon.c
> @@ -368,9 +368,14 @@ static const char *vgacon_startup(void)
>  #endif
>  	}
>  
> +	/* SCREEN_INFO initialized? */
> +	if ((ORIG_VIDEO_MODE  == 0) &&
> +	    (ORIG_VIDEO_LINES == 0) &&
> +	    (ORIG_VIDEO_COLS  == 0))
> +		goto no_vga;
> +
>  	/* VGA16 modes are not handled by VGACON */
> - if ((ORIG_VIDEO_MODE == 0x00) || /* SCREEN_INFO not initialized */
> -	    (ORIG_VIDEO_MODE == 0x0D) ||	/* 320x200/4 */
> +	if ((ORIG_VIDEO_MODE == 0x0D) ||	/* 320x200/4 */
>  	    (ORIG_VIDEO_MODE == 0x0E) ||	/* 640x200/4 */
>  	    (ORIG_VIDEO_MODE == 0x10) ||	/* 640x350/4 */
>  	    (ORIG_VIDEO_MODE == 0x12) ||	/* 640x480/4 */

      reply	other threads:[~2007-05-12  0:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11 11:10 Gerd Hoffmann
2007-05-12  0:48 ` Eric W. Biederman [this message]

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=m1veeyrhn4.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    /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

Powered by JetHome