style cleanup; fixed missing break on i2c disable check... it looks as though i2c was always enabled, even on chips where it was known to be broken. Lets hope this fixes a radeon graphics bug. CID 3234
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40766 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -134,7 +134,7 @@
|
|||||||
#define DEVICE_ID_RADEON_3e54 0x3e54 // new
|
#define DEVICE_ID_RADEON_3e54 0x3e54 // new
|
||||||
#define DEVICE_ID_RADEON_3150 0x3150 // new
|
#define DEVICE_ID_RADEON_3150 0x3150 // new
|
||||||
#define DEVICE_ID_RADEON_3154 0x3154 // new
|
#define DEVICE_ID_RADEON_3154 0x3154 // new
|
||||||
#define DEVICE_ID_RADEON_5462 0x5462 // new X600SE on Toshiba M50 really an X300???
|
#define DEVICE_ID_RADEON_5462 0x5462 // new X600SE on Toshiba M50 an X300???
|
||||||
|
|
||||||
// rv380 X600AIW
|
// rv380 X600AIW
|
||||||
#define DEVICE_ID_RADEON_5b62 0x5b62
|
#define DEVICE_ID_RADEON_5b62 0x5b62
|
||||||
@@ -245,7 +245,7 @@ typedef struct {
|
|||||||
|
|
||||||
#define STD_RADEON 0 // common as muck PC graphics card (if there is such a thing)
|
#define STD_RADEON 0 // common as muck PC graphics card (if there is such a thing)
|
||||||
#define ISMOBILITY 1 // is mobility
|
#define ISMOBILITY 1 // is mobility
|
||||||
#define INTEGRATED 2 // is IGP (Integrated Graphics Processor) built in to PC mainboard northbridge typically uses system RAM for graphics
|
#define INTEGRATED 2 // is IGP (Integrated Graphics Processor) onboard video
|
||||||
#define MOBILE_IGP ISMOBILITY | INTEGRATED // 2 disabilites for the price of 1
|
#define MOBILE_IGP ISMOBILITY | INTEGRATED // 2 disabilites for the price of 1
|
||||||
|
|
||||||
// list of supported devices
|
// list of supported devices
|
||||||
@@ -276,7 +276,7 @@ RadeonDevice radeon_device_list[] = {
|
|||||||
{ DEVICE_ID_RADEON_LX, rt_rv200, ISMOBILITY, "Radeon Mobility 7500 GL" },
|
{ DEVICE_ID_RADEON_LX, rt_rv200, ISMOBILITY, "Radeon Mobility 7500 GL" },
|
||||||
|
|
||||||
// R200
|
// R200
|
||||||
{ DEVICE_ID_RADEON_QH , rt_r200, STD_RADEON, "Fire GL E1" }, // chip type: fgl8800
|
{ DEVICE_ID_RADEON_QH, rt_r200, STD_RADEON, "Fire GL E1" }, // chip fgl8800
|
||||||
{ DEVICE_ID_RADEON_QI, rt_r200, STD_RADEON, "Radeon 8500 QI" },
|
{ DEVICE_ID_RADEON_QI, rt_r200, STD_RADEON, "Radeon 8500 QI" },
|
||||||
{ DEVICE_ID_RADEON_QJ, rt_r200, STD_RADEON, "Radeon 8500 QJ" },
|
{ DEVICE_ID_RADEON_QJ, rt_r200, STD_RADEON, "Radeon 8500 QJ" },
|
||||||
{ DEVICE_ID_RADEON_QK, rt_r200, STD_RADEON, "Radeon 8500 QK" },
|
{ DEVICE_ID_RADEON_QK, rt_r200, STD_RADEON, "Radeon 8500 QK" },
|
||||||
@@ -503,7 +503,8 @@ bool Radeon_CardDetect( void )
|
|||||||
if (Radeon_MapBIOS(&pcii, &ri) == B_OK) {
|
if (Radeon_MapBIOS(&pcii, &ri) == B_OK) {
|
||||||
Radeon_UnmapBIOS(&ri);
|
Radeon_UnmapBIOS(&ri);
|
||||||
|
|
||||||
SHOW_INFO( 0, "found supported device pci index %ld, device 0x%04x/0x%04x",
|
SHOW_INFO(0, "found supported device"
|
||||||
|
" pci index %ld, device 0x%04x/0x%04x",
|
||||||
pci_index, pcii.vendor_id, pcii.device_id);
|
pci_index, pcii.vendor_id, pcii.device_id);
|
||||||
found_one = TRUE;
|
found_one = TRUE;
|
||||||
goto done;
|
goto done;
|
||||||
@@ -525,6 +526,7 @@ done:
|
|||||||
return (found_one ? B_OK : B_ERROR);
|
return (found_one ? B_OK : B_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// !extend this array whenever a new ASIC is a added!
|
// !extend this array whenever a new ASIC is a added!
|
||||||
static struct {
|
static struct {
|
||||||
const char *name; // name of ASIC
|
const char *name; // name of ASIC
|
||||||
@@ -534,20 +536,20 @@ static struct {
|
|||||||
bool new_pll; // reference divider of PPLL moved to other location
|
bool new_pll; // reference divider of PPLL moved to other location
|
||||||
} asic_properties[] =
|
} asic_properties[] =
|
||||||
{
|
{
|
||||||
{ "r100", tc_external_rt1, false, true, false,},
|
{ "r100", tc_external_rt1, false, true, false},
|
||||||
{ "rv100", tc_internal_rt1, true, true, false,},
|
{ "rv100", tc_internal_rt1, true, true, false},
|
||||||
{ "rs100", tc_internal_rt1, true, false, false,},
|
{ "rs100", tc_internal_rt1, true, false, false},
|
||||||
{ "rv200", tc_internal_rt2, true, true, false,},
|
{ "rv200", tc_internal_rt2, true, true, false},
|
||||||
{ "rs200", tc_internal_rt1, true, false, false,},
|
{ "rs200", tc_internal_rt1, true, false, false},
|
||||||
{ "r200", tc_external_rt1, true, true, false,},
|
{ "r200", tc_external_rt1, true, true, false},
|
||||||
{ "rv250", tc_internal_rt2, true, true, false,},
|
{ "rv250", tc_internal_rt2, true, true, false},
|
||||||
{ "rs300", tc_internal_rt1, true, false, false,},
|
{ "rs300", tc_internal_rt1, true, false, false},
|
||||||
{ "rv280", tc_internal_rt2, true, true, false,},
|
{ "rv280", tc_internal_rt2, true, true, false},
|
||||||
{ "r300", tc_internal_rt2, true, true, true, },
|
{ "r300", tc_internal_rt2, true, true, true },
|
||||||
{ "r350", tc_internal_rt2, true, true, true, },
|
{ "r350", tc_internal_rt2, true, true, true },
|
||||||
{ "rv350", tc_internal_rt2, true, true, true, },
|
{ "rv350", tc_internal_rt2, true, true, true },
|
||||||
{ "rv380", tc_internal_rt2, true, true, true, },
|
{ "rv380", tc_internal_rt2, true, true, true },
|
||||||
{ "r420", tc_internal_rt2, true, true, true, }
|
{ "r420", tc_internal_rt2, true, true, true }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -564,7 +566,8 @@ static bool probeDevice( device_info *di )
|
|||||||
if (SupportedVendors[vendor].vendor_id != di->pcii.vendor_id)
|
if (SupportedVendors[vendor].vendor_id != di->pcii.vendor_id)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for( device = SupportedVendors[vendor].devices; device->device_id; ++device ) {
|
for (device = SupportedVendors[vendor].devices; device->device_id;
|
||||||
|
++device) {
|
||||||
// avoid double-detection
|
// avoid double-detection
|
||||||
if (device->device_id != di->pcii.device_id)
|
if (device->device_id != di->pcii.device_id)
|
||||||
continue;
|
continue;
|
||||||
@@ -589,9 +592,9 @@ static bool probeDevice( device_info *di )
|
|||||||
case DEVICE_ID_RADEON_5460:
|
case DEVICE_ID_RADEON_5460:
|
||||||
case DEVICE_ID_RADEON_5464:
|
case DEVICE_ID_RADEON_5464:
|
||||||
di->has_no_i2c = true;
|
di->has_no_i2c = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
di->has_no_i2c = false;
|
di->has_no_i2c = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable 2d DMA engine for chips that don't work with our
|
// disable 2d DMA engine for chips that don't work with our
|
||||||
@@ -634,14 +637,15 @@ static bool probeDevice( device_info *di )
|
|||||||
// rs410
|
// rs410
|
||||||
case DEVICE_ID_RS410_5a61:
|
case DEVICE_ID_RS410_5a61:
|
||||||
case DEVICE_ID_RS410_5a62:
|
case DEVICE_ID_RS410_5a62:
|
||||||
|
|
||||||
// r430
|
// r430
|
||||||
case DEVICE_ID_RADEON_UM:
|
case DEVICE_ID_RADEON_UM:
|
||||||
|
|
||||||
// rs480
|
// rs480
|
||||||
case DEVICE_ID_RS480_5954:
|
case DEVICE_ID_RS480_5954:
|
||||||
case DEVICE_ID_RS480_5955:
|
case DEVICE_ID_RS480_5955:
|
||||||
case DEVICE_ID_RS482_5974:
|
case DEVICE_ID_RS482_5974:
|
||||||
case DEVICE_ID_RS482_5975:
|
case DEVICE_ID_RS482_5975:
|
||||||
|
|
||||||
di->acc_dma = false;
|
di->acc_dma = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -661,7 +665,8 @@ static bool probeDevice( device_info *di )
|
|||||||
// we don't need BIOS any more
|
// we don't need BIOS any more
|
||||||
Radeon_UnmapBIOS(&di->rom);
|
Radeon_UnmapBIOS(&di->rom);
|
||||||
|
|
||||||
SHOW_INFO( 0, "found %s; ASIC: %s", device->name, asic_properties[device->asic].name );
|
SHOW_INFO(0, "found %s; ASIC: %s", device->name,
|
||||||
|
asic_properties[device->asic].name);
|
||||||
|
|
||||||
sprintf(di->name, "graphics/%04X_%04X_%02X%02X%02X",
|
sprintf(di->name, "graphics/%04X_%04X_%02X%02X%02X",
|
||||||
di->pcii.vendor_id, di->pcii.device_id,
|
di->pcii.vendor_id, di->pcii.device_id,
|
||||||
@@ -669,9 +674,9 @@ static bool probeDevice( device_info *di )
|
|||||||
SHOW_FLOW(3, "making /dev/%s", di->name);
|
SHOW_FLOW(3, "making /dev/%s", di->name);
|
||||||
|
|
||||||
// we always publish it as a video grabber; we should check for Rage
|
// we always publish it as a video grabber; we should check for Rage
|
||||||
// Theater, but the corresponding code (vip.c) needs a fully initialized
|
// Theater, but the corresponding code (vip.c) needs a fully
|
||||||
// driver, and this is too much hazzly, so we leave it to the media add-on
|
// initialized driver, and this is too much hazzly, so we leave it
|
||||||
// to verify that the card really supports video-in
|
// to the media add-on to verify that the card supports video-in
|
||||||
sprintf(di->video_name, "video/radeon/%04X_%04X_%02X%02X%02X",
|
sprintf(di->video_name, "video/radeon/%04X_%04X_%02X%02X%02X",
|
||||||
di->pcii.vendor_id, di->pcii.device_id,
|
di->pcii.vendor_id, di->pcii.device_id,
|
||||||
di->pcii.bus, di->pcii.device, di->pcii.function);
|
di->pcii.bus, di->pcii.device, di->pcii.function);
|
||||||
|
|||||||
Reference in New Issue
Block a user