diff options
author | Alex Deucher <alex@botch2.(none)> | 2008-01-08 18:43:54 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2008-01-08 18:43:54 -0500 |
commit | 2a54c6bb09ade2ec8f998dfc1624017029d47fa3 (patch) | |
tree | 4ece6889a666307988cb954dd74da6329ca414a5 | |
parent | fa3e2055225c27e25465fc46786da1b7574fd3cc (diff) |
RADEON: Make default output actually work...
-rw-r--r-- | src/radeon.h | 2 | ||||
-rw-r--r-- | src/radeon_driver.c | 28 | ||||
-rw-r--r-- | src/radeon_output.c | 24 |
3 files changed, 28 insertions, 26 deletions
diff --git a/src/radeon.h b/src/radeon.h index d16a234f..bddbc7b9 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -727,6 +727,8 @@ typedef struct { void (*PointerMoved)(int, int, int); CreateScreenResourcesProcPtr CreateScreenResources; + /* if no devices are connected at server startup */ + Bool first_load_no_devices; Bool IsSecondary; Bool IsPrimary; diff --git a/src/radeon_driver.c b/src/radeon_driver.c index d10d81be..07f96a73 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -2678,6 +2678,7 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn) RADEONPrintPortMap(pScrn); + info->first_load_no_devices = FALSE; for (i = 0; i < config->num_output; i++) { xf86OutputPtr output = config->output[i]; @@ -2694,32 +2695,7 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn) if (!found) { /* nothing connected, light up some defaults so the server comes up */ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No connected devices found!\n"); - for (i = 0; i < config->num_output; i++) { - xf86OutputPtr output = config->output[i]; - RADEONOutputPrivatePtr radeon_output = output->driver_private; - - if (info->IsMobility) { - if (radeon_output->type == OUTPUT_LVDS) { - radeon_output->MonType = MT_LCD; - output->status = XF86OutputStatusConnected; - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using LVDS default\n"); - break; - } - } else { - if (radeon_output->type == OUTPUT_VGA || - radeon_output->type == OUTPUT_DVI_I) { - radeon_output->MonType = MT_CRT; - output->status = XF86OutputStatusUnknown; - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using VGA default\n"); - break; - } else if (radeon_output->type == OUTPUT_DVI_D) { - radeon_output->MonType = MT_DFP; - output->status = XF86OutputStatusUnknown; - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using DVI default\n"); - break; - } - } - } + info->first_load_no_devices = TRUE; } ErrorF("finished all detect\n"); diff --git a/src/radeon_output.c b/src/radeon_output.c index b62eeaf7..59e01bb3 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -626,12 +626,36 @@ static xf86OutputStatus radeon_detect(xf86OutputPtr output) { ScrnInfoPtr pScrn = output->scrn; + RADEONInfoPtr info = RADEONPTR(pScrn); RADEONOutputPrivatePtr radeon_output = output->driver_private; Bool connected = TRUE; radeon_output->MonType = MT_UNKNOWN; RADEONConnectorFindMonitor(pScrn, output); + /* nothing connected, light up some defaults so the server comes up */ + if (radeon_output->MonType == MT_NONE && + info->first_load_no_devices) { + if (info->IsMobility) { + if (radeon_output->type == OUTPUT_LVDS) { + radeon_output->MonType = MT_LCD; + info->first_load_no_devices = FALSE; + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using LVDS default\n"); + } + } else { + if (radeon_output->type == OUTPUT_VGA || + radeon_output->type == OUTPUT_DVI_I) { + radeon_output->MonType = MT_CRT; + info->first_load_no_devices = FALSE; + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using VGA default\n"); + } else if (radeon_output->type == OUTPUT_DVI_D) { + radeon_output->MonType = MT_DFP; + info->first_load_no_devices = FALSE; + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Using DVI default\n"); + } + } + } + /* set montype so users can force outputs on even if detection fails */ if (radeon_output->MonType == MT_NONE) { connected = FALSE; |