Chameleon

Chameleon Commit Details

Date:2012-03-22 21:04:54 (12 years 1 month ago)
Author:Tamás Kosárszky
Commit:1903
Parents: 1902
Message:Added "NVDA,Child" device_type support for non-primary NVIDIA cards. This is a quick&dirty way, we need a proper implementation.
Changes:
M/trunk/i386/libsaio/nvidia.c

File differences

trunk/i386/libsaio/nvidia.c
7979
8080
8181
82
8283
8384
8485
......
11901191
11911192
11921193
1193
1194
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
11951204
11961205
11971206
......
14031412
14041413
14051414
1406
1415
1416
1417
1418
14071419
14081420
14091421
14101422
14111423
1412
1424
14131425
14141426
14151427
const char *nvidia_device_type_0[]={ "@0,device_type", "display" };
const char *nvidia_device_type_1[]={ "@1,device_type", "display" };
const char *nvidia_device_type[]={ "device_type","NVDA,Parent" };
const char *nvidia_device_type_child[]={ "device_type","NVDA,Child" };
const char *nvidia_name_0[]={ "@0,name","NVDA,Display-A" };
const char *nvidia_name_1[]={ "@1,name","NVDA,Display-B" };
const char *nvidia_slot_name[]={ "AAPL,slot-name", "Slot-1" };
return 0;
if (!DP_ADD_TEMP_VAL(device, nvidia_name_1))
return 0;
if (!DP_ADD_TEMP_VAL(device, nvidia_device_type))
return 0;
if (devices_number == 1)
{
if (!DP_ADD_TEMP_VAL(device, nvidia_device_type))
return 0;
}
else
{
if (!DP_ADD_TEMP_VAL(device, nvidia_device_type_child))
return 0;
}
// Rek : Dont use sprintf return, it does not WORK !! our custom sprintf() always return 0!
// len = sprintf(tmp, "Slot-%x", devices_number);
/* FIXME: for primary graphics card only */
boot_display = 1;
devprop_add_value(device, "@0,AAPL,boot-display", (uint8_t*)&boot_display, 4);
if (devices_number == 1)
{
devprop_add_value(device, "@0,AAPL,boot-display", (uint8_t*)&boot_display, 4);
}
if (nvPatch == PATCH_ROM_SUCCESS_HAS_LVDS) {
uint8_t built_in = 0x01;
devprop_add_value(device, "@0,built-in", &built_in, 1);
}
// get bios version
const int MAX_BIOS_VERSION_LENGTH = 32;
char* version_str = (char*)malloc(MAX_BIOS_VERSION_LENGTH);

Archive Download the corresponding diff file

Revision: 1903