summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--man/nv.man4
-rw-r--r--src/g80_driver.c2
-rw-r--r--src/nv_driver.c18
4 files changed, 25 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index a6df24c..23753d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,6 +105,11 @@ AC_MSG_RESULT([$XAA])
# Substitutions
AC_SUBST([moduledir])
+# Checks for library functions
+# We don't use strlcat, strlcpy, or timingsafe_memcmp, but check to quiet
+# -Wredundant-decls warning from xorg/os.h which will otherwise redefine them.
+AC_CHECK_FUNCS([strlcat strlcpy timingsafe_memcmp])
+
DRIVER_NAME=nv
AC_SUBST([DRIVER_NAME])
diff --git a/man/nv.man b/man/nv.man
index 0d5ca80..316ac1d 100644
--- a/man/nv.man
+++ b/man/nv.man
@@ -158,12 +158,12 @@ Disable or enable acceleration. Default: acceleration is enabled.
.TP
.BI "Option \*qAccelMethod\*q \*q" string \*q
Choose acceleration architecture, either \*qXAA\*q or \*qEXA\*q.
-XAA is the old but stable architecture.
+XAA is the old but stable architecture, but was removed in Xorg 1.13.
EXA is newer and supports resizing the desktop larger than it started out with RandR 1.2.
If you choose to use EXA, you might also consider setting
.B Option \*qMigrationHeuristic\*q \*qgreedy\*q
to improve performance.
-Default: XAA.
+Default: XAA if compiled for Xorg 1.12 or older, otherwise EXA.
.TP
.BI "Option \*qFPDither\*q \*q" boolean \*q
Enable or disable flat panel dithering by default.
diff --git a/src/g80_driver.c b/src/g80_driver.c
index b022159..3af9dd9 100644
--- a/src/g80_driver.c
+++ b/src/g80_driver.c
@@ -434,9 +434,11 @@ G80PreInit(ScrnInfoPtr pScrn, int flags)
if(!pNv->NoAccel) {
switch(pNv->AccelMethod) {
+#ifdef HAVE_XAA_H
case XAA:
if(!xf86LoadSubModule(pScrn, "xaa")) pNv->NoAccel = 1;
break;
+#endif
case EXA:
if(!xf86LoadSubModule(pScrn, "exa")) pNv->NoAccel = 1;
break;
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 2f56984..7ac0332 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -33,6 +33,15 @@
#include "xf86int10.h"
#include "vbeModes.h"
+/*
+ * nv will refuse to work whenever there's a driver other than vga attached to
+ * the device we're trying to probe, yet nv works fine on top of gffb or
+ * genfb on NetBSD
+ */
+#ifndef __NetBSD__
+#define NV_TEST_FOR_KERNEL_DRIVER 1
+#endif
+
const OptionInfoRec * RivaAvailableOptions(int chipid, int busid);
Bool RivaGetScrnInfoRec(PciChipsets *chips, int chip);
Bool G80GetScrnInfoRec(PciChipsets *chips, int chip);
@@ -913,6 +922,7 @@ 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);
+#ifdef NV_TEST_FOR_KERNEL_DRIVER
if (pci_device_has_kernel_driver(dev)) {
xf86DrvMsg(0, X_ERROR,
NV_NAME ": The PCI device 0x%x (%s) at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n",
@@ -921,6 +931,7 @@ NVPciProbe(DriverPtr drv, int entity, struct pci_device *dev, intptr_t data)
NV_NAME ": This driver cannot operate until it has been unloaded.\n");
return FALSE;
}
+#endif
if(dev->vendor_id == PCI_VENDOR_NVIDIA && !name &&
!NVIsSupported(id) && !NVIsG80(id)) {
@@ -2077,8 +2088,11 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
/* Load XAA if needed */
if (!pNv->NoAccel) {
- if (!xf86LoadSubModule(pScrn, "xaa")) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadwwfb\n");
+#ifdef HAVE_XAA_H
+ if (!xf86LoadSubModule(pScrn, "xaa"))
+#endif
+ {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n");
pNv->NoAccel = 1;
pNv->ShadowFB = 1;
}