Make sure CHIP_IS_AGP flag is set when not overriding to PCI mode.
authorMichel Dänzer <michel@tungstengraphics.com>
Wed, 19 Jul 2006 17:16:26 +0000 (19:16 +0200)
committerMichel Dänzer <michel@tungstengraphics.com>
Wed, 19 Jul 2006 17:16:26 +0000 (19:16 +0200)
This allows using AGP after overriding to PCI mode in a previous session
without reloading the DRM.

shared-core/radeon_cp.c

index 54763fc..5f953a4 100644 (file)
@@ -1351,6 +1351,11 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
                DRM_DEBUG("Forcing AGP card to PCI mode\n");
                dev_priv->flags &= ~CHIP_IS_AGP;
        }
+       else if (!(dev_priv->flags & CHIP_IS_AGP))
+       {
+               DRM_DEBUG("Restoring AGP flag\n");
+               dev_priv->flags |= CHIP_IS_AGP;
+       }
 
        if ((!(dev_priv->flags & CHIP_IS_AGP)) && !dev->sg) {
                DRM_ERROR("PCI GART memory not allocated!\n");