|
Lines 1416-1421
Link Here
|
| 1416 |
return TRUE; |
1416 |
return TRUE; |
| 1417 |
} |
1417 |
} |
| 1418 |
|
1418 |
|
|
|
1419 |
typedef enum { |
| 1420 |
LAYOUT_ISOLATEDEVICE, |
| 1421 |
LAYOUT_SINGLECARD |
| 1422 |
} LayoutValues; |
| 1423 |
|
| 1424 |
static OptionInfoRec LayoutOptions[] = { |
| 1425 |
{ LAYOUT_ISOLATEDEVICE, "IsolateDevice", OPTV_STRING, |
| 1426 |
{0}, FALSE }, |
| 1427 |
{ LAYOUT_SINGLECARD, "SingleCard", OPTV_BOOLEAN, |
| 1428 |
{0}, FALSE }, |
| 1429 |
{ -1, NULL, OPTV_NONE, |
| 1430 |
{0}, FALSE }, |
| 1431 |
}; |
| 1432 |
|
| 1419 |
/* |
1433 |
/* |
| 1420 |
* figure out which layout is active, which screens are used in that layout, |
1434 |
* figure out which layout is active, which screens are used in that layout, |
| 1421 |
* which drivers and monitors are used in these screens |
1435 |
* which drivers and monitors are used in these screens |
|
Lines 2213-2218
Link Here
|
| 2213 |
const char *filename; |
2227 |
const char *filename; |
| 2214 |
char *searchpath; |
2228 |
char *searchpath; |
| 2215 |
MessageType from = X_DEFAULT; |
2229 |
MessageType from = X_DEFAULT; |
|
|
2230 |
char *scanptr; |
| 2231 |
Bool singlecard = 0; |
| 2216 |
|
2232 |
|
| 2217 |
if (getuid() == 0) |
2233 |
if (getuid() == 0) |
| 2218 |
searchpath = ROOT_CONFIGPATH; |
2234 |
searchpath = ROOT_CONFIGPATH; |
|
Lines 2283-2288
Link Here
|
| 2283 |
} |
2299 |
} |
| 2284 |
} |
2300 |
} |
| 2285 |
|
2301 |
|
|
|
2302 |
xf86ProcessOptions(-1, xf86ConfigLayout.options, LayoutOptions); |
| 2303 |
|
| 2304 |
if ((scanptr = xf86GetOptValString(LayoutOptions, LAYOUT_ISOLATEDEVICE))) { |
| 2305 |
; /* IsolateDevice specified; overrides SingleCard */ |
| 2306 |
} else { |
| 2307 |
xf86GetOptValBool(LayoutOptions, LAYOUT_SINGLECARD, &singlecard); |
| 2308 |
if (singlecard) |
| 2309 |
scanptr = xf86ConfigLayout.screens->screen->device->busID; |
| 2310 |
} |
| 2311 |
if (scanptr) { |
| 2312 |
int bus, device, func, stroffset = 0; |
| 2313 |
if (strncmp(scanptr, "PCI:", 4) != 0) { |
| 2314 |
xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n" |
| 2315 |
"\tIgnoring IsolateDevice option.\n"); |
| 2316 |
} else if (sscanf(scanptr, "PCI:%d:%d:%d", &bus, &device, &func) == 3) { |
| 2317 |
xf86IsolateDevice.bus = bus; |
| 2318 |
xf86IsolateDevice.device = device; |
| 2319 |
xf86IsolateDevice.func = func; |
| 2320 |
xf86Msg(X_INFO, |
| 2321 |
"Isolating PCI bus \"%d:%d:%d\"\n", bus, device, func); |
| 2322 |
} |
| 2323 |
} |
| 2324 |
|
| 2286 |
/* Now process everything else */ |
2325 |
/* Now process everything else */ |
| 2287 |
|
2326 |
|
| 2288 |
if (!configFiles(xf86configptr->conf_files) || |
2327 |
if (!configFiles(xf86configptr->conf_files) || |