radeon: disable AGP for certain chips if not specified until we figure it out
authorDave Airlie <airlied@redhat.com>
Sun, 2 Nov 2008 23:51:57 +0000 (09:51 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 2 Nov 2008 23:51:57 +0000 (09:51 +1000)
shared-core/radeon_cp.c

index 1c187b1..7191478 100644 (file)
@@ -2669,9 +2669,16 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
        DRM_DEBUG("%s card detected\n",
                  ((dev_priv->flags & RADEON_IS_AGP) ? "AGP" : (((dev_priv->flags & RADEON_IS_PCIE) ? "PCIE" : "PCI"))));
 
-       if ((dev_priv->flags & RADEON_IS_AGP) && (radeon_agpmode == -1)) {
-               DRM_INFO("Forcing AGP to PCI mode\n");
-               dev_priv->flags &= ~RADEON_IS_AGP;
+       if (dev_priv->flags & RADEON_IS_AGP) {
+
+               /* disable AGP for any chips after RV280 if not specified */
+               if ((dev_priv->chip_family > CHIP_RV280) && (radeon_agpmode == 0))
+                       radeon_agpmode = -1;
+
+               if (radeon_agpmode == -1) {
+                       DRM_INFO("Forcing AGP to PCI mode\n");
+                       dev_priv->flags &= ~RADEON_IS_AGP;
+               }
        }