diff -Nru xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/ChangeLog xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/ChangeLog --- xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/ChangeLog 2010-06-09 19:41:33.000000000 +0100 +++ xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/ChangeLog 2010-07-06 01:36:32.000000000 +0100 @@ -1,3 +1,65 @@ +commit 0dc1c07a7d07c8470b4d8882b827b7a68f2e49fc +Author: Robert Hooker +Date: Tue Jul 6 09:20:57 2010 +0845 + + Add debian tree from origin/debian-unstable + +commit 0f220eb6934edc9a1d2d7d8c11573cdc8a9280e3 +Author: Aaron Plattner +Date: Wed Jun 2 16:06:40 2010 -0700 + + Fix the kernel driver error reporting to be a little more verbose. + + Commit 3e9f7704122e0685ce83f7d3d3630e8a07293671 added printouts when the driver + detects that a kernel module is attached to the given PCI device. However, it + uses ErrorF and doesn't print any identifying information about *which* device + has the problem or even which driver is complaining. Fix it to use xf86DrvMsg + and print the driver name and PCI device and bus IDs. + + Signed-off-by: Aaron Plattner + +commit 4e1efd5222ffb8328b12f63e4d8083298b44dd17 +Author: Aaron Plattner +Date: Wed Jun 2 15:39:35 2010 -0700 + + Depend on libpciaccess >= 0.10.7. + + This is the first version to contain pci_device_has_kernel_driver. + + Signed-off-by: Aaron Plattner + +commit 78ffecce368868f7b363e7f520d163e2e4330adc +Author: Aaron Plattner +Date: Wed Jun 2 15:29:57 2010 -0700 + + Revert "Refuse to bind to a device which has kernel modesetting active." + + It was superseded by 3e9f7704122e0685ce83f7d3d3630e8a07293671, which depends on + libpciaccess and not libdrm. This is better, because the server already depends + on the former, while the latter is optional. + + This reverts commit 17ab5dbea69e690cbf78c25040db518471e0887f. + + Conflicts: + + src/nv_driver.c + +commit 133f7c4d51b3c7d7e1e7af80056947d3a7ec2097 +Author: Ben Skeggs +Date: Fri Aug 28 09:43:16 2009 +1000 + + nv: refuse to load if there's a kernel driver bound to the device already + + Signed-off-by: Aaron Plattner + +commit 6a86c607b68e016390553ec91cd2e39b65364a9a +Author: Gaetan Nadon +Date: Sun Jun 13 09:50:31 2010 -0400 + + COPYING: update file with Copyright notices from source code. + + Signed-off-by: Gaetan Nadon + commit 4fff9d3f0a27de68bd3190a98558a3de1b7a85d2 Author: Tiago Vignatti Date: Tue May 25 13:32:18 2010 +0300 diff -Nru xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/configure.ac xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/configure.ac --- xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/configure.ac 2010-06-09 19:40:53.000000000 +0100 +++ xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/configure.ac 2010-07-06 01:35:57.000000000 +0100 @@ -89,7 +89,7 @@ [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], [#include "xorg-server.h"]) if test "x$XSERVER_LIBPCIACCESS" = "xyes"; then - PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.8.0]) + PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10.7]) fi CFLAGS="$save_CFLAGS" @@ -134,17 +134,6 @@ AC_SUBST([XORG_CFLAGS]) AC_SUBST([moduledir]) -if test "x$XSERVER_LIBPCIACCESS" = xyes; then - PKG_CHECK_MODULES(LIBDRM, [libdrm > 2.4.3 xf86driproto], HAVE_KMS="yes", HAVE_KMS="no") - if test "x$HAVE_KMS" = xyes; then - AC_DEFINE(HAVE_KMS, 1, [Have kernel modesetting]) - else - AC_MSG_WARN(Support for detecting kernel modesetting drivers is not available.) - AC_MSG_WARN(This driver can cause display problems in the presence of kernel modesetting.) - AC_MSG_WARN(Please install libdrm > 2.4.3 and xf86driproto to enable KMS detection.) - fi -fi - DRIVER_NAME=nv AC_SUBST([DRIVER_NAME]) diff -Nru xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/COPYING xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/COPYING --- xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/COPYING 2010-06-09 19:40:53.000000000 +0100 +++ xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/COPYING 2010-07-06 01:35:57.000000000 +0100 @@ -1,4 +1,6 @@ -Copyright (c) 2007 NVIDIA, Corporation +Copyright (c) 1993-2003 NVIDIA, Corporation +Copyright (c) 2007-2008 NVIDIA, Corporation +Copyright (c) 2007,2010 NVIDIA Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -18,3 +20,45 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Copyright © 2006 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and +that the name of the copyright holders not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. The copyright holders make no representations +about the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. + +Copyright 2010 NVIDIA Corporation +Copyright 1996-1997 David J. McKay + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DAVID J. MCKAY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff -Nru xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/debian/changelog xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/debian/changelog --- xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/debian/changelog 2010-07-06 01:49:33.000000000 +0100 +++ xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/debian/changelog 2010-07-06 01:49:33.000000000 +0100 @@ -1,10 +1,10 @@ -xserver-xorg-video-nv (1:2.1.17+git20100609.4fff9d3f-0ubuntu0sarvatt) maverick; urgency=low +xserver-xorg-video-nv (1:2.1.17+git20100706.0f220eb6-0ubuntu0sarvatt) maverick; urgency=low - * Checkout from git 20100609 (master branch) up to commit - 4fff9d3f0a27de68bd3190a98558a3de1b7a85d2 + * Checkout from git 20100706 (master branch) up to commit + 0f220eb6934edc9a1d2d7d8c11573cdc8a9280e3 * Only added debian/ tree from origin/debian-unstable - -- Robert Hooker Wed, 09 Jun 2010 14:41:36 -0400 + -- Robert Hooker Tue, 06 Jul 2010 09:21:35 +0845 xserver-xorg-video-nv (1:2.1.17-3) unstable; urgency=low diff -Nru xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/.lastcommit xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/.lastcommit --- xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/.lastcommit 2010-06-09 19:40:55.000000000 +0100 +++ xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/.lastcommit 2010-07-06 01:35:57.000000000 +0100 @@ -1 +1 @@ -commit 4fff9d3f0a27de68bd3190a98558a3de1b7a85d2 +commit 0f220eb6934edc9a1d2d7d8c11573cdc8a9280e3 diff -Nru xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/src/Makefile.am xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/src/Makefile.am --- xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/src/Makefile.am 2010-06-09 19:41:38.000000000 +0100 +++ xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/src/Makefile.am 2010-07-06 01:36:37.000000000 +0100 @@ -23,7 +23,7 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. -AM_CFLAGS = @XMODES_CFLAGS@ @XORG_CFLAGS@ $(LIBDRM_CFLAGS) +AM_CFLAGS = @XMODES_CFLAGS@ @XORG_CFLAGS@ nv_drv_la_LTLIBRARIES = nv_drv.la nv_drv_la_LDFLAGS = -module -avoid-version nv_drv_ladir = @moduledir@/drivers diff -Nru xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/src/nv_driver.c xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/src/nv_driver.c --- xserver-xorg-video-nv-2.1.17+git20100609.4fff9d3f/src/nv_driver.c 2010-06-09 19:40:55.000000000 +0100 +++ xserver-xorg-video-nv-2.1.17+git20100706.0f220eb6/src/nv_driver.c 2010-07-06 01:35:57.000000000 +0100 @@ -33,11 +33,6 @@ #include "xf86int10.h" #include "vbeModes.h" -#ifdef HAVE_KMS -#include -#include -#endif - const OptionInfoRec * RivaAvailableOptions(int chipid, int busid); Bool RivaGetScrnInfoRec(PciChipsets *chips, int chip); Bool G80GetScrnInfoRec(PciChipsets *chips, int chip); @@ -835,26 +830,6 @@ return FALSE; } -#ifdef HAVE_KMS -static Bool NVKernelModesettingEnabled(struct pci_device *device) -{ - char *busIdString; - int ret; - - if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) - return FALSE; - - busIdString = DRICreatePCIBusID(device); - - ret = drmCheckModesettingSupported(busIdString); - free(busIdString); - - return (ret == 0); -} -#else -static inline Bool NVKernelModesettingEnabled(struct pci_device *device) { return FALSE; } -#endif //HAVE_KMS - /* Mandatory */ #if XSERVER_LIBPCIACCESS static Bool @@ -865,6 +840,15 @@ NVGetPCIXpressChip(dev) : dev->vendor_id << 16 | dev->device_id; const char *name = xf86TokenToString(NVKnownChipsets, id); + if (pci_device_has_kernel_driver(dev)) { + xf86DrvMsg(0, X_ERROR, + NV_NAME ": The PCI device 0x%x (%s) at %2.2x@%2.2x:%2.2x:%1.1x has a kernel module claiming it.\n", + id, name, dev->bus, dev->domain, dev->dev, dev->func); + xf86DrvMsg(0, X_ERROR, + NV_NAME ": 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 */ @@ -889,14 +873,6 @@ NV_NAME ": Found NVIDIA %s at %2.2x@%2.2x:%2.2x:%1.1x\n", name, dev->bus, dev->domain, dev->dev, dev->func); - /* Trying to bring up a NV mode while kernel modesetting is enabled - results in badness */ - if (NVKernelModesettingEnabled(dev)) { - xf86Msg(X_ERROR, - NV_NAME ": Kernel modesetting driver in use, refusing to load\n"); - return FALSE; - } - if(NVIsG80(id)) return G80GetScrnInfoRec(NULL, entity); else if(dev->vendor_id == PCI_VENDOR_NVIDIA_SGS)