xf86-video-ati: Branch 'master'

Luc Verhaegen libv at kemper.freedesktop.org
Thu Aug 9 03:12:30 PDT 2007


 src/radeon.h     |    1 -
 src/radeon_dri.c |   44 ++++++++++++++++++++------------------------
 2 files changed, 20 insertions(+), 25 deletions(-)

New commits:
diff-tree d0895f67e327bb268fd59fcfd8fc22678d804f57 (from 1de52d91ff3a04b9b587b858e1e5be40d3a7fd0a)
Author: Luc Verhaegen <libv at skynet.be>
Date:   Thu Aug 9 12:11:40 2007 +0200

    AGPFastWrite risk reduction.
    
    Actively warn the user in the log about the effects of AGPFastWrite and
    sanitise AGPFastWrite handling while we're here.

diff --git a/src/radeon.h b/src/radeon.h
index 5f3f4ab..b19b017 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -611,7 +611,6 @@ typedef struct {
     unsigned long     gartOffset;
     unsigned char     *AGP;             /* Map */
     int               agpMode;
-    int               agpFastWrite;
 
     CARD32            pciCommand;
 
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 11f7140..315b204 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -748,28 +748,6 @@ static Bool RADEONSetAgpMode(RADEONInfoP
 
     xf86DrvMsg(pScreen->myNum, from, "Using AGP %dx\n", info->agpMode);
 
-    info->agpFastWrite = 0; // Always off by default as it sucks
-
-    from = xf86GetOptValInteger(info->Options, OPTION_AGP_FW,
-				&info->agpFastWrite) ? X_CONFIG : X_DEFAULT;
-
-    if (info->agpFastWrite &&
-	(vendor == PCI_VENDOR_AMD) &&
-	(device == PCI_CHIP_AMD761)) {
-
-	/* Disable fast write for AMD 761 chipset, since they cause
-	 * lockups when enabled.
-	 */
-	info->agpFastWrite = FALSE;
-	from = X_DEFAULT;
-	xf86DrvMsg(pScreen->myNum, X_WARNING,
-		   "[agp] Not enabling Fast Writes on AMD 761 chipset to avoid "
-		   "lockups");
-    }
-
-    xf86DrvMsg(pScreen->myNum, from, "AGP Fast Writes %sabled\n",
-	       info->agpFastWrite ? "en" : "dis");
-
     mode &= ~RADEON_AGP_MODE_MASK;
     if (is_v3) {
 	/* only set one mode bit for AGPv3 */
@@ -788,8 +766,26 @@ static Bool RADEONSetAgpMode(RADEONInfoP
 	}
     }
 
-    if (info->agpFastWrite) mode |= RADEON_AGP_FW_MODE;
-    else mode &= ~RADEON_AGP_FW_MODE;
+    /* AGP Fast Writes.
+     * TODO: take into account that certain agp modes don't support fast
+     * writes at all */
+    mode &= ~RADEON_AGP_FW_MODE; /* Disable per default */
+    if (xf86ReturnOptValBool(info->Options, OPTION_AGP_FW, FALSE)) {
+	xf86DrvMsg(pScreen->myNum, X_WARNING,
+		   "WARNING: Using the AGPFastWrite option is not recommended.\n");
+	xf86Msg(X_NONE, "\tThis option does not provide much of a noticable speed"
+		" boost, while it\n\twill probably hard lock your machine."
+		" All bets are off!\n");
+
+	/* Black list some host/AGP bridges. */
+	if ((vendor == PCI_VENDOR_AMD) && (device == PCI_CHIP_AMD761))
+	    xf86DrvMsg(pScreen->myNum, X_PROBED, "Ignoring AGPFastWrite option "
+		       "for the AMD 761 northbridge.\n");
+	else {
+	    xf86DrvMsg(pScreen->myNum, X_CONFIG, "Enabling AGP Fast Writes.\n");
+	    mode |= RADEON_AGP_FW_MODE;
+	}
+    } /* Don't mention this otherwise, so that people don't get funny ideas */
 
     xf86DrvMsg(pScreen->myNum, X_INFO,
 	       "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n",


More information about the xorg-commit mailing list