Chameleon

Chameleon Commit Details

Date:2012-11-15 12:19:34 (8 years 18 days ago)
Author:armel cadet-petit
Commit:2122
Parents: 2121
Message:updated ati and nvidia with hdmi audio support
Changes:
M/branches/cparm/i386/modules/GraphicsEnabler/nvidia.h
M/branches/cparm/i386/modules/GraphicsEnabler/ati.h
M/branches/cparm/xcode3_sym.zip
M/branches/cparm/i386/modules/GraphicsEnabler/nvidia.c
M/branches/cparm/CHANGES
M/branches/cparm/i386/modules/GraphicsEnabler/ati.c

File differences

branches/cparm/CHANGES
1
2
3
14
25
36
- Fixed a bug in ati.c
- Update ati.c and nvidia.c
- Security fixes
- Implemented random uuid
- device_inject is now embedded into the modules that need it, and not in the core anymore
branches/cparm/i386/modules/GraphicsEnabler/nvidia.h
5252
5353
5454
55
56
55
56
57
5758
5859
5960
#define kUseNvidiaROM"UseNvidiaROM"/* nvidia.c */
#define kVBIOS"VBIOS"/* nvidia.c */
#define kDcfg0 "display_0" /* nvidia.c */
#define kDcfg1 "display_1" /* nvidia.c */
#define kDcfg0 "display_0" /* nvidia.c */
#define kDcfg1 "display_1" /* nvidia.c */
#define kEnableHDMIAudio "EnableHDMIAudio" /* nvidia.c */
bool setup_nvidia_devprop(pci_dt_t *nvda_dev);
branches/cparm/i386/modules/GraphicsEnabler/ati.h
1212
1313
1414
15
1516
1617
1718
#define kAtiConfig "AtiConfig" /* ati.c */
#define kAtiPorts "AtiPorts" /* ati.c */
#define kATYbinimage "ATYbinimage" /* ati.c */
#define kEnableHDMIAudio "EnableHDMIAudio" /* ati.c */
bool setup_ati_devprop(pci_dt_t *ati_dev);
branches/cparm/i386/modules/GraphicsEnabler/nvidia.c
16241624
16251625
16261626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
16271637
16281638
16291639
if (getBoolForKey(kVBIOS, &doit, DEFAULT_BOOT_CONFIG) && doit) {
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (uint32_t)(rom[2] * 512));
}
//add HDMI Audio back to nvidia
doit = false;
//http://forge.voodooprojects.org/p/chameleon/issues/67/
if(getBoolForKey(kEnableHDMIAudio, &doit, DEFAULT_BOOT_CONFIG) && doit)
{
static uint8_t connector_type_1[]= {0x00, 0x08, 0x00, 0x00};
devprop_add_value(device, "@1,connector-type",connector_type_1, 4);
}
//end Nvidia HDMI Audio
free(rom);
return true;
branches/cparm/i386/modules/GraphicsEnabler/ati.c
843843
844844
845845
846
846847
847848
848849
......
883884
884885
885886
887
888
886889
887890
888891
......
892895
893896
894897
895
896898
897899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
898917
899918
900919
......
12121231
12131232
12141233
1234
1235
1236
1237
12151238
12161239
1217
1218
1219
1220
1221
1222
1223
1224
1240
12251241
12261242
12271243
......
14611477
14621478
14631479
1464
1480
14651481
1466
1482
14671483
14681484
14691485
......
14711487
14721488
14731489
1474
1490
14751491
14761492
14771493
......
14801496
14811497
14821498
1483
1499
14841500
14851501
14861502
bool get_platforminfo_val(value_t *val);
bool get_vramtotalsize_val(value_t *val);
bool validate_rom(struct pci_rom_bios_t *rom_header, pci_dt_t *pci_dev);
bool get_hdmiaudio(value_t * val);
typedef struct {
uint32_tflags;
{FLAGTRUE,false,"device_type",get_nameparent_val,NULVAL},
{FLAGTRUE,false,"model",get_model_val,STRVAL("ATI Radeon")},
//{FLAGTRUE,false,"VRAM,totalsize",get_vramtotalsize_val,NULVAL},
{FLAGTRUE, false, "hda-gfx",get_hdmiaudio,NULVAL},
{FLAGTRUE,false,NULL,NULL,NULVAL}
};
void get_vram_size(void);
bool load_vbios_file(const char *key, uint16_t vendor_id, uint16_t device_id, uint32_t subsys_id);
void free_val(value_t *val);
int devprop_add_list(dev_prop_t devprop_list[]);
bool get_hdmiaudio(value_t * val)
{
bool doit = false;
if(getBoolForKey(kEnableHDMIAudio, &doit, DEFAULT_BOOT_CONFIG) && doit){
val->type = kStr;
val->size = strlen("onboard-1") + 1;
val->data = (uint8_t *)"onboard-1";
return true;
}
return false;
}
bool get_bootdisplay_val(value_t *val)
{
static uint32_t v = 0;
if (!validate_rom(rom_addr, card->pci_dev))
return false;
card->rom_size = rom_addr->size * 512;
if (!card->rom_size)
return false;
card->rom = malloc(card->rom_size);
if (!card->rom)
return false;
card->rom_size = rom_addr->size * 512;
if (!card->rom_size)
{
free(card->rom);
return false;
}
return false;
memcpy(card->rom, (void *)rom_addr, card->rom_size);
// use cfg_name on radeon_cards, to retrive the default name from card_configs,
card->cfg_name = card_configs[card->info->cfg_name].name;
// Uncommented the following line and added verbose for debugging AtiPorts issues on some cards
card->ports = card_configs[card->info->cfg_name].ports;
//card->ports = card_configs[card->info->cfg_name].ports;
// Report number of ports card reports
verbose("Card reported ports: %d\n", card->ports);
//verbose("Card reported ports: %d\n", card->ports);
// which means one of the fb's or kNull
verbose("Framebuffer set to: %s using device's default.\n", card->cfg_name);
else
{
// else, use the fb name returned by AtiConfig.
verbose("Framebuffer set to: %s using AtiConfig=%s\n", card->cfg_name, card->cfg_name);
verbose("(AtiConfig) Framebuffer set to: %s\n", card->cfg_name);
}
// Check AtiPorts key for nr of ports,
if (n_ports > 0)
{
card->ports = n_ports; // use it.
verbose("Number of ports set to: %d using AtiPorts=%d\n", card->ports, card->ports);
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 ?
{

Archive Download the corresponding diff file

Revision: 2122