[xorg-x11-drv-mga] Only refuse to bind on G200 server chips.
Adam Jackson
ajax at fedoraproject.org
Wed Apr 3 20:15:19 UTC 2013
commit b5e5fe9f137bb814f75fd69563c67c1e4c635b31
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Apr 3 16:15:13 2013 -0400
Only refuse to bind on G200 server chips.
mga-1.6.2-fix-kms-matching.patch | 49 ++++++++++++++++++++++++++++++++++++++
xorg-x11-drv-mga.spec | 7 ++++-
2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/mga-1.6.2-fix-kms-matching.patch b/mga-1.6.2-fix-kms-matching.patch
new file mode 100644
index 0000000..3839b0a
--- /dev/null
+++ b/mga-1.6.2-fix-kms-matching.patch
@@ -0,0 +1,49 @@
+From 49381ff2c3aa98be5bb84494b2ad3f81a0d31bcc Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau at debian.org>
+Date: Mon, 07 Jan 2013 22:04:36 +0000
+Subject: Restrict kernel driver matching to g200 server chips
+
+Otherwise we might catch devices handled by matroxfb, not the mgag200
+kms driver.
+
+Debian bug#697532
+
+Reported-by: olafBuddenhagen at gmx.net
+Reviewed-by: Dave Airlie <airlied at redhat.com>
+Signed-off-by: Julien Cristau <jcristau at debian.org>
+---
+diff --git a/src/mga_driver.c b/src/mga_driver.c
+index 8c4bb9c..5cce7ac 100644
+--- a/src/mga_driver.c
++++ b/src/mga_driver.c
+@@ -676,12 +676,22 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev,
+ #endif
+
+ if (pci_device_has_kernel_driver(dev)) {
+- xf86DrvMsg(0, X_ERROR,
+- "mga: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n",
+- dev->device_id, dev->bus, dev->domain, dev->dev, dev->func);
+- xf86DrvMsg(0, X_ERROR,
+- "mga: This driver cannot operate until it has been unloaded.\n");
+- return FALSE;
++ /* If it's a G200 server chip, it's probably on KMS, so bail; if not,
++ * it might be using matroxfb, which is ok. */
++ switch (dev->device_id) {
++ case PCI_CHIP_MGAG200_SE_A_PCI:
++ case PCI_CHIP_MGAG200_SE_B_PCI:
++ case PCI_CHIP_MGAG200_EV_PCI:
++ case PCI_CHIP_MGAG200_ER_PCI:
++ case PCI_CHIP_MGAG200_WINBOND_PCI:
++ case PCI_CHIP_MGAG200_EH_PCI:
++ xf86DrvMsg(0, X_ERROR,
++ "mga: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n",
++ dev->device_id, dev->bus, dev->domain, dev->dev, dev->func);
++ xf86DrvMsg(0, X_ERROR,
++ "mga: This driver cannot operate until it has been unloaded.\n");
++ return FALSE;
++ }
+ }
+
+ /* Allocate a ScrnInfoRec and claim the slot */
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/xorg-x11-drv-mga.spec b/xorg-x11-drv-mga.spec
index d0b7a7c..13c67c6 100644
--- a/xorg-x11-drv-mga.spec
+++ b/xorg-x11-drv-mga.spec
@@ -8,7 +8,7 @@
Summary: Xorg X11 mga video driver
Name: xorg-x11-drv-mga
Version: 1.6.2
-Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
+Release: 6%{?gitdate:.%{gitdate}git%{gitversion}}%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -23,6 +23,7 @@ Source0: http://x.org/pub/individual/driver/%{tarball}-%{version}.tar.bz2
Patch0: mga-1.4.5-no-hal-advertising.patch
Patch2: mga-1.4.12-bigendian.patch
+Patch3: mga-1.6.2-fix-kms-matching.patch
ExcludeArch: s390 s390x %{?rhel:ppc ppc64}
@@ -41,6 +42,7 @@ X.Org X11 mga video driver.
%setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
%patch0 -p1 -b .hal
%patch2 -p1 -b .bigendian
+%patch3 -p1 -b .kms
%build
autoreconf -v --install || exit 1
@@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man4/mga.4*
%changelog
+* Wed Apr 03 2013 Adam Jackson <ajax at redhat.com> 1.6.2-6
+- Only refuse to bind on G200 server chips.
+
* Thu Mar 07 2013 Peter Hutterer <peter.hutterer at redhat.com> - 1.6.2-5
- require xorg-x11-server-devel, not -sdk
More information about the scm-commits
mailing list