summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/gxt4500.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-07-18 09:23:17 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2022-07-19 13:19:11 +0200
commit145eed48de278007f646b908fd70ac59d24ed81a (patch)
treebdb53ed82ffa4fd95cb46af5da9a63ba149ab957 /drivers/video/fbdev/gxt4500.c
parentfbdev: Convert drivers to aperture helpers (diff)
downloadlinux-145eed48de278007f646b908fd70ac59d24ed81a.tar.xz
linux-145eed48de278007f646b908fd70ac59d24ed81a.zip
fbdev: Remove conflicting devices on PCI bus
Remove firmware devices on the PCI bus, by calling aperture_remove_conflicting_pci_devices() in the probe function of each related fbdev driver. iSo far, most of these drivers did not remove conflicting VESA or EFI devices, or outride failed for resource conflicts (i.e., matroxfb.) This must have been broken for quite some time. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220718072322.8927-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/video/fbdev/gxt4500.c')
-rw-r--r--drivers/video/fbdev/gxt4500.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/fbdev/gxt4500.c b/drivers/video/fbdev/gxt4500.c
index e5475ae1e158..f0d36a4fdaef 100644
--- a/drivers/video/fbdev/gxt4500.c
+++ b/drivers/video/fbdev/gxt4500.c
@@ -6,6 +6,7 @@
* Copyright (C) 2006 Paul Mackerras, IBM Corp. <paulus@samba.org>
*/
+#include <linux/aperture.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fb.h>
@@ -621,6 +622,10 @@ static int gxt4500_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
struct fb_var_screeninfo var;
enum gxt_cards cardtype;
+ err = aperture_remove_conflicting_pci_devices(pdev, "gxt4500fb");
+ if (err)
+ return err;
+
err = pci_enable_device(pdev);
if (err) {
dev_err(&pdev->dev, "gxt4500: cannot enable PCI device: %d\n",