summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-07-26 18:14:20 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-07-26 18:19:27 +0200
commit645453ce11f819c4e9dd9be95ce9d621dc7d466b (patch)
treeb28d1007d9145ae7d2b37d5673e58257174e1ef6
parent09c901e4bdf2bd18110f963ef3759f6759f15317 (diff)
Bug #7629: Fix for CHIP_IS_AGP getting 'restored' with non-AGP cards
Commit 2a47f6bfecea5dabcbf79d5e1aaf271f50070b89 caused the CHIP_IS_AGP flag to get 'restored' with PCI(e) cards. I can't think of a way to fix this without introducing a (otherwise redundant) CHIP_IS_PCI flag.
-rw-r--r--shared-core/radeon_cp.c8
-rw-r--r--shared-core/radeon_drv.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 299ec6a6..12ba7ba3 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1351,7 +1351,8 @@ 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))
+ else if (!(dev_priv->flags & (CHIP_IS_AGP | CHIP_IS_PCI | CHIP_IS_PCIE))
+ && !init->is_pci)
{
DRM_DEBUG("Restoring AGP flag\n");
dev_priv->flags |= CHIP_IS_AGP;
@@ -2215,9 +2216,10 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
if (drm_device_is_agp(dev))
dev_priv->flags |= CHIP_IS_AGP;
-
- if (drm_device_is_pcie(dev))
+ else if (drm_device_is_pcie(dev))
dev_priv->flags |= CHIP_IS_PCIE;
+ else
+ dev_priv->flags |= CHIP_IS_PCI;
DRM_DEBUG("%s card detected\n",
((dev_priv->flags & CHIP_IS_AGP) ? "AGP" : (((dev_priv->flags & CHIP_IS_PCIE) ? "PCIE" : "PCI"))));
diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h
index 63b5aced..ff75480a 100644
--- a/shared-core/radeon_drv.h
+++ b/shared-core/radeon_drv.h
@@ -143,6 +143,7 @@ enum radeon_chip_flags {
CHIP_HAS_HIERZ = 0x00100000UL,
CHIP_IS_PCIE = 0x00200000UL,
CHIP_NEW_MEMMAP = 0x00400000UL,
+ CHIP_IS_PCI = 0x00800000UL,
};
#define GET_RING_HEAD(dev_priv) (dev_priv->writeback_works ? \