xf86-video-ati: Branch 'master' - 2 commits

Dave Airlie airlied at kemper.freedesktop.org
Thu Jan 4 01:39:54 EET 2007


 man/radeon.man      |    5 +-
 src/radeon_dri.c    |    8 ++--
 src/radeon_driver.c |   95 ++++++++++++++++++++++++++--------------------------
 3 files changed, 57 insertions(+), 51 deletions(-)

New commits:
diff-tree c54a31565e3ea50f1af7b81b1bf0c0e437099f47 (from dda2bbfdc2e0da6e8b9cb8d1bf78b91f1bb8131f)
Author: Dave Airlie <airlied at linux.ie>
Date:   Thu Jan 4 10:39:01 2007 +1100

    radeon: fixup fastwrites to be always off
    
    My 8500 in i845 doesn't work with fastwrites even setup by the firmware.

diff --git a/man/radeon.man b/man/radeon.man
index b0a4f04..d8620fa 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -177,8 +177,9 @@ The default is to
 .B leave it unchanged.
 .TP
 .BI "Option \*qAGPFastWrite\*q \*q" boolean \*q
-Enable or disable AGP fast writes.  Enabling this is frequently the cause of
-instability. Used only when the DRI is enabled.
+Enable AGP fast writes.  Enabling this is frequently the cause of
+instability. Used only when the DRI is enabled. If you enable
+this option you will get *NO* support from developers.
 .br
 The default is to
 .B leave it unchanged.
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 35e4154..39c72db 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -739,8 +739,9 @@ static Bool RADEONSetAgpMode(RADEONInfoP
     from = X_DEFAULT;
 
     if (xf86GetOptValInteger(info->Options, OPTION_AGP_MODE, &info->agpMode)) {
-	if (info->agpMode < is_v3 ? 4 : 1 || info->agpMode > is_v3 ? 8 : 4 ||
-	    info->agpMode & (info->agpMode - 1)) {
+	if ((info->agpMode < (is_v3 ? 4 : 1)) ||
+            (info->agpMode > (is_v3 ? 8 : 4)) ||
+	    (info->agpMode & (info->agpMode - 1))) {
 	    xf86DrvMsg(pScreen->myNum, X_ERROR,
 		       "Illegal AGP Mode: %d (valid values: %s), leaving at "
 		       "%dx\n", info->agpMode, is_v3 ? "4, 8" : "1, 2, 4",
@@ -753,7 +754,7 @@ static Bool RADEONSetAgpMode(RADEONInfoP
 
     xf86DrvMsg(pScreen->myNum, from, "Using AGP %dx\n", info->agpMode);
 
-    info->agpFastWrite = (agp_status & RADEON_AGP_FW_MODE);
+    info->agpFastWrite = 0; // Always off by default as it sucks
 
     from = xf86GetOptValInteger(info->Options, OPTION_AGP_FW,
 				&info->agpFastWrite) ? X_CONFIG : X_DEFAULT;
@@ -794,6 +795,7 @@ static Bool RADEONSetAgpMode(RADEONInfoP
     }
 
     if (info->agpFastWrite) mode |= RADEON_AGP_FW_MODE;
+    else mode &= ~RADEON_AGP_FW_MODE;
 
     xf86DrvMsg(pScreen->myNum, X_INFO,
 	       "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n",
diff-tree dda2bbfdc2e0da6e8b9cb8d1bf78b91f1bb8131f (from 9506f7015a1e442f4ca0bd3bfae555ec7e8a5f37)
Author: Dave Airlie <airlied at linux.ie>
Date:   Thu Jan 4 10:29:54 2007 +1100

    radeon: don't touch Controller[1] on single CRTC cards.
    
    This might fix bug 9371

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 4b2f3ed..cd5a807 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2268,53 +2268,56 @@ static Bool RADEONPreInitModes(ScrnInfoP
     }
     xf86PrintModes(pScrn);
 
-    if(pRADEONEnt->Controller[1]->binding == 1) {
 
-       xf86SetCrtcForModes(info->CRT2pScrn, INTERLACE_HALVE_V);
-
-       xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-           "Modes for CRT2: ********************\n");
-
-       xf86PrintModes(info->CRT2pScrn);
-
-       info->CRT1Modes = pScrn->modes;
-       info->CRT1CurrentMode = pScrn->currentMode;
-
-       xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Generating MergedFB mode list\n");
-
-       if (info->NoVirtual) {
-           pScrn->display->virtualX = 0;
-           pScrn->display->virtualY = 0;
-       }
-       pScrn->modes = RADEONGenerateModeList(pScrn, info->MetaModes,
-	            	                  info->CRT1Modes, info->CRT2pScrn->modes,
-					  info->CRT2Position);
-
-       if(!pScrn->modes) {
-
-	  xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-	      "Failed to parse MetaModes or no modes found. MergeFB mode disabled.\n");
-	  if(info->CRT2pScrn) {
-	     if(info->CRT2pScrn->modes) {
-	        while(info->CRT2pScrn->modes)
-		   xf86DeleteMode(&info->CRT2pScrn->modes, info->CRT2pScrn->modes);
-	     }
-	     if(info->CRT2pScrn->monitor) {
-	        if(info->CRT2pScrn->monitor->Modes) {
-	           while(info->CRT2pScrn->monitor->Modes)
-		      xf86DeleteMode(&info->CRT2pScrn->monitor->Modes, info->CRT2pScrn->monitor->Modes);
-	        }
-		if(info->CRT2pScrn->monitor->DDC) xfree(info->CRT2pScrn->monitor->DDC);
-	        xfree(info->CRT2pScrn->monitor);
-	     }
-             xfree(info->CRT2pScrn);
-	     info->CRT2pScrn = NULL;
-	  }
-	  pScrn->modes = info->CRT1Modes;
-	  info->CRT1Modes = NULL;
-	  info->MergedFB = FALSE;
-
-       }
+    if (pRADEONEnt->HasCRTC2) {
+	if(pRADEONEnt->Controller[1]->binding == 1) {
+	    
+	    xf86SetCrtcForModes(info->CRT2pScrn, INTERLACE_HALVE_V);
+	    
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		       "Modes for CRT2: ********************\n");
+	    
+	    xf86PrintModes(info->CRT2pScrn);
+	    
+	    info->CRT1Modes = pScrn->modes;
+	    info->CRT1CurrentMode = pScrn->currentMode;
+	    
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Generating MergedFB mode list\n");
+	    
+	    if (info->NoVirtual) {
+		pScrn->display->virtualX = 0;
+		pScrn->display->virtualY = 0;
+	    }
+	    pScrn->modes = RADEONGenerateModeList(pScrn, info->MetaModes,
+						  info->CRT1Modes, info->CRT2pScrn->modes,
+						  info->CRT2Position);
+	    
+	    if(!pScrn->modes) {
+		
+		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+			   "Failed to parse MetaModes or no modes found. MergeFB mode disabled.\n");
+		if(info->CRT2pScrn) {
+		    if(info->CRT2pScrn->modes) {
+			while(info->CRT2pScrn->modes)
+			    xf86DeleteMode(&info->CRT2pScrn->modes, info->CRT2pScrn->modes);
+		    }
+		    if(info->CRT2pScrn->monitor) {
+			if(info->CRT2pScrn->monitor->Modes) {
+			    while(info->CRT2pScrn->monitor->Modes)
+				xf86DeleteMode(&info->CRT2pScrn->monitor->Modes, info->CRT2pScrn->monitor->Modes);
+			}
+			if(info->CRT2pScrn->monitor->DDC) xfree(info->CRT2pScrn->monitor->DDC);
+			xfree(info->CRT2pScrn->monitor);
+		    }
+		    xfree(info->CRT2pScrn);
+		    info->CRT2pScrn = NULL;
+		}
+		pScrn->modes = info->CRT1Modes;
+		info->CRT1Modes = NULL;
+		info->MergedFB = FALSE;
+		
+	    }
+	}
     }
 
     if (info->MergedFB) {



More information about the xorg-commit mailing list