diff options
author | Alex Deucher <alex@botch2.(none)> | 2007-11-29 13:27:37 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2007-11-29 13:27:37 -0500 |
commit | 9840a0fd4fc8c980533fcd4a02c55cd0d5634b6d (patch) | |
tree | ebf36d4c55f577ff3e8ae422e60e0b957a78f7d0 | |
parent | 6f080d00e6f4f84d5e0d6b4eff302bf42c230e81 (diff) |
RADEON: add MacModel "mini-internal" for minis with internal TMDS
Some macs (minis and powerbooks) use internal tmds, others use external tmds
and not just for dual-link TMDS, it shows up with single-link as well.
Unforunately, there doesn't seem to be any good way to figure it out.
-rw-r--r-- | man/radeon.man | 10 | ||||
-rw-r--r-- | src/radeon.h | 3 | ||||
-rw-r--r-- | src/radeon_output.c | 31 |
3 files changed, 36 insertions, 8 deletions
diff --git a/man/radeon.man b/man/radeon.man index f302adea..8f7b551c 100644 --- a/man/radeon.man +++ b/man/radeon.man @@ -414,8 +414,10 @@ The default is .TP .BI "Option \*qMacModel\*q \*q" string \*q .br -Used to specify Mac models for connector tables and quirks. Only valid - on PowerPC. +Used to specify Mac models for connector tables and quirks. If you have +a powerbook or mini with DVI that does not work properly, try the alternate + options as Apple does not seem to provide a good way of knowing whether + they use internal or external TMDS for DVI. Only valid on PowerPC. .br ibook \-\- ibooks .br @@ -423,7 +425,9 @@ powerbook-duallink \-\- Powerbooks with external DVI .br powerbook \-\- Powerbooks with integrated DVI .br -mini \-\- Mac Mini +mini \-\- Mac Mini with external DVI +.br +mini-internal \-\- Mac Mini with integrated DVI .br The default value is .B undefined. diff --git a/src/radeon.h b/src/radeon.h index 5b91d007..4180752e 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -433,7 +433,8 @@ typedef enum { RADEON_MAC_IBOOK = 0x00000001, RADEON_MAC_POWERBOOK_DL = 0x00000002, RADEON_MAC_POWERBOOK = 0x00000004, - RADEON_MAC_MINI = 0x00000008 + RADEON_MAC_MINI = 0x00000008, + RADEON_MAC_MINI_INTERNAL = 0x00000016 } RADEONMacModel; #endif diff --git a/src/radeon_output.c b/src/radeon_output.c index 08c690c2..1645b5a4 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -2718,6 +2718,19 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn) info->BiosConnector[1].DDCType = DDC_NONE_DETECTED; info->BiosConnector[1].valid = TRUE; return TRUE; + case RADEON_MAC_MINI_INTERNAL: + info->BiosConnector[0].DDCType = DDC_CRT2; + info->BiosConnector[0].DACType = DAC_TVDAC; + info->BiosConnector[0].TMDSType = TMDS_INT; + info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I; + info->BiosConnector[0].valid = TRUE; + + info->BiosConnector[1].ConnectorType = CONNECTOR_STV; + info->BiosConnector[1].DACType = DAC_TVDAC; + info->BiosConnector[1].TMDSType = TMDS_NONE; + info->BiosConnector[1].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[1].valid = TRUE; + return TRUE; default: return FALSE; } @@ -2840,6 +2853,11 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn) char cpuline[50]; /* 50 should be sufficient for our purposes */ FILE *f = fopen ("/proc/cpuinfo", "r"); + /* Some macs (minis and powerbooks) use internal tmds, others use external tmds + * and not just for dual-link TMDS, it shows up with single-link as well. + * Unforunately, there doesn't seem to be any good way to figure it out. + */ + if (f != NULL) { while (fgets(cpuline, sizeof cpuline, f)) { if (!strncmp(cpuline, "machine", strlen ("machine"))) { @@ -2851,8 +2869,11 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn) break; } - if (strstr(cpuline, "PowerMac10,1") || - strstr(cpuline, "PowerMac10,2")) { + if (strstr(cpuline, "PowerMac10,1")) { + ret = RADEON_MAC_MINI_INTERNAL; + break; + } + if (strstr(cpuline, "PowerMac10,2")) { ret = RADEON_MAC_MINI; break; } @@ -2880,8 +2901,8 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn) if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Detected %s.\n", - ret == RADEON_MAC_POWERBOOK_DL ? "PowerBook with dual link DVI" : - ret == RADEON_MAC_POWERBOOK ? "PowerBook with single link DVI" : + ret == RADEON_MAC_POWERBOOK_DL ? "PowerBook with external DVI" : + ret == RADEON_MAC_POWERBOOK ? "PowerBook with integrated DVI" : ret == RADEON_MAC_IBOOK ? "iBook" : "Mac Mini"); xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -2934,6 +2955,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) info->MacModel = RADEON_MAC_POWERBOOK_DL; else if (!strncmp("powerbook", optstr, strlen("powerbook"))) info->MacModel = RADEON_MAC_POWERBOOK; + else if (!strncmp("mini-internal", optstr, strlen("mini-internal"))) + info->MacModel = RADEON_MAC_MINI_INTERNAL; else if (!strncmp("mini", optstr, strlen("mini"))) info->MacModel = RADEON_MAC_MINI; else { |