Chameleon

Chameleon Commit Details

Date:2011-08-14 16:50:00 (7 years 11 months ago)
Author:Azimutz
Commit:1379
Parents: 1378
Message:ati.c: restructure populating card->cfg_name and card->ports.
Changes:
M/trunk/i386/libsaio/ati.c

File differences

trunk/i386/libsaio/ati.c
13131313
13141314
13151315
1316
13161317
1318
13171319
13181320
1321
13191322
1320
1323
1324
1325
1326
1327
13211328
13221329
13231330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
13241346
13251347
1326
1348
1349
1350
13271351
1352
1353
1354
13281355
1329
1330
1331
1332
1333
1334
13351356
13361357
13371358
//atN = 0;
// Check AtiConfig key for a framebuffer name,
card->cfg_name = getStringForKey(kAtiConfig, &bootInfo->chameleonConfig);
// if none,
if (!card->cfg_name)
{
// use the device fb key on radeon_cards, to retrive the default name from card_configs.
card->cfg_name = card_configs[card->info->cfg_name].name;
card->ports = card_configs[card->info->cfg_name].ports;
// and leave ports alone!
//card->ports = card_configs[card->info->cfg_name].ports;
// which means one of the fb's or kNull
verbose("Framebuffer set to device's default: %s\n", card->cfg_name);
}
else
{
// else, use the fb name returned by AtiConfig.
verbose("(AtiConfig) Framebuffer set to: %s\n", card->cfg_name);
}
// Check AtiPorts key for nr of ports,
card->ports = getIntForKey(kAtiPorts, &n_ports, &bootInfo->chameleonConfig);
// if a value bigger than 0 ?? is found, (do we need >= 0 ?? that's null FB on card_configs)
if (n_ports > 0)
{
card->ports = n_ports; // use it.
verbose("(AtiPorts) Nr of ports set to: %d\n", card->ports);
}
else// if (card->cfg_name > 0) // do we want 0 ports if fb is kNull or mistyped ?
{
// else, match fb name with card_configs list and retrive default nr of ports.
for (i = 0; i < kCfgEnd; i++)
if (strcmp(card->cfg_name, card_configs[i].name) == 0)
card->ports = card_configs[i].ports;
card->ports = card_configs[i].ports; // default
verbose("Nr of ports set to framebuffer's default: %d\n", card->ports);
}
//else
//card->ports = 2/1 ?; // set a min if 0 ports ?
//verbose("Nr of ports set to min: %d\n", card->ports);
getIntForKey(kAtiPorts, &n_ports, &bootInfo->bootConfig);
if (n_ports > 0){
card->ports = n_ports;
verbose("AtiPorts set to %d\n",n_ports); //AniV
}
sprintf(name, "ATY,%s", card->cfg_name);
aty_name.type = kStr;
aty_name.size = strlen(name) + 1;

Archive Download the corresponding diff file

Revision: 1379