f96cb2
diff -up xf86-video-ati-6.9.0/src/atipciids.h.dave xf86-video-ati-6.9.0/src/atipciids.h
f96cb2
--- xf86-video-ati-6.9.0/src/atipciids.h.dave	2008-02-19 00:41:27.000000000 +1000
f96cb2
+++ xf86-video-ati-6.9.0/src/atipciids.h	2008-10-29 16:04:14.000000000 +1000
76344a
@@ -35,8 +35,11 @@
76344a
 
76344a
 /* PCI Vendor */
76344a
 #define PCI_VENDOR_ATI			0x1002
76344a
+#define PCI_VENDOR_IBM			0x1014
76344a
 #define PCI_VENDOR_AMD			0x1022
76344a
 #define PCI_VENDOR_DELL			0x1028
76344a
+#define PCI_VENDOR_VIA			0x1106
76344a
+#define PCI_VENDOR_INTEL		0x8086
76344a
 
76344a
 #include "ati_pciids_gen.h"
76344a
 
f96cb2
diff -up xf86-video-ati-6.9.0/src/radeon_dri.c.dave xf86-video-ati-6.9.0/src/radeon_dri.c
f96cb2
--- xf86-video-ati-6.9.0/src/radeon_dri.c.dave	2008-10-29 16:03:59.000000000 +1000
f96cb2
+++ xf86-video-ati-6.9.0/src/radeon_dri.c	2008-10-29 16:04:14.000000000 +1000
f96cb2
@@ -868,6 +868,41 @@ static void RADEONDRIInitGARTValues(RADE
f96cb2
 
76344a
 }
76344a
 
76344a
+/* AGP Mode Quirk List - Certain hostbridge/gfx-card combos don't work with
76344a
+ * the standard AGPMode settings, so we detect and handle these
76344a
+ * on a case-by-base basis with quirks.  To see if an AGPMode is valid, test
76344a
+ * it by setting Option "AGPMode" "1" (or "2", or "4" or "8"). */
76344a
+typedef struct {
76344a
+    unsigned int hostbridgeVendor;
76344a
+    unsigned int hostbridgeDevice;
76344a
+    unsigned int chipVendor;
76344a
+    unsigned int chipDevice;
76344a
+    unsigned int subsysVendor;
76344a
+    unsigned int subsysDevice;
76344a
+    unsigned int defaultMode;
76344a
+} radeon_agpmode_quirk, *radeon_agpmode_quirk_ptr;
76344a
+
76344a
+/* Keep sorted by hostbridge vendor and device */
76344a
+static radeon_agpmode_quirk radeon_agpmode_quirk_list[] = {
76344a
+
76344a
+    /* Intel 82865G/PE/P DRAM Controller/Host-Hub / Mobility 9800 Needs AGPMode 4 (deb #462590) */
76344a
+    { PCI_VENDOR_INTEL,0x2570,  PCI_VENDOR_ATI,0x4a4e,  PCI_VENDOR_DELL,0x5106,  4 },
76344a
+    /* Intel 82855PM Processor to I/O Controller / Mobility M6 LY Needs AGPMode 1 (deb #467235) */
76344a
+    { PCI_VENDOR_INTEL,0x3340,  PCI_VENDOR_ATI,0x4c59,  0x1014,0x052f,   1},
76344a
+    /* Intel 82830 830 Chipset Host Bridge / Mobility M6 LY Needs AGPMode 2 (fdo #17360)*/
76344a
+    { PCI_VENDOR_INTEL,0x3575,  PCI_VENDOR_ATI,0x4c59,  PCI_VENDOR_DELL,0x00e3,  2 },
76344a
+    /* Intel 82852/82855 host bridge / Mobility 9600 M10 RV350 Needs AGPMode 1 (deb #467460) */
76344a
+    { PCI_VENDOR_INTEL,0x3580,  PCI_VENDOR_ATI,0x4e50,  0x1025,0x0061,  1 },
76344a
+
76344a
+    /* ASRock K7VT4A+ AGP 8x / ATI Radeon 9250 AGP Needs AGPMode 4 (LP: #133192) */
76344a
+    { 0x1849,0x3189,            PCI_VENDOR_ATI,0x5960,  0x1787, 0x5960,          4},
76344a
+
76344a
+    /* VIA VT8377 Host Bridge / R200 QM [Radeon 9100] Needs AGPMode 4 (deb #461144) */
76344a
+    { 0x1106,0x3189,            PCI_VENDOR_ATI,0x514d,  0x174b,0x7149,           4 },
76344a
+
76344a
+    { 0, 0, 0, 0, 0, 0, 0 },
76344a
+};
76344a
+
76344a
 /* Set AGP transfer mode according to requests and constraints */
76344a
 static Bool RADEONSetAgpMode(RADEONInfoPtr info, ScreenPtr pScreen)
76344a
 {
f96cb2
@@ -890,6 +925,21 @@ static Bool RADEONSetAgpMode(RADEONInfoP
76344a
 	else defaultMode = 1;
76344a
     }
76344a
 
76344a
+    /* Apply AGPMode Quirks */
76344a
+    radeon_agpmode_quirk_ptr p = radeon_agpmode_quirk_list;
76344a
+    while (p && p->chipDevice != 0) {
76344a
+        if (vendor == p->hostbridgeVendor &&
76344a
+            device == p->hostbridgeDevice &&
76344a
+            PCI_DEV_VENDOR_ID(info->PciInfo) == p->chipVendor &&
76344a
+            PCI_DEV_DEVICE_ID(info->PciInfo) == p->chipDevice &&
76344a
+            PCI_SUB_VENDOR_ID(info->PciInfo) == p->subsysVendor &&
76344a
+            PCI_SUB_DEVICE_ID(info->PciInfo) == p->subsysDevice)
76344a
+        {
76344a
+            defaultMode = p->defaultMode;
76344a
+        }
76344a
+        ++p;
76344a
+    }
76344a
+
76344a
     from = X_DEFAULT;
76344a
 
76344a
     if (xf86GetOptValInteger(info->Options, OPTION_AGP_MODE, &info->dri->agpMode)) {