From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Cc: Pavel Roskin <proski@gnu.org>
Subject: Re: [PATCH] Video mode fixes in linux loader
Date: Mon, 13 Apr 2009 16:45:58 +0200 [thread overview]
Message-ID: <20090413144558.GA22165@thorin> (raw)
In-Reply-To: <20090413141657.GE12170@thorin>
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
On Mon, Apr 13, 2009 at 04:16:57PM +0200, Robert Millan wrote:
> > The default VGA mode is now GRUB_LINUX_VID_MODE_NORMAL, not the mode of
> > the kernel we tried to load before.
>
> Ok, BUT if we're already in vesa mode, and we know it works (since we're using
> it), there's no point in wasting time only to get a worse mode.
>
> We should just make sure subsequent calls to "linux" command override the
> previous one.
I think this should do it. Can you confirm this works for you?
(note: this patch is intentionally missing indentation, for readability)
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
[-- Attachment #2: vid_mode.diff --]
[-- Type: text/x-diff, Size: 1533 bytes --]
* loader/i386/linux.c (grub_linux_boot): Only go back to text
mode when `vid_mode' wasn't initialized. Otherwise leave the
current mode (whatever that is).
(grub_cmd_linux): Default to `vid_mode = 0' rather than
`GRUB_LINUX_VID_MODE_NORMAL'.
Index: loader/i386/linux.c
===================================================================
--- loader/i386/linux.c (revision 2097)
+++ loader/i386/linux.c (working copy)
@@ -331,12 +331,14 @@ grub_linux_boot (void)
params = real_mode_mem;
- if (vid_mode < GRUB_LINUX_VID_MODE_VESA_START ||
- vid_mode >= GRUB_LINUX_VID_MODE_VESA_START +
- ARRAY_SIZE (linux_vesafb_modes))
- grub_video_restore ();
- else if (vid_mode)
+ if (vid_mode)
{
+ if (vid_mode < GRUB_LINUX_VID_MODE_VESA_START ||
+ vid_mode >= GRUB_LINUX_VID_MODE_VESA_START +
+ ARRAY_SIZE (linux_vesafb_modes))
+ grub_video_restore ();
+ else
+ {
struct linux_vesafb_mode *linux_mode;
int depth, flags;
@@ -366,6 +368,7 @@ grub_linux_boot (void)
return grub_errno;
}
}
+ }
if (! grub_linux_setup_video (params))
params->have_vga = GRUB_VIDEO_TYPE_VLFB;
@@ -570,8 +573,7 @@ grub_cmd_linux (grub_command_t cmd __att
(unsigned) real_size, (unsigned) prot_size);
/* Look for memory size and video mode specified on the command line. */
- vid_mode = GRUB_LINUX_VID_MODE_NORMAL;
- linux_mem_size = 0;
+ vid_mode = linux_mem_size = 0;
for (i = 1; i < argc; i++)
if (grub_memcmp (argv[i], "vga=", 4) == 0)
{
next prev parent reply other threads:[~2009-04-13 14:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 15:34 [PATCH] Video mode fixes in linux loader Pavel Roskin
2009-04-07 0:31 ` Yoshinori K. Okuji
2009-04-07 0:49 ` Pavel Roskin
2009-04-07 7:31 ` phcoder
2009-04-07 22:04 ` Pavel Roskin
2009-04-12 19:11 ` phcoder
2009-04-12 20:43 ` Pavel Roskin
2009-04-13 14:16 ` Robert Millan
2009-04-13 14:45 ` Robert Millan [this message]
2009-04-13 15:41 ` Pavel Roskin
2009-04-13 19:05 ` Robert Millan
2009-04-13 23:20 ` Pavel Roskin
2009-04-14 0:02 ` phcoder
2009-05-02 11:38 ` Robert Millan
2009-05-02 11:31 ` Robert Millan
2009-05-02 15:32 ` Robert Millan
2009-05-03 0:03 ` BandiPat
2009-05-03 15:53 ` Robert Millan
2009-05-04 15:15 ` BandiPat
2009-05-04 16:01 ` Robert Millan
2009-05-04 18:16 ` BandiPat
2009-05-04 18:16 ` Felix Zielcke
2009-05-04 20:30 ` Robert Millan
2009-05-04 21:59 ` BandiPat
2009-05-13 20:47 ` Robert Millan
2009-05-04 18:04 ` Robert Millan
2009-05-03 13:18 ` Isaac Dupree
2009-05-03 15:50 ` Robert Millan
2009-04-13 15:16 ` Pavel Roskin
2009-04-13 18:59 ` Robert Millan
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=20090413144558.GA22165@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
--cc=proski@gnu.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.