[xorg-x11-drv-cirrus] fix slot unclaim if cirrus loads before modeset
Dave Airlie
airlied at fedoraproject.org
Mon Aug 20 03:52:42 UTC 2012
commit dcb6dd193e53d0724fb5209df059ea3e3097442f
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Aug 20 13:52:07 2012 +1000
fix slot unclaim if cirrus loads before modeset
cirrus-1.5.1-fix-slot-claim.patch | 50 +++++++++++++++++++++++++++++++++++++
xorg-x11-drv-cirrus.spec | 7 ++++-
2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/cirrus-1.5.1-fix-slot-claim.patch b/cirrus-1.5.1-fix-slot-claim.patch
new file mode 100644
index 0000000..7447265
--- /dev/null
+++ b/cirrus-1.5.1-fix-slot-claim.patch
@@ -0,0 +1,50 @@
+From bc04e9ed659be51a3c712f34a038bd60f639f9c5 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at redhat.com>
+Date: Mon, 20 Aug 2012 13:49:19 +1000
+Subject: [PATCH] cirrus: fix falling back after kernel check
+
+if we find a kernel driver the code leave the pci slot claimed which
+stops us falling back. unclaim the pci slot.
+
+Signed-off-by: Dave Airlie <airlied at redhat.com>
+---
+ src/cir_driver.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/cir_driver.c b/src/cir_driver.c
+index 5468b6b..c8d5aae 100644
+--- a/src/cir_driver.c
++++ b/src/cir_driver.c
+@@ -237,9 +237,10 @@ CIRProbe(DriverPtr drv, int flags)
+ CIRChipsets, CIRPciChipsets, devSections,
+ numDevSections, drv, &usedChips);
+ /* Free it since we don't need that list after this */
+- free(devSections);
+- if (numUsed <= 0)
++ if (numUsed <= 0) {
++ free(devSections);
+ return FALSE;
++ }
+ if (flags & PROBE_DETECT)
+ foundScreen = TRUE;
+ else for (i = 0; i < numUsed; i++) {
+@@ -257,6 +258,8 @@ CIRProbe(DriverPtr drv, int flags)
+ pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func);
+ xf86DrvMsg(0, X_ERROR,
+ "cirrus: This driver cannot operate until it has been unloaded.\n");
++ xf86UnclaimPciSlot(pPci, devSections[0]);
++ free(devSections);
+ return FALSE;
+ }
+ #endif
+@@ -290,6 +293,7 @@ CIRProbe(DriverPtr drv, int flags)
+ pScrn->Probe = NULL;
+ }
+ }
++ free(devSections);
+ free(usedChips);
+
+ return foundScreen;
+--
+1.7.10.2
+
diff --git a/xorg-x11-drv-cirrus.spec b/xorg-x11-drv-cirrus.spec
index 5dcbe12..306bfd4 100644
--- a/xorg-x11-drv-cirrus.spec
+++ b/xorg-x11-drv-cirrus.spec
@@ -5,7 +5,7 @@
Summary: Xorg X11 cirrus video driver
Name: xorg-x11-drv-cirrus
Version: 1.5.1
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -16,6 +16,7 @@ Source0: ftp://ftp.x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
Patch0: cirrus-1.2.0-qemu.patch
Patch3: cirrus-1.3.2-virt-16bpp.patch
+Patch4: cirrus-1.5.1-fix-slot-claim.patch
BuildRequires: xorg-x11-server-sdk >= 1.10.99.902
BuildRequires: xorg-x11-util-macros >= 1.1.5
@@ -30,6 +31,7 @@ X.Org X11 cirrus video driver.
%setup -q -n %{tarball}-%{version}
%patch0 -p1 -b .qemu
%patch3 -p1 -b .16bpp
+%patch4 -p1 -b .slot
%build
%configure --disable-static
@@ -55,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man4/cirrus.4*
%changelog
+* Mon Aug 20 2012 Dave Airlie <airlied at redhat.com> 1.5.1-3
+- fix slot unclaim if cirrus loads before modeset
+
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list