The nv driver was somewhat brain-damaged, it was detecting most all

of the devices on the system as possible video devices.  Pull in
a patch from git to at least try to address this.
This commit is contained in:
Robert Noland 2009-03-01 18:22:02 +00:00
parent 70945c220e
commit 80af950d5c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=229288
3 changed files with 46 additions and 1 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= xf86-video-nv
PORTVERSION= 2.1.12
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= x11-drivers
MAINTAINER= x11@FreeBSD.org

View file

@ -0,0 +1,16 @@
--- src/g80_driver.c.orig 2008-08-04 17:08:54.000000000 -0500
+++ src/g80_driver.c 2009-02-28 20:24:36.000000000 -0600
@@ -206,11 +206,8 @@
CARD32 tmp;
memType BAR1sizeKB;
- if(flags & PROBE_DETECT) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "G80 PROBE_DETECT unimplemented\n");
- return FALSE;
- }
+ if(flags & PROBE_DETECT)
+ return TRUE;
/* Check the number of entities, and fail if it isn't one. */
if(pScrn->numEntities != 1)

View file

@ -0,0 +1,29 @@
--- src/nv_driver.c.orig 2008-08-26 15:46:19.000000000 -0500
+++ src/nv_driver.c 2009-02-28 20:24:36.000000000 -0600
@@ -77,11 +77,22 @@
static Bool NVSetModeVBE(ScrnInfoPtr pScrn, DisplayModePtr pMode);
#if XSERVER_LIBPCIACCESS
-/* For now, just match any NVIDIA PCI device and sort through them in the probe
- * routine */
+/* For now, just match any NVIDIA display device and sort through them in the
+ * probe routine */
+
+/*
+ * libpciaccess's masks are shifted by 8 bits compared to the ones in xf86Pci.h.
+ */
+#define LIBPCIACCESS_CLASS_SHIFT (PCI_CLASS_SHIFT - 8)
+#define LIBPCIACCESS_CLASS_MASK (PCI_CLASS_MASK >> 8)
+
static const struct pci_id_match NVPciIdMatchList[] = {
- { PCI_VENDOR_NVIDIA, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0 },
- { PCI_VENDOR_NVIDIA_SGS, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0},
+ { PCI_VENDOR_NVIDIA, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
+ PCI_CLASS_DISPLAY << LIBPCIACCESS_CLASS_SHIFT, LIBPCIACCESS_CLASS_MASK, 0 },
+
+ { PCI_VENDOR_NVIDIA_SGS, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
+ PCI_CLASS_DISPLAY << LIBPCIACCESS_CLASS_SHIFT, LIBPCIACCESS_CLASS_MASK, 0 },
+
{ 0, 0, 0 }
};
#endif