Bug #7629: Fix for CHIP_IS_AGP getting 'restored' with non-AGP cards

Commit 2a47f6bfec 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.
This commit is contained in:
Michel Dänzer 2006-07-26 18:14:20 +02:00
parent 09c901e4bd
commit 645453ce11
2 changed files with 6 additions and 3 deletions

View file

@ -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"))));

View file

@ -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 ? \