From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 3/3] multiboot2: do not set StdOut mode unconditionally
Date: Wed, 31 May 2023 12:57:13 +0200 [thread overview]
Message-ID: <ZHcoCcd5nugmWURI@Air-de-Roger> (raw)
In-Reply-To: <b9bd819d-93ad-d511-4602-8e3f4f515546@suse.com>
On Wed, Apr 05, 2023 at 12:36:55PM +0200, Jan Beulich wrote:
> On 31.03.2023 11:59, Roger Pau Monne wrote:
> > @@ -887,6 +881,15 @@ void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable
> >
> > efi_arch_edid(gop_handle);
> > }
> > + else
> > + {
> > + /* If no GOP, init ConOut (StdOut) to the max supported size. */
> > + efi_console_set_mode();
> > +
> > + if ( StdOut->QueryMode(StdOut, StdOut->Mode->Mode,
> > + &cols, &rows) == EFI_SUCCESS )
> > + efi_arch_console_init(cols, rows);
> > + }
>
> Instead of making this an "else", wouldn't you better check that a
> valid gop_mode was found? efi_find_gop_mode() can return ~0 after all.
When using vga=current gop_mode would also be ~0, in order for
efi_set_gop_mode() to not change the current mode, I was trying to
avoid exposing keep_current or similar extra variable to signal this.
> Furthermore, what if the active mode doesn't support text output? (I
> consider the spec unclear in regard to whether this is possible, but
> maybe I simply didn't find the right place stating it.)
>
> Finally I think efi_arch_console_init() wants calling nevertheless.
>
> So altogether maybe
>
> if ( gop_mode == ~0 ||
> StdOut->QueryMode(StdOut, StdOut->Mode->Mode,
> &cols, &rows) != EFI_SUCCESS )
I think it would make more sense to call efi_console_set_mode() only
if the current StdOut mode is not valid, as anything different from
vga=current will already force a GOP mode change.
Thanks, Roger.
next prev parent reply other threads:[~2023-05-31 10:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 9:59 [PATCH v2 0/3] gfx: improvements when using multiboot2 and EFI Roger Pau Monne
2023-03-31 9:59 ` [PATCH v2 1/3] efi: try to use the currently set GOP mode Roger Pau Monne
2023-04-04 16:07 ` Jan Beulich
2023-03-31 9:59 ` [PATCH v2 2/3] multiboot2: parse console= and vga= options when setting " Roger Pau Monne
2023-04-05 10:15 ` Jan Beulich
2023-05-30 16:02 ` Roger Pau Monné
2023-05-31 9:15 ` Jan Beulich
2023-05-31 9:30 ` Roger Pau Monné
2023-05-31 9:47 ` Jan Beulich
2023-03-31 9:59 ` [PATCH v2 3/3] multiboot2: do not set StdOut mode unconditionally Roger Pau Monne
2023-04-05 10:36 ` Jan Beulich
2023-05-31 10:57 ` Roger Pau Monné [this message]
2023-05-31 14:16 ` Jan Beulich
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=ZHcoCcd5nugmWURI@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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.