aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers/xf86-video-nv/files/patch-src-nv_driver.c
blob: c0155d99bb5a8d047fb689267a70696fac296ba6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- src/nv_driver.c.orig	2017-01-17 22:41:33 UTC
+++ src/nv_driver.c
@@ -911,6 +911,8 @@ NVPciProbe(DriverPtr drv, int entity, struct pci_devic
                       NVGetPCIXpressChip(dev) : dev->vendor_id << 16 | dev->device_id;
     const char *name = xf86TokenToString(NVKnownChipsets, id);
 
+#ifndef __FreeBSD__
+    /* FreeBSD always has vgapci driver attached.  */
     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",
@@ -919,6 +921,7 @@ NVPciProbe(DriverPtr drv, int entity, struct pci_devic
                    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)) {
@@ -1543,7 +1546,11 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 	xf86FreeInt10(pNv->pInt);
 	return FALSE;
     }
+#ifdef __powerpc__ /* XXX probably MI */
+    vgaHWSetMmioFuncs(VGAHWPTR(pScrn), pNv->IOAddress, 0);
+#else
     vgaHWSetStdFuncs(VGAHWPTR(pScrn));
+#endif
     
     /* We use a programmable clock */
     pScrn->progClock = TRUE;