Message ID | 20230726081947.3310004-3-kai.heng.feng@canonical.com |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c index 41e77de1ea82..d0eccc4ed60b 100644 --- a/drivers/video/aperture.c +++ b/drivers/video/aperture.c @@ -328,9 +328,8 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na resource_size_t base, size; int bar, ret; -#ifdef CONFIG_X86 - primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; -#endif + if (pdev == vga_default_device()) + primary = true; for (bar = 0; bar < PCI_STD_NUM_BARS; ++bar) { if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM))