Hi,
any chance to get the attached nice, harmfull patch,
which alows with a proper kernel to have multiple local users
on any supported hardware.
it doesn't change anything if the option prefbusid is ommited
(which would be the case in most cases) , but gives wider and better
graphic card support in multi user environment
and will be merged in debian,
it would be nice if mandrake could be the first to offer it ( me thinks)
( and would also save me some work patching XFree, and some web space too)
best,
svetljo
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualit�tssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86Config.c
xc-changed/programs/Xserver/hw/xfree86/common/xf86Config.c
--- xc/programs/Xserver/hw/xfree86/common/xf86Config.c 2003-02-20 04:36:07.000000000
+0000
+++ xc-changed/programs/Xserver/hw/xfree86/common/xf86Config.c 2003-08-26
14:59:47.000000000 +0100
@@ -2213,6 +2213,7 @@ xf86HandleConfigFile(void)
const char *filename;
char *searchpath;
MessageType from = X_DEFAULT;
+ char *layopt;
if (getuid() == 0)
searchpath = ROOT_CONFIGPATH;
@@ -2282,6 +2283,19 @@ xf86HandleConfigFile(void)
}
}
}
+
+ layopt = xf86FindOptionValue(xf86ConfigLayout.options, "PrefBusID");
+ if (layopt) {
+ int bus, device, func;
+ if (sscanf(layopt, "%d:%d:%d", &bus, &device, &func) == 3) {
+ xf86PrefBusId.bus = bus;
+ xf86PrefBusId.device = device;
+ xf86PrefBusId.func = func;
+ xf86Msg(X_INFO,
+ "Preferred PCI BusID set to \"%d:%d:%d\"\n",bus,device,func);
+ }
+ }
+
/* Now process everything else */
diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86Globals.c
xc-changed/programs/Xserver/hw/xfree86/common/xf86Globals.c
--- xc/programs/Xserver/hw/xfree86/common/xf86Globals.c 2003-02-20 04:05:14.000000000
+0000
+++ xc-changed/programs/Xserver/hw/xfree86/common/xf86Globals.c 2003-04-02
13:03:00.000000000 +0100
@@ -215,6 +215,7 @@ Bool xf86MiscModInDevAllowNonLocal = FAL
#endif
PropertyPtr *xf86RegisteredPropertiesTable = NULL;
Bool xf86inSuspend = FALSE;
+PciBusId xf86PrefBusId;
#ifdef DLOPEN_HACK
/*
diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86Init.c
xc-changed/programs/Xserver/hw/xfree86/common/xf86Init.c
--- xc/programs/Xserver/hw/xfree86/common/xf86Init.c 2003-02-26 09:21:38.000000000
+0000
+++ xc-changed/programs/Xserver/hw/xfree86/common/xf86Init.c 2003-08-26
14:55:22.000000000 +0100
@@ -1553,6 +1553,22 @@ ddxProcessArgument(int argc, char **argv
xf86AllowMouseOpenFail = TRUE;
return 1;
}
+ if (!strcmp(argv[i], "-prefbusid"))
+ {
+ int bus, device, func;
+ if (++i >= argc)
+ return 0;
+ if (sscanf(argv[i], "%d:%d:%d", &bus, &device, &func) == 3) {
+ xf86PrefBusId.bus = bus;
+ xf86PrefBusId.device = device;
+ xf86PrefBusId.func = func;
+ return 2;
+ }
+ else {
+ ErrorF("Invalid preferred PCI BusId\n");
+ return 0;
+ }
+ }
/* OS-specific processing */
return xf86ProcessArgument(argc, argv, i);
}
diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
xc-changed/programs/Xserver/hw/xfree86/common/xf86pciBus.c
--- xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c 2003-02-18 15:42:11.000000000
+0000
+++ xc-changed/programs/Xserver/hw/xfree86/common/xf86pciBus.c 2003-04-02
13:03:00.000000000 +0100
@@ -160,7 +160,10 @@ FindPCIVideoInfo(void)
int num = 0;
pciVideoPtr info;
Bool mem64 = FALSE;
+ int DoPrefBusIdCheck = 0;
+ if( xf86PrefBusId.bus || xf86PrefBusId.device || xf86PrefBusId.func )
+ DoPrefBusIdCheck = 1;
pcrpp = xf86PciInfo = xf86scanpci(0);
getPciClassFlags(pcrpp);
@@ -182,7 +185,11 @@ FindPCIVideoInfo(void)
subclass = pcrp->pci_sub_class;
}
- if (PCIINFOCLASSES(baseclass, subclass)) {
+ if (PCIINFOCLASSES(baseclass, subclass) &&
+ (DoPrefBusIdCheck ?
+ (xf86PrefBusId.bus == pcrp->busnum &&
+ xf86PrefBusId.device == pcrp->devnum &&
+ xf86PrefBusId.func == pcrp->funcnum):1)) {
num++;
xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo,
sizeof(pciVideoPtr) * (num + 1));
diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86Priv.h
xc-changed/programs/Xserver/hw/xfree86/common/xf86Priv.h
--- xc/programs/Xserver/hw/xfree86/common/xf86Priv.h 2002-12-12 18:29:10.000000000
+0000
+++ xc-changed/programs/Xserver/hw/xfree86/common/xf86Priv.h 2003-04-02
13:03:00.000000000 +0100
@@ -53,6 +53,7 @@ extern Bool xf86BestRefresh;
extern Gamma xf86Gamma;
extern char *xf86ServerName;
extern Bool xf86ShowUnresolved;
+extern PciBusId xf86PrefBusId;
/* Other parameters */