diff options
author | Alex Deucher <alex@botch2.com> | 2007-08-05 16:13:39 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.com> | 2007-08-05 16:13:39 -0400 |
commit | 3752808d6c08a9727370ef8d79088e787791e131 (patch) | |
tree | 93dbe431eddf1801b9eed7f832374a0691d72155 /src/radeon_output.c | |
parent | b4ec3e436afb5bc99ec755cbd96eee9a1ec492a5 (diff) |
RADEON: Always set MonType in radeon_detect()
- Always set the the MonType in radeon detect even if no
monitor is detected so users can still force disconnected
outputs on. For DVI-I users will have to set the
dvi_monitor_type attribute to force digital or analog,
everything else should just work.
Diffstat (limited to 'src/radeon_output.c')
-rw-r--r-- | src/radeon_output.c | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/src/radeon_output.c b/src/radeon_output.c index 1bbc73e..7a26d43 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -1035,13 +1035,12 @@ radeon_detect(xf86OutputPtr output) ScrnInfoPtr pScrn = output->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); RADEONOutputPrivatePtr radeon_output = output->driver_private; + Bool connected = TRUE; - /* assume tv is connected for now */ + /* assume tv is disconnected for now */ if (radeon_output->type == OUTPUT_STV) { - /*radeon_output->MonType = MT_STV;*/ radeon_output->MonType = MT_NONE; } else if (radeon_output->type == OUTPUT_CTV) { - /*radeon_output->MonType = MT_CTV;*/ radeon_output->MonType = MT_NONE; } else { radeon_output->MonType = MT_UNKNOWN; @@ -1050,25 +1049,36 @@ radeon_detect(xf86OutputPtr output) /* force montype based on output property */ if (radeon_output->type == OUTPUT_DVI) { + if (radeon_output->MonType == MT_NONE) + connected = FALSE; if ((info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_DVI_I_ATOM) || (!info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_DVI_I)) { - if (radeon_output->MonType > MT_NONE) { - if (radeon_output->DVIType == DVI_ANALOG) - radeon_output->MonType = MT_CRT; - else if (radeon_output->DVIType == DVI_DIGITAL) - radeon_output->MonType = MT_DFP; - } + if (radeon_output->DVIType == DVI_ANALOG) + radeon_output->MonType = MT_CRT; + else if (radeon_output->DVIType == DVI_DIGITAL) + radeon_output->MonType = MT_DFP; } } + /* set montype so users can force outputs on even if detection fails */ + if (radeon_output->MonType == MT_NONE) { + connected = FALSE; + if (radeon_output->type == OUTPUT_LVDS) + radeon_output->MonType = MT_LCD; + else if (radeon_output->type == OUTPUT_VGA) + radeon_output->MonType = MT_CRT; + else if (radeon_output->type == OUTPUT_STV) + radeon_output->MonType = MT_STV; + else if (radeon_output->type == OUTPUT_CTV) + radeon_output->MonType = MT_CTV; + else if ((info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_DVI_D_ATOM) || + (!info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_DVI_D)) + radeon_output->MonType = MT_DFP; + } if (radeon_output->MonType == MT_UNKNOWN) { output->subpixel_order = SubPixelUnknown; return XF86OutputStatusUnknown; - } - else if (radeon_output->MonType == MT_NONE) { - output->subpixel_order = SubPixelUnknown; - return XF86OutputStatusDisconnected; } else { switch(radeon_output->MonType) { @@ -1080,8 +1090,11 @@ radeon_detect(xf86OutputPtr output) output->subpixel_order = SubPixelNone; break; } - - return XF86OutputStatusConnected; + + if (connected) + return XF86OutputStatusConnected; + else + return XF86OutputStatusDisconnected; } } |