xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Tue Feb 23 08:43:51 PST 2010


 src/radeon_driver.c |   28 +++++++++++++++++-----------
 src/radeon_output.c |    4 ++++
 2 files changed, 21 insertions(+), 11 deletions(-)

New commits:
commit 1b7e9a2e50f77819b3aff4e37ba39eaec69ff932
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Tue Feb 23 11:39:55 2010 -0500

    radeon: fixes for zaphodheads option
    
    Needed for systems with more than two outputs.
    Both KMS and non-KMS zaphod work on systems with
    more than two outputs now.

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index c97be4f..9a4cb9a 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2832,22 +2832,29 @@ static void RADEONFixZaphodOutputs(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr info = RADEONPTR(pScrn);
     xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(pScrn);
+    xf86OutputPtr output;
     int o;
     char *s;
 
     if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) {
 	for (o = 0; o < config->num_output; o++) {
-	    if (!RADEONZaphodStringMatches(pScrn, info->IsPrimary, s, config->output[o]->name))
-		xf86OutputDestroy(config->output[o]);
+	    if (RADEONZaphodStringMatches(pScrn, info->IsPrimary, s, config->output[o]->name))
+		output = config->output[o];
+	}
+	while (config->num_output > 1) {
+	    if (config->output[0] != output)
+		xf86OutputDestroy(config->output[0]);
+	    else if (config->output[1] != output)
+		xf86OutputDestroy(config->output[1]);
 	}
     } else {
 	if (info->IsPrimary) {
 	    xf86OutputDestroy(config->output[0]);
-	    while(config->num_output > 1) {
+	    while (config->num_output > 1) {
 		xf86OutputDestroy(config->output[1]);
 	    }
 	} else {
-	    while(config->num_output > 1) {
+	    while (config->num_output > 1) {
 		xf86OutputDestroy(config->output[1]);
 	    }
 	}
@@ -2862,12 +2869,14 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn)
     int mask;
     int found = 0;
 
-    if (!info->IsPrimary && !info->IsSecondary)
-	mask = 3;
-    else if (info->IsPrimary)
+    if (info->IsPrimary)
 	mask = 1;
-    else
+    else if (info->IsSecondary)
 	mask = 2;
+    else
+	mask = 3;
+
+    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mask: %d\n", mask);
 
     if (!RADEONAllocateControllers(pScrn, mask))
 	return FALSE;
@@ -3161,9 +3170,6 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags)
     if (!RADEONPreInitControllers(pScrn))
        goto fail;
 
-
-    ErrorF("before xf86InitialConfiguration\n");
-
     if (!xf86InitialConfiguration (pScrn, FALSE))
    {
       xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 49df82f..7b28523 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -2736,6 +2736,10 @@ radeon_output_clones (ScrnInfoPtr pScrn, xf86OutputPtr output)
     int			o;
     int			index_mask = 0;
 
+    /* no cloning with zaphod */
+    if (info->IsPrimary || info->IsSecondary)
+	return index_mask;
+
     /* DIG routing gets problematic */
     if (info->ChipFamily >= CHIP_FAMILY_R600)
 	return index_mask;


More information about the xorg-commit mailing list