xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Tue Jan 8 15:43:57 PST 2008


 src/radeon.h        |    2 ++
 src/radeon_driver.c |   28 ++--------------------------
 src/radeon_output.c |   24 ++++++++++++++++++++++++
 3 files changed, 28 insertions(+), 26 deletions(-)

New commits:
commit 2a54c6bb09ade2ec8f998dfc1624017029d47fa3
Author: Alex Deucher <alex at botch2.(none)>
Date:   Tue Jan 8 18:43:54 2008 -0500

    RADEON: Make default output actually work...

diff --git a/src/radeon.h b/src/radeon.h
index d16a234..bddbc7b 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 d10d81b..07f96a7 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 b62eeaf..59e01bb 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;


More information about the xorg-commit mailing list