mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-06 04:48:22 +02:00
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:
parent
09c901e4bd
commit
645453ce11
2 changed files with 6 additions and 3 deletions
|
|
@ -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"))));
|
||||
|
|
|
|||
|
|
@ -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 ? \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue