From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Mario Limonciello <superm1@kernel.org>,
mario.limonciello@amd.com, bhelgaas@google.com,
Eric Biggers <ebiggers@kernel.org>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/VGA: Select SCREEN_INFO
Date: Mon, 13 Oct 2025 18:36:16 +0300 (EEST) [thread overview]
Message-ID: <f4df0e28-5d45-44aa-e7b9-2d5d075ea649@linux.intel.com> (raw)
In-Reply-To: <a7870faa-9c31-435b-b043-9f3ba1cbdcee@suse.de>
[-- Attachment #1: Type: text/plain, Size: 3145 bytes --]
On Mon, 13 Oct 2025, Thomas Zimmermann wrote:
> Am 13.10.25 um 16:35 schrieb Ilpo Järvinen:
> > On Mon, 13 Oct 2025, Mario Limonciello wrote:
> >
> > > On 10/13/25 9:16 AM, Ilpo Järvinen wrote:
> > > > On Mon, 13 Oct 2025, Mario Limonciello (AMD) wrote:
> > > >
> > > > > commit 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with
> > > > > a screen info check") introduced an implicit dependency upon
> > > > > SCREEN_INFO
> > > > > by removing the open coded implementation.
> > > > >
> > > > > If a user didn't have CONFIG_SCREEN_INFO set vga_is_firmware_default()
> > > > > would now return false. Add a select for SCREEN_INFO to ensure that
> > > > > the
> > > > > VGA arbiter works as intended.
> > > > >
> > > > > Reported-by: Eric Biggers <ebiggers@kernel.org>
> > > > > Closes: https://lore.kernel.org/linux-pci/20251012182302.GA3412@sol/
> > > > > Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> > > > > Fixes: 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with
> > > > > a
> > > > > screen info check")
> > > > > Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
> > > > > ---
> > > > > drivers/pci/Kconfig | 1 +
> > > > > 1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> > > > > index 7065a8e5f9b14..c35fed47addd5 100644
> > > > > --- a/drivers/pci/Kconfig
> > > > > +++ b/drivers/pci/Kconfig
> > > > > @@ -306,6 +306,7 @@ config VGA_ARB
> > > > > bool "VGA Arbitration" if EXPERT
> > > > > default y
> > > > > depends on (PCI && !S390)
> > > > > + select SCREEN_INFO
> > > > > help
> > > > > Some "legacy" VGA devices implemented on PCI typically have
> > > > > the same
> > > > > hard-decoded addresses as they did on ISA. When multiple PCI
> > > > > devices
> > > > The commit 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default()
> > > > with
> > > > a screen info check") also changed to #ifdef CONFIG_SCREEN_INFO around
> > > > the
> > > > call, but that now becomes superfluous with this select, no?
> > > Thanks! Will adjust.
>
> Yes, thanks. You can no longer run into this #else.
>
> > >
> > > > Looking into the history of the ifdefs here is quite odd pattern (only
> > > > the last one comes with some explanation but even that is on the vague
> > > > side and fails to remove the actual now unnecessary ifdef :-/):
> > > >
> > > > #if defined(CONFIG_X86) -> #if defined(CONFIG_X86) -> select SCREEN_INFO
> > > >
> > > > Was it intentional to allow building without CONFIG_SCREEN_INFO?
> > > >
> > > You mean in the VGA arbiter code? Or just in general?
> > Here in the VGA arbiter. I'm just trying to understand why the #else part
> > was here post-337bf13aa9dda.
>
> The #else branch used to return false (i.e., the device is not the default).
> But this was only used internally by fbcon for minor features. So it really
> didn't matter that much.
>
> Now we need the default for userspace, hence we likely should have an #else
> branch at all.
Thanks for the explanation.
--
i.
next prev parent reply other threads:[~2025-10-13 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 13:59 [PATCH] PCI/VGA: Select SCREEN_INFO Mario Limonciello (AMD)
2025-10-13 14:16 ` Ilpo Järvinen
2025-10-13 14:31 ` Mario Limonciello
2025-10-13 14:35 ` Ilpo Järvinen
2025-10-13 15:19 ` Thomas Zimmermann
2025-10-13 15:36 ` Ilpo Järvinen [this message]
2025-10-13 16:08 ` Thomas Zimmermann
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=f4df0e28-5d45-44aa-e7b9-2d5d075ea649@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=ebiggers@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=superm1@kernel.org \
--cc=tzimmermann@suse.de \
/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.