From a1360856bfe72291ee3c9e72a4c629c837892b96da1f5590bafbbd7cb8ee55aa Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Tue, 8 Jan 2019 10:20:38 +0000 Subject: [PATCH] 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 --- ...laim-pci-slots-if-fb-slot-is-already.patch | 33 +++++++++++++++++++ xorg-x11-server.changes | 8 +++++ xorg-x11-server.spec | 6 +++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch diff --git a/u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch b/u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch new file mode 100644 index 0000000..1461518 --- /dev/null +++ b/u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch @@ -0,0 +1,33 @@ +Author: Michal Srb +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 + diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 9bd80fd..e71f530 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Jan 2 11:36:57 UTC 2019 - msrb@suse.com + +- 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) + ------------------------------------------------------------------- Thu Nov 22 10:47:07 UTC 2018 - sndirsch@suse.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 178c7bf..901f064 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -1,7 +1,7 @@ # # spec file for package xorg-x11-server # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -228,6 +228,8 @@ Patch1501: U_xkb-Fix-heap-overflow-caused-by-optimized-away-min.patch Patch1502: U_dix-window-Use-ConfigureWindow-instead-of-MoveWindow.patch +Patch1503: u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch + %description This package contains the X.Org Server. @@ -371,6 +373,8 @@ sh %{SOURCE92} --verify . %{SOURCE91} %patch1502 -p1 +%patch1503 -p1 + %build test -e source-file-list || \ find -L . -type f \! -name '*.orig' \! -path ./source-file-list > \