Skip to contentSkip to conversation

PCI/VGA: Select SCREEN_INFO

PATCH Superseded Mario Limonciello (AMD) 3 participants 7 messages Oct 13, 2025 PCI

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI/VGA: Select SCREEN_INFO

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.

Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")
---
 drivers/pci/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/Kconfig +1 -0
index 7065a8e5f9b14..c35fed47addd5 100644
@@ -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
Signature · 1 line
2.43.0
#1 lore raw
Quoted 22 lines · Mario Limonciello (AMD)

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.

Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")
---
 drivers/pci/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/Kconfig +0 -0
index 7065a8e5f9b14..c35fed47addd5 100644

drivers/pci/Kconfig config VGA_ARB · line 312

Quoted 7 lines
drivers/pci/Kconfig +1 -0
@@ -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?

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?

Signature · 1 line
 i.
#2 lore raw
Quoted 19 lines · Ilpo Järvinen
Quoted 17 lines · Mario Limonciello (AMD)

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.

Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")
---
  drivers/pci/Kconfig | 1 +
  1 file changed, 1 insertion(+)
Quoted 16 lines

drivers/pci/Kconfig config VGA_ARB · line 312

Quoted 12 lines
drivers/pci/Kconfig +1 -0
index 7065a8e5f9b14..c35fed47addd5 100644
@@ -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.

Quoted 9 lines

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? There is a lot of other places that conditionalize code on CONFIG_SCREEN_INFO. You don't "have" to build in the the VGA arbiter and presumably those are correct.

#3 lore raw
Quoted 45 lines · Mario Limonciello
Quoted 20 lines · Ilpo Järvinen
Quoted 18 lines · Mario Limonciello (AMD)

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.

Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a

screen info check")

---
  drivers/pci/Kconfig | 1 +
  1 file changed, 1 insertion(+)
Quoted 16 lines

drivers/pci/Kconfig config VGA_ARB · line 312

Quoted 12 lines
drivers/pci/Kconfig +1 -0
index 7065a8e5f9b14..c35fed47addd5 100644
@@ -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.

Quoted 5 lines

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 :-/):

Quoted 6 lines
Quoted 4 lines

#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.

Quoted 4 lines

There is a lot of
other places that conditionalize code on CONFIG_SCREEN_INFO. You don't "have" to build in the the VGA arbiter and presumably those are correct.

Signature · 1 line
 i.
#4 lore raw

Hi

Am 13.10.25 um 16:35 schrieb Ilpo Järvinen:

Quoted 38 lines · Mario Limonciello
Quoted 37 lines · Ilpo Järvinen
Quoted 35 lines · Mario Limonciello (AMD)
Quoted 24 lines

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.

Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a

screen info check")

---
   drivers/pci/Kconfig | 1 +
   1 file changed, 1 insertion(+)
drivers/pci/Kconfig +0 -0
index 7065a8e5f9b14..c35fed47addd5 100644

drivers/pci/Kconfig config VGA_ARB · line 312

Quoted 7 lines
drivers/pci/Kconfig +1 -0
@@ -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?

Quoted 1 line
Quoted 1 line

Thanks! Will adjust.

Yes, thanks. You can no longer run into this #else.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

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 :-/):

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines

#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.

Best regards
Thomas

Quoted 5 lines
Quoted 5 lines

There is a lot of
other places that conditionalize code on CONFIG_SCREEN_INFO. You don't "have" to build in the the VGA arbiter and presumably those are correct.

Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
#5 lore raw
Quoted 63 lines · Thomas Zimmermann

Am 13.10.25 um 16:35 schrieb Ilpo Järvinen:

Quoted 45 lines · Mario Limonciello
Quoted 44 lines · Ilpo Järvinen
Quoted 42 lines · Mario Limonciello (AMD)
Quoted 33 lines

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.

Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with

a
screen info check")

---
   drivers/pci/Kconfig | 1 +
   1 file changed, 1 insertion(+)
drivers/pci/Kconfig +1 -0
index 7065a8e5f9b14..c35fed47addd5 100644
@@ -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
Quoted 3 lines

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?

Quoted 1 line
Quoted 1 line

Thanks! Will adjust.

Yes, thanks. You can no longer run into this #else.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

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 :-/):

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines

#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.

Quoted 6 lines

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.

Signature · 1 line
 i.
#6 lore raw

Am 13.10.25 um 17:36 schrieb Ilpo Järvinen:

Quoted 58 lines · Thomas Zimmermann
Quoted 57 lines

Am 13.10.25 um 16:35 schrieb Ilpo Järvinen:

Quoted 45 lines · Mario Limonciello
Quoted 44 lines · Ilpo Järvinen
Quoted 42 lines · Mario Limonciello (AMD)
Quoted 33 lines

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.

Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with

a
screen info check")

---
    drivers/pci/Kconfig | 1 +
    1 file changed, 1 insertion(+)
drivers/pci/Kconfig +1 -0
index 7065a8e5f9b14..c35fed47addd5 100644
@@ -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
Quoted 3 lines

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?

Quoted 1 line
Quoted 1 line

Thanks! Will adjust.

Yes, thanks. You can no longer run into this #else.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

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?

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

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

'should not have'. Oops

Quoted 3 lines
Quoted 1 line

branch at all.

Thanks for the explanation.

Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)