diff options
author | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-05-26 15:49:11 -0400 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-05-26 15:49:11 -0400 |
commit | 089ae4afd23322bf602d340c531c36a4c8b461ed (patch) | |
tree | 8b17e52506d76c9af3397f85cb8ffda2d0f89e68 | |
parent | c4cef0c9481257a744ac99dfc7beb988ce51a8ee (diff) |
RADEON: Switch SetOutputType() to use names rather than numbers
-rw-r--r-- | src/radeon_output.c | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index c65798d..a5b3790 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -569,32 +569,45 @@ void RADEONSetOutputType(ScrnInfoPtr pScrn, RADEONOutputPrivatePtr radeon_output { RADEONInfoPtr info = RADEONPTR (pScrn); RADEONOutputType output; + if (info->IsAtomBios) { switch(radeon_output->ConnectorType) { - case 0: output = OUTPUT_NONE; break; - case 1: output = OUTPUT_VGA; break; - case 2: - case 3: - case 4: output = OUTPUT_DVI; break; - case 5: output = OUTPUT_STV; break; - case 6: output = OUTPUT_CTV; break; - case 7: - case 8: output = OUTPUT_LVDS; break; - case 9: + case CONNECTOR_VGA_ATOM: + output = OUTPUT_VGA; break; + case CONNECTOR_DVI_I_ATOM: + case CONNECTOR_DVI_D_ATOM: + case CONNECTOR_DVI_A_ATOM: + output = OUTPUT_DVI; break; + case CONNECTOR_STV_ATOM: + output = OUTPUT_STV; break; + case CONNECTOR_CTV_ATOM: + output = OUTPUT_CTV; break; + case CONNECTOR_LVDS_ATOM: + case CONNECTOR_DIGITAL_ATOM: + output = OUTPUT_LVDS; break; + case CONNECTOR_NONE_ATOM: + case CONNECTOR_UNSUPPORTED_ATOM: default: output = OUTPUT_NONE; break; } } else { switch(radeon_output->ConnectorType) { - case 0: output = OUTPUT_NONE; break; - case 1: output = OUTPUT_LVDS; break; - case 2: output = OUTPUT_VGA; break; - case 3: - case 4: output = OUTPUT_DVI; break; - case 5: output = OUTPUT_STV; break; - case 6: output = OUTPUT_CTV; break; - default: output = OUTPUT_NONE; break; + case CONNECTOR_PROPRIETARY: + output = OUTPUT_LVDS; break; + case CONNECTOR_CRT: + output = OUTPUT_VGA; break; + case CONNECTOR_DVI_I: + case CONNECTOR_DVI_D: + output = OUTPUT_DVI; break; + case CONNECTOR_CTV: + output = OUTPUT_STV; break; + case CONNECTOR_STV: + output = OUTPUT_CTV; break; + case CONNECTOR_NONE: + case CONNECTOR_UNSUPPORTED: + default: + output = OUTPUT_NONE; break; } } radeon_output->type = output; |