xorg-x11-server/u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch
Stefan Dirsch a1360856bf Accepting request 663594 from home:michalsrb:bug1119431:X11:XOrg
- u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch
  * X server does not support mixing fbdev with other drivers, so
    claiming pci slots when a fb slot is already claimed only leads
    to quiting with fatal error. (bsc#1119431)

OBS-URL: https://build.opensuse.org/request/show/663594
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=727
2019-01-08 10:20:38 +00:00

34 lines
1.1 KiB
Diff

Author: Michal Srb <msrb@suse.com>
Subject: xfree86: Do not claim pci slots if fb slot is already claimed.
Patch-Mainline: To be upstreamed
References: bsc#1119431
The xf86PostProbe would terminate with fatal error if both fb and pci
slot were claimed at the same time, so there is no point in trying.
The opposite logic is already implemented - fb slots will not be claimed
if a pci slot was claimed.
This fixes issue with xf86-video-fbdev and xf86-video-vesa activating at
the same time (when /dev/fb0 is provided by the vesafb kernel driver).
---
hw/xfree86/common/xf86pciBus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 0718cdcb0..24396a63c 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -212,6 +212,9 @@ xf86ClaimPciSlot(struct pci_device *d, DriverPtr drvp,
EntityPtr p = NULL;
int num;
+ if (fbSlotClaimed)
+ return -1;
+
if (xf86CheckPciSlot(d)) {
num = xf86AllocateEntity();
p = xf86Entities[num];
--
2.16.4