From 6ff57e2d7cd0b9b513070f72ffd894e8d6f57149 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 Sep 2005 06:35:09 +0000 Subject: fix pci overriding from userspace --- shared-core/radeon_cp.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shared-core/radeon_cp.c') diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index 655803e4..f3c5ecfa 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -1304,6 +1304,12 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) drm_radeon_private_t *dev_priv = dev->dev_private; DRM_DEBUG("\n"); + if (init->is_pci && (dev_priv->flags & CHIP_IS_AGP)) + { + DRM_DEBUG("Forcing AGP card to PCI mode\n"); + dev_priv->flags &= ~CHIP_IS_AGP; + } + if ((!(dev_priv->flags & CHIP_IS_AGP)) && !dev->sg) { DRM_ERROR("PCI GART memory not allocated!\n"); radeon_do_cleanup_cp(dev); -- cgit v1.2.3