summaryrefslogtreecommitdiff
path: root/src/radeon_bios.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.(none)>2007-11-09 17:11:43 -0500
committerAlex Deucher <alex@botch2.(none)>2007-11-09 17:11:43 -0500
commit342e3e207efda42ba679731c30dfb9d5e9d5643f (patch)
tree35f708c9531b42b2e8ac610eb77fd063a2b92d1c /src/radeon_bios.c
parent8078c299d5941460243944d55051547c1a4d3791 (diff)
combine outputs based on id
Diffstat (limited to 'src/radeon_bios.c')
-rw-r--r--src/radeon_bios.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 9218079f..342e458b 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -162,7 +162,7 @@ Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
static Bool RADEONGetATOMConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR (pScrn);
- int offset, i, tmp, tmp0, crtc, portinfo, gpio;
+ int offset, i, j, tmp, tmp0, id, portinfo, gpio;
if (!info->VBIOS) return FALSE;
@@ -176,10 +176,11 @@ static Bool RADEONGetATOMConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
portinfo = RADEON_BIOS16(offset + 6 + i * 2);
info->BiosConnector[i].DACType = (portinfo & 0xf) - 1;
info->BiosConnector[i].ConnectorType = (portinfo >> 4) & 0xf;
- crtc = (portinfo >> 8) & 0xf;
+ id = (portinfo >> 8) & 0xf;
tmp0 = RADEON_BIOS16(info->MasterDataStart + 24);
- gpio = RADEON_BIOS16(tmp0 + 4 + 27 * crtc) * 4;
+ gpio = RADEON_BIOS16(tmp0 + 4 + 27 * id) * 4;
info->BiosConnector[i].gpio = gpio;
+ info->BiosConnector[i].output_id = id;
switch(gpio) {
case RADEON_GPIO_MONID:
@@ -221,18 +222,25 @@ static Bool RADEONGetATOMConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
return FALSE;
}
- /* DVI-I ports have 2 entries: one for analog, one for digital. combine them */
- if (info->BiosConnector[0].valid && info->BiosConnector[7].valid) {
- info->BiosConnector[7].DACType = info->BiosConnector[0].DACType;
- info->BiosConnector[0].valid = FALSE;
- }
-
- if (info->BiosConnector[4].valid && info->BiosConnector[3].valid) {
- info->BiosConnector[3].DACType = info->BiosConnector[4].DACType;
- info->BiosConnector[4].valid = FALSE;
+ for (i = 0; i < 8; i++) {
+ if (info->BiosConnector[i].valid) {
+ for (j = 0; j < 8; j++) {
+ if (info->BiosConnector[j].valid && (i != j) ) {
+ if (info->BiosConnector[i].output_id == info->BiosConnector[j].output_id) {
+ if ((i == 3) || (i == 7)) {
+ info->BiosConnector[i].DACType = info->BiosConnector[j].DACType;
+ info->BiosConnector[j].valid = FALSE;
+ } else if ((j == 3) || (j == 7)) {
+ info->BiosConnector[j].DACType = info->BiosConnector[i].DACType;
+ info->BiosConnector[i].valid = FALSE;
+ }
+ /* other possible combos? */
+ }
+ }
+ }
+ }
}
-
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Bios Connector table: \n");
for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) {
if (info->BiosConnector[i].valid) {