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