From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: marmarek@invisiblethingslab.com, xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/5] efi: only set a console mode if the current one is invalid
Date: Fri, 31 Mar 2023 09:37:38 +0200 [thread overview]
Message-ID: <ZCaNwp6dJg5MhRpP@Air-de-Roger> (raw)
In-Reply-To: <6dcc187a-5e81-2f36-4104-d9caac148cdd@suse.com>
On Fri, Mar 31, 2023 at 08:51:46AM +0200, Jan Beulich wrote:
> On 30.03.2023 18:17, Roger Pau Monné wrote:
> > On Thu, Mar 30, 2023 at 06:07:57PM +0200, Jan Beulich wrote:
> >> On 30.03.2023 17:44, Roger Pau Monné wrote:
> >>> I guess I'm slightly confused by the usage of both GOP and StdOut, I
> >>> would assume if we have a gop, and can correctly initialize it there's
> >>> no need to fiddle with StdOut also?
> >>
> >> Setting the GOP mode is done last before exiting boot services; this
> >> may be a graphics mode which doesn't support a text output protocol.
> >
> > Right, that's what I was missing. I assumed that all modes available
> > in GOP would be compatible with the ConOut mode.
> >
> > Would you be OK with leaving StdOut as-is when booted from multiboot2,
> > or there's a chance of things not being properly setup?
>
> On modern UEFI it may be unlikely, but I think it's not impossible (see
> below).
>
> > IMO it's not very friendly to change the StdOut mode if not explicitly
> > requested, as in the multiboot2 case that gets setup by the
> > bootloader.
>
> May get set up, that is. If it was set up, then yes, we probably should
> leave it alone unless told to use another mode. I.e. no vga= or
> vga=current should minimally result in no further mode change. Aiui we
> can't easily honor vga=gfx-... in that case, so leaving the mode alone
> there may also be better than trying to guess a mode. The only time
> where I would think it would be nice to switch by default even in the
> xen.gz case is if the boot loader handed us the screen in some text
> mode.
How would you detect such case?
ConOut is always text-mode like because it's a
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface.
Would it be a matter of checking whether the current GOP mode is
valid, and if so leave it as-is unless told otherwise by a command
line parameter?
I would also like to avoid the unconditional resizing of the ConOut
interface that's done in efi_console_set_mode(), as that has the size
effect of changing the GOP mode, so I would only call
efi_console_set_mode() is there's no gop.
Not sure it's meaningful to change the ConOut number of cols/rows if
there's no GOP, maybe it's possible to have some kind of screen that's
usable for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL but not as a GOP?
Thanks, Roger.
next prev parent reply other threads:[~2023-03-31 7:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 15:45 [PATCH 0/5] gfx: improvements when using multiboot2 and EFI + misc Roger Pau Monne
2022-11-23 15:45 ` [PATCH 1/5] x86/platform: introduce hypercall to get initial video console settings Roger Pau Monne
2022-12-05 13:00 ` Jan Beulich
2022-11-23 15:45 ` [PATCH 2/5] efi: only set a console mode if the current one is invalid Roger Pau Monne
2022-12-05 14:19 ` Jan Beulich
2023-03-30 15:44 ` Roger Pau Monné
2023-03-30 16:07 ` Jan Beulich
2023-03-30 16:17 ` Roger Pau Monné
2023-03-31 6:51 ` Jan Beulich
2023-03-31 7:37 ` Roger Pau Monné [this message]
2023-04-03 11:03 ` Jan Beulich
2022-11-23 15:45 ` [PATCH 3/5] efi: try to use the currently set GOP mode Roger Pau Monne
2022-12-05 14:32 ` Jan Beulich
2022-11-23 15:45 ` [PATCH 4/5] multiboot2: parse console= option when setting " Roger Pau Monne
2022-12-05 15:10 ` Jan Beulich
2022-12-05 16:01 ` Jan Beulich
2022-12-13 11:41 ` Daniel Kiper
2023-03-29 16:29 ` Roger Pau Monné
2023-03-30 6:24 ` Jan Beulich
2023-03-30 8:11 ` Roger Pau Monné
2023-03-30 8:52 ` Jan Beulich
2022-11-23 15:45 ` [PATCH 5/5] multiboot2: parse vga= " Roger Pau Monne
2022-12-05 16:26 ` Jan Beulich
2022-11-24 5:15 ` [PATCH 0/5] gfx: improvements when using multiboot2 and EFI + misc Marek Marczykowski-Górecki
2022-11-24 8:11 ` Jan Beulich
2022-11-24 8:59 ` Roger Pau Monné
2022-11-24 9:56 ` Roger Pau Monné
2022-11-24 15:00 ` Marek Marczykowski-Górecki
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=ZCaNwp6dJg5MhRpP@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=jbeulich@suse.com \
--cc=marmarek@invisiblethingslab.com \
--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.