PCI/VGA: Select SCREEN_INFO
PATCH v2 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. Also drop the now dead code.
---
v2:
* drop dead code (Ilpo)
--- drivers/pci/Kconfig | 1 + drivers/pci/vgaarb.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-)
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
drivers/pci/vgaarb.c +1 -7
@@ -556,13 +556,7 @@ EXPORT_SYMBOL(vga_put);static bool vga_is_firmware_default (struct pci_dev *pdev) { -#ifdef CONFIG_SCREEN_INFO -struct screen_info *si = &screen_info; - -return pdev ==screen_info_pci_dev (si); -#else -return false; -#endif +return pdev ==screen_info_pci_dev (&screen_info); }static bool vga_arb_integrated_gpu (struct device *dev)
Signature · 1 line
2.43.0
Hi
Am 13.10.25 um 17:44 schrieb Mario Limonciello (AMD):
Quoted 8 lines
commit
337bf13aa9dda("PCI/VGA: Replacevga_is_firmware_default()with a screen info check") introduced an implicit dependency uponSCREEN_INFOby removing the open coded implementation.If a user didn't have
CONFIG_SCREEN_INFOsetvga_is_firmware_default()would now return false. Add a select forSCREEN_INFOto ensure that the VGA arbiter works as intended. Also drop the now dead code.
Quoted 5 lines
Reported-by Eric Biggers <[email protected]>Suggested-by Thomas Zimmermann <[email protected]>Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")Signed-off-by Mario Limonciello (AMD) <[email protected]>
I think we should take this patch in any case, even if it would not fix the reporter's problem.
Best regards
Thomas
Quoted 39 lines
---
v2:
* drop dead code (Ilpo)--- drivers/pci/Kconfig | 1 + drivers/pci/vgaarb.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-)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 devicesdrivers/pci/vgaarb.c +1
-7@@ -556,13 +556,7 @@ EXPORT_SYMBOL(vga_put);static bool vga_is_firmware_default (struct pci_dev *pdev) { -#ifdef CONFIG_SCREEN_INFO -struct screen_info *si = &screen_info; - -return pdev ==screen_info_pci_dev (si); -#else -return false; -#endif +return pdev ==screen_info_pci_dev (&screen_info); }static bool vga_arb_integrated_gpu (struct device *dev)
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)
Quoted 42 lines · Mario Limonciello (AMD)
commit
337bf13aa9dda("PCI/VGA: Replacevga_is_firmware_default()with a screen info check") introduced an implicit dependency uponSCREEN_INFOby removing the open coded implementation.If a user didn't have
CONFIG_SCREEN_INFOsetvga_is_firmware_default()would now return false. Add a select forSCREEN_INFOto ensure that the VGA arbiter works as intended. Also drop the now dead code.Reported-by Eric Biggers <[email protected]>Suggested-by Thomas Zimmermann <[email protected]>Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")Signed-off-by Mario Limonciello (AMD) <[email protected]>---
v2:
* drop dead code (Ilpo)--- drivers/pci/Kconfig | 1 + drivers/pci/vgaarb.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-)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 devicesdrivers/pci/vgaarb.c +0
-1@@ -556,13 +556,7 @@ EXPORT_SYMBOL(vga_put);static bool vga_is_firmware_default (struct pci_dev *pdev) { -#ifdef CONFIG_SCREEN_INFO
drivers/pci/vgaarb.c EXPORT_SYMBOL(vga_put); · line 562
Quoted 10 lines
drivers/pci/vgaarb.c +1
-6-struct screen_info *si = &screen_info; - -return pdev ==screen_info_pci_dev (si); -#else -return false; -#endif +return pdev ==screen_info_pci_dev (&screen_info); }static bool vga_arb_integrated_gpu (struct device *dev)
Signature · 1 line
i.
Bjorn Helgaas
AppliedQuoted 8 lines · Mario Limonciello (AMD)
commit
337bf13aa9dda("PCI/VGA: Replacevga_is_firmware_default()with a screen info check") introduced an implicit dependency uponSCREEN_INFOby removing the open coded implementation.If a user didn't have
CONFIG_SCREEN_INFOsetvga_is_firmware_default()would now return false. Add a select forSCREEN_INFOto ensure that the VGA arbiter works as intended. Also drop the now dead code.
Quoted 5 lines
Reported-by Eric Biggers <[email protected]>Suggested-by Thomas Zimmermann <[email protected]>Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")Signed-off-by Mario Limonciello (AMD) <[email protected]>
Applied to for-linus for v6.18, thanks!
Quoted 42 lines
---
v2:
* drop dead code (Ilpo)--- drivers/pci/Kconfig | 1 + drivers/pci/vgaarb.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-)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 devicesdrivers/pci/vgaarb.c +1
-7@@ -556,13 +556,7 @@ EXPORT_SYMBOL(vga_put);static bool vga_is_firmware_default (struct pci_dev *pdev) { -#ifdef CONFIG_SCREEN_INFO -struct screen_info *si = &screen_info; - -return pdev ==screen_info_pci_dev (si); -#else -return false; -#endif +return pdev ==screen_info_pci_dev (&screen_info); }static bool vga_arb_integrated_gpu (struct device *dev)Signature · 1 line
2.43.0
Quoted 9 lines · Bjorn Helgaas
Quoted 8 lines · Mario Limonciello (AMD)
commit
337bf13aa9dda("PCI/VGA: Replacevga_is_firmware_default()with a screen info check") introduced an implicit dependency uponSCREEN_INFOby removing the open coded implementation.If a user didn't have
CONFIG_SCREEN_INFOsetvga_is_firmware_default()would now return false. Add a select forSCREEN_INFOto ensure that the VGA arbiter works as intended. Also drop the now dead code.
Quoted 7 lines
Quoted 5 lines
Reported-by Eric Biggers <[email protected]>Suggested-by Thomas Zimmermann <[email protected]>Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")Signed-off-by Mario Limonciello (AMD) <[email protected]>Applied to for-linus for v6.18, thanks!
Oops, dropped because of this regression:
https://lore.kernel.org/r/176038554347.1442.9483731885505420131@15dd6324cc71
Quoted 42 lines
Quoted 42 lines
---
v2:
* drop dead code (Ilpo)--- drivers/pci/Kconfig | 1 + drivers/pci/vgaarb.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-)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 devicesdrivers/pci/vgaarb.c +1
-7@@ -556,13 +556,7 @@ EXPORT_SYMBOL(vga_put);static bool vga_is_firmware_default (struct pci_dev *pdev) { -#ifdef CONFIG_SCREEN_INFO -struct screen_info *si = &screen_info; - -return pdev ==screen_info_pci_dev (si); -#else -return false; -#endif +return pdev ==screen_info_pci_dev (&screen_info); }static bool vga_arb_integrated_gpu (struct device *dev)Signature · 1 line
2.43.0
Quoted 16 lines · Bjorn Helgaas
Quoted 15 lines · Bjorn Helgaas
Quoted 13 lines · Mario Limonciello (AMD)
commit
337bf13aa9dda("PCI/VGA: Replacevga_is_firmware_default()with a screen info check") introduced an implicit dependency uponSCREEN_INFOby removing the open coded implementation.If a user didn't have
CONFIG_SCREEN_INFOsetvga_is_firmware_default()would now return false. Add a select forSCREEN_INFOto ensure that the VGA arbiter works as intended. Also drop the now dead code.Reported-by Eric Biggers <[email protected]>Suggested-by Thomas Zimmermann <[email protected]>Fixes 337bf13aa9dda ("PCI/VGA: Replace vga_is_firmware_default() with a screen info check")Signed-off-by Mario Limonciello (AMD) <[email protected]>
Quoted 5 lines
Quoted 1 line
Applied to for-linus for v6.18, thanks!
Oops, dropped because of this regression:
https://lore.kernel.org/r/176038554347.1442.9483731885505420131@15dd6324cc71
Ah thanks for that. I hadn't had non-x86 to test.
I'll try to cross compile to repro and come up with a solution.
Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
---
v2:
* drop dead code (Ilpo)--- drivers/pci/Kconfig | 1 + drivers/pci/vgaarb.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-)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 devicesdrivers/pci/vgaarb.c +1
-7@@ -556,13 +556,7 @@ EXPORT_SYMBOL(vga_put);static bool vga_is_firmware_default (struct pci_dev *pdev) { -#ifdef CONFIG_SCREEN_INFO -struct screen_info *si = &screen_info; - -return pdev ==screen_info_pci_dev (si); -#else -return false; -#endif +return pdev ==screen_info_pci_dev (&screen_info); }static bool vga_arb_integrated_gpu (struct device *dev)Signature · 1 line
2.43.0