summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/tgafb.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-07-18 10:23:17 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2022-07-19 14:19:11 +0300
commit145eed48de278007f646b908fd70ac59d24ed81a (patch)
treebdb53ed82ffa4fd95cb46af5da9a63ba149ab957 /drivers/video/fbdev/tgafb.c
parent8d69d008f44cb96050c35e64fe940a22dd6b0113 (diff)
downloadlinux-145eed48de278007f646b908fd70ac59d24ed81a.tar.xz
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/tgafb.c')
-rw-r--r--drivers/video/fbdev/tgafb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/fbdev/tgafb.c b/drivers/video/fbdev/tgafb.c
index 9266c76783cc..4600138e3bef 100644
--- a/drivers/video/fbdev/tgafb.c
+++ b/drivers/video/fbdev/tgafb.c
@@ -12,6 +12,7 @@
* more details.
*/
+#include <linux/aperture.h>
#include <linux/bitrev.h>
#include <linux/compiler.h>
#include <linux/delay.h>
@@ -106,6 +107,12 @@ static struct pci_driver tgafb_pci_driver = {
static int tgafb_pci_register(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
+ int ret;
+
+ ret = aperture_remove_conflicting_pci_devices(pdev, "tgafb");
+ if (ret)
+ return ret;
+
return tgafb_register(&pdev->dev);
}