rpms/xorg-x11-drv-nv/devel nv-refuse-kms.patch, NONE, 1.1 xorg-x11-drv-nv.spec, 1.91, 1.92

Ben Skeggs bskeggs at fedoraproject.org
Thu Aug 27 23:50:13 UTC 2009


Author: bskeggs

Update of /cvs/pkgs/rpms/xorg-x11-drv-nv/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23634

Modified Files:
	xorg-x11-drv-nv.spec 
Added Files:
	nv-refuse-kms.patch 
Log Message:
* Fri Aug 28 2009 Ben Skeggs <bskeggs at redhat.com> 2.1.14-5
- refuse to load if KMS driver already using the hw



nv-refuse-kms.patch:
 nv_driver.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- NEW FILE nv-refuse-kms.patch ---
>From ee544c2b11ab327abab6e205425e6eafe961de2e Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs at redhat.com>
Date: Fri, 28 Aug 2009 09:43:16 +1000
Subject: [PATCH] nv: refuse to load if there's a kernel driver bound to the device already

---
 src/nv_driver.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index a7cf2dc..6f7fc0e 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -780,6 +780,12 @@ NVPciProbe(DriverPtr drv, int entity, struct pci_device *dev, intptr_t data)
                       NVGetPCIXpressChip(dev) : dev->vendor_id << 16 | dev->device_id;
     const char *name = xf86TokenToString(NVKnownChipsets, id);
 
+    if (pci_device_has_kernel_driver(dev)) {
+	ErrorF("The PCI device has a kernel module claiming it.\n");
+	ErrorF("This driver cannot operate until it has been unloaded\n");
+	return FALSE;
+    }
+
     if(dev->vendor_id == PCI_VENDOR_NVIDIA && !name &&
        !NVIsSupported(id) && !NVIsG80(id)) {
         /* See if pci.ids knows what the heck this thing is */
-- 
1.6.4



Index: xorg-x11-drv-nv.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nv/devel/xorg-x11-drv-nv.spec,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -p -r1.91 -r1.92
--- xorg-x11-drv-nv.spec	4 Aug 2009 17:18:50 -0000	1.91
+++ xorg-x11-drv-nv.spec	27 Aug 2009 23:50:13 -0000	1.92
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 nv video driver
 Name:      xorg-x11-drv-nv
 Version:   2.1.14
-Release:   4%{?dist}
+Release:   5%{?dist}
 URL:       http://www.x.org
 License: MIT
 Group:     User Interface/X Hardware Support
@@ -29,6 +29,7 @@ Patch6:	    nv-2.1.6-panel-fix.patch
 Patch7:	    nv-save-rom.patch
 Patch9:	    nv-2.1.8-g80-no-doublescan.patch
 Patch10:    nv-2.1.12-gf7025-gf7050.patch
+Patch11:    nv-refuse-kms.patch
 
 %description 
 X.Org X11 nv video driver.
@@ -43,6 +44,7 @@ X.Org X11 nv video driver.
 %patch7 -p1 -b .save-rom
 %patch9 -p1 -b .doublescan
 %patch10 -p1 -b .nv6x
+%patch11 -p1 -b .nokms
 
 %build
 autoreconf -v --install
@@ -70,6 +72,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man4/nv.4*
 
 %changelog
+* Fri Aug 28 2009 Ben Skeggs <bskeggs at redhat.com> 2.1.14-5
+- refuse to load if KMS driver already using the hw
+
 * Tue Aug 04 2009 Adam Jackson <ajax at redhat.com> 2.1.14-4
 - autoreconf so the dpms configurey gets picked up
 




More information about the fedora-extras-commits mailing list