summaryrefslogtreecommitdiff
path: root/x11/modular-xorg-server/patches/patch-sb
blob: 2d7a7df16d00ddc462ce13cee4a8167daf36a3aa (plain)
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
$NetBSD: patch-sb,v 1.2.10.1 2010/07/04 07:31:14 agc Exp $

--- hw/xfree86/common/xf86Configure.c.orig	2009-10-12 02:52:40.000000000 +0000
+++ hw/xfree86/common/xf86Configure.c
@@ -115,7 +115,7 @@ xf86AddBusDeviceToConfigure(const char *
 		return NULL;
 	isPrimary = xf86IsPrimaryPci(pVideo);
 	break;
-#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
+#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) && !defined(__NetBSD__)
     case BUS_SBUS:
 	for (i = 0;  i < nDevToConfig;  i++)
 	    if (DevToConfig[i].sVideo &&
@@ -180,8 +180,14 @@ xf86AddBusDeviceToConfigure(const char *
 
 	NewDevice.GDev.busID = xnfalloc(16);
 	xf86FormatPciBusNumber(pVideo->bus, busnum);
-	sprintf(NewDevice.GDev.busID, "PCI:%s:%d:%d",
-	    busnum, pVideo->dev, pVideo->func);
+
+	if (pVideo->domain == 0) {
+		snprintf(NewDevice.GDev.busID, 16, "PCI:%s:%d:%d",
+		  busnum, pVideo->dev, pVideo->func);
+	} else {
+		snprintf(NewDevice.GDev.busID, 16, "PCI:%s@%d:%d:%d",
+		  busnum, pVideo->domain, pVideo->dev, pVideo->func);
+	}
 
 	NewDevice.GDev.chipID = pVideo->device_id;
 	NewDevice.GDev.chipRev = pVideo->revision;