summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-12-04 17:08:58 -0500
committerAlex Deucher <alex@t41p.hsd1.va.comcast.net>2007-12-04 17:08:58 -0500
commit21ed435398e4a398dd8a0a5d7c1d4cc45e916332 (patch)
tree4d92e6bb7efac934812785878a9ba7ef1f68e16f
parent54bfd522405d9fdfb69d3a59e111ac3d63483dbb (diff)
RADEON: add MacModel imac-g5-isight for iMac G5 iSight
Thanks to Étienne Bersac for helping to figure this out.
-rw-r--r--man/radeon.man2
-rw-r--r--src/radeon.h19
-rw-r--r--src/radeon_output.c41
3 files changed, 46 insertions, 16 deletions
diff --git a/man/radeon.man b/man/radeon.man
index 881612a..3c4df23 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -437,6 +437,8 @@ mini-internal \-\- Mac Mini with integrated DVI
.br
mini \-\- mini-external alias
.br
+imac-g5-isight \-\- iMac G5 iSight
+.br
The default value is
.B undefined.
.TP
diff --git a/src/radeon.h b/src/radeon.h
index 38d8b9f..fe491e8 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -431,18 +431,21 @@ typedef enum {
} RADEONErrata;
typedef enum {
- RADEON_SIL_164 = 0x00000001,
- RADEON_SIL_1178 = 0x00000002
+ RADEON_DVOCHIP_NONE,
+ RADEON_SIL_164,
+ RADEON_SIL_1178
} RADEONExtTMDSChip;
#if defined(__powerpc__)
typedef enum {
- RADEON_MAC_IBOOK = 0x00000001,
- RADEON_MAC_POWERBOOK_EXTERNAL = 0x00000002,
- RADEON_MAC_POWERBOOK_INTERNAL = 0x00000004,
- RADEON_MAC_POWERBOOK_VGA = 0x00000008,
- RADEON_MAC_MINI_EXTERNAL = 0x00000010,
- RADEON_MAC_MINI_INTERNAL = 0x00000020
+ RADEON_MAC_NONE,
+ RADEON_MAC_IBOOK,
+ RADEON_MAC_POWERBOOK_EXTERNAL,
+ RADEON_MAC_POWERBOOK_INTERNAL,
+ RADEON_MAC_POWERBOOK_VGA,
+ RADEON_MAC_MINI_EXTERNAL,
+ RADEON_MAC_MINI_INTERNAL,
+ RADEON_MAC_IMAC_G5_ISIGHT
} RADEONMacModel;
#endif
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 4e5aded..11a2a8a 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -2789,6 +2789,25 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
info->BiosConnector[1].DDCType = DDC_NONE_DETECTED;
info->BiosConnector[1].valid = TRUE;
return TRUE;
+ case RADEON_MAC_IMAC_G5_ISIGHT:
+ info->BiosConnector[0].DDCType = DDC_MONID;
+ info->BiosConnector[0].DACType = DAC_NONE;
+ info->BiosConnector[0].TMDSType = TMDS_INT;
+ info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_D;
+ info->BiosConnector[0].valid = TRUE;
+
+ info->BiosConnector[1].DDCType = DDC_DVI;
+ info->BiosConnector[1].DACType = DAC_TVDAC;
+ info->BiosConnector[1].TMDSType = TMDS_NONE;
+ info->BiosConnector[1].ConnectorType = CONNECTOR_CRT;
+ info->BiosConnector[1].valid = TRUE;
+
+ info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
+ info->BiosConnector[2].DACType = DAC_TVDAC;
+ info->BiosConnector[2].TMDSType = TMDS_NONE;
+ info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
+ info->BiosConnector[2].valid = TRUE;
+ return TRUE;
default:
return FALSE;
}
@@ -2974,18 +2993,21 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
break;
}
} else if (!strncmp(cpuline, "detected as", strlen("detected as"))) {
- if (strstr(cpuline, "iBook")) {
- ret = RADEON_MAC_IBOOK;
+ if (strstr(cpuline, "iBook")) {
+ ret = RADEON_MAC_IBOOK;
break;
} else if (strstr(cpuline, "PowerBook")) {
ret = RADEON_MAC_POWERBOOK_INTERNAL; /* internal tmds */
break;
- }
+ } else if (strstr(cpuline, "iMac G5 (iSight)")) {
+ ret = RADEON_MAC_IMAC_G5_ISIGHT;
+ break;
+ }
- /* No known PowerMac model detected */
- break;
- }
- }
+ /* No known PowerMac model detected */
+ break;
+ }
+ }
fclose (f);
} else
@@ -3002,7 +3024,8 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
ret == RADEON_MAC_POWERBOOK_VGA ? "PowerBook with VGA" :
ret == RADEON_MAC_IBOOK ? "iBook" :
ret == RADEON_MAC_MINI_EXTERNAL ? "Mac Mini with external DVI" :
- "Mac Mini with integrated DVI");
+ ret == RADEON_MAC_MINI_INTERNAL ? "Mac Mini with integrated DVI" :
+ "iMac G5 iSight");
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"If this is not correct, try Option \"MacModel\" and "
"consider reporting to the\n");
@@ -3065,6 +3088,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
info->MacModel = RADEON_MAC_MINI_EXTERNAL;
else if (!strncmp("mini", optstr, strlen("mini"))) /* alias */
info->MacModel = RADEON_MAC_MINI_EXTERNAL;
+ else if (!strncmp("imac-g5-isight", optstr, strlen("imac-g5-isight")))
+ info->MacModel = RADEON_MAC_IMAC_G5_ISIGHT;
else {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid Mac Model: %s\n", optstr);
}