From: wuqianhai <[email protected]>

Use CONFIG_SCREEN_INFO rather than an architecture-specific condition to
guard vga_is_firmware_default().  LoongArch now provides
sysfb_primary_display whenever CONFIG_SCREEN_INFO is enabled, so have
VGA_ARB select SCREEN_INFO on LoongArch as well.

The screen_info staleness is handled by the PCI resource-assignment path
in the previous patch, so vga_arb_device_init() no longer has to refresh
screen_info itself.

Signed-off-by: wuqianhai <[email protected]>
---
 drivers/pci/Kconfig  | 2 +-
 drivers/pci/vgaarb.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 0c7408509ba2..01e6378effae 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -255,7 +255,7 @@ config VGA_ARB
        bool "VGA Arbitration" if EXPERT
        default y
        depends on !S390
-       select SCREEN_INFO if X86
+       select SCREEN_INFO if X86 || LOONGARCH
        help
          Some "legacy" VGA devices implemented on PCI typically have the same
          hard-decoded addresses as they did on ISA. When multiple PCI devices
diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
index 3e58b2c05c85..4528ad038610 100644
--- a/drivers/pci/vgaarb.c
+++ b/drivers/pci/vgaarb.c
@@ -566,7 +566,7 @@ EXPORT_SYMBOL(vga_put);
 
 static bool vga_is_firmware_default(struct pci_dev *pdev)
 {
-#if defined CONFIG_X86
+#ifdef CONFIG_SCREEN_INFO
        return pdev == screen_info_pci_dev(&sysfb_primary_display.screen);
 #else
        return false;
-- 
2.34.1

Reply via email to